Skip to content

[sw,dif] Port rstmgr_cpu_info_test to DT & update pwrmgr/rstmgr difs for DJ #26270

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

Merged
merged 5 commits into from
Feb 17, 2025

Conversation

AlexJones0
Copy link
Contributor

@AlexJones0 AlexJones0 commented Feb 12, 2025

Fix #26226

This PR ports the rstmgr_cpu_info_test to use the devicetables API so that it no longer depends on Earlgrey-specific constants. The test remains passing on Earlgrey on FPGA (in fpga_cw310_rom_with_fake_keys) and will compile for Darjeeling via

bazel build --build_tests_only //sw/device/tests:rstmgr_cpu_info_test_sim_dv --//hw/top=darjeeling

As part of porting this test, the pwrmgr and rstmgr difs have been updated to support both Earglrey and Darjeeling's IP. This caused issues in bindgen when opentitanlib was compiled due an issue with upstream rules_rust where rust_bindgen_library does not understand defines set on cc_libraries. This is patched until support is merged upstream. It also fixes the documentation of an unrelated Bazel function which I encountered issues with whilst debugging the aforementioned bindgen issue, though now unrelated to this PR.

@AlexJones0 AlexJones0 force-pushed the dt_rstmgr_cpu_info branch 2 times, most recently from 4dc2626 to 160cc7e Compare February 14, 2025 11:24
AlexJones0 and others added 2 commits February 14, 2025 16:42
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]>
@AlexJones0 AlexJones0 changed the title [sw] Port rstmgr_cpu_info_test to devicetables [sw,dif] Port rstmgr_cpu_info_test to DT & update pwrmgr/rstmgr difs for DT Feb 14, 2025
@AlexJones0 AlexJones0 marked this pull request as ready for review February 14, 2025 16:56
@AlexJones0 AlexJones0 requested review from cfrantz and a team as code owners February 14, 2025 16:56
@AlexJones0 AlexJones0 requested review from nbdd0121 and jwnrt and removed request for cfrantz February 14, 2025 16:56
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]>
@AlexJones0 AlexJones0 requested a review from nbdd0121 February 14, 2025 17:18
@AlexJones0 AlexJones0 changed the title [sw,dif] Port rstmgr_cpu_info_test to DT & update pwrmgr/rstmgr difs for DT [sw,dif] Port rstmgr_cpu_info_test to DT & update pwrmgr/rstmgr difs for DJ Feb 14, 2025
Copy link
Contributor

@jwnrt jwnrt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks for the bindgen patch

@jwnrt jwnrt merged commit a7f6327 into lowRISC:master Feb 17, 2025
42 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Multitop, test] chip_sw_rstmgr_cpu_info
5 participants