Commit graph

494 commits

Author SHA1 Message Date
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
f76dd23067 fix weird PDDB dependency issue
more of a work-around than anything else. the observation is
the PDDB_A* series of constants aren't used outide of the crate
for gen2-targets and so we just remove it as a dependency in
the lib.rs side of things.

This clears up the cargo error we're getting. still don't know
why the dependency tree is not working for that particular target,
but someone is pulling a pddb dependency and it's not obvious who.
2025-05-11 14:40:19 +08:00
bunnie
fbcb59c69e migrations applied to pddb
still broken, there is a weird dependency problem on
board-baosec target that is still to be debugged, but
wanted to get everything committed so i can try bigger
experiments without losing state
2025-05-11 12:59:00 +08:00
bunnie
58f20057b4 update strategy 2025-05-10 08:22:38 +08:00
bunnie
c7225d227d migrate pddb size to board:: and fix boot init
the policy is to format the PDDB automatically on boot if
it can't be mounted.

Need to think about whether this is the right thing to do
or not for the product: if there is any sort of error, it will
just wipe the PDDB entirely, making it unrecoverable.

That being said, why would there be an error? if that happens,
something bad probably happened to the hardware. I feel like
if the SPI interface is reliable this shouldn't be a problem.
So the solution is to make sure the hardware is reliable...
on the other hand, fundamentally, SPI flash can wear out, so
this could aggravate problems at EOL for the device (i.e.
it will take small problems and "amplify them up" into a huge
problem).

The trade-off is...the auto-format makes the token "just work"
on boot. Maybe the right thing to do is to add some code that
checks to see if we're in a true blank state, and if so,
autoformat; and if it looks like something was there before,
prompt for a format?

tbd.
2025-05-08 16:06:42 +08:00
bunnie
f92839602e feature flag fixes for moving sizes to board:: 2025-05-08 16:04:36 +08:00
bunnie
fe599c2fe0 migrate lengths to board:: for gen2; fix opcode numbering bug
opcode numbering bug only affects test mode, fortunately. just
bit-rot from tests long not run...
2025-05-08 16:03:48 +08:00
bunnie
1a3b9131d1 reduce debug out put as this makes it hard to see what's going on in CI 2025-05-06 12:54:34 +08:00
bunnie
ef97e33ae4 fix pddb in doc-deps target 2025-05-06 03:15:51 +08:00
bunnie
89d6b0e81f debug checkpoint
left off at trying to debug the PDDB mount process.
2025-05-06 02:07:31 +08:00
bunnie
15dd0a7f17 cleanup warnings 2025-05-06 02:07:16 +08:00
bunnie
8e161d7e9d we're at least booting now and talking to the pddb service 2025-05-06 01:51:29 +08:00
bunnie
a4e86eead5 cleanup some gen1/gen2 differences 2025-05-06 01:49:42 +08:00
bunnie
1ee1239494 fix hosted mode lifetime issue 2025-05-05 01:52:43 +08:00
bunnie
34e9a1f1ce gen2 apis now compiling clean
system doesn't work yet because none of the keystore is there, but
at least we don't have conflicting/missing APIs
2025-05-05 01:49:39 +08:00
bunnie
c8db01c563 re-org rootkeys-api into common and generation-specific libraries 2025-05-04 19:05:58 +08:00
bunnie
9d6223d0b2 pddb migrations for keystore-api 2025-05-04 18:34:33 +08:00
bunnie
22433fa25c reconfigure toml files for pddb target testing
OK, i think this gets us to the starting point of shaving down
the PDDB crate from the restored baseline
2025-05-04 17:03:00 +08:00
bunnie
f9c42f6176 rollback pddb to previous known good state
restart the refactor process now that the modals arc is finished.
2025-05-04 16:40:13 +08:00
bunnie
142d55a2b7 this was meant to be committed with the previous commit 2025-05-04 16:34:12 +08:00
bunnie
ae23121d6a checkin work state before we rollback the pddb area
i have decided that the current approach sucks, and i'm going
to abort the work in the pddb area. however, the stuff in
the rest of the branch is pretty useful, so we'll just revert
the stuff inside the pddb directory.
2025-05-04 16:33:12 +08:00
bunnie
abbffaaf20 more restructuring of pddb codebase
in particular, spinor driver stub does not belong in this crate
2025-05-04 03:34:01 +08:00
bunnie
e7a2c97ca3 some progress on compatibility 2025-04-29 22:32:59 +08:00
bunnie
54ba8c9cf7
Merge branch 'main' into pddb-feat-down 2025-02-01 22:29:55 +08:00
bunnie
4f14a67504 formatting changes due to changes in nightly rust
needed to get a clean check on gh
2025-02-01 22:26:40 +08:00
bunnie
858d7a739f part way through the main module, we have more clarity on the task
i think it's becoming clearer at this point that other elements
need to be implemented before we can attack this. leaving notes
and bread crumbs so I can come back to this branch later
2025-02-01 02:37:33 +08:00
bunnie
ecaab9041f add the hw module 2025-02-01 02:37:09 +08:00
bunnie
deb2b6ac53 add an interim shim for the spinor implementation
The Spinor struct will be pulled into the PDDB for the cramium
version. This is done in part to reduce the number of servers
(keep the memory footprint light) and also because the physical
spinor hardware is owned by the swapper crate (because the ROM
shares a bus with the swap RAM). So, all that is needed in
this case is a thin shim that can adapt the two APIs to be
compatible with each other.

