diff options
author | Richard Braun <rbraun@sceen.net> | 2016-01-30 01:25:52 +0100 |
---|---|---|
committer | Richard Braun <rbraun@sceen.net> | 2016-01-30 01:51:48 +0100 |
commit | 945f51bfe865e122d73986dd8219762450ffc0f3 (patch) | |
tree | 858283023412ddf46f7504cad5f5aa26dbce0496 /i386/i386at/model_dep.c | |
parent | c29915fccda96258dbccf49b052ee4ddd7d51169 (diff) |
Fix early page allocation on Xen
The Xen target was completely ignored when porting the biosmem and
vm_page physical memory allocators. Let's fix this.
* i386/Makefrag.am (libkernel_a_SOURCES): Add i386/i386at/biosmem.{c,h}.
* i386/i386/vm_page.h (VM_PAGE_MAX_SEGS, VM_PAGE_DIRECTMAP_LIMIT,
VM_PAGE_HIGHMEM_LIMIT): Define for Xen.
* i386/i386at/biosmem.c: Include mach/xen.h.
(biosmem_panic_setup_msg): Comment out for Xen since it's unused.
(biosmem_map_build, biosmem_map_build_simple,
biosmem_save_cmdline_sizes, biosmem_find_boot_data_update,
biosmem_find_boot_data, biosmem_setup_allocator): Likewise.
(biosmem_bootstrap_common): New function.
(biosmem_xen_bootstrap): Likewise, for Xen.
(biosmem_bootalloc): Perform bottom-up allocations for Xen.
* i386/i386at/biosmem.h (biosmem_xen_bootstrap): New prototype, for Xen.
* i386/i386at/model_dep.c (i386at_init): Call biosmem_xen_bootstrap instead
of biosmem_bootstrap on Xen.
* i386/include/mach/i386/vm_types.h (phys_addr_t): Define as an unsigned
64-bits integer when PAE is enabled.
Diffstat (limited to 'i386/i386at/model_dep.c')
-rw-r--r-- | i386/i386at/model_dep.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/i386/i386at/model_dep.c b/i386/i386at/model_dep.c index dbb9d8b6..7638b832 100644 --- a/i386/i386at/model_dep.c +++ b/i386/i386at/model_dep.c @@ -286,7 +286,11 @@ i386at_init(void) /* * Read memory map and load it into the physical page allocator. */ +#ifdef MACH_HYP + biosmem_xen_bootstrap(); +#else /* MACH_HYP */ biosmem_bootstrap((struct multiboot_raw_info *) &boot_info); +#endif /* MACH_HYP */ #ifdef MACH_XEN kernel_cmdline = (char*) boot_info.cmd_line; |