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

Kernel: Use klog() instead of kprintf()

Also, duplicate data in dbg() and klog() calls were removed.
In addition, leakage of virtual address to kernel log is prevented.
This is done by replacing kprintf() calls to dbg() calls with the
leaked data instead.
Also, other kprintf() calls were replaced with klog().
This commit is contained in:
Liav A 2020-03-01 21:45:39 +02:00 committed by Andreas Kling
parent 19aa53e1f9
commit 0fc60e41dd
53 changed files with 397 additions and 573 deletions

View file

@ -109,7 +109,7 @@ InterruptManagement::InterruptManagement()
void InterruptManagement::switch_to_pic_mode()
{
kprintf("Interrupts: Switch to Legacy PIC mode\n");
klog() << "Interrupts: Switch to Legacy PIC mode";
SpuriousInterruptHandler::initialize(7);
SpuriousInterruptHandler::initialize(15);
for (auto& irq_controller : m_interrupt_controllers) {
@ -125,10 +125,10 @@ void InterruptManagement::switch_to_pic_mode()
void InterruptManagement::switch_to_ioapic_mode()
{
kprintf("Interrupts: Switch to IOAPIC mode\n");
klog() << "Interrupts: Switch to IOAPIC mode";
if (m_interrupt_controllers.size() == 1) {
if (get_interrupt_controller(0).type() == IRQControllerType::i8259) {
kprintf("Interrupts: NO IOAPIC detected, Reverting to PIC mode.\n");
klog() << "Interrupts: NO IOAPIC detected, Reverting to PIC mode.";
return;
}
}