Added support for SetVariable to store volatile variable,

and SetNVVariable to store non volatile variable.

Signed-off-by: Sylvain Chouleur <sylvain.chouleur@gmail.com>
Signed-off-by: Nigel Croxon <nigel.croxon@hp.com>
This commit is contained in:
Nigel Croxon 2013-10-11 11:12:28 -04:00
parent 5f765e9208
commit 27cdb74865
2 changed files with 57 additions and 0 deletions

View File

@ -522,6 +522,21 @@ LibDeleteVariable (
);
EFI_STATUS
LibSetNVVariable (
IN CHAR16 *VarName,
IN EFI_GUID *VarGuid,
IN UINTN DataSize,
IN VOID *Data
);
EFI_STATUS
LibSetVariable (
IN CHAR16 *VarName,
IN EFI_GUID *VarGuid,
IN UINTN DataSize,
IN VOID *Data
);
EFI_STATUS
LibInsertToTailOfBootOrder (
IN UINT16 BootOption,
IN BOOLEAN OnlyInsertIfEmpty

View File

@ -321,6 +321,48 @@ LibDeleteVariable (
return (Status);
}
EFI_STATUS
LibSetNVVariable (
IN CHAR16 *VarName,
IN EFI_GUID *VarGuid,
IN UINTN DataSize,
IN VOID *Data
)
{
EFI_STATUS Status;
Status = uefi_call_wrapper(
RT->SetVariable,
5,
VarName, VarGuid,
EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_RUNTIME_ACCESS | EFI_VARIABLE_NON_VOLATILE,
DataSize, Data
);
ASSERT (!EFI_ERROR(Status));
return (Status);
}
EFI_STATUS
LibSetVariable (
IN CHAR16 *VarName,
IN EFI_GUID *VarGuid,
IN UINTN DataSize,
IN VOID *Data
)
{
EFI_STATUS Status;
Status = uefi_call_wrapper(
RT->SetVariable,
5,
VarName, VarGuid,
EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_RUNTIME_ACCESS,
DataSize, Data
);
ASSERT (!EFI_ERROR(Status));
return (Status);
}
EFI_STATUS
LibInsertToTailOfBootOrder (
IN UINT16 BootOption,