Move boot_page_directory while increment
This commit is contained in:
parent
80b88c7d03
commit
24249a5f40
1 changed files with 12 additions and 11 deletions
|
@ -41,28 +41,29 @@ export var boot_page_directory: [1024]u32 align(4096) linksection(".rodata.boot"
|
||||||
var i = 0;
|
var i = 0;
|
||||||
var idx = 1;
|
var idx = 1;
|
||||||
|
|
||||||
// Fill preceding pages with zeroes. May not be unecessary but incurs no runtime cost
|
// Fill preceding pages with zeroes. May be unecessary but incurs no runtime cost
|
||||||
while (i < KERNEL_PAGE_NUMBER - 1) {
|
while (i < KERNEL_PAGE_NUMBER - 1) : ({
|
||||||
dir[idx] = 0;
|
|
||||||
i += 1;
|
i += 1;
|
||||||
idx += 1;
|
idx += 1;
|
||||||
|
}) {
|
||||||
|
dir[idx] = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Map the kernel's higher half pages increasing by 4 MiB every time
|
// Map the kernel's higher half pages increasing by 4 MiB every time
|
||||||
i = 0;
|
i = 0;
|
||||||
while (i < KERNEL_NUM_PAGES) {
|
while (i < KERNEL_NUM_PAGES) : ({
|
||||||
|
i += 1;
|
||||||
|
idx += 1;
|
||||||
|
}) {
|
||||||
dir[idx] = 0x00000083 | (i << 22);
|
dir[idx] = 0x00000083 | (i << 22);
|
||||||
i += 1;
|
|
||||||
idx += 1;
|
|
||||||
}
|
}
|
||||||
// Increase max number of branches done by comptime evaluator
|
// Fill suceeding pages with zeroes. May be unecessary but incurs no runtime cost
|
||||||
@setEvalBranchQuota(1024);
|
|
||||||
// Fill suceeding pages with zeroes. May not be unecessary but incurs no runtime cost
|
|
||||||
i = 0;
|
i = 0;
|
||||||
while (i < 1024 - KERNEL_PAGE_NUMBER - KERNEL_NUM_PAGES) {
|
while (i < 1024 - KERNEL_PAGE_NUMBER - KERNEL_NUM_PAGES) : ({
|
||||||
dir[idx] = 0;
|
|
||||||
i += 1;
|
i += 1;
|
||||||
idx += 1;
|
idx += 1;
|
||||||
|
}) {
|
||||||
|
dir[idx] = 0;
|
||||||
}
|
}
|
||||||
break :init dir;
|
break :init dir;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue