summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2021-03-31 00:15:28 +0200
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2021-03-31 00:17:31 +0200
commit66b55623f3072ec000b01577b93a94cf387c16c8 (patch)
tree0aea358da57bc6f87e624efb1d96635a34f4796e
parent5ca43778aa584b56fdc25d16354b1de142fc31b5 (diff)
Keep BIOS mapped even without Linux
Not only Linux drivers need BIOS mapped. * i386/i386at/model_dep.c (i386at_init) [!LINUX_DEV]: Map the low memory. * i386/intel/pmap.c (pmap_create) [!LINUX_DEV]: Likewise.
-rw-r--r--i386/i386at/model_dep.c6
-rw-r--r--i386/intel/pmap.c2
2 files changed, 1 insertions, 7 deletions
diff --git a/i386/i386at/model_dep.c b/i386/i386at/model_dep.c
index 1e98c5c3..34045dc5 100644
--- a/i386/i386at/model_dep.c
+++ b/i386/i386at/model_dep.c
@@ -447,13 +447,11 @@ i386at_init(void)
kernel_page_dir[lin2pdenum_cont(INIT_VM_MIN_KERNEL_ADDRESS) + i] =
kernel_page_dir[lin2pdenum_cont(LINEAR_MIN_KERNEL_ADDRESS) + i];
#endif
- /* We need BIOS memory mapped at 0xc0000 & co for Linux drivers */
-#ifdef LINUX_DEV
+ /* We need BIOS memory mapped at 0xc0000 & co for BIOS accesses */
#if VM_MIN_KERNEL_ADDRESS != 0
kernel_page_dir[lin2pdenum_cont(LINEAR_MIN_KERNEL_ADDRESS - VM_MIN_KERNEL_ADDRESS)] =
kernel_page_dir[lin2pdenum_cont(LINEAR_MIN_KERNEL_ADDRESS)];
#endif
-#endif
#ifdef MACH_PV_PAGETABLES
for (i = 0; i < PDPNUM; i++)
@@ -523,12 +521,10 @@ i386at_init(void)
}
#endif
/* Keep BIOS memory mapped */
-#ifdef LINUX_DEV
#if VM_MIN_KERNEL_ADDRESS != 0
kernel_page_dir[lin2pdenum_cont(LINEAR_MIN_KERNEL_ADDRESS - VM_MIN_KERNEL_ADDRESS)] =
kernel_page_dir[lin2pdenum_cont(LINEAR_MIN_KERNEL_ADDRESS)];
#endif
-#endif
/* Not used after boot, better give it back. */
#ifdef MACH_XEN
diff --git a/i386/intel/pmap.c b/i386/intel/pmap.c
index 347474a9..d0df3181 100644
--- a/i386/intel/pmap.c
+++ b/i386/intel/pmap.c
@@ -1264,7 +1264,6 @@ pmap_t pmap_create(vm_size_t size)
INTEL_PGBYTES);
}
-#ifdef LINUX_DEV
#if VM_MIN_KERNEL_ADDRESS != 0
/* Do not map BIOS in user tasks */
page_dir
@@ -1276,7 +1275,6 @@ pmap_t pmap_create(vm_size_t size)
[lin2pdenum(LINEAR_MIN_KERNEL_ADDRESS - VM_MIN_KERNEL_ADDRESS)]
= 0;
#endif
-#endif
#ifdef MACH_PV_PAGETABLES
{
for (i = 0; i < PDPNUM; i++)