From c06c21e47252913878c614ace8bb00ad991b2469 Mon Sep 17 00:00:00 2001 From: Adrian-Ken Rueegsegger Date: Tue, 17 Mar 2015 16:46:41 +0100 Subject: [PATCH] hw_x86_64: Add mapping for APIC MMIO to initial pt Make the local APIC accessible via its MMIO region by adding a 2 MB large page mapping at 0xfee00000 with memory type UC. Note: The mapping is added to the initial page tables to make the APIC usable prior to the activation of core's page tables, e.g. in the constructor of the timer class. --- repos/base-hw/src/core/spec/x86_64/kernel/crt0.s | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/repos/base-hw/src/core/spec/x86_64/kernel/crt0.s b/repos/base-hw/src/core/spec/x86_64/kernel/crt0.s index 2c69b887a..c5348a378 100644 --- a/repos/base-hw/src/core/spec/x86_64/kernel/crt0.s +++ b/repos/base-hw/src/core/spec/x86_64/kernel/crt0.s @@ -128,7 +128,9 @@ .p2align MIN_PAGE_SIZE_LOG2 _kernel_pdp: .quad _kernel_pd + 0xf - .fill 511, 8, 0x0 + .fill 2, 8, 0x0 + .quad _kernel_pd_503 + 0xf + .fill 508, 8, 0x0 /* PD */ .p2align MIN_PAGE_SIZE_LOG2 @@ -136,3 +138,9 @@ .quad 0 .quad 0x20018f .fill 510, 8, 0x0 + + .p2align MIN_PAGE_SIZE_LOG2 + _kernel_pd_503: + .fill 503, 8, 0x0 + .quad 0xfee0019f + .fill 8, 8, 0x0