Kernel/ACPI: Use printf() with %p
This commit is contained in:
parent
40099feb80
commit
5fc543c179
@ -17,7 +17,7 @@ ACPI::SDTHeader* ACPI::get_rsdt_or_xsdt()
|
|||||||
|
|
||||||
kdbgln("First time accessing the RSDT/XSDT, mapping it into memory");
|
kdbgln("First time accessing the RSDT/XSDT, mapping it into memory");
|
||||||
void* physical = (void*)bootboot.arch.x86_64.acpi_ptr;
|
void* physical = (void*)bootboot.arch.x86_64.acpi_ptr;
|
||||||
kdbgln("RSDT/XSDT physical address: %lx", (uint64_t)physical);
|
kdbgln("RSDT/XSDT physical address: %p", physical);
|
||||||
|
|
||||||
SDTHeader* rsdt = (SDTHeader*)MemoryManager::get_unaligned_mapping(physical);
|
SDTHeader* rsdt = (SDTHeader*)MemoryManager::get_unaligned_mapping(physical);
|
||||||
|
|
||||||
@ -30,7 +30,7 @@ ACPI::SDTHeader* ACPI::get_rsdt_or_xsdt()
|
|||||||
rsdt = (SDTHeader*)MemoryManager::get_unaligned_mappings(cache, rsdt_pages);
|
rsdt = (SDTHeader*)MemoryManager::get_unaligned_mappings(cache, rsdt_pages);
|
||||||
}
|
}
|
||||||
|
|
||||||
kdbgln("Mapped RSDT/XSDT to virtual address %lx, uses %ld pages", (uint64_t)rsdt, rsdt_pages);
|
kdbgln("Mapped RSDT/XSDT to virtual address %p, uses %ld pages", rsdt, rsdt_pages);
|
||||||
cache = rsdt;
|
cache = rsdt;
|
||||||
return rsdt;
|
return rsdt;
|
||||||
}
|
}
|
||||||
@ -58,8 +58,8 @@ void* ACPI::find_table(ACPI::SDTHeader* root_sdt, const char* signature)
|
|||||||
{
|
{
|
||||||
bool isXSDT = is_xsdt();
|
bool isXSDT = is_xsdt();
|
||||||
uint64_t entries = (root_sdt->Length - sizeof(SDTHeader)) / (isXSDT ? 8 : 4);
|
uint64_t entries = (root_sdt->Length - sizeof(SDTHeader)) / (isXSDT ? 8 : 4);
|
||||||
kdbgln("Searching for table %s in the %s at %lx (table contains %ld entries)", signature, isXSDT ? "XSDT" : "RSDT",
|
kdbgln("Searching for table %s in the %s at %p (table contains %ld entries)", signature, isXSDT ? "XSDT" : "RSDT",
|
||||||
(uint64_t)root_sdt, entries);
|
root_sdt, entries);
|
||||||
|
|
||||||
for (uint64_t i = 0; i < entries; i++)
|
for (uint64_t i = 0; i < entries; i++)
|
||||||
{
|
{
|
||||||
@ -81,9 +81,9 @@ void* ACPI::find_table(ACPI::SDTHeader* root_sdt, const char* signature)
|
|||||||
kwarnln("Entry %ld in the %s points to null", i, isXSDT ? "XSDT" : "RSDT");
|
kwarnln("Entry %ld in the %s points to null", i, isXSDT ? "XSDT" : "RSDT");
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
kdbgln("Physical address of entry: %lx", (uint64_t)h);
|
kdbgln("Physical address of entry: %p", h);
|
||||||
SDTHeader* realHeader = (SDTHeader*)MemoryManager::get_unaligned_mapping(h);
|
SDTHeader* realHeader = (SDTHeader*)MemoryManager::get_unaligned_mapping(h);
|
||||||
kdbgln("Mapped entry to virtual address %lx", (uint64_t)realHeader);
|
kdbgln("Mapped entry to virtual address %p", realHeader);
|
||||||
if (!validate_sdt_header(realHeader))
|
if (!validate_sdt_header(realHeader))
|
||||||
{
|
{
|
||||||
kwarnln("Header of entry %ld is not valid, skipping this entry", i);
|
kwarnln("Header of entry %ld is not valid, skipping this entry", i);
|
||||||
|
Loading…
Reference in New Issue
Block a user