Hurl.debug_lookup(): show page table entry index
This commit is contained in:
parent
90711adada
commit
72b83b0c3c
@ -83,7 +83,7 @@ struct Hurl
|
||||
return opIndexAssign(pte, cast(ulong)address, level);
|
||||
}
|
||||
|
||||
private ulong pt_index(ulong address, ulong level)
|
||||
public ulong pt_index(ulong address, ulong level)
|
||||
{
|
||||
return (address >> (39u - (9u * level))) & 0x1FFu;
|
||||
}
|
||||
@ -140,7 +140,7 @@ struct Hurl
|
||||
for (size_t level = 0; level < 4u; level++)
|
||||
{
|
||||
PageTableEntry entry = (*pt)[address, level];
|
||||
klog.writefln("Level %u, entry = 0x%x", level, entry);
|
||||
klog.writefln("Level %u, index %u, entry = 0x%x", level, pt.pt_index(cast(ulong)address, level), entry);
|
||||
if (entry.present)
|
||||
{
|
||||
pt = entry.follow();
|
||||
|
Loading…
x
Reference in New Issue
Block a user