forked from rivosinc/edk2
-
Notifications
You must be signed in to change notification settings - Fork 0
RISC-V: Management Mode: Variable Service #2
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
Open
cap2k4-rivos
wants to merge
5
commits into
dev/cap2k4/MMInfra
Choose a base branch
from
dev/cap2k4/MMVariableService
base: dev/cap2k4/MMInfra
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cap2k4-rivos
pushed a commit
that referenced
this pull request
Sep 8, 2025
Implementation is based on https://github.com/riscv-non-isa/riscv-rpmi/tree/main and works in the following way: 1. MM initialization is successful -> call REQFWD_COMPLETE_CURRENT_MESSAGE to yield. (this API will change once we have properly defined the init API for MM) 2. NS domain calls MM_COMMUNICATE, OpenSBI performs context switch (if channel is not capable of SSE) -> MM resumes loop from REQFWD_COMPLETE_CURRENT_MESSAGE. 3. Calls REQFWD_RETRIEVE_CURRENT_MESSAGE. 4. MM handles the request contained in the message. 5. MM calls REQFWD_COMPLETE_CURRENT_MESSAGE. 6. OpenSBI switches to the non-secure domain (as there are no more messages in the queue && SSE is not supported) 7. Go to #2 Signed-off-by: Dhaval Sharma <[email protected]>
d658867 to
249a716
Compare
fbe3e1a to
a0bae81
Compare
This VirtNorFlash module is required for StandaloneMm firmware. This StandaloneMm implementation is mostly copied from edk2-platforms/Platform/ARM/Drivers/NorFlashDxe Signed-off-by: Yong Li <[email protected]>
Signed-off-by: Yong Li <[email protected]> Signed-off-by: Dhaval Sharma <[email protected]>
Signed-off-by: Dhaval Sharma <[email protected]>
The FTW (Fault Tolerant Write) protocol is called when the variable reclaiming happens Signed-off-by: Yong Li <[email protected]>
Add support for UEFI secure variable service using the standalone MM framework on RiscV64. It moves the software handling of the UEFI authenticated variable store into the standalone MM context, which is a platform defined secure environment. For the OpenSBI based secure montor implementaion, the secure variable storage is put at a specific address in the flash0 block in Qemu virt machine. The Non-secure shared memory between UEFI and standalone MM is allocated at 0xFFE00000. The SECURE_BOOT_ENABLE is disabled as default, need add build option-DSECURE_BOOT_ENABLE=TRUE to enable this feature. Signed-off-by: Yong Li <[email protected]> Signed-off-by: Dhaval Sharma <[email protected]>
a0bae81 to
00543ca
Compare
cap2k4-rivos
pushed a commit
that referenced
this pull request
Sep 8, 2025
Implementation is based on https://github.com/riscv-non-isa/riscv-rpmi/tree/main and works in the following way: 1. MM initialization is successful -> call REQFWD_COMPLETE_CURRENT_MESSAGE to yield. (this API will change once we have properly defined the init API for MM) 2. NS domain calls MM_COMMUNICATE, OpenSBI performs context switch (if channel is not capable of SSE) -> MM resumes loop from REQFWD_COMPLETE_CURRENT_MESSAGE. 3. Calls REQFWD_RETRIEVE_CURRENT_MESSAGE. 4. MM handles the request contained in the message. 5. MM calls REQFWD_COMPLETE_CURRENT_MESSAGE. 6. OpenSBI switches to the non-secure domain (as there are no more messages in the queue && SSE is not supported) 7. Go to #2 Signed-off-by: Dhaval Sharma <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This adds the Variable Service in RISC-V Management Mode.
How This Was Tested
Note: This branch is not complete, to test use this Branch.