From c5b9d20c7ebabcb9a806841bdb0c4ca452ffd96e Mon Sep 17 00:00:00 2001 From: Drew Galbraith Date: Wed, 15 Nov 2023 15:19:02 -0800 Subject: [PATCH] [Zion] Remove early_dbgln since dbgln no longer allocs. --- zion/debug/debug.cpp | 5 ----- zion/debug/debug.h | 12 ------------ zion/memory/physical_memory.cpp | 2 +- zion/zion.cpp | 4 ++-- 4 files changed, 3 insertions(+), 20 deletions(-) diff --git a/zion/debug/debug.cpp b/zion/debug/debug.cpp index 27279e6..a401fdc 100644 --- a/zion/debug/debug.cpp +++ b/zion/debug/debug.cpp @@ -40,11 +40,6 @@ void AddProcPrefix() { } // namespace -void early_dbgln(const char* str) { - dbgcstr(str); - dbgcstr("\n"); -} - void dbgln(const glcr::StringView& str) { AddProcPrefix(); dbg(str); diff --git a/zion/debug/debug.h b/zion/debug/debug.h index 2f6be94..a767596 100644 --- a/zion/debug/debug.h +++ b/zion/debug/debug.h @@ -6,20 +6,8 @@ #include "include/ztypes.h" -// Debug line without formatting for -// before allocations are available. -void early_dbgln(const char* str); - void dbgln(const glcr::StringView& str); -// TODO: Write a version of StrFormat that -// accepts a fix-sized buffer for output -// to use in the kernel. That way we make -// dbgln and panic calls without allocation. -// Optionally, add a dbgln_unbounded method for -// things like the Debug syscall where the formatted -// string may be fairly large. - template void dbgln(const char* str, Args... args) { char buffer[256]; diff --git a/zion/memory/physical_memory.cpp b/zion/memory/physical_memory.cpp index 5289265..63fbcf1 100644 --- a/zion/memory/physical_memory.cpp +++ b/zion/memory/physical_memory.cpp @@ -206,7 +206,7 @@ uint64_t AllocatePage() { } #if K_PHYS_DEBUG - early_dbgln("[PMM] Boostrap Alloc!"); + dbgln("[PMM] Boostrap Alloc!"); #endif uint64_t page = gBootstrap.next_page; diff --git a/zion/zion.cpp b/zion/zion.cpp index 3fc40bd..1484695 100644 --- a/zion/zion.cpp +++ b/zion/zion.cpp @@ -18,11 +18,11 @@ #include "syscall/syscall.h" extern "C" void zion() { - early_dbgln("[boot] Init GDT & IDT."); + dbgln("[boot] Init GDT & IDT."); InitGdt(); InitIdt(); - early_dbgln("[boot] Init Physical Memory Manager."); + dbgln("[boot] Init Physical Memory Manager."); phys_mem::InitBootstrapPageAllocation(); KernelVmm kvmm; KernelHeap heap;