Commit graph

396 commits

Author SHA1 Message Date
bunnie
67fc21fbdd harmonize hosted mode selection, but retain an explicit hosted flag
In general, hosted mode is assumed "by default" if the target
is not Xous. This allows packages to be built cleanly on command
lines that don't know to pass a --feature flag to specify a target.

However, an explicit "hosted" flag is still retained so that we
can confirm the build system intent. This saves us from the failure
mode that we thought we were building for target A, but accidentally
ommitted the flag, and instead we've been silently building for
"hosted" mode without any warning. The main consumer of the "hosted"
flag is now just the build.rs script inside of the utralib.
2022-10-25 17:21:02 +08:00
bunnie
c127f00dc1 add a no-codec feature for DVT builds
specifying this turns off all dependencies that rely on the
codec, which is a different device on DVT.
2022-10-20 22:35:17 +08:00
bunnie
6dacf18213 replace remaining final few instances of com poweroff with susres poweroff 2022-10-17 05:06:39 +08:00
bunnie
dc2c79df4d deprecate reboot function in test routines 2022-10-17 05:06:05 +08:00
bunnie
13217fa402 fix hosted mode warning 2022-10-09 18:08:00 +08:00
bunnie
62af36560b checks for cache coherence issues
Most of the changes introduced in this commit were rolled back,
but, there is now a test facility that's hanging out for the PDDB
to help with future debug efforts.

The patch was motivated by a problem observed in FSCB consistency
when it's updated. Ultimately the root cause was traced to a
cache coherence problem and it's fixed by a patch in the spinor
crate.

However, this patch still retains a check that the data is coherent,
in case the flushing routine isn't complete or some other factor
was missed. It also includes a large amount of commented-out code
that keeps a bit of history used to debug the problem -- eventually,
we can just cull that but it's kept around in case we got the
root cause wrong (or there were multiple causes and coherence is
just one of them).
2022-10-07 18:52:57 +08:00
bunnie
4e40ae6c5d move from target selectors to feature selectors for back-ends
This will allow for e.g. xous on riscv32-imac but not a precursor
target, for example: by using feature selectors we get to have
a bigger range of targets that we support, such as for implementations
that haven't been upstreamed or have official target-triples.

The downsides are:

- patch override libraries don't absorb feature flags. so, for
example, the AES crate that is used to patch other crates won't
be aware of the target features without modifying the referencing
crates.

- features are normally meant to be additive, but target features
are mutually exclusive. The mutex is enforced by a check in
utralib that throws a panic on build if two targets are accidentally
selected at the same time.
2022-10-02 02:56:44 +08:00
bunnie
85279566f0 fix #77
This adds some UX feedback in the edge case that a suspend could not
happen due to a blocking sever, e.g. a sha512 hash pending or
a SPINOR flash write/erase pending.

