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

Ampere: Add in-band NVPARAM access support #241

Merged
merged 3 commits into from
Nov 13, 2024

Conversation

nhivp
Copy link
Member

@nhivp nhivp commented Nov 11, 2024

This introduces NVPARAM Runtime DXE driver to provide in-band NVPARAM access in runtime.

Tam Chi Nguyen added 3 commits November 9, 2024 15:22
NVParamLibConstructor function will locate gEfiMmCommunication2ProtocolGuid
protocol which is required to communicate with ATF for Altra NVPARAM access.
Without this step, all NVPARAM access of DXE_RUNTIME_DRIVER will return
EFI_INVALID_PARAMETER error.

Signed-off-by: Nhi Pham <[email protected]>
NVParamRuntimeDxe is a proxy to access NVPARAM at runtime via UEFI variables
like NVParamOffset and NVParamValue.

UEFI Variable GUID for the runtime NVPARAM access:
0xa12544a4, 0xbcc0, 0x4b12, { 0xaa, 0x56, 0x0a, 0x2a, 0x76, 0xf1, 0x65, 0x63 }

To read a NVPARAM:
    + Write offset to UEFI variable name "NVParamOffset"
    + Read back UEFI variable name "NVParamValue"

To write a NVPARAM:
    + Write offset to UEFI variable name "NVParamOffset"
    + Write 4 bytes value to UEFI variable name "NVParamValue"

Signed-off-by: Nhi Pham <[email protected]>
NVParamRuntimeDxe allows to read/write NVPARAM at runtime via UEFI
variables.

To read a NVPARAM:
    + Write offset to UEFI variable name "NVParamOffset"
    + Read back UEFI variable name "NVParamValue"

To write a NVPARAM:
    + Write offset to UEFI variable name "NVParamOffset"
    + Write 4 bytes value to UEFI variable name "NVParamValue"

Signed-off-by: Nhi Pham <[email protected]>
@chuongtranle
Copy link
Contributor

For this patch series,
Reviewed-by: Chuong Tran [email protected]

@nhivp nhivp merged commit 6bf2763 into tianocore:master Nov 13, 2024
1 check 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.

2 participants