From dbbe83bd8882fe18e26f6305a1f425145bfea8db Mon Sep 17 00:00:00 2001 From: Josh Rahm Date: Tue, 26 Oct 2021 00:04:44 -0600 Subject: Fixed annoying bug with bootup when compiling with new GCC. The problem was the BSS segment was not aligned with size 4, thus the routine to clear the BSS segment was infinite looping, clobbering everything in it's wake until it ran off the memory edge and caused a hard fault. This commit does a couple of things. 1. Fixes the alignment issue in the linker script 2. Panics if the bss/data segments are not aligned properly 3. Makes the logging the _first_ thing to initialize. Much easier to debug that way! --- include/kern/log.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include/kern') diff --git a/include/kern/log.h b/include/kern/log.h index e1e4088..32d3890 100644 --- a/include/kern/log.h +++ b/include/kern/log.h @@ -20,4 +20,6 @@ void kerr_logf(const char* fmt, ...); /** Like klogf, but with a va_list argument. */ void kerr_vlogf(const char* fmt, va_list args); +void initialize_logging(); + #endif -- cgit