1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-18 21:45:08 +00:00

Kernel: Scan ACPI memory ranges for the RSDP table

On some systems the ACPI RSDP table may be located in ACPI reserved
memory ranges rather than in the EBDA or BIOS areas.
This commit is contained in:
Tom 2022-01-02 16:27:21 -07:00 committed by Linus Groh
parent 190572b714
commit 10efbfb09e
3 changed files with 35 additions and 1 deletions

View file

@ -174,6 +174,17 @@ UNMAP_AFTER_INIT void MemoryManager::protect_ksyms_after_init()
dmesgln("Write-protected kernel symbols after init.");
}
IterationDecision MemoryManager::for_each_physical_memory_range(Function<IterationDecision(PhysicalMemoryRange const&)> callback)
{
VERIFY(!m_physical_memory_ranges.is_empty());
for (auto& current_range : m_physical_memory_ranges) {
IterationDecision decision = callback(current_range);
if (decision != IterationDecision::Continue)
return decision;
}
return IterationDecision::Continue;
}
UNMAP_AFTER_INIT void MemoryManager::register_reserved_ranges()
{
VERIFY(!m_physical_memory_ranges.is_empty());