diff --git a/repos/base-hw/lib/mk/x86_64_muen/core.mk b/repos/base-hw/lib/mk/x86_64_muen/core.mk index 2c0d4bc96..6b24cce92 100644 --- a/repos/base-hw/lib/mk/x86_64_muen/core.mk +++ b/repos/base-hw/lib/mk/x86_64_muen/core.mk @@ -13,7 +13,7 @@ INC_DIR += $(REP_DIR)/src/core/include/spec/x86 # add assembly sources SRC_S += spec/x86_64/mode_transition.s SRC_S += spec/x86_64/kernel/crt0.s -SRC_S += spec/x86_64/kernel/crt0_translation_table.s +SRC_S += spec/x86_64_muen/kernel/crt0_translation_table.s SRC_S += spec/x86_64/crt0.s # add C++ sources diff --git a/repos/base-hw/src/core/spec/x86_64_muen/kernel/crt0_translation_table.s b/repos/base-hw/src/core/spec/x86_64_muen/kernel/crt0_translation_table.s new file mode 100644 index 000000000..ae9ce7ee1 --- /dev/null +++ b/repos/base-hw/src/core/spec/x86_64_muen/kernel/crt0_translation_table.s @@ -0,0 +1,52 @@ +/* + * \brief Initial pagetables for x86_64_muen + * \author Adrian-Ken Rueegsegger + * \author Reto Buerki + * \date 2015-04-22 + */ + +/* + * Copyright (C) 2015 Genode Labs GmbH + * + * This file is part of the Genode OS framework, which is distributed + * under the terms of the GNU General Public License version 2. + */ + +.include "macros.s" + +.data + + /***************************************** + ** Identity mapping from 2MiB to 1GiB ** + ** plus mappings for Muen pvirt pages ** + *****************************************/ + + /* PML4 */ + .p2align MIN_PAGE_SIZE_LOG2 + .global _kernel_pml4 + _kernel_pml4: + .quad _kernel_pdp + 0xf + .fill 511, 8, 0x0 + + /* PDP */ + .p2align MIN_PAGE_SIZE_LOG2 + _kernel_pdp: + .quad _kernel_pd + 0xf + .fill 55, 8, 0x0 + .quad _kernel_pd_pvirt + 0xf + .fill 455, 8, 0x0 + + /* PD */ + .p2align MIN_PAGE_SIZE_LOG2 + _kernel_pd: + .quad 0 + .set entry, 0x20018f + .rept 511 + .quad entry + .set entry, entry + 0x200000 + .endr + + .p2align MIN_PAGE_SIZE_LOG2 + _kernel_pd_pvirt: + .quad 0xe0000018f + .fill 511, 8, 0x0