git://scm.lunaixsky.com
/
lunaix-os.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Unifying the Lunaix's Physical Memory Model (#28)
[lunaix-os.git]
/
lunaix-os
/
arch
/
i386
/
boot
/
kpt_setup.c
diff --git
a/lunaix-os/arch/i386/boot/kpt_setup.c
b/lunaix-os/arch/i386/boot/kpt_setup.c
index 26a348d13b4eb9fa8b8cb7ad67b0de18fd65bd4e..c353d77e0d968cf1f7aa51e53ba9abdd1607ecf3 100644
(file)
--- a/
lunaix-os/arch/i386/boot/kpt_setup.c
+++ b/
lunaix-os/arch/i386/boot/kpt_setup.c
@@
-17,6
+17,7
@@
extern u8_t __kboot_end[];
// define the initial page table layout
struct kernel_map {
pte_t l0t[_PAGE_LEVEL_SIZE];
// define the initial page table layout
struct kernel_map {
pte_t l0t[_PAGE_LEVEL_SIZE];
+ pte_t pg_mnt[_PAGE_LEVEL_SIZE];
struct {
pte_t _lft[_PAGE_LEVEL_SIZE];
struct {
pte_t _lft[_PAGE_LEVEL_SIZE];
@@
-86,6
+87,10
@@
_init_page()
// XXX: Mapping the kernel .rodata section?
// XXX: Mapping the kernel .rodata section?
+ // set mount point
+ pte_t* kmntep = (pte_t*) &kpt_pa->l0t[pfn_at(PG_MOUNT_1, L0T_SIZE)];
+ set_pte(kmntep, mkpte((ptr_t)kpt_pa->pg_mnt, KERNEL_DATA));
+
// Build up self-reference
pte = mkpte_root((ptr_t)kpt_pa, KERNEL_DATA);
set_pte(boot_l0tep + _PAGE_LEVEL_MASK, pte);
// Build up self-reference
pte = mkpte_root((ptr_t)kpt_pa, KERNEL_DATA);
set_pte(boot_l0tep + _PAGE_LEVEL_MASK, pte);