From e29b7797dc2aebcfb00fc08201c31ef0caf5f4d3 Mon Sep 17 00:00:00 2001 From: Richard Braun Date: Wed, 21 Sep 2016 00:36:22 +0200 Subject: Enable high memory * i386/i386at/biosmem.c (biosmem_setup): Load the HIGHMEM segment if present. (biosmem_free_usable): Report high memory as usable. * vm/vm_page.c (vm_page_boot_table_size, vm_page_table_size, vm_page_mem_size, vm_page_mem_free): Scan all segments. * vm/vm_resident.c (vm_page_grab): Describe allocation strategy with regard to the HIGHMEM segment. --- vm/vm_resident.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'vm/vm_resident.c') diff --git a/vm/vm_resident.c b/vm/vm_resident.c index e276fe68..e3e34dc3 100644 --- a/vm/vm_resident.c +++ b/vm/vm_resident.c @@ -771,6 +771,15 @@ vm_page_t vm_page_grab(void) simple_lock(&vm_page_queue_free_lock); + /* + * XXX Mach has many modules that merely assume memory is + * directly mapped in kernel space. Instead of updating all + * users, we assume those which need specific physical memory + * properties will wire down their pages, either because + * they can't be paged (not part of an object), or with + * explicit VM calls. The strategy is then to let memory + * pressure balance the physical segments with pageable pages. + */ mem = vm_page_alloc_pa(0, VM_PAGE_SEL_DIRECTMAP, VM_PT_KERNEL); if (mem == NULL) { -- cgit v1.2.3