From b39089e3e900353e31d93fec75b93ad05e747cdb Mon Sep 17 00:00:00 2001 From: dyson Date: Thu, 17 Jul 1997 04:34:03 +0000 Subject: Add support for 4MB pages. This includes the .text, .data, .data parts of the kernel, and also most of the dynamic parts of the kernel. Additionally, 4MB pages will be allocated for display buffers as appropriate (only.) The 4MB support for SMP isn't complete, but doesn't interfere with operation either. --- sys/vm/pmap.h | 3 ++- sys/vm/vm_mmap.c | 12 ++++++++---- 2 files changed, 10 insertions(+), 5 deletions(-) (limited to 'sys/vm') diff --git a/sys/vm/pmap.h b/sys/vm/pmap.h index 7a7233f..fa9c1bf 100644 --- a/sys/vm/pmap.h +++ b/sys/vm/pmap.h @@ -61,7 +61,7 @@ * any improvements or extensions that they make and grant Carnegie the * rights to redistribute these changes. * - * $Id: pmap.h,v 1.19 1997/02/22 09:48:04 peter Exp $ + * $Id: pmap.h,v 1.20 1997/04/13 01:48:33 dyson Exp $ */ /* @@ -130,6 +130,7 @@ void pmap_dispose_proc __P((struct proc *p)); void pmap_swapout_proc __P((struct proc *p)); void pmap_swapin_proc __P((struct proc *p)); void pmap_activate __P((struct proc *p)); +vm_offset_t pmap_addr_hint __P((vm_object_t obj, vm_offset_t addr, vm_size_t size)); #endif /* KERNEL */ diff --git a/sys/vm/vm_mmap.c b/sys/vm/vm_mmap.c index 2bed05f..27e83a7 100644 --- a/sys/vm/vm_mmap.c +++ b/sys/vm/vm_mmap.c @@ -38,7 +38,7 @@ * from: Utah $Hdr: vm_mmap.c 1.6 91/10/21$ * * @(#)vm_mmap.c 8.4 (Berkeley) 1/12/94 - * $Id: vm_mmap.c,v 1.63 1997/03/23 03:37:53 bde Exp $ + * $Id: vm_mmap.c,v 1.64 1997/06/15 23:35:32 dyson Exp $ */ /* @@ -946,7 +946,8 @@ vm_mmap(map, addr, size, prot, maxprot, flags, handle, foff) if (handle == NULL) { object = NULL; } else { - object = vm_pager_allocate(type, handle, OFF_TO_IDX(objsize), prot, foff); + object = vm_pager_allocate(type, + handle, OFF_TO_IDX(objsize), prot, foff); if (object == NULL) return (type == OBJT_DEVICE ? EINVAL : ENOMEM); } @@ -972,10 +973,13 @@ vm_mmap(map, addr, size, prot, maxprot, flags, handle, foff) maxprot |= VM_PROT_EXECUTE; #endif + if (fitit) { + *addr = pmap_addr_hint(object, *addr, size); + } + rv = vm_map_find(map, object, foff, addr, size, fitit, prot, maxprot, docow); - if (rv != KERN_SUCCESS) { /* * Lose the object reference. Will destroy the @@ -989,7 +993,7 @@ vm_mmap(map, addr, size, prot, maxprot, flags, handle, foff) /* * "Pre-fault" resident pages. */ - if ((type == OBJT_VNODE) && (map->pmap != NULL) && (object != NULL)) { + if ((map->pmap != NULL) && (object != NULL)) { pmap_object_init_pt(map->pmap, *addr, object, (vm_pindex_t) OFF_TO_IDX(foff), size, 1); } -- cgit v1.1