Commit graph

7 commits

Author SHA1 Message Date
bunnie
5c624e7e52 add a flush after every PDDB write
uncommitted data will lead to corruption later on
2022-11-03 21:01:11 +08:00
Sean Cross
779cc61c56 emulation: spinor: implement erasesector4byte
Implement this command, which is used by the system for bulk erases.

Signed-off-by: Sean Cross <sean@xobs.io>
2022-11-03 12:31:22 +08:00
Sean Cross
4b3d1503e7 renode: place all peripherals under "Betrusted" ns
Give a "Betrusted" namespace to all of the peripherals. This will enable
us to upstream various modules without breaking compatibility with our
own versions of these peripherals.

Signed-off-by: Sean Cross <sean@xobs.io>
2022-10-20 22:19:40 +08:00
Sean Cross
3c156f6ae4 emulation: use BackingFile to make spi persistent
Use the `BackingFile` property of the SPI flash block in order to allow
SPI flash writes to persist across runs. This will write out the SPI
flash contents as data is written.

Signed-off-by: Sean Cross <sean@xobs.io>
2022-06-24 15:55:05 +08:00
Sean Cross
210d0c7fe3 emulation: MX66UM1G45G: add BackingFile property
The `BackingFile` property can be set to a file path in order to make
flash writes persist across runs.

Signed-off-by: Sean Cross <sean@xobs.io>
2022-06-24 15:39:10 +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
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