mirror of
https://github.com/genodelabs/genode.git
synced 2025-01-31 16:35:28 +00:00
hw_x86_64: Factor out initial PT to separate file
This allows the specification of different initial pagetables for a platform based on x86_64 (e.g. Muen).
This commit is contained in:
parent
9d4f410988
commit
bb06826c95
@ -11,6 +11,7 @@ INC_DIR += $(REP_DIR)/src/core/include/spec/x86_64
|
||||
# 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/crt0.s
|
||||
|
||||
# add C++ sources
|
||||
|
@ -123,38 +123,3 @@
|
||||
.p2align 8
|
||||
.space 32 * 1024
|
||||
_stack_high:
|
||||
|
||||
.data
|
||||
|
||||
/****************************************
|
||||
** Initial pagetables **
|
||||
** Identity mapping from 2MiB to 4MiB **
|
||||
****************************************/
|
||||
|
||||
/* PML4 */
|
||||
.p2align MIN_PAGE_SIZE_LOG2
|
||||
_kernel_pml4:
|
||||
.quad _kernel_pdp + 0xf
|
||||
.fill 511, 8, 0x0
|
||||
|
||||
/* PDP */
|
||||
.p2align MIN_PAGE_SIZE_LOG2
|
||||
_kernel_pdp:
|
||||
.quad _kernel_pd + 0xf
|
||||
.fill 2, 8, 0x0
|
||||
.quad _kernel_pd_503 + 0xf
|
||||
.fill 508, 8, 0x0
|
||||
|
||||
/* PD */
|
||||
.p2align MIN_PAGE_SIZE_LOG2
|
||||
_kernel_pd:
|
||||
.quad 0
|
||||
.quad 0x20018f
|
||||
.fill 510, 8, 0x0
|
||||
|
||||
.p2align MIN_PAGE_SIZE_LOG2
|
||||
_kernel_pd_503:
|
||||
.fill 502, 8, 0x0
|
||||
.quad 0xfec0019f
|
||||
.quad 0xfee0019f
|
||||
.fill 8, 8, 0x0
|
||||
|
@ -0,0 +1,51 @@
|
||||
/*
|
||||
* \brief Initial pagetables for x86_64
|
||||
* \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 4MiB **
|
||||
** plus mappings for LAPIC, I/O APIC MMIO **
|
||||
********************************************/
|
||||
|
||||
/* 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 2, 8, 0x0
|
||||
.quad _kernel_pd_503 + 0xf
|
||||
.fill 508, 8, 0x0
|
||||
|
||||
/* PD */
|
||||
.p2align MIN_PAGE_SIZE_LOG2
|
||||
_kernel_pd:
|
||||
.quad 0
|
||||
.quad 0x20018f
|
||||
.fill 510, 8, 0x0
|
||||
|
||||
.p2align MIN_PAGE_SIZE_LOG2
|
||||
_kernel_pd_503:
|
||||
.fill 502, 8, 0x0
|
||||
.quad 0xfec0019f
|
||||
.quad 0xfee0019f
|
||||
.fill 8, 8, 0x0
|
Loading…
x
Reference in New Issue
Block a user