aboutsummaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
authorKimplul <kimi.h.kuparinen@gmail.com>2024-07-07 00:49:55 +0300
committerKimplul <kimi.h.kuparinen@gmail.com>2024-07-07 00:49:55 +0300
commit03e12129927b0deba537a11bb5575bef93c57d0f (patch)
tree3e2fce59e7c6d604e163236b44f7f96d1c31e279 /src/main.c
parent3fedbb6e1f849c5e0a4033d68201d60c2fc48121 (diff)
downloadkmi-03e12129927b0deba537a11bb5575bef93c57d0f.tar.gz
kmi-03e12129927b0deba537a11bb5575bef93c57d0f.zip
fixed crash with dbg_fdt()
+ Apparently dbg_fdt() itself wasn't buggy, but for whatever reason GCC produced an absolute load to the prefix string in __print_prefix() which caused all the issues. Unclear why, seems like a compiler bug. This commit is more of a workaround, I'd still like to investigate this further.
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/main.c b/src/main.c
index 169efc3..aaf4cde 100644
--- a/src/main.c
+++ b/src/main.c
@@ -66,7 +66,7 @@ __noreturn void kernel(void *fdt, uintptr_t load_addr, struct vmem *d)
/* start up debugging in kernel IO */
setup_io_dbg(d);
- //dbg_fdt(fdt);
+ dbg_fdt(fdt);
setup_arch(fdt);
@@ -106,7 +106,6 @@ __noreturn void main(unsigned long hart, void *fdt, uintptr_t load_addr)
(void)hart;
/** @todo some kind of lottery? */
-
pm_t ram_base = __fdt_ram_base(fdt);
pm_t ram_size = __fdt_ram_size(fdt);
set_ram_base(ram_base);