From 102eabcb4b4fa1ad8eebf632995cd0550fbc9830 Mon Sep 17 00:00:00 2001 From: apio Date: Sat, 19 Nov 2022 17:52:24 +0100 Subject: [PATCH] Do some more formatted logging --- kernel/src/main.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/kernel/src/main.cpp b/kernel/src/main.cpp index 258e35ee..f08ea018 100644 --- a/kernel/src/main.cpp +++ b/kernel/src/main.cpp @@ -30,6 +30,8 @@ extern "C" [[noreturn]] void _start() u64 physical = MemoryManager::alloc_physical_page().release_value(); + Serial::printf("Allocated physical frame %#lx\n", physical); + auto rc = MMU::map(address, physical, MMU::ReadWrite); bool success = !rc.has_error(); @@ -80,6 +82,8 @@ extern "C" [[noreturn]] void _start() CPU::efficient_halt(); } + Serial::printf("Unmapped page, was pointing to %#lx\n", urc.value()); + if (urc.release_value() != physical) { Serial::println("unmap returned a different address than the one we mapped");