Sean Cross
b72b4825f0
emulation: add jtag peripheral
...
This initial draft of the jtag peripheral is enough to get the test
started.
Signed-off-by: Sean Cross <sean@xobs.io>
2022-04-20 21:29:09 +08:00
Sean Cross
df03f8c820
emulation: bq27421: correct endianness
...
Because of the previous commit, endianness was incorrect and we weren't
reading the full range of values.
Correct the endianness and support continuous reads. Also expose various
settings so they may be adjusted.
Signed-off-by: Sean Cross <sean@xobs.io>
2022-04-20 21:27:51 +08:00
Sean Cross
cd19fcba57
emulation: ec: i2c: allow reading multiple registers
...
Previously, the code would only allow for reading one register at a
time. This caused that one register to be duplicated repeatedly.
As a result, readings such as Voltage were incorrect.
Signed-off-by: Sean Cross <sean@xobs.io>
2022-04-20 21:26:58 +08:00
Johan Euphrosine
30ff598696
README: add note about renode version
2022-04-06 00:42:46 +09:00
Sean Cross
a70aee7bad
loader: move loader into main workspace
...
Add the loader into the main workspace, removing it from its own
sub-workspace. We can do this now that we can specify the linker script
in `build.rs`.
This improves IDE support, and should shrink disk storage requirements.
Signed-off-by: Sean Cross <sean@xobs.io>
2022-03-22 02:09:18 +08:00
Sean Cross
84c0896823
linux-server: update versatile system
...
Signed-off-by: Sean Cross <sean@xobs.io>
2022-03-02 21:08:22 +08:00
Sean Cross
e507c474d6
wf200: add binary file
...
Signed-off-by: Sean Cross <sean@xobs.io>
2022-03-02 20:51:35 +08:00
Sean Cross
768a7c4b0d
emulation: add WF200 ethernet implementation
...
This adds a working Ethernet implementation based on the WF200. It
currently gets connected to a Linux machine running a udhcpd server,
however it could also get connected to a TUN/TAP connection on Linux or
Mac.
Signed-off-by: Sean Cross <sean@xobs.io>
2022-02-23 21:44:01 +08:00
Sean Cross
9c1255bdd7
emulation: split Com emulation into three files
...
The COM bus is fundamentally three things: The SoC, the EC, and the glue
that binds the two together.
Now that we have the `EnsureTypeIsLoaded` trick, split the file into
three different groups.
Signed-off-by: Sean Cross <sean@xobs.io>
2022-02-18 09:07:13 +08:00
Sean Cross
317f3136aa
emulation: complete initial emulation of spinor/flash
...
Emulate both the SPINOR block as well as the OSPI flash attached to it.
With this change, the PDDB can now be initialized and resets itself
properly. Additionally, data persists across virtual reboots.
Data does not persist across runs of the emulator. That will follow in
an upcoming patch.
Signed-off-by: Sean Cross <sean@xobs.io>
2022-02-17 18:03:45 +08:00
Sean Cross
88512da693
emulation: keyboard: add key injection functions
...
It is now possible to inject keys, strings, and lines of text.
Signed-off-by: Sean Cross <sean@xobs.io>
2022-02-14 17:51:56 +08:00
Sean Cross
d44cae2eae
xous-release: silence GPIO range
...
Signed-off-by: Sean Cross <sean@xobs.io>
2022-02-14 16:37:33 +08:00
Sean Cross
ed4dfd4dc1
emulation: com: update HOLD as part of Transmit
...
Previously, the HOLD signal was updated in a different clock domain from
the transmission signal. This could result in the HOLD bit being set
even if there was no data available.
Update the HOLD bit if it's present as part of the Transmit cycle.
Signed-off-by: Sean Cross <sean@xobs.io>
2022-02-14 13:52:43 +08:00
Sean Cross
11783a050e
emulation: i2c: implement Reset bit on I2C
...
Signed-off-by: Sean Cross <sean@xobs.io>
2022-02-14 13:41:50 +08:00
Sean Cross
c392d8df90
emulation: BQ27421: implement more registers
...
This gets the gas gauge showing more data.
Signed-off-by: Sean Cross <sean@xobs.io>
2022-02-14 13:41:15 +08:00
Sean Cross
49e1eb19c0
emulation: connect EC
...
Connect the EC to the SoC. This allows for emulating both the EC and SoC
in tandem. Messages flow via a 16-bit bus. When data is not available,
`0xdddd` is returned.
There is a HOLD line that goes from the EC to the SoC. This is tied to
the inverse of presence of data in the EC FIFO -- when it's empty, HOLD
is `1`, and when there is data it's `0`.
Signed-off-by: Sean Cross <sean@xobs.io>
2022-02-14 12:28:40 +08:00
Sean Cross
fbbb2120ab
com: working on getting com functioning
...
Signed-off-by: Sean Cross <sean@xobs.io>
2022-02-13 10:59:47 +08:00
Piotr Zierhoffer
e21e55807e
Update Renode models with new ClockEntry API
2022-02-04 04:04:37 +01:00
Sean Cross
4a44d8d32d
emulation: csproj: update targetframework to 2.1
...
The targetframework tag is now 2.1, in accordance with the upstream C#
code from Microsoft.
Signed-off-by: Sean Cross <sean@xobs.io>
2022-01-26 12:51:19 +08:00
Sean Cross
96d241acfd
emulation: memlcd: reduce dirty bit count to 2 bytes
...
Previously, the memlcd had 22 bytes of dirty bits following a line. This
was reduced to 2 bytes, but the logic checking the dirty bytes had not
been updated.
Reduce the dirty byte count to 2 bytes.
Signed-off-by: Sean Cross <sean@xobs.io>
2022-01-26 12:48:04 +08:00
bunnie
40dcd28b23
move the devboot line
2022-01-25 18:22:02 +08:00
bunnie
0d4ab0eb47
Revert "loader: move loader into main workspace"
...
This reverts commit 0d72454776 .
2022-01-17 22:55:39 +08:00
Sean Cross
0d72454776
loader: move loader into main workspace
...
Add the loader into the main workspace, removing it from its own
sub-workspace. We can do this now that we can specify the linker script
in `build.rs`.
This improves IDE support, and should shrink disk storage requirements.
Signed-off-by: Sean Cross <sean@xobs.io>
2022-01-14 17:32:04 +08:00
bunnie
010856406d
fix permissions
2021-10-27 23:06:13 +08:00
Sean Cross
63dc07d633
emulation: get more of the EC working
...
Signed-off-by: Sean Cross <sean@xobs.io>
2021-09-27 19:42:04 +08:00
Sean Cross
45d8124418
Merge branch 'main' of github.com:betrusted-io/xous-core
2021-09-15 17:18:14 +08:00
bunnie
74e2f3f2d2
add a trace debug print in engine emulation for correlation
...
against cycle-accurate verilog simulator.
2021-09-07 05:08:56 +08:00
bunnie
3c67e7a89b
update csharp docs
2021-09-06 21:11:27 +08:00
Sean Cross
ac81da5ecf
emulation: watchdog: fix watchdog timer
...
This causes it to actually work.
Signed-off-by: Sean Cross <sean@xobs.io>
2021-08-30 15:30:59 +08:00
Sean Cross
b8c23af4fd
emulation: fix betrustedsoci2c implementation
...
This fixes the RTC, which gets things working again.
Signed-off-by: Sean Cross <sean@xobs.io>
2021-08-30 15:12:13 +08:00
Sean Cross
9f46fbdcb3
emulation: map soc_csr.bin to flash
...
This is required in order to get the keys, which are used by the
firmware now.
Signed-off-by: Sean Cross <sean@xobs.io>
2021-08-30 13:32:41 +08:00
Sean Cross
a3d69684c8
Merge branch 'main' of github.com:betrusted-io/xous-core
2021-08-30 12:36:40 +08:00
Sean Cross
5aaf166541
emulation: implement partial ec i2c
...
This implements some i2c functionality on the EC. Additionally, it
implements the Betrusted watchdog.
Signed-off-by: Sean Cross <sean@xobs.io>
2021-08-30 12:36:04 +08:00
bunnie
dcc22a910f
update renode.svd with extra register for susres
2021-08-29 22:58:57 +08:00
bunnie
e407e77b4f
unbreak renode build
2021-08-24 23:38:26 +08:00
Sean Cross
66a68f1757
emulation: use riscv32imac-unknown-xous-elf loader
...
Use the new target for the loader.
Signed-off-by: Sean Cross <sean@xobs.io>
2021-08-18 18:23:09 +08:00
Sean Cross
5ec4da0f8f
emulation: use riscv32imac-unknown-xous-elf
...
The path to the generated file has changed. Update it.
Signed-off-by: Sean Cross <sean@xobs.io>
2021-08-04 10:14:56 +08:00
Sean Cross
9e1fec4d78
emulation: update offset of xous.img
...
This image file should get loaded onto SPI flash rather than into RAM,
since RAM gets cleared by the bootloader now.
Place it at a location that matches real hardware.
Signed-off-by: Sean Cross <sean@xobs.io>
2021-08-02 18:16:01 +08:00
Sean Cross
bb9472816f
emulation: add spinor_soft_int and wfi
...
These two peripherals are required to run the current build.
Signed-off-by: Sean Cross <sean@xobs.io>
2021-08-02 17:10:10 +08:00
bunnie
fe581d23ac
update renode svd
2021-07-18 18:52:07 +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
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
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
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
bunnie
2a417557a5
update renode artifacts
2021-07-13 01:02:08 +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
Sean Cross
deb524e570
emulation: sha512: wire up done bit
...
Signed-off-by: Sean Cross <sean@xobs.io>
2021-06-28 21:37:42 +08:00
Sean Cross
3de0b4cf06
emulation: connect sha512 to Renode
...
Signed-off-by: Sean Cross <sean@xobs.io>
2021-06-28 21:35:17 +08:00
Sean Cross
96c3c59b72
emulation: add first draft of sha512 engine
...
This should be feature complete, but has not been tested.
Signed-off-by: Sean Cross <sean@xobs.io>
2021-06-28 21:34:50 +08:00
Sean Cross
2877fcc72a
emulation: correctly wire keyboard inject interrupt
...
This interrupt was wired to the incorrect variable.
Signed-off-by: Sean Cross <sean@xobs.io>
2021-06-28 21:34:20 +08:00
bunnie
4a3258f6bd
Merge branch 'bunnie-dev' into main
2021-06-28 01:33:42 +08:00
bunnie
e2ada8f8fe
attempt to fix up some build system warts
2021-06-28 01:31:43 +08:00
bunnie
a9cc7c3b53
unbreak the renode build
2021-06-27 16:22:30 +08:00
Sean Cross
6b53b1e159
keyboard: map "Home" key to home button
...
It just makes sense.
Signed-off-by: Sean Cross <sean@xobs.io>
2021-06-26 00:40:48 +08:00
Sean Cross
e6073c585d
emulation: fix mapping for down/left
...
This also maps backslash to Menu.
Signed-off-by: Sean Cross <sean@xobs.io>
2021-06-26 00:39:45 +08:00
Sean Cross
24fbdd9c48
emulation: check in newly-minted i2c drivers
...
Signed-off-by: Sean Cross <sean@xobs.io>
2021-06-25 23:55:50 +08:00
Sean Cross
2c270ee355
emulation: add initial drafts of i2c for soc
...
Signed-off-by: Sean Cross <sean@xobs.io>
2021-06-25 23:55:04 +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
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
Sean Cross
fb839f3217
wip
...
Signed-off-by: Sean Cross <sean@xobs.io>
2021-06-16 16:53:40 +08:00
bunnie
b1d027bc52
adding AES native instruction support
2021-06-04 00:49:34 +08:00
bunnie
77ed8972f6
Merge branch 'aes' into bunnie-dev
2021-06-02 04:08:00 +08:00
bunnie
fadc9c29ab
Merge remote-tracking branch 'origin/master' into bunnie-dev
2021-06-02 03:59:25 +08:00
bunnie
25e6bced00
add power-on utilization reporting
...
there is now an extra field in the status bar that gives
the %'age of time that the clocks are running.
2021-06-02 01:08:31 +08:00
Sean Cross
0644d681c5
emulation: add simple vexriscv aes engine
...
This Python-based engine implements the vexriscv accelerated
instructions.
Signed-off-by: Sean Cross <sean@xobs.io>
2021-06-01 20:01:43 +08:00
bunnie
ee2e38be05
add commands to help manage wfi/power debugging
2021-06-01 17:02:30 +08:00
bunnie
61f95363fd
mark a commit for the latest build submitted for testing
2021-06-01 15:33:48 +08:00
bunnie
2f9fa57bdd
clock-gate based power management now seems to be more or less working
2021-05-31 23:14:35 +08:00
bunnie
d9e56fd321
very preliminary power savings working
2021-05-31 05:20:54 +08:00
bunnie
7c55925926
intermediate check-in on wfi
2021-05-30 23:07:16 +08:00
bunnie
afe8d8733d
updates to use the always-on power domain timers
2021-05-30 04:29:03 +08:00
bunnie
52c32cc4d1
auto-powerdown of sha block when not in use
2021-05-30 00:12:18 +08:00
bunnie
1e5bf6131d
update precursors with usb PHY reset patch
2021-05-23 23:55:55 +08:00
Sean Cross
51b4a2db82
emulation: check in repl file with warning header
...
Signed-off-by: Sean Cross <sean@xobs.io>
2021-05-19 14:27:42 +08:00
Sean Cross
e0f4e0c47f
emulation: fix missing interrupts in peripherals
...
Now that we wire up the irq line, ensure the peripherals have actual
interrupts.
Signed-off-by: Sean Cross <sean@xobs.io>
2021-05-19 14:12:01 +08:00
Sean Cross
04f1d11c69
emulation: fix interrupt offset for keyboard
...
This fixes the keyboard interrupt offset to be at 11, rather than 10.
Signed-off-by: Sean Cross <sean@xobs.io>
2021-05-12 21:26:18 +08:00
bunnie
fe6b417643
checkpoint
2021-05-08 01:13:30 +08:00
bunnie
ab67cf46b2
fix path to renode
2021-05-07 23:43:52 +08:00
bunnie
7dd66a4c18
playback is mostly working and stable
2021-05-07 05:42:39 +08:00
bunnie
d17ae106f1
kernel panic on memory lend
2021-05-05 00:58:48 +08:00
bunnie
a4ca725c2a
add a reset to an i2c core
2021-05-03 21:24:37 +08:00
bunnie
0ca2f58c6e
add a note to indicate if we're in cold sleep
...
it's not terribly aesthetic right now, but we can fix that later.
2021-05-02 03:36:54 +08:00
bunnie
b28dff273f
intermediate checkin figuring out ticktimer issue
...
seems to be a hardware problem with the loading routine
2021-05-01 19:13:22 +08:00
bunnie
46fe3885dc
cleanup more turds left over during the bringup of suspend/resume
2021-05-01 00:35:32 +08:00
bunnie
bbcf698ff3
flesh out a simple touch-and-go suspend/resume demo loop
...
now the debuggening begins. lord help us.
2021-04-29 02:56:53 +08:00
bunnie
e481df71da
add a resume kicker port for the handoff of bootloader to kernel
2021-04-29 01:05:50 +08:00