haiku/headers/private/kernel
Michael Lotz d750211a65 bootloader: Split memory map handling into add/remove passes.
The memory map may be unordered and include overlapping ranges. To make
sure that nothing gets included as usable that should actually be
excluded, first scan for all usable ranges and add them, then remove
anything unusable from these ranges again.

To calculate the amount of unusable memory, count the total after the
first pass and then subtract the total after the second. This way, only
unusable ranges that actually overlap physical memory (and therefore
reduce the amount of usable memory) get excluded.

Note that the explicit ignore of the ACPI reclaim memory is subsumed by
the above. We still don't want to add this region to the usable memory
map, as that would allow the kernel to allocate pages into that region,
possibly corrupting ACPI tables before they were used. We also don't
want to add it as an allocated range, as it is not guaranteed that ACPI
is done with the tables before the unused bootloader ranges are freed in
the kernel.

Also add the missing unusable memory amount from ignoring the first MiB
of memory in the EFI loader.

May fix #16056 although it is not certain that graphics memory ranges
are actually included in the memory map.

Change-Id: Ie7991d2c4dcd988edac2995b3a7efc509fa0f4a3
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2814
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-05-26 04:04:35 +00:00
..
arch kernel/x86: detect xsave subfeatures 2020-05-10 15:49:48 +00:00
boot bootloader: Split memory map handling into add/remove passes. 2020-05-26 04:04:35 +00:00
disk_device_manager
fs KPath: Use an object_cache for the path buffers in the normal case. 2019-07-11 22:52:10 -04:00
platform Efi: fix headers for 32 bit platforms 2020-03-28 20:03:37 +00:00
posix
slab
util kernel_cpp: Dynamic exception specifications were deprecated in C++11. 2020-03-15 17:47:09 -04:00
vm kernel/vm: Whitespace cleanup only. 2020-05-10 23:55:25 +02:00
AllocationTracking.h
AreaKeeper.h AreaKeeper.h: move to headers/private/kernel 2020-03-23 16:38:01 +00:00
block_cache.h
boot_device.h
boot_item.h
boot_splash.h
commpage_compat.h
commpage.h
condition_variable.h kernel: Rework ConditionVariableEntry destruction. 2020-03-07 21:27:05 +00:00
console.h
core_dump.h
cpu.h
debug_heap.h
debug_hex_dump.h
debug_paranoia.h
debug.h s/Haiku License/MIT License/g. 2019-08-30 18:16:02 -04:00
debugger_keymaps.h
DPC.h
elf_priv.h
elf.h
file_cache.h
frame_buffer_console.h
generic_syscall.h
heap.h
int.h
kdevice_manager.h
kdriver_settings.h
kernel_c++_structs.h
kernel_daemon.h
kernel.h
kimage.h
kmodule.h
kscheduler.h
ksignal.h
ksyscalls.h
ksystem_info.h
listeners.h
load_tracking.h
lock.h kernel/lock: Fix build under non-KDEBUG. 2020-05-17 03:36:04 +00:00
low_resource_manager.h
messaging.h
MessagingServiceDefs.h
Notifications.h
port.h
real_time_clock.h
safemode.h
scheduling_analysis.h
sem.h
smp.h smp: Make {acquire|release}_read_seqlock_inline cast explicitly. 2018-12-09 23:01:42 -05:00
syscall_restart.h
system_profiler.h
team.h kernel: Commit missing change to team.h. 2019-07-08 17:58:43 -04:00
thread_types.h kernel: Fix race condition when waiting for load of new team. 2018-12-26 23:48:41 +00:00
thread.h
timer.h
tracing.h
user_atomic.h
user_debugger.h
user_mutex.h
UserEvent.h
usergroup.h
UserTimer.h
vfs.h kernel/fs: Add support for setting custom VMCaches in vnodes. 2019-08-31 20:38:18 -04:00
wait_for_objects.h