Commit graph

232 commits

Author SHA1 Message Date
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
bunnie
3153d6aa66 intermediate progress on suspend/resume 2021-04-28 04:15:25 +08:00
bunnie
46741b5162 update fpga description 2021-04-27 21:56:35 +08:00
bunnie
39eb916297 add pre-builds for users who aren't building the FPGA from source 2021-04-27 19:01:20 +08:00
bunnie
f76358e716 Merge branch 'bunnie-dev' 2021-04-27 18:55:57 +08:00
bunnie
6a703def63 commit the latest SVD files and other minor changes 2021-04-27 00:53:08 +08:00
Sean Cross
c96c78e9ef emulation: document how to edit Renode peripherals
Signed-off-by: Sean Cross <sean@xobs.io>
2021-04-25 14:42:28 +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
bunnie
4ecd7c06ac trying to fix renode stuff, but not quite there 2021-04-23 21:49:13 +08:00
bunnie
2b973fa29c check in failing svd file 2021-04-23 18:06:25 +08:00
bunnie
b8be041663 fix renode emulation -- need to figure out why TRNG server location changed 2021-04-23 18:02:03 +08:00
bunnie
4022462144 fix RTC wakeup alarm code 2021-04-23 17:51:12 +08:00
bunnie
6e8bc612f1 update emulation files 2021-04-23 17:09:46 +08:00
Sean Cross
428ccd2e0f emulation: memlcd: add PRESCALER register
This register is not wired to anything.

Signed-off-by: Sean Cross <sean@xobs.io>
2021-04-23 17:04:59 +08:00
bunnie
8192c68a63 update emulation files 2021-04-23 14:17:21 +08:00
Sean Cross
4ce311d166 emulation: trng_server: physically reorder the enum
Signed-off-by: Sean Cross <sean@xobs.io>
2021-04-23 14:15:11 +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
b19dadd1c6 emulation: trng_server: fix trng register addresses
This swaps the STATUS and DATA registers, which were incorrectly
created.

Signed-off-by: Sean Cross <sean@xobs.io>
2021-04-23 13:58:01 +08:00
Sean Cross
560cd696ab emulation: keyboard: implement keyboard driver
This implements a keyboard driver based on the current understanding of
the keyboard server.

Signed-off-by: Sean Cross <sean@xobs.io>
2021-04-23 13:57:33 +08:00
Sean Cross
9d9473645b emulation: update betrusted platform file
This updates the memory addresses and attaches the keyboard interrupt.

Signed-off-by: Sean Cross <sean@xobs.io>
2021-04-23 13:56:48 +08:00
bunnie
07c20f6285 update to latest SVD 2021-04-23 01:49:31 +08:00
bunnie
084b66a927 update SVD references to latest SoC design (ticktimer/susres) 2021-04-22 18:08:43 +08:00
bunnie
8916f3e6a3 bump to latest soc.svd 2021-04-21 00:02:10 +08:00
bunnie
e5343bceb9 retrofit system to use the new device-based CSR image 2021-04-20 19:27:29 +08:00
bunnie
d807098ed1 more mods for the braille branch 2021-04-16 05:34:08 +08:00
bunnie
ac40075140 add keyboard input via UART 2021-04-16 04:11:25 +08:00
bunnie
024a072a7c absorb WDT fix to eliminate a race condition 2021-04-15 18:40:00 +08:00
bunnie
93400df67c an initial cut at fcc test commands 2021-04-15 04:10:47 +08:00
bunnie
9f4dc8a7b1 add wifi reset opcodes 2021-04-14 22:43:23 +08:00
bunnie
75295485a7 fix RTC callbacks 2021-04-14 02:58:22 +08:00
bunnie
b408882de7 add updated SVD files to track litex changes 2021-04-12 22:42:02 +08:00
bunnie
a9de4782c5 crashing on load when logger is in callback 2021-04-08 23:07:02 +08:00
bunnie
45c90659e5 rtc first draft 2021-04-08 02:30:57 +08:00
bunnie
da7ace04d4 rebuild and prep for testing on hardware 2021-04-04 02:15:46 +08:00
bunnie
ef3653bf36 add updated SVD files for WDT interrupt rev 2021-03-25 02:40:18 +08:00
Sean Cross
0e8c231758 emulation: add description to renode.svd
Signed-off-by: Sean Cross <sean@xobs.io>
2021-03-24 08:41: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
cb5efccdf8 emulation: ticktimer: fix spurious interrupt on init
Due to a race condition, an IRQ was always fired when the timer was
turned on.

