Catch up with changes in the common vm code.
This commit is contained in:
parent
1c7ffbcc19
commit
c0af07f1b6
|
@ -101,7 +101,6 @@
|
|||
#include <vm/vm.h>
|
||||
#include <vm/vm_param.h>
|
||||
#include <vm/lock.h>
|
||||
#include <vm/vm_statistics.h>
|
||||
#include <vm/pmap.h>
|
||||
#include <vm/vm_prot.h>
|
||||
|
||||
|
@ -163,17 +162,18 @@ mmrw(dev, uio, flags)
|
|||
/* minor device 1 is kernel memory */
|
||||
case 1:
|
||||
c = MIN(iov->iov_len, MAXPHYS);
|
||||
if (!kernacc((caddr_t)uio->uio_offset, c,
|
||||
if (!kernacc((caddr_t)(long)uio->uio_offset, c,
|
||||
uio->uio_rw == UIO_READ ? B_READ : B_WRITE))
|
||||
return (EFAULT);
|
||||
error = uiomove((caddr_t)uio->uio_offset, (int)c, uio);
|
||||
error = uiomove((caddr_t)(long)uio->uio_offset, (int)c, uio);
|
||||
continue;
|
||||
|
||||
/* minor device 2 is EOF/RATHOLE */
|
||||
case 2:
|
||||
if (uio->uio_rw == UIO_WRITE)
|
||||
uio->uio_resid = 0;
|
||||
return (0);
|
||||
if (uio->uio_rw == UIO_READ)
|
||||
return (0);
|
||||
c = iov->iov_len;
|
||||
break;
|
||||
|
||||
/* minor device 11 (/dev/eeprom) accesses Non-Volatile RAM */
|
||||
case 11:
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Header: /cvsroot/src/sys/arch/sun3/sun3/pmap.c,v 1.21 1994/05/02 05:46:12 glass Exp $
|
||||
* $Header: /cvsroot/src/sys/arch/sun3/sun3/pmap.c,v 1.22 1994/05/04 05:47:10 gwr Exp $
|
||||
*/
|
||||
#include <sys/systm.h>
|
||||
#include <sys/param.h>
|
||||
|
@ -39,7 +39,6 @@
|
|||
#include <vm/vm.h>
|
||||
#include <vm/vm_kern.h>
|
||||
#include <vm/vm_page.h>
|
||||
#include <vm/vm_statistics.h>
|
||||
|
||||
#include <machine/pte.h>
|
||||
#include <machine/control.h>
|
||||
|
@ -102,8 +101,13 @@ vm_offset_t avail_start, avail_end;
|
|||
#define NKSEG (NSEGMAP - (KERNBASE / NBSG)) /* is KERNBASE ok? */
|
||||
#define NUSEG (NSEGMAP-NKSEG)
|
||||
|
||||
/*
|
||||
* Note that PMAP_LOCK is used in routines called at splnet() and
|
||||
* MUST NOT lower the priority. For this reason we arrange that:
|
||||
* splimp = max(splnet,splbio)
|
||||
* Would splvm() be more natural here? (same level as splimp).
|
||||
*/
|
||||
#define splpmap splimp
|
||||
|
||||
#define PMAP_LOCK() s = splpmap()
|
||||
#define PMAP_UNLOCK() splx(s)
|
||||
|
||||
|
@ -956,11 +960,10 @@ void pmap_common_init(pmap)
|
|||
void pmap_bootstrap()
|
||||
{
|
||||
vm_offset_t temp_seg, va, eva, pte;
|
||||
extern vm_size_t page_size;
|
||||
extern void vm_set_page_size();
|
||||
unsigned int sme;
|
||||
|
||||
page_size = NBPG;
|
||||
PAGE_SIZE = NBPG;
|
||||
vm_set_page_size();
|
||||
|
||||
sun3_protection_init();
|
||||
|
|
Loading…
Reference in New Issue