seL4 / util_libs

Other
53 stars 83 forks source link

Issues with BCM serial driver #171

Open Ivan-Velickovic opened 9 months ago

Ivan-Velickovic commented 9 months ago

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.

axel-h commented 8 months ago

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

Ivan-Velickovic commented 8 months ago

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