Changeset 147 for trunk/hal/x86_64/core
- Timestamp:
- Jul 5, 2017, 11:19:36 AM (7 years ago)
- Location:
- trunk/hal/x86_64/core
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/hal/x86_64/core/hal_boot.h
r145 r147 108 108 /* -------------------------------------------------------------------------- */ 109 109 110 #define VA_SIGN_MASK 0xffff000000000000 111 #define VA_SIGN_POS(va) ((va) & ~VA_SIGN_MASK) 112 113 #define pl1_i(VA) (((VA_SIGN_POS(VA)) & L1_FRAME) >> L1_SHIFT) 114 #define pl2_i(VA) (((VA_SIGN_POS(VA)) & L2_FRAME) >> L2_SHIFT) 115 #define pl3_i(VA) (((VA_SIGN_POS(VA)) & L3_FRAME) >> L3_SHIFT) 116 #define pl4_i(VA) (((VA_SIGN_POS(VA)) & L4_FRAME) >> L4_SHIFT) 117 110 118 #define L4_SLOT_PTE 255 111 #define L4_SLOT_KERNBASE 480 112 113 /* 114 * L3 = (KERNBASE % NBPD_L4) / NBPD_L3 115 * L2 = (KERNBASE % NBPD_L3) / NBPD_L2 116 */ 117 #define L3_SLOT_KERNBASE 0 118 #define L2_SLOT_KERNBASE 0 119 #define L4_SLOT_KERNBASE pl4_i(KERNBASE) 120 #define L3_SLOT_KERNBASE (pl3_i(KERNBASE) % 512) 121 #define L2_SLOT_KERNBASE (pl2_i(KERNBASE) % 512) 119 122 120 123 #define PDIR_SLOT_PTE L4_SLOT_PTE -
trunk/hal/x86_64/core/hal_gpt.c
r145 r147 35 35 #include <ppm.h> 36 36 #include <page.h> 37 38 #define VA_SIGN_MASK 0xffff00000000000039 #define VA_SIGN_POS(va) ((va) & ~VA_SIGN_MASK)40 41 #define pl1_i(VA) (((VA_SIGN_POS(VA)) & L1_FRAME) >> L1_SHIFT)42 #define pl2_i(VA) (((VA_SIGN_POS(VA)) & L2_FRAME) >> L2_SHIFT)43 #define pl3_i(VA) (((VA_SIGN_POS(VA)) & L3_FRAME) >> L3_SHIFT)44 #define pl4_i(VA) (((VA_SIGN_POS(VA)) & L4_FRAME) >> L4_SHIFT)45 37 46 38 extern vaddr_t __kernel_end;
Note: See TracChangeset
for help on using the changeset viewer.