You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I just ran into a hang running the test suite on Sonata with reduced UART FIFO sizes (we're moving to small FIFOs to save on FPGA resources). The core issue was a write to stderr which goes to uart1 if it exists (which it does on Sonata).
The problem is uart1 never get initialised so our small transmit FIFO fills up and the test hangs. stdout goes to uart or uart0 which gets initialised in the loader:
// Initialise the UART so that we can use it for debugging.
uart->init();
But there's no initialisation for uart1.
Clearly I can just initialize uart1 in the same place but is that the most appropriate place for it? In particular that's aiming to initialise the UART used for debug logs which has the happy side effect of initialising the UART used for stdout as they're the same UART. So mixing in initialisation for stdio specific things doesn't clearly fit there.
We may want stdout and stderr to both go to uart on Sonata anyway so I can sidestep the problem that way but nevertheless there should be some defined stdio or UART init this can all be properly handled in.
The text was updated successfully, but these errors were encountered:
I would like to add a device-initialisation phase that can run on the scheduler's stack before we start the scheduler. This is the right place to do UART initialisation and would also be a good place to configure the revoker. The allocator should be able to have a capability that excludes the registers that configure the revokable range of memory and have early initialisation code set this.
I just ran into a hang running the test suite on Sonata with reduced UART FIFO sizes (we're moving to small FIFOs to save on FPGA resources). The core issue was a write to
stderr
which goes touart1
if it exists (which it does on Sonata).cheriot-rtos/sdk/include/stdio.h
Lines 33 to 37 in b6875ba
The problem is
uart1
never get initialised so our small transmit FIFO fills up and the test hangs.stdout
goes touart
oruart0
which gets initialised in the loader:cheriot-rtos/sdk/core/loader/boot.cc
Lines 1048 to 1055 in b6875ba
But there's no initialisation for
uart1
.Clearly I can just initialize
uart1
in the same place but is that the most appropriate place for it? In particular that's aiming to initialise the UART used for debug logs which has the happy side effect of initialising the UART used forstdout
as they're the same UART. So mixing in initialisation for stdio specific things doesn't clearly fit there.We may want
stdout
andstderr
to both go touart
on Sonata anyway so I can sidestep the problem that way but nevertheless there should be some defined stdio or UART init this can all be properly handled in.The text was updated successfully, but these errors were encountered: