OpenCore  1.0.4
OpenCore Bootloader
Loading...
Searching...
No Matches
LegacyNvramWrapper.c File Reference
#include <Uefi.h>
#include <Protocol/OcVariableRuntime.h>
#include <Protocol/OcFirmwareRuntime.h>
#include <Library/OcDirectResetLib.h>
#include <Library/OcVariableLib.h>
#include <Library/UefiBootServicesTableLib.h>

Go to the source code of this file.

Functions

STATIC EFI_STATUS InternalLocateVariableRuntimeProtocol (OC_VARIABLE_RUNTIME_PROTOCOL **OcVariableRuntimeProtocol)
 
VOID OcLoadLegacyNvram (IN OC_STORAGE_CONTEXT *Storage, IN OC_NVRAM_LEGACY_MAP *LegacyMap, IN BOOLEAN LegacyOverwrite, IN BOOLEAN RequestBootVarRouting)
 
VOID EFIAPI OcSaveLegacyNvram (VOID)
 
VOID EFIAPI OcResetLegacyNvram (VOID)
 
VOID EFIAPI OcSwitchToFallbackLegacyNvram (VOID)
 

Detailed Description

Methods wrapping calls to legacy NVRAM protocol from OpenCore.

Copyright (C) 2022, mikebeaton. All rights reserved.
SPDX-License-Identifier: BSD-3-Clause

Definition in file LegacyNvramWrapper.c.

Function Documentation

◆ InternalLocateVariableRuntimeProtocol()

STATIC EFI_STATUS InternalLocateVariableRuntimeProtocol ( OC_VARIABLE_RUNTIME_PROTOCOL ** OcVariableRuntimeProtocol)

Definition at line 17 of file LegacyNvramWrapper.c.

◆ OcLoadLegacyNvram()

VOID OcLoadLegacyNvram ( IN OC_STORAGE_CONTEXT * Storage,
IN OC_NVRAM_LEGACY_MAP * LegacyMap,
IN BOOLEAN LegacyOverwrite,
IN BOOLEAN RequestBootVarRouting )

Load emulated NVRAM using installed protocol when present.

Parameters
[in]StorageOpenCore storage.
[in]LegacyMapOpenCore legacy NVRAM map, stating which variables are allowed to be read/written.
[in]LegacyOverwriteWhether to overwrite any pre-existing variables found in emulated NVRAM.
[in]RequestBootVarRoutingWhether OpenCore boot variable routing is enabled.

Definition at line 54 of file LegacyNvramWrapper.c.

◆ OcResetLegacyNvram()

VOID EFIAPI OcResetLegacyNvram ( VOID )

Reset emulated NVRAM using installed protocol when present. If protocol is present, does not return and restarts system.

Definition at line 147 of file LegacyNvramWrapper.c.

◆ OcSaveLegacyNvram()

VOID EFIAPI OcSaveLegacyNvram ( VOID )

Save to emulated NVRAM using installed protocol when present.

Definition at line 124 of file LegacyNvramWrapper.c.

◆ OcSwitchToFallbackLegacyNvram()

VOID EFIAPI OcSwitchToFallbackLegacyNvram ( VOID )

Switch to fallback emulated NVRAM using installed protocol when present.

Definition at line 172 of file LegacyNvramWrapper.c.