[Zion] Add an early debug method without allocations.
This commit is contained in:
parent
85564b018d
commit
4af19d010f
|
@ -132,6 +132,8 @@ void dbg_internal(const char* fmt, va_list args) {
|
|||
|
||||
} // namespace
|
||||
|
||||
void early_dbgln(const char* str) { dbgcstr(str); }
|
||||
|
||||
void dbg(const char* fmt, ...) {
|
||||
va_list arg;
|
||||
va_start(arg, fmt);
|
||||
|
|
|
@ -4,6 +4,10 @@
|
|||
|
||||
#include "include/ztypes.h"
|
||||
|
||||
// Debug line without formatting for
|
||||
// before allocations are available.
|
||||
void early_dbgln(const char* str);
|
||||
|
||||
void dbg(const char* fmt, ...);
|
||||
void dbgln(const char* str, ...);
|
||||
void panic(const char* str, ...);
|
||||
|
|
|
@ -17,11 +17,11 @@
|
|||
#include "syscall/syscall.h"
|
||||
|
||||
extern "C" void zion() {
|
||||
dbgln("[boot] Init GDT & IDT.");
|
||||
early_dbgln("[boot] Init GDT & IDT.");
|
||||
InitGdt();
|
||||
InitIdt();
|
||||
|
||||
dbgln("[boot] Init Physical Memory Manager.");
|
||||
early_dbgln("[boot] Init Physical Memory Manager.");
|
||||
phys_mem::InitBootstrapPageAllocation();
|
||||
KernelHeap heap(0xFFFFFFFF'40000000, 0xFFFFFFFF'80000000);
|
||||
phys_mem::InitPhysicalMemoryManager();
|
||||
|
|
Loading…
Reference in New Issue