Skip to content
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

Add alert handler to ot_earlgrey #110

Merged

Conversation

AlexJones0
Copy link

@AlexJones0 AlexJones0 commented Jan 22, 2025

This PR introduces two commits that connect the alert handler to the ot_earlgrey QEMU machine, to allow it to support the same alert handling functionality that is already present in ot_darjeeling. See the commit messages for more details.

This functionality cannot be appropriately tested by the existing alert handler tests, which require additional functionality either in the alert handler or other blocks. With the additional changes from #111 on top, which adds support for NMIs, I can see that rv_core_ibex_nmi_irq_test is passing, which makes simple use of the alert handler with a pwrmgr fatal alert.

Copy link

@rivos-eblot rivos-eblot left a comment

Choose a reason for hiding this comment

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

LGTM, except the file header (lowRISC, 2025 ... 😄)

Connect the alerts for each of the OpenTitan Earlgrey devices to the
alert handler. This is based on the mappings found in the autogenerated
`hw/top_earlgrey/sw/autogen/top_earlgrey.h` file for the Earlgrey top
found in the OpenTitan repository.

Signed-off-by: Alex Jones <[email protected]>
Connects GPIO signals for the four different escalation severities of
OpenTitan Earlgrey's Alert handler.

For now, escalation signal 3 (phase 3) connects to the pwrmgr, where it
causes a shutdown as is the default in Darjeeling. In reality, the alert
handler should cause a reset in phase 3 and populate the rstmgr's
`reset_info` accordingly, but this requires additional work in other
blocks, and as such we simply leave this connected to the pwrmgr
shutdown for now to match Darjeeling's functionality.

Signed-off-by: Alex Jones <[email protected]>
Copy link

@rivos-eblot rivos-eblot left a comment

Choose a reason for hiding this comment

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

LGTM

@jwnrt jwnrt merged commit 898d4da into lowRISC:dev/ot-earlgrey-1.0.0-updates Jan 22, 2025
6 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.

3 participants