Commit graph

1664 commits

Author SHA1 Message Date
Sam Blenny
5bf1a34eb7 temporarily change com_rs-ref; TODO: UPDATE HASH
Signed-off-by: samblenny
2021-07-21 09:06:12 +00:00
Sam Blenny
803f6d496f fix passphrase length limit to match WF200 API
Signed-off-by: samblenny
2021-07-21 09:06:12 +00:00
Sam Blenny
03ad8bd2e4 add support for wlan commands to com server
Signed-off-by: samblenny
2021-07-21 09:06:12 +00:00
Sam Blenny
2bbb8d05b9 add ip shellchat command
This is for testing out the IP stack: list dhcp info, send pings,
send UDP message, and receive UDP message.

Signed-off-by: samblenny
2021-07-21 09:06:12 +00:00
Sam Blenny
e8bdf91cc3 add wlan shell command
This is for turning the WF200 wifi radio on and off, setting the
SSID and password, joining an AP, leaving an AP, and checking the
AP connection status.

Signed-off-by: samblenny
2021-07-21 09:06:12 +00:00
bunnie
0d3c936d43
Update flash.md 2021-07-21 00:03:29 +08:00
bunnie
b0d70cde97
Update flash.md 2021-07-18 20:18:49 +08:00
bunnie
fe581d23ac update renode svd 2021-07-18 18:52:07 +08:00
bunnie
e362e2579f un-break hosted mode 2021-07-18 18:29:24 +08:00
bunnie
d98f296499 fixed ordering bug in spinor driver
works now!
2021-07-18 18:02:46 +08:00
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