From 4a32baf12f4f170060013ef73fa411eeba98ac85 Mon Sep 17 00:00:00 2001 From: bunnie Date: Sat, 9 Jan 2021 02:38:02 +0800 Subject: [PATCH] fix SVD sample file issues that are breaking CI --- buildpush.sh | 2 + svd2utra/examples/soc.svd | 816 ++++++++++++++------------------------ xtask/src/main.rs | 2 +- 3 files changed, 307 insertions(+), 513 deletions(-) diff --git a/buildpush.sh b/buildpush.sh index 35fdf1800..cb400bf83 100755 --- a/buildpush.sh +++ b/buildpush.sh @@ -58,6 +58,8 @@ set -- "${POSITIONAL[@]}" DESTDIR=code/precursors cargo xtask hw-image ../betrusted-soc/build/software/soc.svd +cp ../betrusted-soc/build/software/soc.svd svd2utra/examples/soc.svd +cp ../betrusted-soc/build/software/soc.svd emulation/renode.svd if [ $? -ne 0 ] then diff --git a/svd2utra/examples/soc.svd b/svd2utra/examples/soc.svd index 6a9c3179f..f45d74861 100644 --- a/svd2utra/examples/soc.svd +++ b/svd2utra/examples/soc.svd @@ -452,15 +452,15 @@ interrupts.]]> UARTSEL +console, others reserved based on build]]> 0x0014 0x00 32 uartsel - 0 - [0:0] + 1 + [1:0] 0 @@ -1051,8 +1051,192 @@ register to disable individual events.]]> - INFO + APP_UART_PHY 0xF000A000 + APP_UART_PHY + + + TUNING_WORD + 0x0000 + 0x4b7f5a + 32 + + + tuning_word + 31 + [31:0] + 0 + + + + + + 0 + 0x4 + registers + + + + APP_UART + 0xF000B000 + APP_UART + + + RXTX + 0x0000 + 0x00 + 32 + + + rxtx + 7 + [7:0] + 0 + + + + + TXFULL + 0x0004 + 0x00 + 32 + + + txfull + 0 + [0:0] + 0 + + + + + RXEMPTY + 0x0008 + 0x00 + 32 + + + rxempty + 0 + [0:0] + 0 + + + + + EV_STATUS + + 0x000c + 0x00 + 32 + + + tx + 0 + [0:0] + 0 + + + + rx + 1 + [1:1] + 1 + + + + + + EV_PENDING + + 0x0010 + 0x00 + 32 + + + tx + 0 + [0:0] + 0 + + + + rx + 1 + [1:1] + 1 + + + + + + EV_ENABLE + + 0x0014 + 0x00 + 32 + + + tx + 0 + [0:0] + 0 + + + + rx + 1 + [1:1] + 1 + + + + + + TXEMPTY + 0x0018 + 0x00 + 32 + + + txempty + 0 + [0:0] + 0 + + + + + RXFULL + 0x001c + 0x00 + 32 + + + rxfull + 0 + [0:0] + 0 + + + + + + 0 + 0x20 + registers + + + app_uart + 4 + + + + INFO + 0xF000C000 INFO @@ -1136,10 +1320,10 @@ register to disable individual events.]]> GIT_GITREV +``3ea245d3``, so this value is 1050822099, which should be enough to check out +the exact git version used to build this firmware.]]> 0x0014 - 0x00 + 0x3ea245d3 32 @@ -1156,7 +1340,7 @@ git version used to build this firmware.]]> is ``1``, then the repository this was built from has one additional commit beyond the tag indicated in `MAJOR`, `MINOR`, and `REVISION`.]]> 0x0018 - 0x00 + 0x02 32 @@ -1252,7 +1436,7 @@ modifications.]]> SRAM_EXT - 0xF000B000 + 0xF000D000 SRAM_EXT @@ -1294,7 +1478,7 @@ modifications.]]> MEMLCD - 0xF000C000 + 0xF000E000 MEMLCD @@ -1410,7 +1594,7 @@ register to disable individual events.]]> COM - 0xF000D000 + 0xF000F000 COM @@ -1569,12 +1753,12 @@ register to disable individual events.]]> com - 4 + 5 I2C - 0xF000E000 + 0xF0010000 I2C @@ -1822,12 +2006,12 @@ register to disable individual events.]]> i2c - 5 + 6 BTEVENTS - 0xF000F000 + 0xF0011000 BTEVENTS @@ -1911,12 +2095,12 @@ register to disable individual events.]]> btevents - 6 + 7 MESSIBLE - 0xF0010000 + 0xF0012000 MESSIBLE @@ -1982,7 +2166,7 @@ register advances the read pointer automatically.]]> MESSIBLE2 - 0xF0011000 + 0xF0013000 MESSIBLE2 @@ -2048,7 +2232,7 @@ register advances the read pointer automatically.]]> TICKTIMER - 0xF0012000 + 0xF0014000 TICKTIMER @@ -2193,12 +2377,12 @@ register to disable individual events.]]> ticktimer - 7 + 8 POWER - 0xF0013000 + 0xF0015000 POWER @@ -2343,7 +2527,7 @@ reset fashion]]> SPINOR - 0xF0014000 + 0xF0016000 SPINOR @@ -2624,7 +2808,7 @@ checked]]> KEYBOARD - 0xF0015000 + 0xF0017000 KEYBOARD @@ -2834,19 +3018,19 @@ again until the interrupt is serviced.]]> keyboard - 8 + 9 SEED - 0xF0016000 + 0xF0018000 SEED SEED1 0x0000 - 0x2bab99b7 + 0x59f86187 32 @@ -2861,7 +3045,7 @@ again until the interrupt is serviced.]]> SEED0 0x0004 - 0x364d429c + 0x5df4998c 32 @@ -2881,7 +3065,7 @@ again until the interrupt is serviced.]]> ROMTEST - 0xF0017000 + 0xF0019000 ROMTEST @@ -2923,7 +3107,7 @@ again until the interrupt is serviced.]]> AUDIO - 0xF0018000 + 0xF001A000 AUDIO @@ -3290,12 +3474,12 @@ I2S_FORMAT.I2S_STANDARD is I2S standard]]> audio - 9 + 10 TRNG_KERNEL - 0xF0019000 + 0xF001B000 TRNG_KERNEL @@ -3426,12 +3610,12 @@ I2S_FORMAT.I2S_STANDARD is I2S standard]]> trng_kernel - 10 + 11 TRNG_SERVER - 0xF001A000 + 0xF001C000 TRNG_SERVER @@ -3539,7 +3723,7 @@ when cleared, TRNGs are always on]]> AV_CONFIG 0x000c - 0x30d40 + 0x200c350 32 @@ -3549,12 +3733,29 @@ when cleared, TRNGs are always on]]> 0 + + samples + 27 + [27:20] + 20 + + + + test + 28 + [28:28] + 28 + + RO_CONFIG 0x0010 - 0x10000c9 + 0x38080c9 32 @@ -3566,8 +3767,8 @@ when cleared, TRNGs are always on]]> dwell - 20 - [20:1] + 12 + [12:1] 1 delay - 30 - [30:21] - 21 + 22 + [22:13] + 13 + + fuzz + 23 + [23:23] + 23 + + + + oversampling + 31 + [31:24] + 24 + + @@ -3723,12 +3942,12 @@ to max field size]]> trng_server - 11 + 12 TRNG - 0xF001B000 + 0xF001D000 TRNG @@ -4009,472 +4228,9 @@ VCCBRAM (V) = ``Value`` x 3 / 4096.]]> registers - - AES - 0xF001C000 - AES - - - KEY_0_Q - 0x0000 - 0x00 - 32 - - - key_0 - 31 - [31:0] - 0 - - - - - - KEY_1_Q - 0x0004 - 0x00 - 32 - - - key_1 - 31 - [31:0] - 0 - - - - - - KEY_2_Q - 0x0008 - 0x00 - 32 - - - key_2 - 31 - [31:0] - 0 - - - - - - KEY_3_Q - 0x000c - 0x00 - 32 - - - key_3 - 31 - [31:0] - 0 - - - - - - KEY_4_Q - 0x0010 - 0x00 - 32 - - - key_4 - 31 - [31:0] - 0 - - - - - - KEY_5_Q - 0x0014 - 0x00 - 32 - - - key_5 - 31 - [31:0] - 0 - - - - - - KEY_6_Q - 0x0018 - 0x00 - 32 - - - key_6 - 31 - [31:0] - 0 - - - - - - KEY_7_Q - 0x001c - 0x00 - 32 - - - key_7 - 31 - [31:0] - 0 - - - - - - DATAOUT_0 - 0x0020 - 0x00 - 32 - - - data_0 - 31 - [31:0] - 0 - - - - - - DATAOUT_1 - 0x0024 - 0x00 - 32 - - - data_1 - 31 - [31:0] - 0 - - - - - - DATAOUT_2 - 0x0028 - 0x00 - 32 - - - data_2 - 31 - [31:0] - 0 - - - - - - DATAOUT_3 - 0x002c - 0x00 - 32 - - - data_3 - 31 - [31:0] - 0 - - - - - - DATAIN_0 - 0x0030 - 0x00 - 32 - - - data_0 - 31 - [31:0] - 0 - - - - - - DATAIN_1 - 0x0034 - 0x00 - 32 - - - data_1 - 31 - [31:0] - 0 - - - - - - DATAIN_2 - 0x0038 - 0x00 - 32 - - - data_2 - 31 - [31:0] - 0 - - - - - - DATAIN_3 - 0x003c - 0x00 - 32 - - - data_3 - 31 - [31:0] - 0 - - - - - - IV_0 - 0x0040 - 0x00 - 32 - - - iv_0 - 31 - [31:0] - 0 - - - - - - IV_1 - 0x0044 - 0x00 - 32 - - - iv_1 - 31 - [31:0] - 0 - - - - - - IV_2 - 0x0048 - 0x00 - 32 - - - iv_2 - 31 - [31:0] - 0 - - - - - - IV_3 - 0x004c - 0x00 - 32 - - - iv_3 - 31 - [31:0] - 0 - - - - - - CTRL - 0x0050 - 0x00 - 32 - - - mode - 2 - [2:0] - 0 - - - - key_len - 5 - [5:3] - 3 - - - - manual_operation - 6 - [6:6] - 6 - - - - operation - 7 - [7:7] - 7 - - - - - - STATUS - 0x0054 - 0x09 - 32 - - - idle - 0 - [0:0] - 0 - - - - stall - 1 - [1:1] - 1 - - - - output_valid - 2 - [2:2] - 2 - - - - input_ready - 3 - [3:3] - 3 - - - - operation_rbk - 4 - [4:4] - 4 - - - - mode_rbk - 7 - [7:5] - 5 - - - - key_len_rbk - 10 - [10:8] - 8 - - - - manual_operation_rbk - 11 - [11:11] - 11 - - - - - - TRIGGER - 0x0058 - 0x00 - 32 - - - start - 0 - [0:0] - 0 - - - - key_clear - 1 - [1:1] - 1 - - - - iv_clear - 2 - [2:2] - 2 - - - - data_in_clear - 3 - [3:3] - 3 - - - - data_out_clear - 4 - [4:4] - 4 - - - - prng_reseed - 5 - [5:5] - 5 - - - - - - - 0 - 0x5c - registers - - SHA512 - 0xF001D000 + 0xF001E000 SHA512 @@ -4964,12 +4720,12 @@ in bits]]> sha512 - 12 + 13 ENGINE - 0xF001E000 + 0xF001F000 ENGINE @@ -5193,12 +4949,12 @@ exactly reflects the binary layout of an Engine instruction.]]> engine - 13 + 14 JTAG - 0xF001F000 + 0xF0020000 JTAG @@ -5256,7 +5012,7 @@ exactly reflects the binary layout of an Engine instruction.]]> WDT - 0xF0020000 + 0xF0021000 WDT @@ -5299,10 +5055,46 @@ entered. Defaults to a range of 1.67-5.00 seconds]]> + + STATE + 0x0008 + 0x00 + 32 + + + enabled + 0 + [0:0] + 0 + + + + armed1 + 1 + [1:1] + 1 + + + + armed2 + 2 + [2:2] + 2 + + + + disarmed + 3 + [3:3] + 3 + + + + 0 - 0x8 + 0xc registers diff --git a/xtask/src/main.rs b/xtask/src/main.rs index f3e83391a..b25f7497a 100644 --- a/xtask/src/main.rs +++ b/xtask/src/main.rs @@ -74,7 +74,7 @@ fn build_hw_image(debug: bool, svd: Option) -> Result<(), DynError> { // Tools use this environment variable to know when to rebuild the UTRA crate. std::env::set_var("XOUS_SVD_FILE", path.canonicalize().unwrap()); - std::fs::copy(path, std::path::Path::new("emulation/renode.svd"))?; + // std::fs::copy(path, std::path::Path::new("emulation/renode.svd"))?; let kernel = build_kernel(debug)?; let mut init = vec![];