Commit graph

2958 commits

Author SHA1 Message Date
bunnie
19a025975e add a note for STAGING area as well 2022-04-22 02:47:55 +08:00
bunnie
d9322366cf modifications to prepare for enhanced USB security
The next release will feature an access control on USB so that
root keys and the encrypted gateware cannot be read back and
transitively the writes would be guttered (but this is not a problem
because the write target address is not set by the memory location
of the write, it's actually set by the location specified in
the program command to the FLASH).

This means that the updating program has to be modified accordingly;
now, for writes, a single location is targeted (and as alluded above,
this is funneled to a write FIFO buffer, and then the actual address is
set with the page program command); and for readback, attempts to read
back the SoC area are flagged and noted as impossible due to security
precautions.
2022-04-22 02:44:04 +08:00
bunnie
b58b8df398 add a maintainer's note 2022-04-22 02:43:49 +08:00
bunnie
ef4ac4f58b fix more merge problems 2022-04-21 18:01:24 +08:00
bunnie
188a18976c clean up merge conflicts 2022-04-21 17:57:42 +08:00
bunnie
c3e5b23dd3 Merge branch 'main' into usbdev 2022-04-21 17:56:28 +08:00
Sean Cross
b829783e7d emulation: wf200: implement "Disconnect" verb
Signed-off-by: Sean Cross <sean@xobs.io>
2022-04-21 12:00:12 +08:00
Sean Cross
a74199829a emulation: add initial TLV320AIC3100
This audio codec lives on I2C and doesn't really do much for us.
However, by adding this device we can now pass `test oqc`.

The next step will be to implement `BetrustedI2S` which is where the
actual audio emulation occurs.

Signed-off-by: Sean Cross <sean@xobs.io>
2022-04-21 11:42:02 +08:00
Sean Cross
aded1e9800 Merge branch 'main' of github.com:betrusted-io/xous-core 2022-04-21 10:36:55 +08:00
Sean Cross
e15649ccd5 svd2repl: add susres
Signed-off-by: Sean Cross <sean@xobs.io>
2022-04-21 10:20:19 +08:00
Sean Cross
582be287f4 emulation: add susres to emulation
Signed-off-by: Sean Cross <sean@xobs.io>
2022-04-21 10:20:00 +08:00
Sean Cross
0992b519b5 emulation: load bootloader from ROM
By loading the bootloader from ROM instead of from ELF, we ensure that
.bss and friends aren't overwritten.

Signed-off-by: Sean Cross <sean@xobs.io>
2022-04-21 10:19:02 +08:00
Sean Cross
2979f4453f emulation: ensure peripherals are reset
Add a `Reset()` call to many more peripherals to ensure they are reset
when the board is reset.

Signed-off-by: Sean Cross <sean@xobs.io>
2022-04-21 10:18:35 +08:00
Sean Cross
d7c2033273 emulation: keyboard: support "Wake Up" sequence
The hardcoded sequence "F1+F4" will wake a device that is suspended.

Signed-off-by: Sean Cross <sean@xobs.io>
2022-04-21 10:16:36 +08:00
Sean Cross
b5a858938a emulation: add separate TAP and Linux implementations
Add one script that starts up a TAP connection as well as a second one
that uses a native Linux machine.

Signed-off-by: Sean Cross <sean@xobs.io>
2022-04-21 10:15:12 +08:00
Sean Cross
86c4a6813d susres: add initial suspend/resume implementation
Signed-off-by: Sean Cross <sean@xobs.io>
2022-04-21 10:14:46 +08:00
bunnie
6a4d79dfe1 update Cargo.lock to reflect the latest PR 2022-04-21 02:43:54 +08:00
bunnie
94fff6b624 add some missing features to the release notes 2022-04-21 02:43:40 +08:00
bunnie
012a4d4673
Merge pull request #138 from vmedea/minifb-0.23
Update minifb to 0.23.0
2022-04-20 20:19:09 +02: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
Mara Huldra
aa360a9733 Update minifb to 0.23.0
Minifb 0.23 fixes a serious wayland keyboard issue.
2022-04-20 18:28:16 +02:00
Sean Cross
b72b4825f0 emulation: add jtag peripheral
This initial draft of the jtag peripheral is enough to get the test
started.

Signed-off-by: Sean Cross <sean@xobs.io>
2022-04-20 21:29:09 +08:00
Sean Cross
df03f8c820 emulation: bq27421: correct endianness
Because of the previous commit, endianness was incorrect and we weren't
reading the full range of values.

Correct the endianness and support continuous reads. Also expose various
settings so they may be adjusted.

Signed-off-by: Sean Cross <sean@xobs.io>
2022-04-20 21:27:51 +08:00
Sean Cross
cd19fcba57 emulation: ec: i2c: allow reading multiple registers
Previously, the code would only allow for reading one register at a
time. This caused that one register to be duplicated repeatedly.

