Commit graph

133 commits

Author SHA1 Message Date
bunnie
3f869ca389 bump utralib version for publication 2026-01-29 19:12:00 +08:00
bunnie
00e70d8c1d add oem-baosec-lite support to loader 2026-01-24 23:51:02 +08:00
bunnie
fba011db3a commit version bump so that we may publish our packages 2026-01-08 03:04:19 +08:00
bunnie
544a0368fc setup the security dependency to pull in sigcheck in crates that use it 2025-12-22 16:18:21 +08:00
bunnie
d874c3e5c2 commit for version bump 2025-12-16 02:02:37 +08:00
bunnie
9b54fdb64f fix dabao target dependencies 2025-12-02 02:27:01 +08:00
bunnie
52215251a4 add a random seed to the environment
this is randomly genverated on boot and inserted into the
environment. it is unique per-PID.

This is useful for seeding psuedorandom number generators,
especially in environments where syscalls are not possible.
2025-12-02 01:40:49 +08:00
bunnie
8402c601d2 refactor loader to use new env and pass serial #'s to bao-1x envs 2025-11-06 14:02:02 +08:00
bunnie
e82b5e5a7f
cleanup after previous commit
now that the ensure QE command is part of the discovery API,
there's no longer a need to call it
2025-10-30 14:56:57 +08:00
bunnie
dbb0a75118 bump versions
have to absorb a version change due to xous-semver change

might as well also update the utra/svd generator dependencies
since that's been held off for a long time now.
2025-10-06 13:23:18 +08:00
bunnie
b665e799ee add detached-app handling
"detached-apps" are Xous applications loaded into a region
of memory-mapped FLASH (and thus memory-mapped applications)
that are separate from the main xous.img image.

This allows developers to work on "just their app" instead
of having to upload the whole Xous ball.

Currently the only configuration that supports this is the
dabao configuration.
2025-10-05 17:08:42 +08:00
bunnie
0f98c3bea1 implement signature checking on the off-chip swap image
Swap can be "secured" in two ways:

1) it can be re-encrypted to a secure, locally generated key

2) it can be signature-checked with a public key.

(2) is provided as a path to receive updates. Updates are distributed
as "encrypted" (with the "0" key), but signed with a public key.
Once the update is validated, it's meant to be re-encrypted
with a per-device unique key.

A big reason for the re-encryption is because the swap is already
encrypted, we can rely on the AEAD for validation, and skip the
signature check (saves time on boot). Recall that the reason
we don't just do a sig-check and run is that is a TOCTOU:
it's pretty trivial to execute a mux that swaps out the FLASH
memory after the signature check with another version that has
malicious stuff in it. So we go with a sector-by-sector
AEAD that's ideally encrypted to a locally generated key.

It also offers the possibility to prevent malleability of the
swap data between devices, as many public-key signed images
could be floating around, including old versions that include
insecurities (e.g. prevents downgrade attack by replacing
an up to date image with an older signed image with an insecurity).

However, this latter possibility requires the user interface
to be correctly setup to prevent malleability by asking users
to opt-in to partition re-encryption. Need to consider this user
experience flow - kicking the can down the line, but that time
is coming soon.
2025-10-04 18:55:36 +08:00
bunnie
9b11361256 fixup loader heap; move signature validation; fixup swap structures
- loader heap is now fixed in a "throw-away" region of memory.
this means the heap should only be used sparingly, and somewhat
dangerously, because the values can't persist beyond the lifetime
of the loader.

- signature validation moved earlier

- fixup swap structures to refer to the API so that image creation
is easier/consistent
2025-10-04 00:56:18 +08:00
bunnie
0437a1263b remove deprecated loader features 2025-10-01 23:38:05 +08:00
bunnie
ed935c66cb loader tracking api changes; needs refinement still. 2025-10-01 02:57:32 +08:00
bunnie
4b99406277 cleanup warnings and errors for verilator target in loader 2025-09-20 22:12:54 +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
ad38080484 refactor dependencies to allow for critical_section in loader 2025-09-11 00:55:01 +08:00
bunnie
af465ce563 add always-update flag
useful for fast debug loops
2025-09-09 22:24:24 +08:00
bunnie
75a9373fea fix AES dependencies so that the correct acceleration is enabled
This relies on a trick I was not aware of previously, which is
that transitive dependencies absorb the additive set of features
enabled within a crate.

see

https://doc.rust-lang.org/cargo/reference/features.html#feature-unification

for the full description. but basically by referring to the feature
required in "aes" despite not being used in the crate but pulled
in by aes-gcm-siv, i can ensure that the transitive dependency
is in fact used.

