Commit graph

10340 commits

Author SHA1 Message Date
bunnie
1d274e4d7c engine passs tests, but still some issues with power management 2021-06-25 04:40:06 +08:00
bunnie
6825e2e7e8 reset the i2c machine every new transaction 2021-06-25 03:41:42 +08:00
bunnie
f7874aab94 add in a missing redraw command 2021-06-25 03:38:54 +08:00
bunnie
75dca6bd4c checkin for a rollback to sanity check some things 2021-06-25 02:09:42 +08:00
Sean Cross
7b7be0fe9e hosted: fix MemoryRange refactor
This fixes the MemoryRange refactor where `.addr` and `.size` are now
private fields.

Previously it had only been tested on baremetal mode.

Signed-off-by: Sean Cross <sean@xobs.io>
2021-06-24 18:02:28 +08:00
Sean Cross
a99839ecd6 xous: mark MemoryRange fields as private
Mark the private fields in a `MemoryRange` struct as being private. This
allows us to perform operations on the memory range armed with the
knowledge that the entire range is valid and unaliased.

Signed-off-by: Sean Cross <sean@xobs.io>
2021-06-24 17:41:16 +08:00
Sean Cross
1fb7d4ebd5 kernel: use unsafe {} on Hosted mode
Since `MemoryRange::new()` is now unsafe, add an `unsafe {}` note when
calling this function on Hosted mode.

This fixes the build.

Signed-off-by: Sean Cross <sean@xobs.io>
2021-06-24 17:07:41 +08:00
Sean Cross
023918082b xous: add as_slice() and as_mut_slice() to MemoryRange
Add functions to obtain various slices from a `MemoryRange`. These
functions are safe because we know that the memory in the range is
valid, and we know the size of the type.

Signed-off-by: Sean Cross <sean@xobs.io>
2021-06-24 17:02:47 +08:00
Sean Cross
977a175bb5 xous: mark MemoryRange::new() as unsafe
This function allows for creating arbitrary memory ranges. Mark this
function as `unsafe` in order to warn users that this can be used to
create invalid memory regions.

Signed-off-by: Sean Cross <sean@xobs.io>
2021-06-24 17:02:02 +08:00
bunnie
afa55055ea add serial console mux setting 2021-06-24 13:52:44 +08:00
bunnie
3b0a4f2bf4 clean up some obvious bugs
stuff doesn't crash but also doesn't work
2021-06-24 03:38:32 +08:00
bunnie
ae25142acb engine25519 doesn't crash on boot, at least.
ManagedMemory structure for susres has some issues with large
blocks, so use "heap-allocated" structures
2021-06-24 03:17:32 +08:00
bunnie
16ec932286 refactor to sync/async apis split 2021-06-23 19:12:43 +08:00
bunnie
7ff4824eb6 add routines to copy audio test files to the device 2021-06-23 19:07:59 +08:00
bunnie
f93e06939e
Update flash.md 2021-06-23 18:52:25 +08:00
Sean Cross
b1e949c4c4 xtask: add libstd-test routine
This routine takes a list of binaries to include in the resulting image.

Signed-off-by: Sean Cross <sean@xobs.io>
2021-06-23 17:54:04 +08:00
Sean Cross
e4d02301ee kernel: support pluggable debug printing
This allows us to support different printers in the kernel. For example,
this can be used to swap out the println!() function to print to GDB
when a debugger is attached.

Signed-off-by: Sean Cross <sean@xobs.io>
2021-06-23 17:51:59 +08:00
bunnie
5d21ef0c76 beginnings of the curve25519 accelerator engine core driver
the engine-25519 server just takes microcode jobs and runs them
on the curve25519 accelerator engine.

all the fancy crypto stuff comes from other crates, which will
be filled in later.
2021-06-22 01:48:51 +08:00
bunnie
e8dc10977a clarify trng hosted mode messages, reduce noise 2021-06-21 22:21:40 +08:00
bunnie
96959bfe0d add version reporting to boot log 2021-06-21 22:18:39 +08:00
Sean Cross
931b992063 kernel: gdb_server: return 0xff on read error
This seems to be rather universal.

Signed-off-by: Sean Cross <sean@xobs.io>
2021-06-21 20:23:22 +08:00
Sean Cross
524df22667 kernel: riscv: ensure pages are writable when poking
Ensure pages of memory can be written to when we write to them. This
lets us patch program code to, for example, insert breakpoints.

Signed-off-by: Sean Cross <sean@xobs.io>
2021-06-21 20:22:45 +08:00
Sean Cross
973e4601e4 kernel: don't use debug_here in CI
When running in CI, cause processes to panic rather than waiting for a
debugger to attach. This will ensure test failures are caught sooner
rather than later.

