1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 07:48:11 +00:00

Everywhere: Replace a bundle of dbg with dbgln.

These changes are arbitrarily divided into multiple commits to make it
easier to find potentially introduced bugs with git bisect.
This commit is contained in:
asynts 2021-01-09 00:42:44 +01:00 committed by Andreas Kling
parent 019c9eb749
commit 4e8fd0216b
7 changed files with 51 additions and 13 deletions

View file

@ -150,15 +150,15 @@ void Parser::access_generic_address(const Structures::GenericAddressStructure& s
switch ((GenericAddressStructure::AddressSpace)structure.address_space) {
case GenericAddressStructure::AddressSpace::SystemIO: {
IOAddress address(structure.address);
dbg() << "ACPI: Sending value 0x" << String::format("%x", value) << " to " << address;
dbgln("ACPI: Sending value {:x} to {:p}", value, address);
switch (structure.access_size) {
case (u8)GenericAddressStructure::AccessSize::QWord: {
dbg() << "Trying to send QWord to IO port";
dbgln("Trying to send QWord to IO port");
ASSERT_NOT_REACHED();
break;
}
case (u8)GenericAddressStructure::AccessSize::Undefined: {
dbg() << "ACPI Warning: Unknown access size " << structure.access_size;
dbgln("ACPI Warning: Unknown access size {}", structure.access_size);
ASSERT(structure.bit_width != (u8)GenericAddressStructure::BitWidth::QWord);
ASSERT(structure.bit_width != (u8)GenericAddressStructure::BitWidth::Undefined);
dbg() << "ACPI: Bit Width - " << structure.bit_width << " bits";
@ -172,7 +172,7 @@ void Parser::access_generic_address(const Structures::GenericAddressStructure& s
return;
}
case GenericAddressStructure::AddressSpace::SystemMemory: {
dbg() << "ACPI: Sending value 0x" << String::format("%x", value) << " to " << PhysicalAddress(structure.address);
dbgln("ACPI: Sending value {:x} to {}", value, PhysicalAddress(structure.address));
switch ((GenericAddressStructure::AccessSize)structure.access_size) {
case GenericAddressStructure::AccessSize::Byte:
*map_typed<u8>(PhysicalAddress(structure.address)) = value;
@ -195,10 +195,10 @@ void Parser::access_generic_address(const Structures::GenericAddressStructure& s
case GenericAddressStructure::AddressSpace::PCIConfigurationSpace: {
// According to the ACPI specification 6.2, page 168, PCI addresses must be confined to devices on Segment group 0, bus 0.
auto pci_address = PCI::Address(0, 0, ((structure.address >> 24) & 0xFF), ((structure.address >> 16) & 0xFF));
dbg() << "ACPI: Sending value 0x" << String::format("%x", value) << " to " << pci_address;
dbgln("ACPI: Sending value {:x} to {}", value, pci_address);
u32 offset_in_pci_address = structure.address & 0xFFFF;
if (structure.access_size == (u8)GenericAddressStructure::AccessSize::QWord) {
dbg() << "Trying to send QWord to PCI configuration space";
dbgln("Trying to send QWord to PCI configuration space");
ASSERT_NOT_REACHED();
}
ASSERT(structure.access_size != (u8)GenericAddressStructure::AccessSize::Undefined);