Commit graph

10340 commits

Author SHA1 Message Date
bunnie
4b99406277 cleanup warnings and errors for verilator target in loader 2025-09-20 22:12:54 +08:00
bunnie
0b1f2796f7 for hwsim target make xous-log output to the duart
this removes the kernel log but you have the verilator sim trace
to debug things
2025-09-20 22:12:19 +08:00
bunnie
ee36a25acd add check for soc.svd file
in simulation some extra registers are made available for helping
to manipulate the simulation. map them in if they are around.
2025-09-20 22:11:22 +08:00
bunnie
f2fe921ff1 fixup bao1x-sim target 2025-09-20 22:10:48 +08:00
bunnie
54571572ac
Merge pull request #682 from betrusted-io/fixups
cleanup some svd name refs to be clearer
2025-09-20 00:44:24 +08:00
bunnie
8ff7718309 cleanup some svd name refs to be clearer 2025-09-20 00:42:33 +08:00
bunnie
93c7329746
Merge pull request #681 from betrusted-io/fix-names
Flag day: Fix names
2025-09-18 21:34:30 +08:00
bunnie
179e178e96 fix up formatting that changed due to the flag day 2025-09-18 21:31:54 +08:00
bunnie
8931ad4dd9 add official part number to the readme 2025-09-18 21:29:19 +08:00
bunnie
1255bf12d9 FLAG DAY: fix all names to harmonize around 'bao1x'
The code base had evolved through several code names, interim
names, company names and chip names that alternatively did or did
not exist.

Baochip is the definitive name of the company, and the Baochip1x
(full part number BAO1X2S4F-WA) is the definitivey part number of
the SoC. For convenience, the part number is shortened to 'bao1x'
in most feature flags and variable references.

This commit fixes all of the odd names and removes some unmaintained
early targets.
2025-09-18 21:25:51 +08:00
bunnie
43c4644b57
Merge pull request #680 from betrusted-io/trng-tweaks
Trng tweaks
2025-09-18 20:22:09 +08:00
bunnie
edf5206846 test code for shutdown/keep-on
at the moment not working, will resume debug once new rev of board
is back.
2025-09-18 20:19:48 +08:00
bunnie
d02268e24c some test code for debugging power-off states 2025-09-18 20:19:22 +08:00
bunnie
04088d15d9 update TRNG tuning parameters to match NTO tape-out
performance is much better, ~7.9834 bits entropy/byte on the
raw RO now.
2025-09-18 20:18:07 +08:00
bunnie
245bd6c264 add extended RO trng tests to baremetal 2025-09-18 20:17:45 +08:00
bunnie
9fb5bc03b7
Merge pull request #679 from betrusted-io/nto-trng
Nto trng - tracking for WIP
2025-09-14 14:12:22 +08:00
bunnie
74218bcded cleanup some cruft 2025-09-14 13:26:33 +08:00
bunnie
442b3a6431 document why value is bit-shifted 2025-09-14 02:18:20 +08:00
bunnie
818717e236 add avalanche generator characterization routine to baremetal 2025-09-14 02:15:21 +08:00
bunnie
a65917707b propagate name change to legacy lib 2025-09-14 02:15:04 +08:00
bunnie
e697b2da77 add bio pin setup handler for xous env 2025-09-14 02:14:41 +08:00
bunnie
2050672b85 propagate name change to loader 2025-09-14 02:14:26 +08:00
bunnie
05a7a1fc06 fix naming of trng cases 2025-09-14 02:10:32 +08:00
bunnie
e87501f14d move debug lib in bdma so we can gate it on/off more easily 2025-09-14 02:10:10 +08:00
bunnie
0391a6aef5 fix naming for bio api 2025-09-14 02:09:40 +08:00
bunnie
a4d9fc9dc7 add bio bit setting and also add input bit mapping to board file 2025-09-14 02:07:42 +08:00
bunnie
514b27eb18 add pio bit setting to api 2025-09-14 02:07:14 +08:00
bunnie
21fc147060 add base64 dep to baremetal 2025-09-13 23:31:04 +08:00
bunnie
95b0639c51 add trng dump code
this code, when run, will continuously dump base64-encoded
TRNG traces to the serial port. Combined with the script
in tools/trng_b64.py which runs on the host, one can recover
extensive TRNG raw data for further analysis by TRNG characterization
tools.
2025-09-13 23:30:01 +08:00
bunnie
f094c22eaa add some notes moving toward trng characterization on new chip 2025-09-13 23:29:27 +08:00
bunnie
6908d9293e add a tool for recovering and analyzing trng traces from NTO 2025-09-13 23:28:42 +08:00
bunnie
bc46acd318
Merge pull request #678 from betrusted-io/nto-usb
Better USB support for NTO
2025-09-13 16:44:33 +08:00
bunnie
b0d2a18122 add some debug info for spurious irqs 2025-09-13 16:18:15 +08:00
bunnie
a077e9c617 fix IRQ mapping on board description 2025-09-13 16:17:47 +08:00
bunnie
9b515a042f add serial port library functions and handlers
this creates hooks for applications to listen to the serial port,
as well as to send and receive data. some improvements to code
ordering for readability are bundled in this as well.