THe currently checked in code is just a copy of the existing
spinor code tho - it has no bearing on reality, it's just there
as a placeholder that contains all the APIs.
2025-02-01 02:35:26 +08:00
bunnie
aea415cca8 figure out changes necessary at the external API level 2025-02-01 02:35:09 +08:00
bunnie
73458dbd4c make a wish list of the dependencies we want to isolate
gate the dependencies behind a "gen1" and "gen2" feature
flag.
2025-02-01 02:31:59 +08:00
bunnie
45a8eb2227 stage tomls for version bump: try_send added to xous-ipc 2024-12-16 18:50:11 +08:00
bunnie
93b9ec00bf bump version numbers on all the packages so we can absorb num-derive changes 2024-12-02 19:14:11 +08:00
bunnie
2ace34abee cleanup static mut warning in hosted mode 2024-12-02 18:54:44 +08:00
bunnie
e4e6db8bc9 fix implicit lifetime warning 2024-12-02 18:54:26 +08:00
bunnie
83e26ff4c7 update num-derive dependency
this became mandatory in 1.83 to remove warnings. I think it
should have no impact on functionality.
2024-12-02 18:52:59 +08:00
bunnie
043dfd84ae update formatting to latest nightly rules 2024-09-24 01:49:45 +08:00
bunnie
f494da21cc absorb new xous-ipc version 2024-09-23 22:05:50 +08:00
bunnie
2e9b19d62d fail, don't panic on serialization failure
this allows us to handle the error. probably should propagate
on to xous-ipc
2024-09-23 19:02:19 +08:00
bunnie
8cd1cef679 cleanup bulk read on PDDB
we don't have to pass a "size" field anymore; since we're end-offset
from pos, just pass pos and use that to chain records.
2024-09-23 18:07:50 +08:00
bunnie
cdc841124d fix a xous-ipc change but now conflated with reformatting 2024-09-23 14:18:45 +08:00
bunnie
75954de8d6 commit the version bump 2024-09-23 01:46:25 +08:00
bunnie
4c7c9312c1 change xous-ipc api to 0.10.0 2024-09-23 00:24:48 +08:00
bunnie
be227adde1 removed sized strings from pddb interchange structures
I think this is safe to do because no strings can be directly
serialized into the PDDB's structures. The place to check for
this is inside the backend/ directory. For example, `DictName`
is where the name field is serialized into a structure that
goes onto the disk. It's explicitly length-checked.

What this means is that we could have calls into the pddb crate
with invalid length strings, however, if you check the lib
implementation, all of the APIs also pre-flight the length of
arguments to ensure they fit into the destination string.

So mostly what we're losing is the constraints on the intermediate
IPC representation, but the length is still checked on either side.
2024-09-22 15:44:05 +08:00
bunnie
34e6f46d63 formatting changes that resulted from the regex search
a bunch of lines are shorter or different length now which
triggers a mandatory reformat. this patch cleans that up,
so that going forward the manual rework patches are clearer and
not tied up with formatting patches.
2024-09-22 15:31:14 +08:00
bunnie
f2fbc7fafd regex search/replace instances of xous_ipc::String to String
more regex results
2024-09-22 14:19:32 +08:00
bunnie
311154e231 absorb version bump 2024-06-27 00:26:12 +08:00
bunnie
a360f3ee52 bump xous pins for RawTrng API 2024-06-13 15:49:35 +08:00
bunnie
35e7cf3a5b bump xous dep revs 2024-05-29 02:07:06 +08:00
bunnie
9e66c1bee2 commit the version bump 2024-05-07 01:03:05 +08:00