Commit graph

1631 commits

Author SHA1 Message Date
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
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
bunnie
057d9895a6 beginnings of image signing 2021-07-06 17:31:09 +08:00
bunnie
c51c8081b4 update another build that solves some WDT issues
opened a task to look at WDT stability. seems like we're
still not there yet...
2021-07-06 02:07:31 +08:00
bunnie
d846c5ad0e add a memory stress tester 2021-07-06 01:35:19 +08:00
Sean Cross
2339b7315f emulation: memlcd: add DEVBOOT register and defacement
Add this new register as well as the defacement that occurs when it is
enabled.

Signed-off-by: Sean Cross <sean@xobs.io>
2021-07-05 17:35:15 +08:00
Sean Cross
c1d41bb168 emulation: repl: shrink memory range for sram
Signed-off-by: Sean Cross <sean@xobs.io>
2021-07-05 17:34:58 +08:00
Sean Cross
2c2fdaa1b4 emulation: sync svd from precursors
Signed-off-by: Sean Cross <sean@xobs.io>
2021-07-05 17:18:29 +08:00
bunnie
2c6ba2f127 fix brokenness with ptr_meta crate 2021-07-05 17:17:33 +08:00
bunnie
6ee6316beb Merge branch 'main' into bunnie-dev 2021-07-05 17:12:43 +08:00
bunnie
6c697de512 add l2 cache support (suspend/resume flushing)
also noted some performance benchmark improvements
2021-07-05 17:05:10 +08:00