Commit graph

34 commits

Author SHA1 Message Date
bunnie
b8125a5b1f add @xobs patch to get a local-only interface working
EC can talk to the emulated/fake network, but this network
does not have connectivity to the outside world.
2023-09-21 18:39:32 +08:00
Sean Cross
b5a858938a emulation: add separate TAP and Linux implementations
Add one script that starts up a TAP connection as well as a second one
that uses a native Linux machine.

Signed-off-by: Sean Cross <sean@xobs.io>
2022-04-21 10:15:12 +08:00
Sean Cross
86c4a6813d susres: add initial suspend/resume implementation
Signed-off-by: Sean Cross <sean@xobs.io>
2022-04-21 10:14:46 +08:00
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
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
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
d44cae2eae xous-release: silence GPIO range
Signed-off-by: Sean Cross <sean@xobs.io>
2022-02-14 16:37:33 +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
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
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
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
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
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
8cb4362824 trying to merge...what are all these changes? 2021-07-18 12:31:29 +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
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
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
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
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
Sean Cross
2202736aad xous-release: remove unimplemented lattice_hip block
Signed-off-by: Sean Cross <sean@xobs.io>
2021-04-25 14:37:27 +08:00
Sean Cross
37fa1d7cc4 emulation: add initial draft of ec
Signed-off-by: Sean Cross <sean@xobs.io>
2021-04-25 14:32:02 +08:00
Sean Cross
d1b6ad0eb7 emulation: xous-release: silence unimplemented blocks
Signed-off-by: Sean Cross <sean@xobs.io>
2021-04-23 13:58:40 +08:00
Sean Cross
f3ed417c7a emulation: xous-release: add more debug examples
Signed-off-by: Sean Cross <sean@xobs.io>
2021-03-22 22:23:53 +08:00
Sean Cross
2d33c3903d emulation: sync renode addresses
The addresses of the target system have changed. Update the platform
definition file to keep these addresses in sync.

Signed-off-by: Sean Cross <sean@xobs.io>
2021-01-07 18:49:01 +08:00
Sean Cross
e88b4cae7c emulation: update renode models to include trng
Signed-off-by: Sean Cross <sean@xobs.io>
2020-12-23 22:12:28 +08:00
Sean Cross
d8733a437c README: rewrite to document xtask
The `xtask` command has come a long way, and is the preferred method of
building this repositry. Document the fun ways it can be used.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-11-03 20:41:37 +08:00
Renamed from emulation/boot.resc (Browse further)