summaryrefslogtreecommitdiff
path: root/Kernel/Interrupts/APIC.cpp
diff options
context:
space:
mode:
authorIdan Horowitz <idan.horowitz@gmail.com>2021-12-19 19:36:42 +0200
committerBrian Gianforcaro <b.gianfo@gmail.com>2021-12-22 00:02:36 -0800
commit5f4a67434cdd1c9b85e925a8815130b585bd548c (patch)
treed9164c2814d8b38bacc557afcc942ccf03a193bf /Kernel/Interrupts/APIC.cpp
parentfccd0432a13b17a85cea3dbd48ee7999159f31a9 (diff)
downloadserenity-5f4a67434cdd1c9b85e925a8815130b585bd548c.zip
Kernel: Move userspace virtual address range base to 0x10000
Now that the shared bottom 2 MiB virtual address mappings are gone userspace can use lower virtual addresses.
Diffstat (limited to 'Kernel/Interrupts/APIC.cpp')
-rw-r--r--Kernel/Interrupts/APIC.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/Kernel/Interrupts/APIC.cpp b/Kernel/Interrupts/APIC.cpp
index 4efc9d007b..a73f4ff3bf 100644
--- a/Kernel/Interrupts/APIC.cpp
+++ b/Kernel/Interrupts/APIC.cpp
@@ -333,6 +333,7 @@ UNMAP_AFTER_INIT void APIC::setup_ap_boot_environment()
// * aps_to_enable u32 values for ap_cpu_init_stacks
// * aps_to_enable u32 values for ap_cpu_init_processor_info_array
constexpr u64 apic_startup_region_base = 0x8000;
+ VERIFY(apic_startup_region_base + apic_ap_start_size < USER_RANGE_BASE);
auto apic_startup_region = create_identity_mapped_region(PhysicalAddress(apic_startup_region_base), Memory::page_round_up(apic_ap_start_size + (2 * aps_to_enable * sizeof(u32))));
memcpy(apic_startup_region->vaddr().as_ptr(), reinterpret_cast<const void*>(apic_ap_start), apic_ap_start_size);