-
Notifications
You must be signed in to change notification settings - Fork 747
WIP: OT bitstream update #3085
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
WIP: OT bitstream update #3085
Conversation
Signed-off-by: Chris Frantz <cfrantz@google.com>
The main opentitan source base uses bazel as the build system and uses cargo-raze to auto-generate rules for external rust dependencies. Cargo-raze has difficulty dealing with `bin` crates not published at crates.io. By refactoring as a lib+bin crate, the main codebase can use earlgrey-cw310 as an upstream dependency.
Signed-off-by: Chris Frantz <cfrantz@google.com>
Signed-off-by: Chris Frantz <cfrantz@google.com>
Signed-off-by: Chris Frantz <cfrantz@google.com>
@@ -7,764 +7,14 @@ | |||
// https://github.com/rust-lang/rust/issues/62184. | |||
#![cfg_attr(not(doc), no_main)] | |||
#![feature(custom_test_frameworks)] | |||
#![test_runner(test_runner)] | |||
#![test_runner(my_test_runner)] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the only place I see my_test_runner
-- is this change a leftover?
@@ -108,6 +112,7 @@ impl<const MAX_AVAILABLE_REGIONS_OVER_TWO: usize> PMP<MAX_AVAILABLE_REGIONS_OVER | |||
// Reset back to how we found it | |||
csr::CSR.pmpconfig_set(i / 4, pmpcfg_og); | |||
} | |||
*/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tock doesn't usually like leaving commented-out code in the repository. They'd prefer that PR authors remove the code, and if it is needed later someone can dig it out of git history.
For updating the bitstream I think it's best to continue with #3056 It's significantly further along. It already contains the changes to support the manifest, already contains fixes for the registers that have changed and is heading towards getting the ePMP up and running. It's mostly just stuck on the Flash and CSRNG tests failing As for the refactoring that can just be split out into a separate PR. For the OTBN app you will need this PR, which is still pending approval: tock/elf2tab#37 |
I'm going to close this PR until after the OpenTitan project institutes a formal release process. |
Pull Request Overview
This pull request is a work in progress to bring tock upstream into a state that works with the current version of the OpenTitan hardware. It includes the following:
flash_header
of the image to be consistent with the TestROM/MaskROM manifest definition.bin
crate into alib+bin
crate. The OpenTitan project wants to declare tock-upstream as a dependency to its own source base and provide its own per-product board init sources. At the same time, we want tock-upstream to have an independent and functional board definition that can initialize some of the common hardware (e.g. currently earlgrey_cw310). We are using cargo raze to automatically consume the Cargo.toml files and create bazel definitions within our codebase. By making the earlgrey_cw310 crate alib+bin
crate, we can depend on it as a somewhat generic source of init code while defining amain
in our own sources.earlgrey_cw310
crate should be feature-gated so make the initialization sequence finer-grained.rsa.tbf
which is needed as a test resource.Testing Strategy
This PR was tested by following the instructions in
boards/opentitan/README.md
. Unfortunately, a number of the tests are failing for various reasons:rsa.tbf
does not seem to result in a valid tock binary. In fact, elf2tab fails on that file because the start symbol appears to overlap both the.text
and.data
sections. However, the OTBN accelerator in OT is a Harvard architecture and as such, the apparent overlap isn't a real overlap.TODO or Help Wanted
This pull request still needs review and discussion.
Documentation Updated
/docs
, or no updates are required.Formatting
make prepush
.