mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 20:57:35 +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:
parent
78b2be5a2a
commit
67583bc424
8 changed files with 69 additions and 55 deletions
|
@ -24,6 +24,7 @@
|
|||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <AK/Debug.h>
|
||||
#include <AK/Optional.h>
|
||||
#include <AK/StringView.h>
|
||||
#include <Kernel/ACPI/MultiProcessorParser.h>
|
||||
|
@ -201,13 +202,14 @@ void IOAPIC::configure_redirection_entry(int index, u8 interrupt_vector, u8 deli
|
|||
u32 redirection_entry1 = interrupt_vector | (delivery_mode & 0b111) << 8 | logical_destination << 11 | active_low << 13 | trigger_level_mode << 15 | masked << 16;
|
||||
u32 redirection_entry2 = destination << 24;
|
||||
write_register((index << 1) + IOAPIC_REDIRECTION_ENTRY_OFFSET, redirection_entry1);
|
||||
#ifdef IOAPIC_DEBUG
|
||||
dbg() << "IOAPIC Value: 0x" << String::format("%x", read_register((index << 1) + IOAPIC_REDIRECTION_ENTRY_OFFSET));
|
||||
#endif
|
||||
|
||||
if constexpr (debug_ioapic)
|
||||
dbgln("IOAPIC Value: {:#x}", read_register((index << 1) + IOAPIC_REDIRECTION_ENTRY_OFFSET));
|
||||
|
||||
write_register((index << 1) + IOAPIC_REDIRECTION_ENTRY_OFFSET + 1, redirection_entry2);
|
||||
#ifdef IOAPIC_DEBUG
|
||||
dbg() << "IOAPIC Value: 0x" << String::format("%x", read_register((index << 1) + 0x11));
|
||||
#endif
|
||||
|
||||
if constexpr (debug_ioapic)
|
||||
dbgln("IOAPIC Value: {:#x}", read_register((index << 1) + 0x11));
|
||||
}
|
||||
|
||||
void IOAPIC::mask_all_redirection_entries() const
|
||||
|
@ -319,17 +321,15 @@ void IOAPIC::write_register(u32 index, u32 value) const
|
|||
InterruptDisabler disabler;
|
||||
m_regs->select = index;
|
||||
m_regs->window = value;
|
||||
#ifdef IOAPIC_DEBUG
|
||||
dbg() << "IOAPIC Writing, Value 0x" << String::format("%x", m_regs->window) << " @ offset 0x" << String::format("%x", m_regs->select);
|
||||
#endif
|
||||
|
||||
dbgln<debug_ioapic>("IOAPIC Writing, Value {:#x} @ offset {:#x}", (u32)m_regs->window, (u32)m_regs->select);
|
||||
}
|
||||
u32 IOAPIC::read_register(u32 index) const
|
||||
{
|
||||
InterruptDisabler disabler;
|
||||
m_regs->select = index;
|
||||
#ifdef IOAPIC_DEBUG
|
||||
dbg() << "IOAPIC Reading, Value 0x" << String::format("%x", m_regs->window) << " @ offset 0x" << String::format("%x", m_regs->select);
|
||||
#endif
|
||||
dbgln<debug_ioapic>("IOAPIC Reading, Value {:#x} @ offset {:#x}", (u32)m_regs->window, (u32)m_regs->select);
|
||||
return m_regs->window;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue