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

lib: sbi: fix number of PMP entries detection #374

Conversation

vlkondratiev
Copy link
Contributor

CSR_PMPADDRn lower bits may read all-0 or all-1, depending on the configuration. For TOR it is all-0, for NAPOT - all-1.

Thus if PMP entry was pre-configured as NAPOT, original code would stop scanning because value read back not equal to the written one.

Mask lower bits before comparison to fix this

CSR_PMPADDRn lower bits may read all-0 or all-1, depending on
the configuration. For TOR it is all-0, for NAPOT - all-1.

Thus if PMP entry was pre-configured as NAPOT, original code would
stop scanning because value read back not equal to the written one.

Mask lower bits before comparison to fix this

Signed-off-by: Vladimir Kondratiev <[email protected]>
Copy link

github-actions bot commented Sep 4, 2024

We have mailing list based patch review so it would be great if you can send these patchs to OpenSBI mailing list.

You need to join OpenSBI mailing list using following link
http://lists.infradead.org/mailman/listinfo/opensbi

Make sure you use "git send-email" to send the patches.

Thanks for your contribution to OpenSBI project.

@github-actions github-actions bot closed this Sep 4, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Sep 4, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant