1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 06:37:43 +00:00

Kernel: Unbreak building with extra debug macros, part 1

This commit is contained in:
Ben Wiederhake 2020-08-27 00:32:56 +02:00 committed by Andreas Kling
parent 8c1888811f
commit eac3bbdcee
9 changed files with 24 additions and 14 deletions

View file

@ -34,6 +34,8 @@
#include <Kernel/VM/MemoryManager.h>
#include <Kernel/VM/TypedMapping.h>
//#define IOAPIC_DEBUG
#define IOAPIC_REDIRECTION_ENTRY_OFFSET 0x10
namespace Kernel {
enum DeliveryMode {
@ -319,7 +321,7 @@ void IOAPIC::write_register(u32 index, u32 value) const
regs->select = index;
regs->window = value;
#ifdef IOAPIC_DEBUG
dbg() << "IOAPIC Writing, Value 0x" << String::format("%x", regs.window) << " @ offset 0x" << String::format("%x", regs.select);
dbg() << "IOAPIC Writing, Value 0x" << String::format("%x", regs->window) << " @ offset 0x" << String::format("%x", regs->select);
#endif
}
u32 IOAPIC::read_register(u32 index) const
@ -328,7 +330,7 @@ u32 IOAPIC::read_register(u32 index) const
auto regs = map_typed_writable<ioapic_mmio_regs>(m_address);
regs->select = index;
#ifdef IOAPIC_DEBUG
dbg() << "IOAPIC Reading, Value 0x" << String::format("%x", regs.window) << " @ offset 0x" << String::format("%x", regs.select);
dbg() << "IOAPIC Reading, Value 0x" << String::format("%x", regs->window) << " @ offset 0x" << String::format("%x", regs->select);
#endif
return regs->window;
}