Force a recalculation of the IRQ state when the IRQ is turned on to
avoid firing an interrupt when none should fire.

Signed-off-by: Sean Cross <sean@xobs.io>
2021-03-22 22:23:03 +08:00
bunnie
0e8767aea2 this commit crashes on boot 2021-03-16 19:07:03 +08:00
bunnie
2fb6ae5ee7 debugging i2c 2021-03-16 17:03:10 +08:00
bunnie
c9d7b1c504 add parsing for the <constants> extensions most recently added into Litex 2021-03-02 02:05:34 +08:00
bunnie
d7e1959fed disintegrated fonts working 2021-02-27 14:35:53 +08:00
bunnie
0dc40f4185 attempt to separate fontmaps and loader out of kernel 2021-02-27 02:12:19 +08:00
bunnie
5b80b3fb42 get fcc-agent working again 2021-02-23 04:01:01 +08:00
bunnie
24e7885779 change out hw-image servers for rkyv testing 2021-02-12 01:51:42 +08:00
Sean Cross
4c76bb1a3d emulation: memlcd: fix of-by-one error in redraw
This would cause us to escape the screen under rare circumstances.

Signed-off-by: Sean Cross <sean@xobs.io>
2021-02-10 15:21:44 +08:00
bunnie
9716eba039 Merge remote-tracking branch 'origin/master' into hardware 2021-01-07 20:34:04 +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
bunnie
0ad4377586 update emulation.svd 2021-01-06 13:13:53 +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
Andrew Shen
432a4467c3 Copy WDT into emulator to fix build break
Quick fix a build break in ticktimer-server by copying the WDT
from the SoC into the emulator so that it can reference
utra::wdt::WATCHDOG_RESET_CODE .

Signed-off-by: Andrew Shen <Andrew.Y.Shen@jacobs.ucsd.edu>
2020-12-12 21:06:05 -08:00
Sean Cross
df4db87719 emulation: add fake COM interrupt for CI
The `renode.svd` file hasn't been updated yet, but code depends on
having an interrupt for COM. Add a fake interrupt to get CI building
again.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-11-25 20:39:37 +08:00
bunnie
d583e20b18 very basic battery monitoring via COM 2020-11-25 05:11:32 +08:00
Sean Cross
8270283868 renode: memlcd: accurately map all hardware dirty bits
Previously we were only checking one dirty bit, which doesn't match
what's going on with the real hardware.

