diff options
author | Richard Braun <rbraun@sceen.net> | 2016-09-03 15:18:46 +0200 |
---|---|---|
committer | Richard Braun <rbraun@sceen.net> | 2016-09-03 16:59:04 +0200 |
commit | f6a2436d282a06e5f34789c8c5917e838fa26643 (patch) | |
tree | d04e9761ce58b7236567671bc2757ed78f319a39 /ipc/ipc_init.c | |
parent | 094cfe430457e15d34098af6a04e7f9af950d414 (diff) | |
download | gnumach-f6a2436d282a06e5f34789c8c5917e838fa26643.tar.gz gnumach-f6a2436d282a06e5f34789c8c5917e838fa26643.tar.bz2 gnumach-f6a2436d282a06e5f34789c8c5917e838fa26643.zip |
Fix early physical page allocation
Import upstream biosmem and vm_page changes, and adjust for local
modifications.
Specifically, the biosmem module was mistakenly loading physical
segments that did not clip with the heap as completely available.
This change makes it load them as completely unavailable during
startup, and once the VM system is ready, additional pages are
loaded.
* i386/i386at/biosmem.c (DEBUG): New macro.
(struct biosmem_segment): Remove members `avail_start' and `avail_end'.
(biosmem_heap_cur): Remove variable.
(biosmem_heap_bottom, biosmem_heap_top, biosmem_heap_topdown): New variables.
(biosmem_find_boot_data_update, biosmem_find_boot_data): Remove functions.
(biosmem_find_heap_clip, biosmem_find_heap): New functions.
(biosmem_setup_allocator): Rewritten to use the new biosmem_find_heap
function.
(biosmem_bootalloc): Support both bottom-up and top-down allocations.
(biosmem_directmap_size): Renamed to ...
(biosmem_directmap_end): ... this function.
(biosmem_load_segment): Fix segment loading.
(biosmem_setup): Restrict usable memory to the directmap segment.
(biosmem_free_usable_range): Add checks on input parameters.
(biosmem_free_usable_update_start, biosmem_free_usable_start,
biosmem_free_usable_reserved, biosmem_free_usable_end): Remove functions.
(biosmem_free_usable_entry): Rewritten to use the new biosmem_find_heap
function.
(biosmem_free_usable): Restrict usable memory to the directmap segment.
* i386/i386at/biosmem.h (biosmem_bootalloc): Update description.
(biosmem_directmap_size): Renamed to ...
(biosmem_directmap_end): ... this function.
(biosmem_free_usable): Update declaration.
* i386/i386at/model_dep.c (machine_init): Call biosmem_free_usable.
* vm/vm_page.c (DEBUG): New macro.
(struct vm_page_seg): New member `heap_present'.
(vm_page_load): Remove heap related parameters.
(vm_page_load_heap): New function.
* vm/vm_page.h (vm_page_load): Remove heap related parameters. Update
description.
(vm_page_load_heap): New function.
Diffstat (limited to 'ipc/ipc_init.c')
0 files changed, 0 insertions, 0 deletions