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
+4
-4
@@ -58,7 +58,7 @@ struct acpi
|
||||
public static void initialize(ulong acpi_xsdt_phys)
|
||||
{
|
||||
/* Map the XSDT header. */
|
||||
hurl.map_range(acpi_xsdt_phys, Xsdt.sizeof, 0u);
|
||||
hurl.identity_map_range(acpi_xsdt_phys, Xsdt.sizeof, 0u);
|
||||
const(Xsdt) * xsdt = cast(const(Xsdt) *)acpi_xsdt_phys;
|
||||
if (xsdt.header.signature != XSDT_SIGNATURE)
|
||||
{
|
||||
@@ -66,12 +66,12 @@ struct acpi
|
||||
return;
|
||||
}
|
||||
/* Map the entire XSDT. */
|
||||
hurl.map_range(acpi_xsdt_phys, xsdt.header.length, 0u);
|
||||
hurl.identity_map_range(acpi_xsdt_phys, xsdt.header.length, 0u);
|
||||
size_t n_entries = (xsdt.header.length - xsdt.header.sizeof) / xsdt.tables[0].sizeof;
|
||||
for (size_t i = 0u; i < n_entries; i++)
|
||||
{
|
||||
ulong address = xsdt.tables[i];
|
||||
hurl.map_range(address, 4u, 0u);
|
||||
hurl.identity_map_range(address, 4u, 0u);
|
||||
uint signature = *cast(const(uint) *)address;
|
||||
if (signature == APIC_SIGNATURE)
|
||||
{
|
||||
@@ -83,7 +83,7 @@ struct acpi
|
||||
private static parse_apic_table(ulong address)
|
||||
{
|
||||
const(MadtHeader) * madt_header = cast(const(MadtHeader) *)address;
|
||||
hurl.map_range(address, madt_header.length, 0u);
|
||||
hurl.identity_map_range(address, madt_header.length, 0u);
|
||||
apic_address = madt_header.local_apic_address;
|
||||
klog.writefln("Found 32-bit APIC address: 0x%x", apic_address);
|
||||
const(void) * madt_end = cast(const(void) *)(address + madt_header.length);
|
||||
|
||||
Reference in new issue
Block a user