Commit graph

428 commits

Author SHA1 Message Date
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
bunnie
3ad1ae7325 fix typo 2022-07-05 02:43:47 +08:00
bunnie
900e3e6ae2 fix limit on manual FSCB test so we're triggering basis gen once
it's pretty tedious to do repeated basis regens manually.
2022-07-04 18:35:18 +08:00
bunnie
e26106e334 fix warnings and clean up configs
tighten up the scope of some features to reduce warning messages
2022-07-04 18:13:11 +08:00
bunnie
608817f343 finalize/improve basis stress testing
- add an autotrigger feature for the basis stress test so it can
  be run in a fuzzer loop
- various fixes and improvements to the implementation to help
  integrate with CI
2022-07-04 17:55:52 +08:00
bunnie
a977e9852d add a comprehensive secret basis tester 2022-07-04 04:04:39 +08:00
bunnie
41a144a7e0 add some more feedback to the fscbtest test 2022-07-03 01:13:48 +08:00
bunnie
3992a45763 add a test case for "large" keys (128k datasets) 2022-07-03 00:36:49 +08:00
bunnie
5ba62df98d add a test routine for FSCB regeneration
this is meant to work with a reduced-size PDDB to trigger
fast space regen calls more rapidly.
2022-07-01 17:12:25 +08:00
bunnie
a828b3e665 add "extension test" to the PDDB shellchat test command 2022-07-01 00:02:42 +08:00
bunnie
5d874ac0f3 when connecting to debug core, enable programming 2022-06-28 20:38:23 +08:00
bunnie
4fcc1ea173 bump pddb key listing limits
makes it a bit easier for debugging
2022-06-28 19:59:52 +08:00
bunnie
79cb4cd982 image display now works, once heap increase is called
takes about 1MiB of heap to decode the test PNG.

Putting the heap increase at boot seems to not
work, it causes other processes to not spawn. The condition
is not terribly reproducible, so it's probably a concurrency
issue of some type.
2022-06-27 04:03:49 +08:00
bunnie
78ea80f809 remove main() thread-wrapping for non-ditherpunk configs
saves a bit of memory
2022-06-19 21:39:29 +08:00
bunnie
770f7e1f53 add tracking allocator
has to be instrumented on functions of interest, but there is one
e.g. in shellchat now for tracking allocations to display a PNG.
2022-06-19 01:55:16 +08:00
bunnie
e504e9b89c attempt to limit memory size used by PNG decoder
still getting a heap allocation failure, something is
looking for 256k and even when the heap is increased
to a couple megabytes we get heap allocation failures.
2022-06-18 14:21:56 +08:00
nworbnhoj
409f696fde Implement gam::PixelType
enables gam::Img to import different image formats: U8 & U8x3 for now
2022-06-18 08:43:32 +10:00
bunnie
cf89ebe5f5 add wrapper around main functions that need bigger stacks
This allows for `ditherpunk` config to have a much larger
stack size on select processes only.

The cost comes at a 4k fixed overhead for the sacrificial
wrapper thread, so we lose about 20k of runtime RAM, even
when ditherpunk is *not* activated (because we're
always wrapping the threads).

There is no impact on scheduling or CPU utilization, as the
wrapper thread blocks and is never scheduled once the real
main starts. However, it does subtract one thread from the
total available thread pool.
2022-06-16 03:40:19 +08:00
bunnie
18fc6663b2 work around various shortcomings in the net crate to download images 2022-06-14 19:06:08 +08:00
bunnie
0a94e80504 fix warnings 2022-06-14 17:09:44 +08:00
bunnie
6c5d7d511c update the net image test routine 2022-06-14 16:46:37 +08:00
bunnie
fc8e5df2b1 Merge remote-tracking branch 'origin/dither2' into dp2-merge 2022-06-14 16:45:38 +08:00
bunnie
8cb632180c fix fractional decimal places on integer conversions 2022-06-14 04:30:58 +08:00
bunnie
7b2fbdc88b evict f64's from the kernel, and eliminate f32 parsing
turns out these routines add quite a bit of bloat to the kernel
for only cosmetic reasons.
2022-06-14 04:14:25 +08:00
bunnie
e32ea4d3f5 fix #174 2022-06-10 21:36:53 +08:00
bunnie
09a968ef09 remove debug-here dependency
this contains a dependency to `failure` two levels down that has a critical
vulnerability. Unfortunately no new versions of debug-here have been
published in a while. It's no longer used, so just stripping it out
altogether.
2022-06-07 14:00:25 +08:00
bunnie
f620296a94 fix warnings in hosted mode 2022-06-01 11:54:25 +10:00
bunnie
06cda24c19 fix another errant mut that wasn't needed in pddb 2022-06-01 11:54:25 +10:00
bunnie
503615a138 fix warnings that result from the PDDB mutability change 2022-06-01 11:54:25 +10:00
Sean Cross
d342d7a885 apps/services: remove xous::xous_main macro usage
This macro will be removed, since it is no longer necessary. Remove this
macro across the project and replace it with a standard `main()`
function.

Signed-off-by: Sean Cross <sean@xobs.io>
2022-06-01 11:54:24 +10:00
bunnie
8c08a9a188 bring shellchat to AES 0.8 compatibility
Also note here that we have:

- Run all the AES test vectors and confirmed the pass for both
  hw and sw
- Updated the benchmark numbers for the new AES implementation
2022-06-01 11:53:33 +10:00
bunnie
47b76a3d5b include a getrandom implementation that allows us to use modern randcore
A lot of packages are depending on 0.6 api, which requires a crate
that has OS specific TRNG calls. This patch keeps the 0.5 calls
inside the TRNG crate as direct API calls, and migrates to support
a 0.6 api to a patched version of getrandom that supports Xous.
2022-06-01 11:53:02 +10:00
bunnie
5337d34d45 fix warnings in hosted mode 2022-06-01 00:32:49 +08:00
bunnie
2eee81b218 fix another errant mut that wasn't needed in pddb 2022-06-01 00:21:30 +08:00
bunnie
3b1629744c fix warnings that result from the PDDB mutability change 2022-06-01 00:21:22 +08:00
Sean Cross
3ae9d8abf0 apps/services: remove xous::xous_main macro usage
This macro will be removed, since it is no longer necessary. Remove this
macro across the project and replace it with a standard `main()`
function.

Signed-off-by: Sean Cross <sean@xobs.io>
2022-05-31 13:33:30 +08:00
bunnie
c11d5fe52b bring shellchat to AES 0.8 compatibility
Also note here that we have:

- Run all the AES test vectors and confirmed the pass for both
  hw and sw
- Updated the benchmark numbers for the new AES implementation
2022-05-30 03:09:05 +08:00
bunnie
e14e6206ed include a getrandom implementation that allows us to use modern randcore
A lot of packages are depending on 0.6 api, which requires a crate
that has OS specific TRNG calls. This patch keeps the 0.5 calls
inside the TRNG crate as direct API calls, and migrates to support
a 0.6 api to a patched version of getrandom that supports Xous.
2022-05-29 02:47:51 +08:00
bunnie
116015dff8 fixups and debug 2022-05-27 22:45:23 +08:00
bunnie
8553aea95e fixup a stub 2022-05-27 18:09:21 +08:00
bunnie
05f705a931 prove that we've restored ditherpunk functionality to hosted mode
this basically brings us back to the point of the original PR,
but with the code being optional.
2022-05-27 18:05:36 +08:00
bunnie
7d020182d4 integrate ditherpunk as a feature 2022-05-27 17:28:15 +08:00
bunnie
c8165be0fb Merge remote-tracking branch 'jb/dither' into bunnie-dev 2022-05-27 16:44:17 +08:00
nworbnhoj
342e8e82b1 implement shellchat test modals
remove modals feature ux_tests
2022-05-25 10:29:21 +10:00
bunnie
62cbc86aeb add automation strings 2022-05-24 23:21:26 +08:00
bunnie
4d1d132233 add a first-pass at what hardware CI automation strings might look like 2022-05-24 02:22:36 +08:00
bunnie
3bfdc238a0 add support for keymaps in HID
remaps keys based on the assumed keymap based on the user's
preference for the keyboard layout on the device.

So far, only dvorak and QWERTY are supported.
2022-05-17 16:41:08 +08:00
bunnie
ca275308ef Merge branch 'usbdev' into main 2022-05-17 02:31:10 +08:00
bunnie
66e4d9f803 move test commands for USB status checkup from keys to USB 2022-05-17 02:25:59 +08:00
bunnie
346caad315 Add the usb-device-xous driver to the default hardware config
Also includes the USB test commands in shellchat.

This is different from the usb-test crate, in that it's fully
integrated into Xous. usb-test is just for quick-testing the USB
driver, in the absence of most of the rest of Xous.
2022-05-17 00:46:52 +08:00
bunnie
6f1597b1e7 make "fountain" test optionally terminate
any characters typed as an argument after "fountain" will cause
it to terminate in 10 iterations
2022-05-13 14:50:29 +08:00
bunnie
b470588285 oops, fix a compile error. also try adding a flush()...this only made things worse?? 2022-05-13 02:25:35 +08:00
bunnie
56f9c654c0 debugging of TcpStream Drop dropping too fast
so far only able to confirm the problem happens, no effective
fixes yet.
2022-05-13 02:19:10 +08:00
bunnie
fd500927d3 quit fountain generator if error is encountered 2022-05-11 22:20:15 +08:00
bunnie
ce116c2c0d add "fountain" test to net suite 2022-05-11 21:24:04 +08:00
bunnie
9893e70759 fix warning 2022-05-06 13:45:22 +08:00
bunnie
71e41d4b0a fix buffer length check computation 2022-05-06 13:45:22 +08:00
bunnie
9354932483 fix buffer length check computation 2022-05-06 13:34:59 +08:00
bunnie
382f2ae306 fix warning 2022-05-06 04:00:55 +08:00
bunnie
33a3cfa7c2 fix typo 2022-04-25 18:34:31 +08:00
bunnie
a9b2dd535a add a note to remind about the purpose of the unsub test command 2022-04-25 18:32:09 +08:00
bunnie
d23dbd1db8 add an explicit test of the unsub path
normally you would never use this, this would cause the
connection manager to muck up.
2022-04-25 18:30:43 +08:00
bunnie
2c3143f790 Merge branch 'main' into multi-text-modals 2022-04-22 15:54:18 +08:00
bunnie
bac6c25bfe conversion toward standard testing method 2022-04-22 15:10:51 +08:00
bunnie
ee39b9643e add a timeout for the network to disconnect before starting update
this is to avoid panics due to malformed "packets" being received
as the EC is updating and not working correctly.
2022-04-21 01:22:17 +08:00
bunnie
c85f853e08 clean up use statements 2022-04-17 23:03:31 +08:00
bunnie
2fbb522c06 modify the web server to use mpsc, multiple workers
This is basically the Rust example for the web server, with
some tweaks. Add a command to make the device buzz when
a particular URL is hit, and to wait before responding when
another one is hit.
2022-04-17 18:50:10 +08:00
bunnie
f2bd4a6193 fix listener address and also remove the forced timeout on read 2022-04-17 04:58:55 +08:00
bunnie
b3d83c8494 migrate to std::TcpListener in tests 2022-04-17 04:07:13 +08:00
Gianguido Sorà
63cbe0e26f shellchat: style change in demo modals command 2022-04-13 15:52:14 +02:00
Gianguido Sorà
8375fdf801 shellchat: update demo modals command to new interface 2022-04-13 15:49:51 +02:00
bunnie
5d2c65cb6c fix missing update to display in panic handler 2022-04-10 16:57:04 +08:00
Gianguido Sorà
8123393a7d Merge branch 'main' into feature/multi-text-modals 2022-04-07 16:39:03 +02:00
bunnie
d49c35dc0c verify that unmount callbacks are working 2022-04-07 17:58:37 +08:00
bunnie
6ac4ef292b add basis mount/unmount to pddb shell commands, fix some UX formatting 2022-04-07 15:32:47 +08:00
Gianguido Sorà
ba347f6c79 add placeholders, current selection highlight 2022-04-05 16:18:43 +02:00
bunnie
067c603e03 strip out old UDP libraries, harmonize on just libstd UDP 2022-04-04 23:15:51 +08:00
bunnie
57339dfe2f udp libstd passing inital tests 2022-04-04 22:37:01 +08:00
bunnie
b5a6c436c2 first draft at some basic libstd UDP mechanics 2022-04-04 04:49:17 +08:00
Gianguido Sorà
0b62a2657a feature: generalization of modals.get_text()
Added a get_text_multi() method on modals which builds, shows and returns text taken from a modal view with a given amount of fields.

Calling get_text() is equal to a call to get_text_multi() with fields = 1.
2022-03-31 19:24:53 +02:00
Gianguido Sorà
83e61f5f1b feat: add wiring for multiple TextEntryPayloads drawing 2022-03-31 17:54:22 +02:00
bunnie
d736d54cee make pddbtest not part of the hw build but part of hosted mode by default 2022-03-29 16:49:18 +08:00
bunnie
d074de34d6 add seek tests 2022-03-29 04:40:51 +08:00
bunnie
5f6a21bff1 add some manual test cases that run in hosted mode for pddb
these are helpful for debugging "real" use cases, instead of
the synthetic CI benches that don't fully exercise the file-like
API.
2022-03-29 01:49:47 +08:00
bunnie
18c202dcee start of testing code for the PDDB 2022-03-28 22:56:32 +08:00
bunnie
91ed8193a7 fix delete commands to sync and also make keyword ordering parallel 2022-03-28 03:37:04 +08:00
bunnie
18b7cf78df add some pddb delete routines 2022-03-28 01:55:39 +08:00
bunnie
2340686e80 rate limit error messages 2022-03-27 16:45:00 +08:00
bunnie
107c63f7c2 update RTC functions to use libstd 2022-03-27 04:06:26 +08:00
bunnie
1617200cb6 remove the RTC "reach-around" cheat inside shellchat's test routine
The test routine for shellchat "cheats" and accesses the I2C block
to test the RTC during factory operations. This is not aesthetic
and is also potentially a security hole since we don't want less
trusted stuff willy-nilly playing with i2c.

Rewrite to

1) remove i2c references from shellchat
2) replace RTC calls with the newer non-dangerous llio calls that are
limited to read out the initialized time variables.
2022-03-27 02:56:41 +08:00
bunnie
df96ca1429 test for libstd Instant 2022-03-26 02:35:59 +08:00