OpenCore
1.0.4
OpenCore Bootloader
|
#include <Uefi.h>
#include <Guid/OcVariable.h>
#include <Library/BaseLib.h>
#include <Library/DebugLib.h>
#include <Library/MemoryAllocationLib.h>
#include <Library/OcConfigurationLib.h>
#include <Library/OcVariableLib.h>
#include <Library/UefiLib.h>
#include <Library/UefiRuntimeServicesTableLib.h>
Go to the source code of this file.
Functions | |
EFI_STATUS | OcProcessVariableGuid (IN CONST CHAR8 *AsciiVariableGuid, OUT GUID *VariableGuid, IN OC_NVRAM_LEGACY_MAP *Schema OPTIONAL, OUT OC_NVRAM_LEGACY_ENTRY **SchemaEntry OPTIONAL) |
BOOLEAN | OcVariableIsAllowedBySchemaEntry (IN OC_NVRAM_LEGACY_ENTRY *SchemaEntry, IN EFI_GUID *VariableGuid OPTIONAL, IN CONST VOID *VariableName, IN OC_STRING_FORMAT StringFormat) |
VOID | OcSetNvramVariable (IN CONST CHAR8 *AsciiVariableName, IN EFI_GUID *VariableGuid, IN UINT32 Attributes, IN UINT32 VariableSize, IN VOID *VariableData, IN OC_NVRAM_LEGACY_ENTRY *SchemaEntry OPTIONAL, IN BOOLEAN Overwrite) |
Supports legacy NVRAM configuration.
Used by OcMainLib and OcVariableRuntimeLib (i.e. emulated NVRAM support).
References OpenCore global config (for legacy NVRAM). Despite referencing global config directly, is required to live outside OcMainLib to avoid having to link OcMainLib and all its dependencies to OpenDuet, when we link OcVariableRuntimeLib to OpenDuet.
Copyright (c) 2019-2022, vit9696, mikebeaton. All rights reserved.
SPDX-License-Identifier: BSD-3-Clause
Definition in file LegacyNvramSupport.c.
EFI_STATUS OcProcessVariableGuid | ( | IN CONST CHAR8 * | AsciiVariableGuid, |
OUT GUID * | VariableGuid, | ||
IN OC_NVRAM_LEGACY_MAP *Schema | OPTIONAL, | ||
OUT OC_NVRAM_LEGACY_ENTRY **SchemaEntry | OPTIONAL ) |
Test NVRAM GUID against legacy schema.
[in] | AsciiVariableGuid | Guid to test in ASCII format. |
[out] | VariableGuid | On success AsciiVariableGuid converted to GUID format. |
[in] | Schema | Schema to test against. |
[out] | SchemaEntry | On success list of allowed variable names for this GUID. |
Definition at line 27 of file LegacyNvramSupport.c.
VOID OcSetNvramVariable | ( | IN CONST CHAR8 * | AsciiVariableName, |
IN EFI_GUID * | VariableGuid, | ||
IN UINT32 | Attributes, | ||
IN UINT32 | VariableSize, | ||
IN VOID * | VariableData, | ||
IN OC_NVRAM_LEGACY_ENTRY *SchemaEntry | OPTIONAL, | ||
IN BOOLEAN | Overwrite ) |
Set NVRAM variable - for internal use at NVRAM setup only.
[in] | AsciiVariableName | Variable name. |
[in] | VariableGuid | Variably Guid. |
[in] | Attributes | Attributes. |
[in] | VariableSize | Data size. |
[in] | VariableData | Data. |
[in] | SchemaEntry | Optional schema to filter by. |
[in] | Overwrite | If TRUE pre-existing variables can be overwritten. |
Definition at line 106 of file LegacyNvramSupport.c.
BOOLEAN OcVariableIsAllowedBySchemaEntry | ( | IN OC_NVRAM_LEGACY_ENTRY * | SchemaEntry, |
IN EFI_GUID *VariableGuid | OPTIONAL, | ||
IN CONST VOID * | VariableName, | ||
IN OC_STRING_FORMAT | StringFormat ) |
Test NVRAM variable name against legacy schema.
[in] | SchemaEntry | List of allowed names. |
[in] | VariableGuid | Variable GUID (optional, for debug output only). |
[in] | VariableName | Variable name. |
[in] | StringFormat | Is VariableName Ascii or Unicode? |
Definition at line 58 of file LegacyNvramSupport.c.