mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 23:47:45 +00:00
Kernel: Move create_identity_mapped_region() to MemoryManager
This had no business being in RegionTree, since RegionTree doesn't track identity-mapped regions anyway. (We allow *any* address to be identity mapped, not just the ones that are part of the RegionTree's range.)
This commit is contained in:
parent
3dbb4bc3a6
commit
e0da8da657
5 changed files with 12 additions and 13 deletions
|
@ -332,7 +332,7 @@ UNMAP_AFTER_INIT void APIC::setup_ap_boot_environment()
|
|||
constexpr u64 apic_startup_region_base = 0x8000;
|
||||
auto apic_startup_region_size = Memory::page_round_up(apic_ap_start_size + (2 * aps_to_enable * sizeof(FlatPtr))).release_value_but_fixme_should_propagate_errors();
|
||||
VERIFY(apic_startup_region_size < USER_RANGE_BASE);
|
||||
auto apic_startup_region = MUST(MM.region_tree().create_identity_mapped_region(PhysicalAddress(apic_startup_region_base), apic_startup_region_size));
|
||||
auto apic_startup_region = MUST(MM.create_identity_mapped_region(PhysicalAddress(apic_startup_region_base), apic_startup_region_size));
|
||||
u8* apic_startup_region_ptr = apic_startup_region->vaddr().as_ptr();
|
||||
memcpy(apic_startup_region_ptr, reinterpret_cast<void const*>(apic_ap_start), apic_ap_start_size);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue