Build new page tables in HULK
This commit is contained in:
1 parent
c8a81b1101
commit
c11361d40f
4 files changed
+75
-16
No files matched your search
+10
-1
@@ -31,6 +31,11 @@ struct hippo
|
||||
*/
|
||||
private static __gshared size_t n_free_pages;
|
||||
|
||||
/**
|
||||
* Physical address limit.
|
||||
*/
|
||||
public static __gshared size_t physical_address_limit;
|
||||
|
||||
/**
|
||||
* Initialize HIPPO.
|
||||
*
|
||||
@@ -54,7 +59,7 @@ struct hippo
|
||||
[header.bootinfo.hulk_phys, cast(ulong)header.total_size - LinkerAddresses.hulk_bss_size],
|
||||
[header.bootinfo.bss_phys, LinkerAddresses.hulk_bss_size],
|
||||
[header.bootinfo.stack_phys, header.stack_size],
|
||||
[cast(ulong)header.bootinfo.fb.buffer, header.bootinfo.fb.height * header.bootinfo.fb.stride],
|
||||
[cast(ulong)header.bootinfo.fb.buffer, header.bootinfo.fb.height * header.bootinfo.fb.stride * 4u],
|
||||
[header.bootinfo.pt_phys, header.bootinfo.pt_size],
|
||||
];
|
||||
for (size_t ri = 0u; ri < reserved.length; ri++)
|
||||
@@ -67,6 +72,10 @@ struct hippo
|
||||
{
|
||||
ulong phys = header.bootinfo.memory_map[bii].base;
|
||||
ulong phys_end = phys + header.bootinfo.memory_map[bii].size;
|
||||
if (phys_end > physical_address_limit)
|
||||
{
|
||||
physical_address_limit = phys_end;
|
||||
}
|
||||
usable_memory += header.bootinfo.memory_map[bii].size;
|
||||
while (phys < phys_end)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user