diff options
author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2021-11-28 11:41:35 +0100 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2021-11-28 11:44:40 +0100 |
commit | 230d7726ce55114c5c32c440c5928f104a085ba6 (patch) | |
tree | 270728ff42aa3e1d6d1f213b5a7271973008041b /i386/i386at/mem.c | |
parent | 7bb961dfd808df26b9245c999b8cb4e897439019 (diff) | |
download | gnumach-230d7726ce55114c5c32c440c5928f104a085ba6.tar.gz gnumach-230d7726ce55114c5c32c440c5928f104a085ba6.tar.bz2 gnumach-230d7726ce55114c5c32c440c5928f104a085ba6.zip |
memmmap: Use biosmem_addr_available rather than vm_page_lookup_pa
The segment code actually has vm_page entries for reserved pages, and
thus memmmap would reject mapping ACPI pages. Taking the information
from biosmem is much more precise, and indeed knows all hardware quirks
which can now be dropped from memmmap.
Diffstat (limited to 'i386/i386at/mem.c')
-rw-r--r-- | i386/i386at/mem.c | 18 |
1 files changed, 1 insertions, 17 deletions
diff --git a/i386/i386at/mem.c b/i386/i386at/mem.c index 61143185..e42e995d 100644 --- a/i386/i386at/mem.c +++ b/i386/i386at/mem.c @@ -36,24 +36,8 @@ dev_t dev; vm_offset_t off; vm_prot_t prot; { - struct vm_page *p; - - if (off == 0) - return 0; - - /* - * The legacy device mappings are included in the page tables and - * need their own test. - */ - if (off >= 0xa0000 && off < 0x100000) - goto out; - - p = vm_page_lookup_pa(off); - - if (p != NULL) { + if (biosmem_addr_available(off)) return -1; - } -out: return i386_btop(off); } |