mirror of
https://github.com/wichtounet/thor-os.git
synced 2025-09-16 16:11:42 -04:00
Fix paging of kernel memory in 32bit mode
This commit is contained in:
parent
1ba2207c6c
commit
df0b334bf2
@ -137,7 +137,7 @@ void setup_kernel_paging(uint32_t kernel_mib){
|
||||
auto current_pt = 0;
|
||||
|
||||
auto page_table_ptr = reinterpret_cast<uint32_t*>(PML4T + 3 * PAGE_SIZE + 256 * 8);
|
||||
auto phys = 0x1000003;
|
||||
auto phys = 0x100003;
|
||||
for(uint32_t i = 256; i < (1 + kernel_mib) * 256; ++i){
|
||||
*page_table_ptr = phys;
|
||||
|
||||
@ -146,7 +146,7 @@ void setup_kernel_paging(uint32_t kernel_mib){
|
||||
//A page entry is 64 bit in size
|
||||
page_table_ptr += 2;
|
||||
|
||||
if(i % 512 == 0){
|
||||
if(i % 511 == 0){
|
||||
++current_pt;
|
||||
|
||||
//PD[current_pt] -> PT
|
||||
|
Loading…
x
Reference in New Issue
Block a user