-
Notifications
You must be signed in to change notification settings - Fork 816
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
[rstmgr] Port rstmgr_alert_info_test
to DT
#26422
base: master
Are you sure you want to change the base?
Conversation
cca7664
to
e5f538a
Compare
Signed-off-by: James Wainwright <[email protected]>
The `all_escalation_resets_test` needs to know the number of alerts as a compile-time value constant so that it can reason in a generic way over the alerts. Expose this as an enum constant in the global DT API along with other alert information. Signed-off-by: Alex Jones <[email protected]> (cherry picked from commit ffd84cd)
This was unused. Signed-off-by: James Wainwright <[email protected]>
Signed-off-by: James Wainwright <[email protected]>
Signed-off-by: James Wainwright <[email protected]>
Signed-off-by: James Wainwright <[email protected]>
Remove this dependency by retrieving a pointer to the test utilities from the Retention SRAM via the DT API rather than via a hardcoded Earlgrey constant. This API call cannot happen at compile-time, so an initialization function is introduced alongside corresponding NULL (uninitialized checks) in relevant test utility functions. The static assertions also depend on Earlgrey constants for the Retention SRAM size, but this information is not yet available through the DT API. Adds some conditional #ifdefs to handle this case whilst this information is not yet available. Signed-off-by: Alex Jones <[email protected]> (cherry picked from commit e7b9861)
Signed-off-by: James Wainwright <[email protected]>
e5f538a
to
76cfe31
Compare
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.
#include "dt/dt_alert_handler.h" | ||
#include "dt/dt_aon_timer.h" | ||
#include "dt/dt_flash_ctrl.h" | ||
#include "dt/dt_i2c.h" | ||
#include "dt/dt_kmac.h" | ||
#include "dt/dt_otp_ctrl.h" | ||
#include "dt/dt_pwrmgr.h" | ||
#include "dt/dt_rstmgr.h" | ||
#include "dt/dt_rv_core_ibex.h" | ||
#include "dt/dt_rv_plic.h" | ||
#include "dt/dt_spi_host.h" |
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.
Nit: it would be nice to have the // Generated.
comment by these, for the sake of consistency with other tests/imports. Also on the dt/dt_flash_ctrl.h
header in the #ifdef OPENTITAN_IS_EARLGREY
section below.
static_assert(kDtRvPlicCount > 0, "test requires a PLIC"); | ||
static_assert(kDtRvCoreIbexCount > 0, "how did you make a top without a core?"); | ||
static_assert(kDtAonTimerCount > 0, "test requires an AON timer"); | ||
static_assert(kDtPwrmgrCount > 0, "test requires an AON timer"); |
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.
Bad copy/paste here: should be "test requires a pwrmgr".
I've stolen two commits from here: #26418