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 indication for implementations that do not preserve CTR state across low-power state(s) #9

Open
bcstrongx opened this issue Dec 28, 2023 · 0 comments

Comments

@bcstrongx
Copy link

The Control Transfer Records (CTR) ISA extension contains a significant amount of state (100s of CSRs). Implementations are not required to retain the values of CTR state across clock-gated low-power state(s); instead, CTR CSRs may contain a legal but unspecified value.

For implementations that do not preserve CTR state, ACPI should provide indication to supervisor software. In that case, software should do the following:

  1. On low-power entry, save xctrcontrol and sctrstatus values. Optionally, save CTR entry state.
  2. On low-power exit, restore saved xctrcontrol and sctrstatus values. Then execute CTRCLEAR, unless restoring CTR entry state for the max supported xctrcontrol.DEPTH value. Optionally, restore saved CTR entry state.

I presume the best approach for this will be to assign an Arch Context Lost Flag (bit 1?) for CTR state. I am not sure whether the software guidance above belongs in the CTR spec or the FFH spec. I'm also unclear where (or whether?) to indicate to implementations that this option to not preserve CTR state exists. I don't see any such indication for the hart timer in the priv spec.

CTR is still in the approval process, currently in ARC review. I hope to get this issue closed once CTR is ratification-ready.

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

No branches or pull requests

1 participant