util_libs icon indicating copy to clipboard operation
util_libs copied to clipboard

Issues with BCM serial driver

Open Ivan-Velickovic opened this issue 2 years ago • 2 comments

A while ago I tried to get the RPi4 into the seL4 CI due to how fragile the platform is. After some fixes/work I thought it was ready to go but then it got blocked on not working in release mode (https://github.com/seL4/ci-actions/pull/278).

seL4test would just hang in release mode. What seems to be causing this is the BCM serial driver as applying this patch fixes everything:

diff --git a/libplatsupport/src/mach/bcm/serial.c b/libplatsupport/src/mach/bcm/serial.c
index 0091c15..ec77a7d 100644
--- a/libplatsupport/src/mach/bcm/serial.c
+++ b/libplatsupport/src/mach/bcm/serial.c
@@ -185,7 +185,7 @@ int uart_init(const struct dev_defn *defn, const ps_io_ops_t *ops, ps_chardevice
 
     }
 
-    uart_gpio_configure(defn->id, ops);
+    // uart_gpio_configure(defn->id, ops);
 
     uart_funcs.uart_init(defn, ops, dev);

I don't know anything about GPIO and don't really have the chance to understand it right now so I don't know why this works. In fact, I don't even remember why I tried commenting out this.

Debug mode of sel4test does not make use of the actual serial driver (which seems weird in my opinion now that I think about it) which is why this issue only came up in release mode.

If someone more familiar with GPIO could take a look at this that would be great.

Ivan-Velickovic avatar Oct 18 '23 02:10 Ivan-Velickovic

I wonder, should the seL4 release 13.0 (https://github.com/orgs/seL4/projects/2) include proper RPi4 support also?

axel-h avatar Nov 14 '23 03:11 axel-h

If someone volunteers to solve the issue, than maybe it could be included yes.

Ivan-Velickovic avatar Nov 14 '23 03:11 Ivan-Velickovic