As a result, readings such as Voltage were incorrect.

Signed-off-by: Sean Cross <sean@xobs.io>
2022-04-20 21:26:58 +08:00
bunnie
b39f4c38eb fix update scripts so updates don't wipe root keys :-O 2022-04-20 17:15:46 +08:00
bunnie
9878dfc1a9 add a note about resetting the device properly after an update 2022-04-20 17:03:02 +08:00
bunnie
a31030bf90 remove excess wait state and clarify wait text 2022-04-20 16:59:19 +08:00
bunnie
15105cd0b2 fix update scripts to prevent device from self-resetting during updates 2022-04-20 16:57:10 +08:00
bunnie
e6ef6f81e9 move v0.9.8 to release status on README 2022-04-20 16:11:55 +08:00
bunnie
aa6bf1230a absorb v0.9.8 tagged SoC 2022-04-20 16:11:30 +08:00
bunnie
6e306bdebf update release notes 2022-04-20 03:54:15 +08:00
bunnie
38d6765586 fix remaining bugs in migration, tested and passing on CI + real hardware 2022-04-20 03:48:05 +08:00
bunnie
4f9f1116fc fix various bugs in pddbg
note that there is still pddbg_v1 for the older version of the pddb
2022-04-20 03:47:17 +08:00
bunnie
758ed1ba31 some more fixes to pddbg to bring it up to v2. now passing CI. 2022-04-19 23:28:47 +08:00
bunnie
2d0af08266 bring pddbdbg up to v2 2022-04-19 15:57:51 +08:00
bunnie
b3c89e5f09 add migration of secret basis for v1->v2; fix some interior mutability issues
Probably nobody is really using secret Bases right now, but it's
probably a good idea to lay out all the infrastructure and start
testing it for when it comes time to do it with data that really
matters.
2022-04-19 04:50:15 +08:00
bunnie
d0f632965e add the old version of pddbg for debugging v1.x databases 2022-04-19 04:49:40 +08:00
bunnie
2596a35fe0 Merge branch 'main' into bunnie-dev 2022-04-19 02:05:46 +08:00
bunnie
f4f0812fb4 refactor API to use the None encoding for 0 on NonZeroUsize MemoryMessage fields
at the suggestion of @xobs, requires a new libstd to work with this.
2022-04-19 01:32:36 +08:00
bunnie
4ba34bbd58 intermediate work on v1->v2 migration, need to set aside to fix a libstd problem 2022-04-19 00:45:10 +08:00
bunnie
c8a38b4bf5 fix representation of va in pagetable so we're not burning 12 bits on 0's
this is a v2 fix, incompatible with v1
2022-04-19 00:44:45 +08:00
bunnie
ba3639b00a prepare for v2 migration. more edits coming 2022-04-19 00:44:30 +08:00
bunnie
811b8cff3a Merge branch 'main' into bunnie-dev 2022-04-18 16:23:04 +08:00
bunnie
5c40908244 absorb SoC fix to reduce boot.bin size with latest rustc
just a shift in the optimizer settings.
2022-04-18 16:22:30 +08:00
bunnie
7553053f29 v0.0.2.1 initial implementation - still needs migration code
Previous version was v0.0.1.1
New version is v0.0.2.1 (don't ask me why I skipped v0.0.2.0)

The most significant change is that the key derivation for the basis
is now split into two keys. One key is used for the page table ECB
encoding, and a different key is used for the data AES-GCM-SIV encoding.

This is because someone much smarter than me looked at my scheme
and said it is very dangerous to use the same key for two different
types of ciphers. This person is correct, so it had to be rectified.

For the System Basis, the keys are encrypted using the root keys
wrapper API. In this case, we simply create two random keys, one for
the page table, and one for the data region, and wrap them using
the root keys API.

For user secret Basis, the derived keys are sent through HKDF
with two different "info" strings to derive a pair of keys from
a common password.

In case the cryptographer who looked at this is reading along,
note that the basis name is encoded as a fixed-length, 0-padded
record, so, we don't encode the length of the basis in the hash
used to derive the keys. When I explained the scheme I thought
I was using a variable-length basis name to derive the key, but
when I checked the code, it's always 64 bytes long, and bytes
that are not used are 0-padded, so, I think we don't need the
length encoding field.
2022-04-18 15:59:15 +08:00
bunnie
c85f853e08 clean up use statements 2022-04-17 23:03:31 +08:00
bunnie
53186dd5e8 update release notes 2022-04-17 19:49:20 +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
89ceba9674 tweak some parameters and debug infos
total threads in the net crate are around 10 right now, 32 max, so
increasing the sleeping thread limit to 16, since every now and then
we get exhaustion notes.
2022-04-17 18:49:27 +08:00
bunnie
ecd875e64f remove the legacy files 2022-04-17 05:00:51 +08:00