Commit graph

10340 commits

Author SHA1 Message Date
Sean Cross
31748ab4d4 xtask: fix build warnings due to renode refactor
The Renode refactor didn't propagate the `debug` flag. Additionally, the
`TryInto` import is no longer used.

Fix both warnings.

Signed-off-by: Sean Cross <sean@xobs.io>
2021-07-15 16:44:55 +08:00
Sean Cross
8c7963d65b Merge branch 'renode-crypto' 2021-07-15 16:43:25 +08:00
Sean Cross
db4eb12032 Merge branch 'main' of github.com:betrusted-io/xous-core 2021-07-15 16:43:20 +08:00
Sean Cross
b78073d7ed xtask: use rust to sign binaries, sign Renode images
This removes Python as a dependency. Additionally, Renode images are now
signed.

Signed-off-by: Sean Cross <sean@xobs.io>
2021-07-15 16:41:56 +08:00
Sean Cross
20c91866dd emulation: add keystore and engine to loaded files
These blocks are now supported as emulation targets.

Signed-off-by: Sean Cross <sean@xobs.io>
2021-07-15 16:41:23 +08:00
Sean Cross
aaa4407e21 sign-image: enable kernel image signing
Previously we only supported signing the loader. This also adds the
kernel as a thing that can be signed.

Signed-off-by: Sean Cross <sean@xobs.io>
2021-07-15 16:39:35 +08:00
Sean Cross
fcbc901df8 Cargo: update latest versions of dependencies
Signed-off-by: Sean Cross <sean@xobs.io>
2021-07-15 15:58:13 +08:00
Sean Cross
e15b3e9cc1 emulation: regenerate betrusted-soc.repl
Signed-off-by: Sean Cross <sean@xobs.io>
2021-07-15 15:57:53 +08:00
Sean Cross
50c5e1290d memlcd: implement vram
Now that peripherals handle memory themselves, we need a special block
to handle video memory.

Signed-off-by: Sean Cross <sean@xobs.io>
2021-07-15 15:56:49 +08:00
Sean Cross
9b43b7e475 emulation: engine: remove unused properties
These properties and variables were unused, and should be removed.

Signed-off-by: Sean Cross <sean@xobs.io>
2021-07-15 15:56:18 +08:00
Sean Cross
5ae1e437ab sha512: fix length and 512/256 calculation
The length is now correctly calculated, and the engine properly
completes.

Additionally, a bulk 512/256 implementation has been written that works
well enough, but will fall over if asked to compute a large amount of
data.

Signed-off-by: Sean Cross <sean@xobs.io>
2021-07-15 15:55:13 +08:00
Sean Cross
4790686dd9 engine: pass all checks with engine check
This fixes bugs in SUB, XOR, MUL, NOT, and gets register windows working.

Signed-off-by: Sean Cross <sean@xobs.io>
2021-07-15 11:28:53 +08:00
Sean Cross
acc981638e engine: only 4 tests are failing
Signed-off-by: Sean Cross <sean@xobs.io>
2021-07-15 09:24:19 +08:00
Sean Cross
080c439b22 svd2repl: add memAddr and memSize to peripherals with memory
For peripherals that bring their own memory, avoid generating a memory
region and instead generate a peripheral with the appropriate size
pointers.

Signed-off-by: Sean Cross <sean@xobs.io>
2021-07-14 15:27:23 +08:00
bunnie
98c0054d7e some progress on spinor drivers 2021-07-14 00:01:09 +08:00
bunnie
69d34d38dc Merge branch 'main' into bunnie-dev 2021-07-13 23:11:46 +08:00
bunnie
7cd8b4107a clear keyboard state vectors on resume
if any keys were pressed in the middle of a suspend...

probably, the user didn't care to have them still pressed on resume!
2021-07-13 23:10:10 +08:00
bunnie
78394b869a Merge branch 'main' of github.com:betrusted-io/xous-core into main 2021-07-13 22:42:57 +08:00
bunnie
b8b034086c actually use the curve25519 engine in the loader
forgot to apply a patch.crates-io in the Cargo.toml file
for the loader, so we were using u32 software backend emulation.
2021-07-13 22:40:57 +08:00
bunnie
ef93196cfc stash commit to fix a bootloader issue 2021-07-13 22:28:46 +08:00
Sean Cross
fd5e07b983 emulation: add broken engine implementation
Signed-off-by: Sean Cross <sean@xobs.io>
2021-07-13 22:25:46 +08:00
Sean Cross
4b619bb0a9 emulation: update trng peripherals
The register mapping for the TRNG has changed. Update these peripherals
to reflect the latest shuffle.