I think this was always there but previously I just didn't understand
it correctly or didn't use it right when I tried to deploy it, but
this time I think I got it right.
2025-09-07 11:50:12 +08:00
bunnie
2cb22e6b10 remember usb debug print option 2025-08-10 16:09:33 +08:00
bunnie
45e1fa306e fix linker script for the simulation target
no need to include fonts in the verilator target environment
2025-07-23 01:23:22 +08:00
bunnie
a0a2d1728c loader changes for vexii
primarily modify the loading method to mark pages with A/D flags
as needed to work around lack of A/D handling in the trap handler
of Xous.

Also inside main.rs is a todo list for polishing off the vex-ii
port and turning into something actually sustainable for Denarius
once we have more of a full SoC model available.
2025-07-22 00:46:04 +08:00
bunnie
fa3ab1dea1 cleanup dependencies a bit
cramium-soc i think should be deprecated everywhere because
it is redundant with the board targets: anywhere you see a board
target that includes the crossbar soc it should also transitively
pull in the cramium-soc dependency equivalents.

we'll chase this out more later, but for now we're just trying
to get the PDDB to compile
2025-05-20 14:35:42 +08:00
bunnie
e2379821e6 republish xous-rs to fix cargo test 2025-05-11 15:36:17 +08:00
bunnie
8a4959056b bump version for xous crate update - commit so we can publish crates 2025-05-11 14:45:24 +08:00
bunnie
6d858e9fce cleanup out of place/duplicated constant definitions 2025-05-11 14:42:08 +08:00
bunnie
51b103d674 add cam-test target to the loader 2025-05-01 16:44:43 +08:00
bunnie
55592afaaf try to isolate dependencies better 2025-02-28 16:45:48 +08:00
bunnie
1646b2913e add feature flag to gate out sh1107 bit ordering routine 2025-02-27 03:13:58 +08:00
bunnie
130571b0f4 bring loader up to latest API spec 2025-02-20 15:05:23 +08:00
bunnie
6e18096247 ux-api needs to have the board specified when cramium features are selected 2025-02-11 16:25:22 +08:00
bunnie
25dfc4723d refactor loader to use ux-api 2025-02-02 07:02:35 +08:00
bunnie
201decd4ca more feature flag bitrot in loader 2025-01-01 22:47:59 +08:00
bunnie
6dcb23a53b add flags for configuring uart 2024-12-22 00:32:14 +08:00
bunnie
76ffbf6e27 loader feature for mpw 2024-12-06 03:33:10 +08:00
bunnie
c9865e11c2 remove pio dep from loader 2024-12-02 01:01:22 +08:00
bunnie
d3eda68b42 move features from cramium-soc into specific boards
cramium-soc is moving closer to the platonic SoC specifier,
and the board-* features are for the specific boards that use
cramium-soc

This division of feature flags feels a lot nicer and cleaner -
if it holds up to further development, I think this style might
become the new standard for Xous (as opposed to a single level
of feature flag where both SoC and board target are conflated in
terms of meaning - which kind of made sense when the CPU was
an FPGA and could actually have different features for different
boards, but for ASICs this wouldn't happen).
2024-11-30 02:23:35 +08:00
bunnie
8aa633641f add new dependencies for image checking in loader 2024-11-21 02:20:10 +08:00
bunnie
51717fd7d9 move to simple-fatfs 2024-11-20 20:38:31 +08:00
bunnie
d4f209c0b2 add ghostfat to dependencies
in anticipation of starting to emulate the FS
2024-11-20 01:43:46 +08:00
bunnie
64520cf5a3 add note about failing option for pl230 2024-11-18 18:38:15 +08:00
bunnie
ec801ca716 add nalgebra dependency 2024-11-05 01:46:03 +08:00
bunnie
8ce400dde3 add more feature flags 2024-10-27 23:28:38 +08:00
bunnie
5d49d2dbb7 add libraries for math and make usb a feature 2024-10-21 01:17:41 +08:00
bunnie
3b61a60a2c remove boot delay, add reset-debug feature targets 2024-10-16 03:06:41 +08:00
bunnie
843d928126 update manifests to point to board descriptions 2024-10-04 13:05:59 +08:00
bunnie
b2f81666d0 fix formatting 2024-10-02 01:47:51 +08:00
bunnie
75954de8d6 commit the version bump 2024-09-23 01:46:25 +08:00
bunnie
8015b16cb8 clock tests 2024-07-19 17:16:02 +08:00