1*962a341dSjym /* $NetBSD: kvm_m68k.h,v 1.6 2010/09/20 23:23:16 jym Exp $ */ 295883471Sgwr 395883471Sgwr /*- 495883471Sgwr * Copyright (c) 1997 The NetBSD Foundation, Inc. 595883471Sgwr * All rights reserved. 695883471Sgwr * 795883471Sgwr * This code is derived from software contributed to The NetBSD Foundation 8b6c0c9a2Sthorpej * by Gordon W. Ross and Jason R. Thorpe. 995883471Sgwr * 1095883471Sgwr * Redistribution and use in source and binary forms, with or without 1195883471Sgwr * modification, are permitted provided that the following conditions 1295883471Sgwr * are met: 1395883471Sgwr * 1. Redistributions of source code must retain the above copyright 1495883471Sgwr * notice, this list of conditions and the following disclaimer. 1595883471Sgwr * 2. Redistributions in binary form must reproduce the above copyright 1695883471Sgwr * notice, this list of conditions and the following disclaimer in the 1795883471Sgwr * documentation and/or other materials provided with the distribution. 1895883471Sgwr * 1995883471Sgwr * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS 2095883471Sgwr * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 2195883471Sgwr * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 2295883471Sgwr * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 2395883471Sgwr * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 2495883471Sgwr * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 2595883471Sgwr * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 2695883471Sgwr * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 2795883471Sgwr * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 2895883471Sgwr * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 2995883471Sgwr * POSSIBILITY OF SUCH DAMAGE. 3095883471Sgwr */ 3195883471Sgwr 3295883471Sgwr struct kvm_ops { 336dc46b92Sjym int (*initvtop)(kvm_t *); 346dc46b92Sjym void (*freevtop)(kvm_t *); 35*962a341dSjym int (*kvatop) (kvm_t *, vaddr_t, paddr_t *); 36*962a341dSjym off_t (*pa2off) (kvm_t *, paddr_t); 3795883471Sgwr }; 3895883471Sgwr 39b6c0c9a2Sthorpej struct vmstate { 40b6c0c9a2Sthorpej struct kvm_ops *ops; /* ops vector */ 41b6c0c9a2Sthorpej u_int32_t pgshift; /* log2(page_size) */ 42b6c0c9a2Sthorpej u_int32_t pgofset; /* mask to find offset into page */ 43b6c0c9a2Sthorpej void *private; /* private to the bottom layer */ 44b6c0c9a2Sthorpej }; 45b6c0c9a2Sthorpej 4695883471Sgwr extern struct kvm_ops _kvm_ops_cmn; 47f82a63dfSfredette extern struct kvm_ops _kvm_ops_sun2; 4895883471Sgwr extern struct kvm_ops _kvm_ops_sun3; 4995883471Sgwr extern struct kvm_ops _kvm_ops_sun3x; 50