Add preprocessor directives to supress logs per file.

Makes the output much cleaner by default but allows for getting more
infor if debugging in the future.
This commit is contained in:
Drew Galbraith 2023-06-07 13:51:13 -07:00
parent add533071b
commit 53ff49b265
7 changed files with 52 additions and 5 deletions

View file

@ -90,15 +90,13 @@ extern "C" void interrupt_protection_fault(InterruptFrame* frame) {
extern "C" void isr_page_fault();
extern "C" void interrupt_page_fault(InterruptFrame* frame) {
dbgln("Page Fault - trying to resolve");
uint64_t cr2;
asm volatile("mov %%cr2, %0" : "=r"(cr2));
if (gScheduler->CurrentProcess().vmas()->HandlePageFault(cr2)) {
dbgln("Handled");
return;
}
dbgln("Unable to handle:");
dbgln("Unhandled Page Fault:");
uint64_t err = frame->error_code;
if (err & 0x1) {
dbgln("Page Protection");