From 0ef8bca36fdf3c57c90c948a4894c4baf5e0c3fd Mon Sep 17 00:00:00 2001 From: Samuel Thibault Date: Sat, 24 Mar 2012 02:59:16 +0100 Subject: Make sure BIOS area is mapped in kernel threads * i386/i386at/model_dep.c (i386at_init): Map BIOS memory at 0. * i386/intel/pmap.c (pmap_create): Do not map BIOS memory in user tasks. --- i386/intel/pmap.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'i386/intel/pmap.c') diff --git a/i386/intel/pmap.c b/i386/intel/pmap.c index d8865b2..f0623de 100644 --- a/i386/intel/pmap.c +++ b/i386/intel/pmap.c @@ -1128,6 +1128,12 @@ pmap_t pmap_create(size) panic("pmap_create"); memcpy(p->dirbase, kernel_page_dir, PDPNUM * INTEL_PGBYTES); +#ifdef LINUX_DEV +#if VM_MIN_KERNEL_ADDRESS != 0 + /* Do not map BIOS in user tasks */ + p->dirbase[lin2pdenum(LINEAR_MIN_KERNEL_ADDRESS - VM_MIN_KERNEL_ADDRESS)] = 0; +#endif +#endif #ifdef MACH_XEN { int i; -- cgit v1.2.3