From 6604911264988f4c77540b4a4167b1e5808d8c19 Mon Sep 17 00:00:00 2001 From: Rodrigo Arias Mallo Date: Fri, 12 Jul 2024 12:38:34 +0200 Subject: [PATCH] Remove reg-names property from clint --- JOURNAL.md | 26 ++++++++++++++++++++++++++ ox-plic.dts | 3 +-- 2 files changed, 27 insertions(+), 2 deletions(-) diff --git a/JOURNAL.md b/JOURNAL.md index 8f4d367..fe1b16d 100644 --- a/JOURNAL.md +++ b/JOURNAL.md @@ -1584,3 +1584,29 @@ What I don't understand is why the MMIO region 0 is starting at 0x40000000 while the UART port should be mapped in 0x40001000 as per the device tree. Maybe we could try with the generic configuration of OpenSBI and see if it can load the plic and the serial ports properly directly from the device tree. + +Nice, with OpenSBI 1.5 I can see the console errors when trying the generic +configuration: + + OpenSBI v1.5 + ____ _____ ____ _____ + / __ \ / ____| _ \_ _| + | | | |_ __ ___ _ __ | (___ | |_) || | + | | | | '_ \ / _ \ '_ \ \___ \| _ < | | + | |__| | |_) | __/ | | |____) | |_) || |_ + \____/| .__/ \___|_| |_|_____/|____/_____| + | | + |_| + + init_coldboot: timer init failed (error -3) + +Seems to be failing in `sbi_timer_init()` with `cold_boot = true`. + +And the -3 error seems to be: + + #define SBI_ERR_INVALID_PARAM -3 + +I assume it is calling `fdt_timer_init()`. + +Let's try removing the `reg-names` property, as it seems to cause it to enter a +different branch, but "control" is never matched there. diff --git a/ox-plic.dts b/ox-plic.dts index 833bf4d..35cf1e2 100644 --- a/ox-plic.dts +++ b/ox-plic.dts @@ -228,9 +228,8 @@ * property is described in * Documentation/devicetree/bindings/riscv/cpus.yaml */ - timer@40002000 { + clint: clint@40002000 { reg = <0x0 0x40002000 0x0 0x000c0000>; - reg-names = "control"; interrupts-extended = <&HLIC0 3>, <&HLIC0 7>; /*<&CPU0 0x3>, <&CPU0 0x7>,*/ /*<&onic_pool 0x3>, <&onic_pool 0x7>,*/