The UI will tell the user to retry again; usually the ops in
a normally functioning system for hashes or SPI are very short,
so we could almost just retry automatically but I think for now
I want to see if this edge case actually happens.
2022-09-24 02:40:11 +08:00
bunnie
48269651e8 add continuous-time profiling of AES blocks to the net command 2022-09-16 01:45:32 +08:00
bunnie
5112c395f9 commit a snapshot before refactoring perflib components 2022-09-16 01:25:18 +08:00
bunnie
2b3000a3f5 add routines to access ring-xous aes implementation to characterize CT operation 2022-09-11 19:14:08 +08:00
bunnie
beed2ceab8 add performance counter to measure AES runtimes
this simple test does a walking 1's across AES256 key space to
see if there are gross bit-dependent execution timing problems
2022-09-11 07:46:41 +08:00
bunnie
8969485ccc fix errors that came when turning off the tls feature 2022-08-25 16:08:53 +08:00
bunnie
3de588ccef revise the ws test to use a more reliable server 2022-08-25 15:26:33 +08:00
bunnie
16f7c5b234 fix URL to a working server 2022-08-25 05:22:43 +08:00
bunnie
28434f0873 clean up a warning for now
need to find..a service...to connect to. or something like
that. maybe we just have to start a websocket server somewhere
for testing.
2022-08-25 05:06:15 +08:00
bunnie
ea55d23e67 some initial websocket mucking about 2022-08-25 05:04:37 +08:00
bunnie
25d1d0144a cleanup hosted mode build and carve TLS target out 2022-08-20 00:47:28 +08:00
bunnie
59a3bc0370 cleanup patches 2022-08-20 00:38:21 +08:00
bunnie
a5aee2b0d5 patches for debug 2022-08-16 17:54:36 +08:00
bunnie
a05ab47d10 add some test code to exercise TLS to break the linking 2022-08-13 21:23:35 +08:00
bunnie
548f4b059d chore: fix whitespace and warning 2022-08-11 03:11:38 +08:00
bunnie
23f7a70444 Merge branch 'main' into usb-kbd-refactor 2022-08-10 19:08:14 +08:00
bunnie
d1bd99a7f2 demonstrate switching of core between configurations using shell commands 2022-08-10 18:58:55 +08:00
nworbnhoj
4ddcabc657 Merge branch 'main' into iter 2022-08-07 05:36:40 +10:00
bunnie
ccb7d4f6b3 convert image loop to use BufReader now that net stack works 2022-08-06 17:46:35 +08:00
bunnie
77f5eb1dac add a sync command
especially useful in CI where we unceremoniously pull power repeatedly
between tests and this can lead to data corruption.
2022-08-06 15:59:44 +08:00
bunnie
0c50bf983f more error handling on server 2022-08-06 00:38:34 +08:00
bunnie
86d9fd1aad don't die if the stream hangs up on the server 2022-08-06 00:36:04 +08:00
bunnie
bd8afc6de7 clean up debug spew for merge to main 2022-08-05 15:50:11 +08:00
bunnie
cc03383891 commit the final net test state 2022-08-05 15:17:07 +08:00
bunnie
1cf0479528 remove heuristic from read loop, now that read works. 2022-08-05 05:04:03 +08:00
bunnie
89cba7250e commit the latest test state
a lot of tests are now passing, but still some work to do
on the clone routines.
2022-08-05 05:03:10 +08:00
bunnie
20c2e979c8 add more tests, make print outputs a bit clearer 2022-08-04 21:11:55 +08:00
bunnie
536d90034c add a manually-triggered test suite for the net crate
requires the feature "nettest" to be present in shellchat.
this commit has it turned on, it'll be stripped out before
we push to main.
2022-08-02 16:46:36 +08:00
bunnie
3118ebddc9 add error code printout on dictlist failure 2022-08-02 02:52:20 +08:00
bunnie
2c815375a1 add sync to write function in pddb commands 2022-07-29 00:25:01 +08:00
bunnie
46c53d9612 add telemetry for better PDDB CI 2022-07-28 18:46:56 +08:00
bunnie
deecd3651d sync PDDB before churning or flushing 2022-07-28 04:47:32 +08:00
nworbnhoj
956eef4d69 remove heap monitoring from shellchat net image 2022-07-27 11:41:45 +10:00
nworbnhoj
1357d39255 reconfigure shellchat net image to use decode_png 2022-07-27 11:37:31 +10:00
bunnie
edfbc1e4f0 update some text on the USB command to be more accurate 2022-07-23 17:32:13 +08:00
bunnie
6f10061653 reset "don't ask again" flag for password creation during factory test
this facility is necessary in case a worker accidentally picks
the wrong setting, disabling the feature for the device. When
the factory test completes, a call is made to reset the parameter.

This was a slightly complicated affair because the the don't ask
flag is contained within the rootkeys enclave itself, and we can't
just give access to rootkeys willy-nilly. So the flag is passed
through the PDDB and then to the rootkeys enclave. It's not harmful
to have it reset by an unauthorized actor; the pop-up will not
happen if passwords are, in fact, already set.
2022-07-19 23:57:25 +08:00
bunnie
4a9af7b220 add churn function to the PDDB command list 2022-07-19 15:32:07 +08:00
bunnie
fa984845ed add testing commands for rekeying. 2022-07-19 03:17:08 +08:00
bunnie
13b9064517 convert DNA output to something CI can pick up
this is for automation around PDDB readouts -- it is locked to the
device's DNA.
2022-07-16 00:40:04 +08:00
bunnie
abe153208f update shellchat to use the new semver returns 2022-07-13 04:43:35 +08:00
bunnie
af1013a1f3 rework SoC semver reporting to use xous-semver 2022-07-11 15:39:42 +08:00
bunnie
6e7798ff6c remove ECUP from shellchat 2022-07-11 04:06:26 +08:00
bunnie
77a92e310f shift around position of test in modals test and add a dedicated shellchat test 2022-07-06 05:04:26 +08:00