Mirror the error code at byte 1 (in addition to byte 4) in
respond_with_error. The std-side Xous net backend's send path
reads byte 4 (correct vs. the historical [1,1,1,1,code,0,0,0]
layout), but the recv paths read byte 1 (which is always 1
under the old layout, so ErrorKind::TimedOut and WouldBlock
were unreachable from the recv side). With this change both
decoders see the right value; existing byte-4 readers are
unaffected; the "buf as u32-LE != 0" error marker still holds
because byte 0 stays 1.
Companion PR to rust-lang/rust will fix the std side to read
byte 4 and match the send path. This kernel-side mirror is the
shippable workaround until that lands and works with any
Rust-toolchain version.
kernel can lock on boot if keys are pressed in the loader. This
would cause the interrupt handler to trigger while the handler is
being registered, before everything is set up, leading to an IRQ
storm and the kernel hanging.
the fix is to simply disable interrupts while the setup is happening
a further refactor is the run() method is marked as diverging,
so that it's clear what's going on in the code. this refactor
touches other targets as well, since it's at an api level and
not just a target level.
this indicates if we're going into or out of wfi - this matters
because the clock rate asymmetry can be quite great, and the
calling function can have different optimizations for each mode
of operation
the susres process timeout timer was not cancellable, which means
that there was always a timeout pending regardless of the
success or failure of a suspend/resume process.
This fixes the implementation so that the timer is cancelled
in the case of a successful suspend/resume.
- move susres service up in order
- move clock mangaer up
- move i2c into its own thread
- move keyboard server down
- add centralized hnadlers for perclk update
- TODO: actually call perclk update on perclk changes
(but at least now both ADC and I2C have a hook for updating)
- make main loop stall at the end by calling a dummy server
- This reduces CPU load by removing a future-dummy-wait timer
right now the inability to move the WDT object through the
hardware manager is causing it to be initialized fairly late
in boot which makes it less useful for recovering from boot
failures