very lightly tested, most of the code comes from other more tested
code in the Precursor stack.

the TRNG test stuff is not put into this stack because I think
it belongs in the baremetal environment, as it's only ever
run for characterization. We don't need to bog down the production
stack with test code.
2025-09-13 15:37:08 +08:00
bunnie
890c311102 make the logger serial path more robust to failures
the logger should not fail under any circumstances, so
any errors in the USB stack should be ignored.
2025-09-13 15:36:36 +08:00
bunnie
7f5a288090 add some commands for testing the serial console & port setup 2025-09-13 15:36:16 +08:00
bunnie
e4d230f42e fix plug/unplug not ready error 2025-09-13 15:35:57 +08:00
bunnie
5dae83d404 improve panic screen formatting 2025-09-13 15:35:34 +08:00
bunnie
2af7aecd73 add some reminders for future debugging on usb-device 2025-09-13 01:12:54 +08:00
bunnie
c47334704a PoC USB serial on top of the HID modes.
this now works with windows, after much testing and patching.
2025-09-13 01:12:12 +08:00
bunnie
ff499f7c09 bookmark some usb-device debug config 2025-09-13 01:11:41 +08:00
bunnie
bd50819fa0 fix EP0 receive issue in usb-device
usb-device has a limitation for this hardware in that it can't
initiate an ep0-receive. It has a hook for flipping ep0 from
IN to OUT (as a modal thing) but for our stack you need to
explicitly setup EP0 to receive - an exact amount of data based
on what's expected - exactly at the point of the setup packet
arriving saying an OUT transaction is pending.

The hack to work-around this is to simply intercept those setup
packets in the handle_event_inner() interrupt handler and initiate
the receive. In fact, the data is completely ignored (in our
application it's setting a baud rate which is fictional in our
system). However, clients such as windows will time out and
refuse to communicate if the OUT packet is not ACK'd, even if
it is ignored.
2025-09-13 01:09:11 +08:00
bunnie
aeee970792 fix device name in baremetal 2025-09-13 01:08:47 +08:00
bunnie
3bd79d0328 make loader windows-friendly for usb serial 2025-09-13 01:08:31 +08:00
bunnie
01957c3b65 make baremetal work with windows CDC-ACM without special drivers 2025-09-12 22:15:04 +08:00
bunnie
82c5b7e970 add per-ep app pointers
this fixes the read/write looping issue
2025-09-12 15:45:10 +08:00
bunnie
52648b72b9 fixup dependencies with latest ref changes 2025-09-12 02:52:32 +08:00
bunnie
04278685a4 re-organize package structure 2025-09-12 02:51:53 +08:00
bunnie
b99da45c38 fixup dependencies to point to local fork versions
the local forks are needed to layer in high speed support,
debug, and a couple of other minor improvements.
2025-09-12 02:51:19 +08:00