Commit graph

10340 commits

Author SHA1 Message Date
bunnie
3e922cc9d0 also throw in a lockfile update as a result of a prior PR 2026-05-12 22:19:05 +08:00
bunnie
e4db467d9a update the descriptive name
moving towards a 0.10.1 release, instead of the original
release name
2026-05-12 22:13:31 +08:00
bunnie
f4066999d4
Merge pull request #858 from hanatonikkou/dev
Dali library for Bio-lib
2026-05-12 22:11:04 +08:00
bunnie
318f4b30e5
Update clocks.rs
cleanup some naming
2026-05-12 21:54:29 +08:00
hanatonikkou
ead2e9dda0 Merge branch 'dev' into dali 2026-05-11 15:26:11 +02:00
tunnell
cfcc12eee3 fix(net): write NetError code at byte 1 too, so std-side recv decodes correctly
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.
2026-05-10 20:30:49 +02:00
bunnie
a79a1f8de5
Merge pull request #874 from betrusted-io/puya2
More puya part mods and improved boot ordering
2026-05-09 16:40:48 +08:00
bunnie
f12996a1ab logger loop must never exit, handle exit message with panic 2026-05-09 16:31:12 +08:00
bunnie
0f1cae49f0 make i2c/peri conns lazy
this prevents race conditions on boot between the various
hardware manager dependencies.
2026-05-09 16:06:57 +08:00
bunnie
2f7196679f add some debug telemetry on process termination 2026-05-09 16:06:41 +08:00
bunnie
0c894b05dd disable interrupts before installing interrupt handler
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.
2026-05-08 23:28:32 +08:00
bunnie
26a0894a2d another signing config 2026-05-08 22:21:28 +08:00
bunnie
6fba742cad debug for QE mode entry/exit 2026-05-08 22:21:14 +08:00
bunnie
3e19e7bfd0 add test routine for debugging QE mode 2026-05-08 22:20:32 +08:00
bunnie
ce0e719196
Merge pull request #873 from betrusted-io/fix-race-condition
fix startup race-condition on baosec platform
2026-05-08 04:30:51 +08:00
bunnie
5336b7825b fix formatting issue 2026-05-08 04:25:35 +08:00
bunnie
b669d65f80 fix startup race-condition on baosec platform 2026-05-08 04:22:29 +08:00
bunnie
7590984e4f
Merge pull request #865 from tunnell/fix/kernel-increase-heap-checked-add
Check for overflow in IncreaseHeap syscall
2026-05-08 03:24:29 +08:00
bunnie
679b709d2c
Merge pull request #864 from tunnell/fix/root-keys-fpga-key-ct-eq
Use constant-time compare for FPGA key check
2026-05-08 03:22:01 +08:00
bunnie
12268b32f3
Merge pull request #863 from tunnell/fix/gam-token-ct-eq
Use constant-time compare for GAM auth tokens
2026-05-08 03:21:21 +08:00
bunnie
166e61df54
Merge pull request #872 from betrusted-io/susres
suspend/resume improvements
2026-05-08 03:20:33 +08:00
bunnie
ada3964dfb add an "os" set to the signer
makes things a little more convenient for iterating on signed images
2026-05-08 03:14:26 +08:00
bunnie
50dcf7880f add a wfi specifier to the bio clock change api
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
2026-05-08 03:13:30 +08:00
bunnie
d30ef2f197 debug/fix frequency changes into and out of WFI
I am now confident that the FCLK frequency is correct
going into WFI.
2026-05-08 03:12:47 +08:00
bunnie
b48df7182b make preemption switching infalliable
this allows suspend/resume to complete even if there's
a back-up in the hal processing these requests
2026-05-08 03:11:58 +08:00
bunnie
ae0eee60c5 make bio-op infalliable
this allows suspends to proceed even if the subsystem has an error
2026-05-08 03:11:30 +08:00
bunnie
ccb5912c1a fix timeout on suspend/resume
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.
2026-05-08 03:10:33 +08:00
bunnie
e5971e38ea
Merge pull request #871 from betrusted-io/puya
add puya device support
2026-05-08 03:09:46 +08:00
bunnie
a0609ebc88 add puya device support 2026-05-06 23:35:18 +08:00
bunnie
930de4f61c
Merge branch 'dev' into docs/tools-pddbci-testing-instructions 2026-05-06 09:39:04 +02:00
bunnie
19bffd52f5
Update README.md
update with a little more detail on how to run & use
2026-05-06 15:38:45 +08:00
bunnie
9cfb409f6b
Merge pull request #869 from betrusted-io/clean-base-pddbci-2
apply a clean patch of the changes required to fix ci
2026-05-06 09:33:44 +02:00
bunnie
213a011051 apply a clean patch of the changes required to fix ci 2026-05-06 08:45:15 +08:00
bunnie
c105531e48
Merge pull request #867 from betrusted-io/stability
Stability fixes
2026-05-06 01:33:16 +02:00
bunnie
2ddc5563f6 fix hosted mode 2026-05-06 07:28:08 +08:00
bunnie
7ca009d2b0 Revert "remove api call for reset_reason"
This reverts commit 1dd514f4be.

not sure why but this breaks stability. suspect a loader bug.
2026-05-06 03:28:52 +08:00
bunnie
1dd514f4be remove api call for reset_reason
the register doesn't seem to work.
2026-05-06 02:36:56 +08:00
bunnie
7097164b23 cleanup errant info message 2026-05-06 02:02:05 +08:00
bunnie
761b713d72 add key repeat filtering 2026-05-06 01:29:20 +08:00
bunnie
e2a229faf2 refactor service start order for the main hardware loop
- 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
2026-05-06 00:09:51 +08:00
bunnie
3b4d6a90ed add reset reason userspace apis 2026-05-06 00:09:21 +08:00
bunnie
c6b1b6bb79 refactor i2c implementation into an independent thread
prevents i2c from blocking progress on other critcial hardware
API activities
2026-05-06 00:00:33 +08:00
bunnie
4208ba2e0b reduce debug spew and add userspace api for reset reason 2026-05-05 23:59:39 +08:00
bunnie
602e028402 add some debug tracking on keyboard listeers 2026-05-05 23:59:18 +08:00
bunnie
8c8ad3ab94 api level changes to allow wdt to move earlier in boot
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
2026-05-05 23:58:17 +08:00
bunnie
47821910dd lib-side changes for i2c migration 2026-05-05 23:58:02 +08:00
bunnie
e785257711 api moves for I2C into its own dedicated thread
moving I2C into its own thread mitigates lockup conditions
where I2C is blocking progress on e.g. gpio pin sets and
interrupt handlings
2026-05-05 23:56:58 +08:00
bunnie
ab9a724647 cleanup debug and add reset reason ll api call 2026-05-05 23:56:36 +08:00
bunnie
b78a5619b0 add register interpretation for reset reason 2026-05-05 23:56:05 +08:00
bunnie
85fc3d70f9 add WDT reboot on oem mode in bootloader
prevents device from running down battery if accidentally
left unattended in bootloader while on battery
2026-05-05 23:55:15 +08:00