From 12dc34aed789ae8e7ba342c0ab6b33529516b4bd Mon Sep 17 00:00:00 2001 From: Kimplul Date: Fri, 7 Jan 2022 17:46:43 +0200 Subject: Moved debugging into debug.c + No clue why I had that stuff in common/main.c --- include/apos/debug.h | 16 +++++++++++----- include/arch/arch.h | 4 ++-- 2 files changed, 13 insertions(+), 7 deletions(-) (limited to 'include') diff --git a/include/apos/debug.h b/include/apos/debug.h index 9aa132f..a9e5d46 100644 --- a/include/apos/debug.h +++ b/include/apos/debug.h @@ -3,6 +3,7 @@ #include #include +#include #ifdef DEBUG enum serial_dev { @@ -10,13 +11,14 @@ enum serial_dev { NS16550A, }; -struct dbg_info { - pm_t dbg_ptr; - enum serial_dev dev; -}; - void __fmt(1, 2) dbg(const char *fmt, ...); + +void init_dbg(void *fdt); + +void setup_dmap_dbg(); +void setup_io_dbg(struct vm_branch *b); void setup_dbg(pm_t pt, enum serial_dev dev); + struct dbg_info dbg_from_fdt(void *fdt); #define COMMON_FORMAT "[%s] %s:%d\n\t" @@ -32,6 +34,10 @@ struct dbg_info dbg_from_fdt(void *fdt); #define dbg_init(...) #define dbg_from_fdt(...) +#define init_dbg(...) +#define setup_dmap_dbg(...) +#define setup_io_dbg(...) + #define bug(...) #define warn(...) #define info(...) diff --git a/include/arch/arch.h b/include/arch/arch.h index 1933555..f684cf0 100644 --- a/include/arch/arch.h +++ b/include/arch/arch.h @@ -1,8 +1,8 @@ #ifndef APOS_ARCH_H #define APOS_ARCH_H -/* functions that an arch has to provide */ +#include -void arch_setup(void *fdt); +stat_t setup_arch(void *fdt); #endif /* APOS_ARCH_H */ -- cgit v1.3