bunnie
7257dbcaef
add cache flush after array write
2021-07-18 16:04:44 +08:00
bunnie
825322c730
add explicit .iter() for arrays so we still work with Rust 1.51
2021-07-18 16:04:22 +08:00
bunnie
01d3455a16
Merge branch 'main' into bunnie-dev
2021-07-18 12:33:16 +08:00
bunnie
62764cbf39
Merge branch 'main' of github.com:betrusted-io/xous-core into main
2021-07-18 12:31:51 +08:00
bunnie
8cb4362824
trying to merge...what are all these changes?
2021-07-18 12:31:29 +08:00
Sean Cross
6f77ab8344
xous: add cache_flush() call
...
This call is designed to flush the CPU caches by calling the `FENCE`
instruction.
Signed-off-by: Sean Cross <sean@xobs.io>
2021-07-18 10:31:10 +08:00
bunnie
91fe69ca27
add some real-hardware tests for spinor writes
...
definitely still bugs.
need to sleep on it.
2021-07-18 02:36:31 +08:00
bunnie
c662ca7fdd
Update flash.md
2021-07-17 23:55:36 +08:00
bunnie
904f6f6f38
add more tests
2021-07-17 23:33:57 +08:00
bunnie
168d0fc2cb
start of some basic tests
2021-07-17 17:12:23 +08:00
bunnie
cc0f37a80e
rewrite the spinor services
...
- you can only "patch" regions of memory. caller provides a slice
to the region of data they are patching, so that patches can be
computed by the lib-side code of the server.
- erasing is done with a "patch" with all 0xff's as the write data.
a sequence of pure 0xff for a page does not actually cause a write,
the condition is detected and the write is skipped after an erase.
- patches attempt to be somewhat intelligent and not re-write unchnaged
data, or erase blocks that don't need udpating. However, if a user
submits a "sparse patch" with just a couple bytes modified in a
megabyte region they can expect bad performance. Ideally, in that
scenario, each of the smaller modifications are submitted as
individual calls to the patch function, instead of regurgitating
all the data and hoping that hthe patch function does some intelligent
diffing to be as light-fingered as possible about updating the flash.
In other words, the onus is on the calling server to format
patches intelligently. The patch server does only the simplest,
safest optimizations. You don't want to be shuttling megabytes of
redundant data anyways between servers for many other reasons....!
2021-07-17 02:04:22 +08:00
bunnie
7e7ae82156
pivot spinor implementation
...
realizing some core assumptions were wrong, so, scrapping and
restarting
2021-07-15 23:00:50 +08:00
Sean Cross
d248ab3cc7
emulation: engine: always update registers on write
...
These registers get reset when the hardware is reset, however the engine
may still be running. Ensure it's not running when the device is reset.
Signed-off-by: Sean Cross <sean@xobs.io>
2021-07-15 18:23:36 +08:00
Sean Cross
3f1593e56e
emulation: engines: cache registers in RAM
...
Don't consult RAM every time we want to read a register. This improves
performance at the cost of potentially having stale registers.
Signed-off-by: Sean Cross <sean@xobs.io>
2021-07-15 18:10:38 +08:00
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