hw_x86_64: Declare initial pagetables in .data segment
The table specifies the initial identity mapping for the memory region from 2 MiB to 4 MiB using one 2 MiB mapping.
This commit is contained in:
parent
be430b9648
commit
bafb893a70
|
@ -12,6 +12,8 @@
|
||||||
* under the terms of the GNU General Public License version 2.
|
* under the terms of the GNU General Public License version 2.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
.include "macros.s"
|
||||||
|
|
||||||
.section ".text.crt0"
|
.section ".text.crt0"
|
||||||
|
|
||||||
/* magic multi-boot header to make GRUB happy */
|
/* magic multi-boot header to make GRUB happy */
|
||||||
|
@ -69,3 +71,29 @@
|
||||||
.p2align 8
|
.p2align 8
|
||||||
.space 32 * 1024
|
.space 32 * 1024
|
||||||
_stack_high:
|
_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 511, 8, 0x0
|
||||||
|
|
||||||
|
/* PD */
|
||||||
|
.p2align MIN_PAGE_SIZE_LOG2
|
||||||
|
_kernel_pd:
|
||||||
|
.quad 0
|
||||||
|
.quad 0x20018f
|
||||||
|
.fill 510, 8, 0x0
|
||||||
|
|
Loading…
Reference in New Issue