Commit graph

10340 commits

Author SHA1 Message Date
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
9d07d19361
Merge branch 'main' into vault2 2025-10-30 15:06:23 +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
bunnie
0ddec3f7ba
Merge pull request #710 from betrusted-io/spim-xtx
Spim xtx
2025-10-30 15:05:46 +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
0c522ce914
refactor identify_flash_reset_qpi() to be all-in-one command
identify_flash_reset_qpi's behavior has been revised to
include setting all relevant parameters so that the device
that is identified behaves identically to the model device
(e.g. Macronix), to the extent that it is possible. This
includes setting the QE bit.

The routine to check QE has been renamed to `flash_ensure_eq()`
to reflect that it is safe to call multiple times: it checks
if the bit is already set, and if so, doesn't do anything.
Thus it can be routinely called without worry of wearing
out the device.
2025-10-30 14:56:04 +08:00
bunnie
da623430c6 add debug routines for spim 2025-10-30 04:16:59 +08:00
bunnie
5a8c7c7aa3 cleanup apis and reset spi memory mode at top of boot1 2025-10-30 04:15:12 +08:00
bunnie
60f1b90acb fixup apis 2025-10-30 04:14:48 +08:00
bunnie
3f46e8443c improve spi device detection code 2025-10-30 04:14:28 +08:00
bunnie
94e1f6044a add spim flash autodetect routine and partial support for xtx devices
xtx devices still not fully working, but at least able to switch
in and out of spim modes in the face of uncertainty over which
device type is present.
2025-10-30 04:13:37 +08:00
Jeanie
e268172575 remove version checking 2025-10-29 23:41:08 +09:00
bunnie
03aeafc21a release SE0 using the tristate, not by driving the pin
this reduces current draw when the prog button is depressed.
2025-10-29 03:43:45 +08:00
bunnie
0e50a2591f ensure that boot wait is asserted exactly once in the device lifecycle 2025-10-29 03:43:17 +08:00
bunnie
a14c093da8 enable pullup on SE0 for dabao 2025-10-29 03:42:49 +08:00
bunnie
ddf51992b0
Merge branch 'main' into vault2 2025-10-29 00:56:45 +08:00
bunnie
52b229a39c
Merge pull request #708 from betrusted-io/minor-fixes
Minor fixes
2025-10-29 00:56:33 +08:00
bunnie
cebc87d29a Revert "make acl correct by default for the data region"
This reverts commit 643946a82a.
2025-10-29 00:51:09 +08:00
bunnie
d9cc765419 add a feature to force board type
this is useful in the limited case that the board type is incorrect
in alt-boot mode. saves a step having to type in a command to fix
it.
2025-10-29 00:50:24 +08:00
bunnie
395791b70b make volume label different for alt-boot mode
this helps differentiate the modes to end users
2025-10-28 23:54:20 +08:00
bunnie
9336bdab6a
Merge branch 'main' into vault2 2025-10-28 23:15:41 +08:00
bunnie
4235cba854
Merge pull request #705 from rowr111/tools-bao
tools for the baochip vscode extension
2025-10-28 23:15:27 +08:00
bunnie
997a10470b
Merge pull request #707 from betrusted-io/keystore
Keystore
2025-10-28 23:14:44 +08:00
Jeanie
694eba17fa Merge remote-tracking branch 'upstream/main' into tools-bao 2025-10-29 00:13:17 +09:00
bunnie
03f1c705ee
Merge pull request #706 from betrusted-io/keystore
Keystore
2025-10-28 23:11:39 +08:00