-
Notifications
You must be signed in to change notification settings - Fork 812
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
[sw] Port rstmgr_cpu_info_test to devicetables #26270
Draft
AlexJones0
wants to merge
8
commits into
lowRISC:master
Choose a base branch
from
AlexJones0:dt_rstmgr_cpu_info
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The docs for this function use non-existent top `english_breakfast` as an example (`englishbreakfast` is the actual name). They also give an example of using an array as a dictionary key, but arrays are non-hashable and so a tuple must be used instead to make a collection as a key. Signed-off-by: Alex Jones <[email protected]>
Starts the work for multitop bindgen support by adding the list of Darjeeling dependencies, and selecting the exist of dependencies to use for a given top based on `opentitan_select_top`. This can then be used to replace the existing `_TOPLEVEL` hack that was used by `prepare_sw.py` to reduce the number of dependencies used (and add and extra clang flag to the dif). Signed-off-by: Alex Jones <[email protected]>
Allows the bazel definitions of the rust bindgen libraries to differe depending on top-level, such that the types exposed and used in bindgen will not be generated from the `top_earlgrey.h` file but instead from the files relevant to whatever top level is being used. Signed-off-by: Alex Jones <[email protected]>
Replace existing englishbreakfast conditional with a rust configuration feature per top, which can be used in rust code throughout opentitanlib. Also replaces the included autogenerated C header file with the top-specific equivalent, rather than always using earlgrey's. Note: opentitanlib still looks to be very top-dependent (e.g. the list of included difs, to start). This just does some initial work. Signed-off-by: Alex Jones <[email protected]>
This should be squashed with the previous commit that changes the C difs, but is kept separate to allow easier testing of problems with opentitanlib building when building a Darjeeling sim_dv test. Signed-off-by: Alex Jones <[email protected]>
Adds conditional compilation for Darjeeling to match the changed register definitions, including a change in the number of wakeup reasons for the rstmgr. Ideally this can be better modularised through some devicetable extension API in the future for these blocks, but for now we introduce `ifdef`s to the DIFs to enable this functionality. Signed-off-by: Alex Jones <[email protected]>
Signed-off-by: Alex Jones <[email protected]>
Signed-off-by: Alex Jones <[email protected]>
Quite confused. When I keep only the last 3 commits, I get this output. > bazel query "allpaths(//sw/device/tests:rstmgr_cpu_info_test_sim_dv, //sw/host/opentitanlib:opentitanlib)" --//hw/top=darjeeling
INFO: Empty results
> bazel query "allpaths(//sw/device/tests:rstmgr_cpu_info_test, //sw/host/opentitanlib:opentitanlib)" --//hw/top=darjeeling
//hw/top_earlgrey:silicon_owner_sival_rom_ext
//signing:test_keys
//signing:token
//signing/tokens:local
//sw/device/tests:rstmgr_cpu_info_test
//sw/device/tests:rstmgr_cpu_info_test_silicon_owner_sival_rom_ext
//sw/host/opentitanlib:opentitanlib
//sw/host/opentitantool:opentitantool
> bazel build //sw/device/tests:rstmgr_cpu_info_test --//hw/top=darjeeling
INFO: Invocation ID: b092b69c-bdb0-4306-9744-4939062944b3
INFO: Analyzed 7 targets (0 packages loaded, 2 targets configured).
ERROR: /home/alexj/opentitan/sw/host/opentitanlib/BUILD:57:13: Compiling Rust rlib opentitanlib (191 files) failed: (Exit 1): process_wrapper failed: error executing Rustc command (from target //sw/host/opentitanlib:opentitanlib) bazel-out/k8-opt-exec-ST-fdd1730c120c/bin/external/rules_rust+/util/process_wrapper/process_wrapper --arg-file ... (remaining 293 arguments skipped) not sure if I'm missing something obvious here / not understanding how Bazel works. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR is marked as a draft because it introduces temporary changes to
opentitanlib
to better support multitop, to get around some errors that occurred when compiling asim_dv
test for Darjeeling. This breaks other things in CI at the moment also.Specifically, when changing the
rstmgr
DIF by introducing conditional compilation to make the necessary register bitfield changes to allow this test to function in Darjeeling environments, I began to get errors with opentitanlib when running the following command:This is because opentitanlib is being compiled, and bindgen is not yet multitop and cannot deal with the missing bindings for these rstmgr symbols. The current PR adds support for this, so to reproduce this issue you need to drop all commits preceding e7d0770. It is not yet clear to me why opentitantool is being built for this command.
After this PR,
rstmgr_cpu_info_test
will pass on Earlgrey (onfpga_cw310_rom_with_fake_keys
) and will successfully compile on Darjeeling.