From 5fc543c1799fcebc204499624bab56a720872960 Mon Sep 17 00:00:00 2001 From: apio Date: Sat, 8 Oct 2022 18:15:08 +0200 Subject: [PATCH] Kernel/ACPI: Use printf() with %p --- kernel/src/acpi/RSDT.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/kernel/src/acpi/RSDT.cpp b/kernel/src/acpi/RSDT.cpp index dc055293..5835cc5f 100644 --- a/kernel/src/acpi/RSDT.cpp +++ b/kernel/src/acpi/RSDT.cpp @@ -17,7 +17,7 @@ ACPI::SDTHeader* ACPI::get_rsdt_or_xsdt() kdbgln("First time accessing the RSDT/XSDT, mapping it into memory"); 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); @@ -30,7 +30,7 @@ ACPI::SDTHeader* ACPI::get_rsdt_or_xsdt() 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; return rsdt; } @@ -58,8 +58,8 @@ void* ACPI::find_table(ACPI::SDTHeader* root_sdt, const char* signature) { bool isXSDT = is_xsdt(); 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", - (uint64_t)root_sdt, entries); + kdbgln("Searching for table %s in the %s at %p (table contains %ld entries)", signature, isXSDT ? "XSDT" : "RSDT", + root_sdt, entries); 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"); 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); - kdbgln("Mapped entry to virtual address %lx", (uint64_t)realHeader); + kdbgln("Mapped entry to virtual address %p", realHeader); if (!validate_sdt_header(realHeader)) { kwarnln("Header of entry %ld is not valid, skipping this entry", i);