-
You must be signed in to change notification settings -
OpenTitan: Bump to the latest RTL SHA #3056
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
270cd08
to
704d3ed
Compare
704d3ed
to
1ff1a35
Compare
1ff1a35
to
5d42de9
Compare
a218932
to
568e799
Compare
82832ac
to
c7a9449
Compare
The following patch updates opentitan to match the new configuration, as per, lowRISC/opentitan@217a016 Note: with this patch we now skip the usage of the opentitan `boot_rom`. The Opentitan boot rom contains hw verification for devies which we are currently not supporting in qemu. As of now, the `boot_rom` has no major significance, however, would be good to support in the future. Tested by running utests from the latest tock [1] (that supports this version of OT). [1] tock/tock#3056 Signed-off-by: Wilfred Mallawa <wilfred.mallawa@wdc.com>
c7a9449
to
17705c7
Compare
The following patch updates opentitan to match the new configuration, as per, lowRISC/opentitan@217a016 Note: with this patch we now skip the usage of the opentitan `boot_rom`. The Opentitan boot rom contains hw verification for devies which we are currently not supporting in qemu. As of now, the `boot_rom` has no major significance, however, would be good to support in the future. Tested by running utests from the latest tock [1] (that supports this version of OT). [1] tock/tock#3056 Signed-off-by: Wilfred Mallawa <wilfred.mallawa@wdc.com> Reviewed-by: Alistair Francis <alistair.francis@wdc.com> Message-Id: <20220812005229.358850-1-wilfred.mallawa@opensource.wdc.com> Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
The following patch updates opentitan to match the new configuration, as per, lowRISC/opentitan@217a016 Note: with this patch we now skip the usage of the opentitan `boot_rom`. The Opentitan boot rom contains hw verification for devies which we are currently not supporting in qemu. As of now, the `boot_rom` has no major significance, however, would be good to support in the future. Tested by running utests from the latest tock [1] (that supports this version of OT). [1] tock/tock#3056 Signed-off-by: Wilfred Mallawa <wilfred.mallawa@wdc.com> Reviewed-by: Alistair Francis <alistair.francis@wdc.com> Message-Id: <20220812005229.358850-1-wilfred.mallawa@opensource.wdc.com> Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
The following patch updates opentitan to match the new configuration, as per, lowRISC/opentitan@217a016 Note: with this patch we now skip the usage of the opentitan `boot_rom`. The Opentitan boot rom contains hw verification for devies which we are currently not supporting in qemu. As of now, the `boot_rom` has no major significance, however, would be good to support in the future. Tested by running utests from the latest tock [1] (that supports this version of OT). [1] tock/tock#3056 Signed-off-by: Wilfred Mallawa <wilfred.mallawa@wdc.com> Reviewed-by: Alistair Francis <alistair.francis@wdc.com> Message-Id: <20220812005229.358850-1-wilfred.mallawa@opensource.wdc.com> Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
The following patch updates opentitan to match the new configuration, as per, lowRISC/opentitan@217a016 Note: with this patch we now skip the usage of the opentitan `boot_rom`. The Opentitan boot rom contains hw verification for devies which we are currently not supporting in qemu. As of now, the `boot_rom` has no major significance, however, would be good to support in the future. Tested by running utests from the latest tock [1] (that supports this version of OT). [1] tock/tock#3056 Signed-off-by: Wilfred Mallawa <wilfred.mallawa@wdc.com> Reviewed-by: Alistair Francis <alistair.francis@wdc.com> Message-Id: <20220812005229.358850-1-wilfred.mallawa@opensource.wdc.com> Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
The following patch updates opentitan to match the new configuration, as per, lowRISC/opentitan@217a016 Note: with this patch we now skip the usage of the opentitan `boot_rom`. The Opentitan boot rom contains hw verification for devies which we are currently not supporting in qemu. As of now, the `boot_rom` has no major significance, however, would be good to support in the future. Tested by running utests from the latest tock [1] (that supports this version of OT). [1] tock/tock#3056 Signed-off-by: Wilfred Mallawa <wilfred.mallawa@wdc.com> Reviewed-by: Alistair Francis <alistair.francis@wdc.com> Message-Id: <20220812005229.358850-1-wilfred.mallawa@opensource.wdc.com> Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
The following patch updates opentitan to match the new configuration, as per, lowRISC/opentitan@217a016 Note: with this patch we now skip the usage of the opentitan `boot_rom`. The Opentitan boot rom contains hw verification for devies which we are currently not supporting in qemu. As of now, the `boot_rom` has no major significance, however, would be good to support in the future. Tested by running utests from the latest tock [1] (that supports this version of OT). [1] tock/tock#3056 Signed-off-by: Wilfred Mallawa <wilfred.mallawa@wdc.com> Reviewed-by: Alistair Francis <alistair.francis@wdc.com> Message-Id: <20220812005229.358850-1-wilfred.mallawa@opensource.wdc.com> Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
3135: LEDs array in LED Driver does not need to be mut r=bradjc a=brghena ### Pull Request Overview The array of LEDs in LED Driver does not need to be a mutable reference. The LEDs themselves were not mutable, only the array. But nothing should ever be changing to contents of that array, and the LED Driver does not do so. This seems to be legacy from when we used to have LEDs in a TakeCell. ### Testing Strategy This pull request was tested by compiling all boards and testing the Blink app on an nRF52840DK. ### TODO or Help Wanted Should be good to go. ### Documentation Updated - [X] Updated the relevant files in `/docs`, or no updates are required. ### Formatting - [X] Ran `make prepush`. 3146: static_init: add note about generic parameters r=bradjc a=ppannuto ### Pull Request Overview This pull request adds a quick documentation note, as suggested by #2995. ### Testing Strategy N/A ### TODO or Help Wanted N/A ### Documentation Updated - [x] Updated the relevant files in `/docs`, or no updates are required. ### Formatting - [x] Ran `make prepush`. 3163: boards/opentitan: add flash_ctl utests r=bradjc a=twilfredo ### Pull Request Overview Adds a new test suite to test the flash controller directly. Previous testing was implicit through the TickV tests. This is useful for testing OT changes to the flash controller directly, and much faster (on Verilator)/easier to debug compared to TicKV tests. We currently test all supported functionality, `read_page`, `write_page` and `erase_page`. ### Testing Strategy `make BOARD_CONFIGURATION=sim_verilator test-verilator` Verilator Output: ``` I00001 test_rom.c:115] Test ROM complete, jumping to flash! Unable to find otbn-rsa, disabling RSA support OpenTitan initialisation complete. Entering main loop [FLASH_CTRL] Test page read/write.... [ok] [FLASH_CTRL] Test page erase.... [ok] trivial assertion... [ok] ``` ### Notes The testing is done on the latest supported version of Tock for Opentitan, so this depends on #3056 ### Documentation Updated - [x] No updates are required. ### Formatting - [x] Ran `make prepush`. Co-authored-by: Branden Ghena <brghena@berkeley.edu> Co-authored-by: Pat Pannuto <pat.pannuto@gmail.com> Co-authored-by: Wilfred Mallawa <wilfred.mallawa@wdc.com>
Addresses the issues |
CI error:
|
@alistair23 This is happening because of the diff between the entry point in the app vs the where reset vector points to in qemu. Having a quick look at the test elf (tock/target/riscv32imc-unknown-none-elf/release/deps/earlgrey_cw310-ec5e3eac60b97f7a ), the entry point is at |
Urgh, the linker changes changed the start address and as we don't have the ROM we jump to the wrong place. Patches have been sent to QEMU to fix this and allow changing the |
How are we going without the boot ROM in this PR? Or is the change here just that the QEMU tests no longer exercise the boot ROM, but verilator / hardware tests still assume it will be present? |
We basically just skip the bootrom entirely in QEMU (with this change) mainly because the bootrom has gotten more complex and now runs tests against hwip that aren't supported in QEMU (i.e lifecycle contoller, flash_ctrl). For the functionality we test for currently, the bootrom doesn't seem to make any changes (atleast so far...) so we don't load the bootrom when running tests/apps on qemu ( |
What is the status of this? |
The following patch updates opentitan to match the new configuration, as per, lowRISC/opentitan@217a016 Note: with this patch we now skip the usage of the opentitan `boot_rom`. The Opentitan boot rom contains hw verification for devies which we are currently not supporting in qemu. As of now, the `boot_rom` has no major significance, however, would be good to support in the future. Tested by running utests from the latest tock [1] (that supports this version of OT). [1] tock/tock#3056 Signed-off-by: Wilfred Mallawa <wilfred.mallawa@wdc.com> Reviewed-by: Alistair Francis <alistair.francis@wdc.com> Message-Id: <20220812005229.358850-1-wilfred.mallawa@opensource.wdc.com> Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
On the Tock side It's ready, but we are waiting on this qemu patch series to fix the CI failure (jumping into the wrong resetvector) |
Bump to a newer hardware SHA, including support fot signing the binaries, Manifests and Bazel. Updates to the correct #IRQs for opentitan commit as per [1]. [1] https://github.com/lowRISC/opentitan/blob/217a0168ba118503c166a9587819e3811eeb0c0c/hw/top_earlgrey/sw/autogen/top_earlgrey.h#L1169 Signed-off-by: Alistair Francis <alistair.francis@wdc.com> Signed-off-by: Wilfred Mallawa <wilfred.mallawa@wdc.com> Signed-off-by: Chris Frantz <cfrantz@google.com>
e623f74
to
89abd3e
Compare
Tests are passing again! |
bors r+ |
3208: opentitan: add watchdog/aon_timer r=bradjc a=twilfredo ### Pull Request Overview Uses the `Always on timer` (AON_TIMER) for Opentitan [hw_ip](https://docs.opentitan.org/hw/ip/aon_timer/doc/), to implement watchdog for OpenTitan. This AON_TIMER has both a `watchdog` timer and a `wakeup` timer. The driver implemented has support for both hw functionality but only runs the watch dog timer for now (unused code tagged with `#[cfg(aon_wkup_timer)]`, that should be (?) compiled out and is left for reference/use later. The following patch for [qemu](https://www.mail-archive.com/qemu-devel@nongnu.org/msg907656.html) adds support to the watchdog, so we can use this in the future with qemu also. ### Testing Strategy Driver has been written to support to latest version of OpenTitan supported by TockOS, testing was done on Verilator on this #3056. ### TODO - Tested on Verilator, would be good to test on CW130 (since the AON_TIMER runs on different clock rates on both devices) - Implement a WakeUp timer interface (?) and connect it to this driver. ### Documentation Updated - [x] No updates are required. ### Formatting - [x] Ran `make prepush`. Co-authored-by: Wilfred Mallawa <wilfred.mallawa@wdc.com>
3220: boards/opentitan: Improve README for OT bump r=bradjc a=twilfredo ### Pull Request Overview This adds extensive build instructions/commands to simplify the process of building OpenTitan and running it with Tock. Since OT has moved onto a new build system with `bazel` this adds commands/instructions to build only the target we need to run Tock. ### Testing Strategy Building OpenTitan using these commands and running Tock on Verilator. Tested with: #3056 ### Documentation Updated - [x] Updated the relevant files in `/docs`, or no updates are required. ### Formatting - [x] Ran `make prepush`. Co-authored-by: Wilfred Mallawa <wilfred.mallawa@wdc.com>
3208: opentitan: add watchdog/aon_timer r=alistair23 a=twilfredo ### Pull Request Overview Uses the `Always on timer` (AON_TIMER) for Opentitan [hw_ip](https://docs.opentitan.org/hw/ip/aon_timer/doc/), to implement watchdog for OpenTitan. This AON_TIMER has both a `watchdog` timer and a `wakeup` timer. The driver implemented has support for both hw functionality but only runs the watch dog timer for now (unused code tagged with `#[cfg(aon_wkup_timer)]`, that should be (?) compiled out and is left for reference/use later. The following patch for [qemu](https://www.mail-archive.com/qemu-devel@nongnu.org/msg907656.html) adds support to the watchdog, so we can use this in the future with qemu also. ### Testing Strategy Driver has been written to support to latest version of OpenTitan supported by TockOS, testing was done on Verilator on this #3056. ### TODO - Tested on Verilator, would be good to test on CW130 (since the AON_TIMER runs on different clock rates on both devices) - Implement a WakeUp timer interface (?) and connect it to this driver. ### Documentation Updated - [x] No updates are required. ### Formatting - [x] Ran `make prepush`. Co-authored-by: Wilfred Mallawa <wilfred.mallawa@wdc.com>
3208: opentitan: add watchdog/aon_timer r=bradjc a=twilfredo ### Pull Request Overview Uses the `Always on timer` (AON_TIMER) for Opentitan [hw_ip](https://docs.opentitan.org/hw/ip/aon_timer/doc/), to implement watchdog for OpenTitan. This AON_TIMER has both a `watchdog` timer and a `wakeup` timer. The driver implemented has support for both hw functionality but only runs the watch dog timer for now (unused code tagged with `#[cfg(aon_wkup_timer)]`, that should be (?) compiled out and is left for reference/use later. The following patch for [qemu](https://www.mail-archive.com/qemu-devel@nongnu.org/msg907656.html) adds support to the watchdog, so we can use this in the future with qemu also. ### Testing Strategy Driver has been written to support to latest version of OpenTitan supported by TockOS, testing was done on Verilator on this #3056. ### TODO - Tested on Verilator, would be good to test on CW130 (since the AON_TIMER runs on different clock rates on both devices) - Implement a WakeUp timer interface (?) and connect it to this driver. ### Documentation Updated - [x] No updates are required. ### Formatting - [x] Ran `make prepush`. Co-authored-by: Wilfred Mallawa <wilfred.mallawa@wdc.com>
3214: chips/earlgrey/aes: Fixup AES for Verilator r=bradjc a=twilfredo ### Pull Request Overview On the latest commit of OpenTitan supported by Tock (#3056), on `Verilator` AES does not work as per the tests. The driver returns `ErrorCode::BUSY` since the hw_ip has not moved into the `idle` state when we expect. This issue only occurs on Verilator and works as expected on HW. This patch adds a Verilator specific change to make sure we add a small wait where appropriate. Now passing all AES tests on Verilator. ### Testing Strategy Running the `aes_test` on Verilator. ```` OpenTitan initialisation complete. Entering main loop check run AES128 CCM... AES CCM* encryption/decryption tests aes_ccm_test passed: (current_test=0, encrypting=true, tag_is_valid=true) aes_ccm_test passed: (current_test=0, encrypting=false, tag_is_valid=true) aes_ccm_test passed: (current_test=1, encrypting=true, tag_is_valid=true) aes_ccm_test passed: (current_test=1, encrypting=false, tag_is_valid=true) aes_ccm_test passed: (current_test=2, encrypting=true, tag_is_valid=true) aes_ccm_test passed: (current_test=2, encrypting=false, tag_is_valid=true) [ok] check run AES128 ECB... aes_test passed (ECB Enc Src/Dst) aes_test passed (ECB Dec Src/Dst) aes_test passed (ECB Enc In-place) aes_test passed (ECB Dec In-place) [ok] check run AES128 CBC... aes_test passed (CBC Enc Src/Dst) aes_test passed (CBC Dec Src/Dst) aes_test passed (CBC Enc In-place) aes_test passed (CBC Dec In-place) [ok] check run AES128 CTR... aes_test CTR passed: (CTR Enc Ctr Src/Dst) aes_test CTR passed: (CTR Dec Ctr Src/Dst) [ok] ```` ### TODO or Help Wanted N/A ### Documentation Updated - [x] No updates are required. ### Formatting - [x] Ran `make prepush`. Co-authored-by: Wilfred Mallawa <wilfred.mallawa@wdc.com>
3249: boards/opentitan: bump to latest master RTL SHA r=hudson-ayers a=twilfredo ### Pull Request Overview This patch series adds support for OpenTitan [latest master](lowRISC/opentitan@7550a35) (**as of this PR**). Most of the heavy lifting for this was done in #3056. This PR updates the since changes, registers/irqs etc... to bring Tock up to speed. Going forward: Latest master of OT will most likely work, I'll test any major changes (maybe weekly) and update here as necessary. ### Testing Strategy Running OpenTitan tests on Verilator (with the latest master build of OT). ``` I00000 test_rom.c:98] Version: earlgrey_silver_release_v5-7719-g7550a3512, Build Date: 2022-09-29 11:24:47 I00001 test_rom.c:180] Test ROM complete, jumping to flash! Unable to find otbn-rsa, disabling RSA support OpenTitan initialisation complete. Entering main loop check run AES128 CCM... AES CCM* encryption/decryption tests aes_ccm_test passed: (current_test=0, encrypting=true, tag_is_valid=true) aes_ccm_test passed: (current_test=0, encrypting=false, tag_is_valid=true) aes_ccm_test passed: (current_test=1, encrypting=true, tag_is_valid=true) aes_ccm_test passed: (current_test=1, encrypting=false, tag_is_valid=true) aes_ccm_test passed: (current_test=2, encrypting=true, tag_is_valid=true) aes_ccm_test passed: (current_test=2, encrypting=false, tag_is_valid=true) [ok] check run AES128 ECB... aes_test passed (ECB Enc Src/Dst) aes_test passed (ECB Dec Src/Dst) aes_test passed (ECB Enc In-place) aes_test passed (ECB Dec In-place) [ok] check run AES128 CBC... aes_test passed (CBC Enc Src/Dst) aes_test passed (CBC Dec Src/Dst) aes_test passed (CBC Enc In-place) aes_test passed (CBC Dec In-place) [ok] check run AES128 CTR... aes_test CTR passed: (CTR Enc Ctr Src/Dst) aes_test CTR passed: (CTR Dec Ctr Src/Dst) [ok] check run CSRNG Entropy 32... Entropy32 test: first get Ok(()) Entropy test: obtained all 8 values. They are: [00]: 735b27a0 [01]: 497b246f [02]: 9a8f9420 [03]: 91618fe9 [04]: e07e680b [05]: 01aec0b9 [06]: 3ca6b2a0 [07]: 19078a9d [ok] [FLASH_CTRL] Test page read/write.... [ok] [FLASH_CTRL] Test page erase.... [ok] check hmac load binary... [ok] check hmac check verify... [ok] start multi alarm test... [ok] check otbn run binary... [FAIL] No OTBN binary Not running RSA tests Not running RSA tests check rsa key import... [ok] check rsa 4096 bit key import... [ok] Not running RSA tests start SHA256 verify test Sha256Test: Setting slice to 12..24 Sha256Test: Setting slice to 24..36 Sha256Test: Setting slice to 36..48 Sha256Test: Setting slice to 48..60 Sha256Test: Setting slice to 60..72 Sha256Test: Verification result: Ok(true) [ok] check SipHash 2-4... [ok] [SPI] Setup spi_host0 partial_transfer... [ok] [SPI] Setup spi_host0 transfers... [ok] [SPI] Setup spi_host0 transfer...x2 [ok] trivial assertion... [ok] ``` ### TODO Although QEMU still works for the tests we have now, we need to update some of the IRQs (patches to QEMU). ### Documentation Updated The README changes required by this PR are all documented in #3220 . No major changes required since last OT bump. I will send new update to update some OT paths when #3220 merges. - [x] Updated the relevant files in `/docs`, or no updates are required. ### Formatting - [x] Ran `make prepush`. Co-authored-by: Wilfred Mallawa <wilfred.mallawa@wdc.com>
Pull Request Overview
This bumps us to the latest SHA. This includes support for the Manifest and the ePMP changes
Testing Strategy
Running on FPGA and Verilator
TODO or Help Wanted
Still get all the tests passing
and ePMP cleaned upDocumentation Updated
/docs
, or no updates are required.Formatting
make prepush
.