Commit graph

9331 commits

Author SHA1 Message Date
bunnie
5981d7afe4 make heap a standard feature available in precursor
this makes the env building uniform across platforms
2025-11-07 00:37:36 +08:00
bunnie
50962a6ba6 cleanup warning in latest rust
pointers to font tables are conjured out of thin air and
the standards have changed on how to do this.
2025-11-07 00:36:57 +08:00
bunnie
f70f900f30
Merge pull request #722 from betrusted-io/serial-numbers
Serial numbers
2025-11-06 14:13:13 +08:00
bunnie
ede73b802f update lockfile 2025-11-06 14:11:00 +08:00
bunnie
815621d829 update handling of id numbers 2025-11-06 14:10:38 +08:00
bunnie
d91c2e7671 fix API to reflect that the 0-state is the most permissive state 2025-11-06 14:10:00 +08:00
bunnie
12d0728582 shorten the generic identifier
make it long enough that it's unlikely to have two identical
ones randomly connected to the same machine

but short enough that it's likely/conceivable to have a collision
2025-11-06 14:08:48 +08:00
bunnie
2d7ee0c614 ensure security bits are set according to -A1 stepping
in some modes these don't get side-effected elsewhere so make
sure they are set correctly upon entering the next stage
2025-11-06 14:08:05 +08:00
bunnie
664ef0a6c4 use serial numbers & interim pid/vid in USB stack 2025-11-06 14:07:30 +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
01efeb49cb refactor env parsing
make it extensible so that more env vars can be added easily
2025-11-06 13:55:21 +08:00
bunnie
e737948a2d add test routine to print environment variables 2025-11-06 13:54:59 +08:00
bunnie
bab29616aa Merge branch 'main' of github.com:betrusted-io/xous-core into serial-numbers 2025-11-06 13:04:33 +08:00
bunnie
137c70a629 add routines for manipulating and using the serial numbers in boot1 context 2025-11-04 13:15:28 +08:00
bunnie
aaf1cbd2f9 add base routines for deriving & controlling serial numbers 2025-11-04 13:13:52 +08:00
bunnie
1d644d9d33
Merge pull request #720 from rowr111/app-creation-helper
tools-bao: helper for app creation and move all subparsers to their respective command files
2025-11-04 09:34:08 +08:00
Jeanie
9b69e337fb helper for app creation and move all subparsers to their respective command files 2025-11-03 23:39:11 +09:00
bunnie
ef0f7848e7
Merge pull request #719 from betrusted-io/maybe-fix-usb-lockup
Maybe fix usb lockup
2025-11-03 18:35:48 +08:00
bunnie
5863296632 cleanup the feature tree; add double-lock detection printing
this cleans up the feature dependency tree a bit and also adds
some ability to print an error when the double lock condition
is discovered. it should be solved but it can only be detected
at runtime. Insntead of it being a silent failure (because
the server hung in an interrupt context and couldn't emit any characters),
it sets an atomic bool that can be checked and reported upon by
the main thread.

also cleans up debug uart acquisition.
2025-11-03 08:02:21 +08:00
bunnie
0b92da5bab add better locking on core USB object
there is a lock that happens in serial console interactions with
local echo where the instant feedback of a character entered causes
the USB object to be locked when the interrupt handler enters to
receive a character that was just sent.

The fix to this is to add the ability to disable interrupts before
entering a critical section (such as enqueuing data for a write)
and then re-enabling after tha section is done.
2025-11-03 08:00:31 +08:00
bunnie
eaef679faa
Merge pull request #717 from betrusted-io/keystore-dabao
Keystore dabao
2025-11-02 10:40:28 +08:00
bunnie
5de6581698 include chaff output into the hazardous-debug 2025-11-02 10:38:29 +08:00
bunnie
ed94245a5c enable trng server in dabao mode
this allows the rand core crates to work
2025-11-02 10:37:47 +08:00
bunnie
9d3da626f2 handle case where driver is called too early, before everything is setup 2025-11-02 10:37:04 +08:00
bunnie
c309336897 fix ordering of USB start until everything is setup 2025-11-02 10:36:24 +08:00
bunnie
2f0895b46c Merge branch 'main' of github.com:betrusted-io/xous-core into keystore-dabao 2025-11-02 08:02:17 +08:00
bunnie
cc1f4257d7
Merge pull request #716 from betrusted-io/fix-boot-command
Fix boot command
2025-11-02 08:01:57 +08:00
bunnie
d901c61846 modify boot sequence to generate keys for a dabao environment
also update the audit to check the respective flags
2025-11-01 23:56:47 +08:00
bunnie
26078dcc7d add keystore to dabao configuration
After some contemplation, we should include the keystore in the
core service set featured by the dabao-xous configuration.

The pros are: any compatibility/sharing of resources
that require access to RRAM, one-way counters, UUIDs, etc.
will either require a wholly separate implementation that is
"insecure" or it could just reuse the baosec work. Furthermore,
as cryptographic accelerators are laid into the keystore,
the APIs become available to the dabao environment

The cons are: more space is used in a space-constrained
dabao environment (roughly 140k "deadweight" at the start, but
as cryptographic APIs get layered in this can grow substantially);
the key slots are "used up" in part by the scheme, which leaves
less key slots available for user-defined purposes.

This is mitigated by the fact that there are a couple thousand
key slots, and so even though we use a couple hundred of them
it's still not the whole range.

Also, the baosec/dabao feature flag can be used to feature-out
cryptographic APIs/accelerators that are too obscure or not
useful for the dabao environment, to "lighten up" the
firmware load.
2025-11-01 22:59:07 +08:00
bunnie
3f60e48793 Fix 'boot' command not re-enumerating USB
The "press button" path cleanly shuts down the USB stack
before going into the next stage.

"boot" does not; it missed the additional code added at the
end of the main routine.

Refactor the "boot" routine to be a function call now, so any
future improvements to the boot process are used by both paths.
2025-11-01 20:09:43 +08:00
bunnie
406e39a0d5 fix timebase of delays in loader
should be tied to the system clock frequency
2025-11-01 20:09:12 +08:00
bunnie
05c9828106
Merge pull request #712 from betrusted-io/dabao-console-default
make dabao-console a default app for the dabao target
2025-11-01 19:08:29 +08:00
bunnie
0bcd861d9c add app deduplication code
this ensures that a given app is not included more than once

significantly, this allows for an app to be in the default list
and also selectable from the menu and you don't end up with
two copies of it in the binary.
2025-11-01 14:19:58 +08:00
bunnie
e75713e08e
Merge pull request #715 from rowr111/tools-bao_apps-name-change-and-send-boot-cmd
tools-bao: app->apps name change, send boot cmd to be used by ext for build-flash-run, default baud rate
2025-11-01 04:08:06 +08:00
Jeanie
e5a9a487dc missed in the merge 2025-11-01 04:01:36 +09:00
Jeanie
e75013af43 Merge remote-tracking branch 'upstream/main' into tools-bao_apps-name-change-and-send-boot-cmd 2025-11-01 04:00:39 +09:00
bunnie
23f8534d87
Merge pull request #713 from betrusted-io/app2apps
Rename 'app.uf2' to 'apps.uf2'
2025-11-01 02:57:08 +08:00
Jeanie
c625b77909 app -> apps and new function to send boot command on serial port to start run mode 2025-11-01 03:26:56 +09:00
bunnie
1e5b381c75
Merge pull request #714 from betrusted-io/fix-features-dabao
fix feature tree for dabao build
2025-10-31 12:14:55 +08:00
bunnie
dd144b9446 fix feature tree for dabao build
"usb" is now default for dabao-console, should not be passed
as a universal feature to all apps as not all apps have that
feature
2025-10-31 12:13:54 +08:00
bunnie
f66944990a fix feature tree for dabao build
"usb" is now default for dabao-console, should not be passed
as a universal feature to all apps as not all apps have that
feature
2025-10-31 12:12:52 +08:00
bunnie
be274c7070 fixup side effects of renaming app partition
I think these are the spots that are impacted by the naming
change.
2025-10-31 11:28:26 +08:00
bunnie
0e399e6264 rename detached-app partition to "apps.uf2"
Per @rowr111 suggestion to make it less confusing in that
the app partition can in fact contain more than one app.
2025-10-31 11:27:42 +08:00
bunnie
770c986e72 make dabao-console a default app for the dabao target 2025-10-31 11:17:50 +08:00
bunnie
c6d5199c78
Merge pull request #711 from betrusted-io/xtx-cleanup
Xtx cleanup
2025-10-31 11:14:48 +08:00
bunnie
7e47d27d37 add handling for dabao case in baremetal 2025-10-31 09:46:09 +08:00
bunnie
8b5f27daae change baremetal commands to require a board spec 2025-10-31 09:45:53 +08:00
bunnie
2153ae59df remove selftest from default set 2025-10-31 09:03:04 +08:00
bunnie
ea43e9248a cleanup dangling debug code 2025-10-31 09:01:02 +08:00
bunnie
dd14964ca6
Merge pull request #709 from rowr111/remove-version-checking
remove version checking from the extension tools
2025-10-30 15:06:11 +08:00