1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 19:37:34 +00:00

Kernel: Simplify a bunch of dbg() and klog() calls

LogStream can handle VirtualAddress and PhysicalAddress directly.
This commit is contained in:
Andreas Kling 2020-03-06 15:00:44 +01:00
parent b866582d98
commit c6693f9b3a
11 changed files with 32 additions and 33 deletions

View file

@ -168,7 +168,7 @@ namespace ACPI {
if (m_xsdt_supported) {
volatile auto* xsdt = (volatile Structures::XSDT*)sdt;
klog() << "ACPI: Using XSDT, Enumerating tables @ P " << String::format("%p", m_main_system_description_table.get());
klog() << "ACPI: Using XSDT, Enumerating tables @ " << m_main_system_description_table;
klog() << "ACPI: XSDT Revision " << revision << ", Total length - " << length;
#ifdef ACPI_DEBUG
dbg() << "ACPI: XSDT pointer @ V " << xsdt;
@ -181,7 +181,7 @@ namespace ACPI {
}
} else {
volatile auto* rsdt = (volatile Structures::RSDT*)sdt;
klog() << "ACPI: Using RSDT, Enumerating tables @ P " << String::format("%p", m_main_system_description_table.get());
klog() << "ACPI: Using RSDT, Enumerating tables @ " << m_main_system_description_table;
klog() << "ACPI: RSDT Revision " << revision << ", Total length - " << length;
#ifdef ACPI_DEBUG
dbg() << "ACPI: RSDT pointer @ V " << rsdt;
@ -220,7 +220,7 @@ namespace ACPI {
, m_rsdp(StaticParsing::search_rsdp())
{
if (!m_rsdp.is_null()) {
klog() << "ACPI: Using RSDP @ P " << String::format("%p", m_rsdp);
klog() << "ACPI: Using RSDP @ " << m_rsdp;
m_operable = true;
locate_static_data();
} else {
@ -233,7 +233,7 @@ namespace ACPI {
: Parser(true)
, m_rsdp(rsdp)
{
klog() << "ACPI: Using RSDP @ P " << String::format("%p", rsdp.get());
klog() << "ACPI: Using RSDP @ " << rsdp;
m_operable = true;
locate_static_data();
}

View file

@ -62,7 +62,7 @@ void DMIDecoder::initialize_untrusted()
void DMIDecoder::set_64_bit_entry_initialization_values(PhysicalAddress entry)
{
klog() << "DMIDecoder: SMBIOS 64bit Entry point @ P " << String::format("%p", m_entry64bit_point.get());
klog() << "DMIDecoder: SMBIOS 64bit Entry point @ " << m_entry64bit_point;
m_use_64bit_entry = true;
auto region = MM.allocate_kernel_region(entry.page_base(), PAGE_ROUND_UP(SMBIOS_SEARCH_AREA_SIZE), "DMI Decoder 64 bit Initialization", Region::Access::Read, false, false);
@ -74,7 +74,7 @@ void DMIDecoder::set_64_bit_entry_initialization_values(PhysicalAddress entry)
void DMIDecoder::set_32_bit_entry_initialization_values(PhysicalAddress entry)
{
klog() << "DMIDecoder: SMBIOS 32bit Entry point @ P " << String::format("%p", m_entry32bit_point.get());
klog() << "DMIDecoder: SMBIOS 32bit Entry point @ " << m_entry32bit_point;
m_use_64bit_entry = false;
auto region = MM.allocate_kernel_region(entry.page_base(), PAGE_ROUND_UP(SMBIOS_SEARCH_AREA_SIZE), "DMI Decoder 32 bit Initialization", Region::Access::Read, false, false);
@ -101,7 +101,7 @@ void DMIDecoder::initialize_parser()
} else if (!m_entry32bit_point.is_null()) {
set_32_bit_entry_initialization_values(m_entry32bit_point);
}
klog() << "DMIDecoder: Data table @ P " << String::format("%p", m_structure_table.get());
klog() << "DMIDecoder: Data table @ " << m_structure_table;
enumerate_smbios_tables();
}
@ -264,7 +264,7 @@ u64 DMIDecoder::get_bios_characteristics()
auto* bios_info = (SMBIOS::BIOSInfo*)get_smbios_physical_table_by_type(0).as_ptr();
ASSERT(bios_info != nullptr);
klog() << "DMIDecoder: BIOS info @ P " << String::format("%p", bios_info);
klog() << "DMIDecoder: BIOS info @ " << PhysicalAddress((uintptr_t)bios_info);
return bios_info->bios_characteristics;
}

View file

@ -48,7 +48,7 @@ MultiProcessorParser::MultiProcessorParser()
, m_operable((m_floating_pointer != (uintptr_t) nullptr))
{
if (m_floating_pointer != (uintptr_t) nullptr) {
klog() << "MultiProcessor: Floating Pointer Structure @ P " << String::format("%p", m_floating_pointer);
klog() << "MultiProcessor: Floating Pointer Structure @ " << PhysicalAddress(m_floating_pointer);
parse_floating_pointer_data();
parse_configuration_table();
} else {