Cast %p usage to void*
Apparently, %p only accepts void*, and not any pointer type. Still better than casting a pointer to uint64_t.
This commit is contained in:
parent
3feb7782bc
commit
3686e03bb7
@ -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 %p, uses %ld pages", rsdt, rsdt_pages);
|
kdbgln("Mapped RSDT/XSDT to virtual address %p, uses %ld pages", (void*)rsdt, rsdt_pages);
|
||||||
cache = rsdt;
|
cache = rsdt;
|
||||||
return rsdt;
|
return rsdt;
|
||||||
}
|
}
|
||||||
@ -59,7 +59,7 @@ 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 %p (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",
|
||||||
root_sdt, entries);
|
(void*)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: %p", h);
|
kdbgln("Physical address of entry: %p", (void*)h);
|
||||||
SDTHeader* realHeader = (SDTHeader*)MemoryManager::get_unaligned_mapping(h);
|
SDTHeader* realHeader = (SDTHeader*)MemoryManager::get_unaligned_mapping(h);
|
||||||
kdbgln("Mapped entry to virtual address %p", realHeader);
|
kdbgln("Mapped entry to virtual address %p", (void*)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