Check all the bits to ensure we're accurate.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-11-23 19:31:11 +08:00
Sean Cross
1071a3246b emulation: assign interrupt 8 to ticktimer
This matches the new value from hardware.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-11-23 17:34:50 +08:00
Sean Cross
8c05fa99d2 renode: update svd to match example file
Signed-off-by: Sean Cross <sean@xobs.io>
2020-11-23 16:14:03 +08:00
Sean Cross
f6dc227ed2 emulation: add interrupt to betrusted platform
Signed-off-by: Sean Cross <sean@xobs.io>
2020-11-11 12:50:55 +08:00
Sean Cross
44a3d40b1c emulation: sync latest svd file
This svd file reflects the latest svd from CI.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-11-11 12:50:27 +08:00
Sean Cross
0ed99d1eba emulation: memlcd: format cs file
Signed-off-by: Sean Cross <sean@xobs.io>
2020-11-11 12:50:07 +08:00
Sean Cross
e3dbf1e9d4 emulation: ticktimer: add msleep support
Signed-off-by: Sean Cross <sean@xobs.io>
2020-11-04 13:41:18 +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
Sean Cross
ffcccab513 emulation: add ticktimer and serial uarts
This updates renode's emulation to match the current system design.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-10-15 11:56:41 +08:00
Sean Cross
a0a90cc3ab emulation: rename example.svd to renode.svd
Signed-off-by: Sean Cross <sean@xobs.io>
2020-10-14 10:04:20 +08:00
Sean Cross
30abc1413a utra: move example.svd to emulation
Signed-off-by: Sean Cross <sean@xobs.io>
2020-10-05 10:52:43 +08:00
Sean Cross
d0d687a239 utra: fix build on non-hardware release
This adds svd2utra, which enables building for non-embedded harware.

It also fixes some build issues, and paves the way for generating UTRA
at compile-time.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-10-05 10:13:51 +08:00
bunnie
8cc85f4e11 mods for running on DVT hardware 2020-09-25 17:50:02 +08:00
Sean Cross
965696df8b emulation: fix path to loader
Loader isn't part of the workspace anymore, so its path has changed.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-08-18 17:00:19 +08:00
Sean Cross
1da460cd41 examples: fix betrusted LCD under Renode
This gets the Betrusted LCD demo working within emulation, which means
it ought to work on real hardware.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-08-18 12:09:23 +08:00
Sean Cross
a513800dc5 emulation: update path to target images
Signed-off-by: Sean Cross <sean@xobs.io>
2020-08-17 20:01:26 +08:00
Sean Cross
a467d6fcc7 kernel: baremetal: 2nd process starts to run and crashes
Signed-off-by: Sean Cross <sean@xobs.io>
2020-08-10 16:06:38 +08:00
Sean Cross
10ecacd136 kernel: native: create process for initial processes
These all need to bootstrap themselves.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-08-09 23:08:54 +08:00
Sean Cross
8c3f931445 messaging: first message passing example
THis commit allows us to pass Scalar messages between processes.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-03-30 16:07:58 +08:00
Sean Cross
b0d3a41067 emulation: add powershell script to build renode
This script can be used to build Renode on Windows.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-03-18 14:40:23 +08:00
Sean Cross
d10bc2e894 syscalls: begin adding message-passing syscalls
These are still not connected, however their existence is starting to
solidify the API.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-03-17 10:27:03 +08:00
Sean Cross
c8ccbe27c1 emulation: add initial files for lcd and keyboard
keyboard doesn't work yet, possibly due to upstream bug.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-03-14 15:44:44 +08:00
Sean Cross
c2008e5fe8 syscall: implement map_memory wrapper
Signed-off-by: Sean Cross <sean@xobs.io>
2020-03-13 20:33:08 +08:00
Sean Cross
829570713f README: update info on running renode
Signed-off-by: Sean Cross <sean@xobs.io>
2020-03-12 13:33:37 +08:00
Sean Cross
62cb867ad5 emulation: litex_timer_32: remove dead code
Signed-off-by: Sean Cross <sean@xobs.io>
2020-03-10 17:30:58 +08:00
Sean Cross
8b57b8c36b emulation: add 32-bit litex timer
Litex uses 32-bit CSRs, so add a version of the litex timer module that
uses 32-bit CSRs.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-03-10 16:41:07 +08:00
Sean Cross
5708bcb89a emulation: fix paths for boot.resc
Signed-off-by: Sean Cross <sean@xobs.io>
2020-03-10 14:44:12 +08:00
Sean Cross
279e0131c8 csr.csv: add emulation file
This is used to define the emulation target.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-03-10 12:50:14 +08:00
Sean Cross
f50ec67553 initial commit
This pulls together many disparate repositories into one xous-core
repository.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-03-10 12:13:05 +08:00