Signed-off-by: Sean Cross <sean@xobs.io>
2021-07-13 22:24:04 +08:00
Sean Cross
4864d6bae7 emulation: implement sha512
This implements the sha512 block.

Signed-off-by: Sean Cross <sean@xobs.io>
2021-07-13 22:22:31 +08:00
Sean Cross
dfcc62b96a emulation: add keyrom
This contains the default dev key.

Signed-off-by: Sean Cross <sean@xobs.io>
2021-07-13 22:22:03 +08:00
Sean Cross
f010d76cd5 svd2repl: generate ENGINE and SHA512 blocks
Signed-off-by: Sean Cross <sean@xobs.io>
2021-07-13 22:21:39 +08:00
Sean Cross
f0bd6c6cd3 Merge branch 'sign-image' 2021-07-13 20:11:27 +08:00
Sean Cross
7c0e6ba81d loader: print an error on invalid public key
Instead of silently panicking, print an error to the screen and /then/
panic.

Signed-off-by: Sean Cross <sean@xobs.io>
2021-07-13 20:07:11 +08:00
bunnie
cd28546d60 Merge branch 'bunnie-dev' into main 2021-07-13 01:02:26 +08:00
bunnie
2a417557a5 update renode artifacts 2021-07-13 01:02:08 +08:00
bunnie
135cffcb16 Merge branch 'bunnie-dev' into main 2021-07-13 00:48:12 +08:00
bunnie
8045e0aac8 add the keys command
this is the beginning of where key management goes. for now,
all you can do is just turn USB debug on and off.
2021-07-13 00:47:05 +08:00
bunnie
a4f8346c34 reflect the latest fixes to the secure boot process
also patch up some issues with sha512 reset and loose
ends on docs and updates
2021-07-13 00:46:31 +08:00
bunnie
5d62af49a5 simple signature checks in the bootloader now
checks xous.img as a single blob before accepting it.
2021-07-12 17:16:22 +08:00
bunnie
65ee3609ed
Update flash.md 2021-07-12 16:02:23 +08:00
bunnie
2b19f31da9 set the stage for simple signature validation on the kernel 2021-07-12 02:26:50 +08:00
bunnie
84a2e9f768 fix status bar so that it redraws out of suspend/resume
the bootloader modifies the screen, so all elements must
be redrawn regardless of the pervious state change!
2021-07-11 18:47:19 +08:00
bunnie
b31ff527a3 more help for dealing with python shittiness 2021-07-11 17:01:56 +08:00
bunnie
3359267eb0 update with some hints that hopefully make installation easier 2021-07-11 17:00:38 +08:00
Sean Cross
31551a6227 tools: add sign-image
Add a Rust implementation of `sign-image`. This enables us to sign the
binary on any platform that can compile Rust.

Signed-off-by: Sean Cross <sean@xobs.io>
2021-07-11 16:34:23 +08:00
bunnie
dfb8d89866 add comments about where to get packages from 2021-07-11 14:13:34 +08:00
bunnie
cfd3339b5a add a note about python dependencies 2021-07-11 04:35:36 +08:00
bunnie
8007eabd54 Merge branch 'main' of github.com:betrusted-io/xous-core into main 2021-07-11 04:15:26 +08:00
bunnie
16a746aede remove some warnings in xtask 2021-07-11 04:14:59 +08:00
bunnie
5c5cd36830 update the soc svd and precursors 2021-07-11 04:05:21 +08:00
bunnie
1949c1bbc9 a semblance of sanity, finally 2021-07-09 23:01:50 +08:00
bunnie
3ac17a99db reduce miniruns count to save on gates 2021-07-08 15:58:59 +08:00
Sean Cross
2599031cd7 Merge branch 'main' of github.com:betrusted-io/xous-core 2021-07-07 14:34:19 +08:00
Sean Cross
4e17946960 kernel: riscv: ensure stack is 16-byte aligned
Make sure processes are set up such that the stack is aligned to a
16-byte boundary.

Signed-off-by: Sean Cross <sean@xobs.io>
2021-07-07 14:34:05 +08:00
Sean Cross
d96b6c15c8 loader: ensure stack is 16-byte aligned
The stack must be 16-byte aligned in order for `u32` to work properly,
as the compiler assumes these values are aligned.

Signed-off-by: Sean Cross <sean@xobs.io>
2021-07-07 14:32:08 +08:00
bunnie
657ac115a0
Update flash.md 2021-07-07 00:43:19 +08:00