Signed-off-by: Sean Cross <sean@xobs.io>
2021-06-21 20:05:24 +08:00
Sean Cross
4901453e3d syscall: retor_mem: switch to client in hosted mode
Switch to the message client when returning memory in Hosted mode. This
properly marks a process as ready-to-run, which was otherwise not
correctly done.

Signed-off-by: Sean Cross <sean@xobs.io>
2021-06-21 20:04:22 +08:00
bunnie
9647559d25 update precursors to the latest pre-build 2021-06-21 19:22:44 +08:00
Sean Cross
86dd38f7fa kernel: fix hosted build
Signed-off-by: Sean Cross <sean@xobs.io>
2021-06-21 14:24:16 +08:00
Sean Cross
1bc84c76ff emulation: ignore obj/ directory
This is generated by Visual Studio to cache objects, so ignore it.

Signed-off-by: Sean Cross <sean@xobs.io>
2021-06-21 14:13:52 +08:00
Sean Cross
57b502e2c6 kernel: add gdb support to riscv
This adds various primitives that can be used to attach a debugger to
the kernel.

Signed-off-by: Sean Cross <sean@xobs.io>
2021-06-21 14:13:01 +08:00
Sean Cross
0332959068 kernel: debug: add gdb_server support
Signed-off-by: Sean Cross <sean@xobs.io>
2021-06-21 14:12:42 +08:00
Sean Cross
7371ac7bd5 emulation: connect kernel uart to port 9999
This port is used to attach a debugger.

Signed-off-by: Sean Cross <sean@xobs.io>
2021-06-21 14:11:58 +08:00
Sean Cross
f1041f6f6e kernel: add gdbserver to Cargo.toml
Signed-off-by: Sean Cross <sean@xobs.io>
2021-06-21 14:11:26 +08:00
Sean Cross
266a4541d9 emulation: update renode svd file
Signed-off-by: Sean Cross <sean@xobs.io>
2021-06-21 13:56:51 +08:00
Sean Cross
e883dc56d3 emulation: remove unused csr.csv file
This file appears to be completely unused, and is only causing
confusion.

Signed-off-by: Sean Cross <sean@xobs.io>
2021-06-21 13:55:33 +08:00
Sean Cross
6691c6e4a7 peripherals: sync trng blocks with latest bitstream
The bitstream definition for the TRNG blocks has changed. Update the
Renode models to match.

Signed-off-by: Sean Cross <sean@xobs.io>
2021-06-21 13:54:53 +08:00
Sean Cross
80860f0a51 Merge remote-tracking branch 'origin/main' into debugger 2021-06-21 13:22:51 +08:00
bunnie
7ea45b8e5b fix bias in deface lines 2021-06-21 00:54:18 +08:00
bunnie
58f0c8626f build a skeleton for engine25519 2021-06-20 18:42:37 +08:00
bunnie
e5343dac9e did not mean to add a submodule 2021-06-20 18:12:54 +08:00
bunnie
e9499586f1 right. status loop was a mess.
classic code rot resulting from adding stuff that was never designed
to be in part of what was originally just a test loop to show
uptime.

cleaned it up, idle CPU load drops from 8% -> 2-3%.
2021-06-20 01:55:57 +08:00
bunnie
f4fbe84b78 improve redraw performance on menu
it helps to actually redraw the menu instead of relying
upon status updates to redo the Ux.
2021-06-20 00:44:59 +08:00
bunnie
c0d4cbe81d make the menu object more generic; demo with emoji selection 2021-06-19 04:44:21 +08:00
bunnie
b5630b74ce update documentation 2021-06-19 01:36:35 +08:00
bunnie
2b5ba61552 add some useful messages on boot for the hosted mode users 2021-06-19 01:05:42 +08:00
bunnie
69a22adee9 menus basically working 2021-06-19 00:25:18 +08:00
bunnie
aa967a5a17 quiet up hosted mode build warnings 2021-06-18 22:37:08 +08:00
bunnie
769c90764c menu Ux is now nominally doing something menu-like 2021-06-18 19:35:03 +08:00
bunnie
65cc8dd90c defacement first-pass seems working 2021-06-18 17:40:00 +08:00
bunnie
0f937037e4 just getting to the point of implementing defacement
menu now pops up. does nothing, but we can at least
change contexts for the Ux into a different Ux theme.
2021-06-18 16:20:56 +08:00
Sean Cross
2a1aa24040 kernel: debug: add command to print processes
This changes the `p` command to only print processes, and renames the
existing behavior to `P` which prints processes and threads.

Signed-off-by: Sean Cross <sean@xobs.io>
2021-06-18 12:56:27 +08:00
Sean Cross
9ced90190e kernel: fix process suspension
This enables processes to be "suspended" by going into a Debug state.
Messages will back up and processes will continue to be scheduled around
the suspended process, while the system will continue to operate.

Signed-off-by: Sean Cross <sean@xobs.io>
2021-06-18 12:55:21 +08:00