TianoCore EDK2 master
|
Go to the source code of this file.
Functions | |
EFI_STATUS EFIAPI | ProtocolIsVariablePolicyEnabled (OUT BOOLEAN *State) |
VOID EFIAPI | RecordSecureBootPolicyVarData (VOID) |
BOOLEAN | AtRuntime (VOID) |
EFI_LOCK * | InitializeLock (IN OUT EFI_LOCK *Lock, IN EFI_TPL Priority) |
VOID | AcquireLockOnlyAtBootTime (IN EFI_LOCK *Lock) |
VOID | ReleaseLockOnlyAtBootTime (IN EFI_LOCK *Lock) |
EFI_STATUS | GetFtwProtocol (OUT VOID **FtwProtocol) |
EFI_STATUS | GetFvbByHandle (IN EFI_HANDLE FvBlockHandle, OUT EFI_FIRMWARE_VOLUME_BLOCK_PROTOCOL **FvBlock) |
EFI_STATUS | GetFvbCountAndBuffer (OUT UINTN *NumberHandles, OUT EFI_HANDLE **Buffer) |
VOID EFIAPI | VariableClassAddressChangeEvent (IN EFI_EVENT Event, IN VOID *Context) |
VOID EFIAPI | OnReadyToBoot (EFI_EVENT Event, VOID *Context) |
VOID EFIAPI | OnEndOfDxe (EFI_EVENT Event, VOID *Context) |
VOID | VariableWriteServiceInitializeDxe (VOID) |
VOID EFIAPI | FtwNotificationEvent (IN EFI_EVENT Event, IN VOID *Context) |
EFI_STATUS EFIAPI | VariableServiceInitialize (IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable) |
Implement all four UEFI Runtime Variable services for the nonvolatile and volatile storage space and install variable architecture protocol.
Copyright (C) 2013, Red Hat, Inc. Copyright (c) 2006 - 2019, Intel Corporation. All rights reserved.
(C) Copyright 2015 Hewlett Packard Enterprise Development LP
Copyright (c) Microsoft Corporation. SPDX-License-Identifier: BSD-2-Clause-Patent
Definition in file VariableDxe.c.
Acquires lock only at boot time. Simply returns at runtime.
This is a temperary function that will be removed when EfiAcquireLock() in UefiLib can handle the call in UEFI Runtimer driver in RT phase. It calls EfiAcquireLock() at boot time, and simply returns at runtime.
Lock | A pointer to the lock to acquire. |
Definition at line 108 of file VariableDxe.c.
BOOLEAN AtRuntime | ( | VOID | ) |
Return TRUE if ExitBootServices () has been called.
TRUE | If ExitBootServices () has been called. |
Definition at line 63 of file VariableDxe.c.
Fault Tolerant Write protocol notification event handler.
Non-Volatile variable write may needs FTW protocol to reclaim when writting variable.
[in] | Event | Event whose notification function is being invoked. |
[in] | Context | Pointer to the notification function's context. |
Definition at line 413 of file VariableDxe.c.
EFI_STATUS GetFtwProtocol | ( | OUT VOID ** | FtwProtocol | ) |
Retrieve the Fault Tolerent Write protocol interface.
[out] | FtwProtocol | The interface of Ftw protocol |
EFI_SUCCESS | The FTW protocol instance was found and returned in FtwProtocol. |
EFI_NOT_FOUND | The FTW protocol instance was not found. |
EFI_INVALID_PARAMETER | SarProtocol is NULL. |
Definition at line 150 of file VariableDxe.c.
EFI_STATUS GetFvbByHandle | ( | IN EFI_HANDLE | FvBlockHandle, |
OUT EFI_FIRMWARE_VOLUME_BLOCK_PROTOCOL ** | FvBlock | ||
) |
Retrieve the FVB protocol interface by HANDLE.
[in] | FvBlockHandle | The handle of FVB protocol that provides services for reading, writing, and erasing the target block. |
[out] | FvBlock | The interface of FVB protocol |
EFI_SUCCESS | The interface information for the specified protocol was returned. |
EFI_UNSUPPORTED | The device does not support the FVB protocol. |
EFI_INVALID_PARAMETER | FvBlockHandle is not a valid EFI_HANDLE or FvBlock is NULL. |
Definition at line 180 of file VariableDxe.c.
EFI_STATUS GetFvbCountAndBuffer | ( | OUT UINTN * | NumberHandles, |
OUT EFI_HANDLE ** | Buffer | ||
) |
Function returns an array of handles that support the FVB protocol in a buffer allocated from pool.
[out] | NumberHandles | The number of handles returned in Buffer. |
[out] | Buffer | A pointer to the buffer to return the requested array of handles that support FVB protocol. |
EFI_SUCCESS | The array of handles was returned in Buffer, and the number of handles in Buffer was returned in NumberHandles. |
EFI_NOT_FOUND | No FVB handle was found. |
EFI_OUT_OF_RESOURCES | There is not enough pool memory to store the matching results. |
EFI_INVALID_PARAMETER | NumberHandles is NULL or Buffer is NULL. |
Definition at line 211 of file VariableDxe.c.
Initializes a basic mutual exclusion lock.
This function initializes a basic mutual exclusion lock to the released state and returns the lock. Each lock provides mutual exclusion access at its task priority level. Since there is no preemption or multiprocessor support in EFI, acquiring the lock only consists of raising to the locks TPL. If Lock is NULL, then ASSERT(). If Priority is not a valid TPL value, then ASSERT().
Lock | A pointer to the lock data structure to initialize. |
Priority | EFI TPL is associated with the lock. |
Definition at line 87 of file VariableDxe.c.
VOID EFIAPI OnEndOfDxe | ( | EFI_EVENT | Event, |
VOID * | Context | ||
) |
Notification function of EFI_END_OF_DXE_EVENT_GROUP_GUID event group.
This is a notification function registered on EFI_END_OF_DXE_EVENT_GROUP_GUID event group.
Event | Event whose notification function is being invoked. |
Context | Pointer to the notification function's context. |
Definition at line 343 of file VariableDxe.c.
VOID EFIAPI OnReadyToBoot | ( | EFI_EVENT | Event, |
VOID * | Context | ||
) |
Notification function of EVT_GROUP_READY_TO_BOOT event group.
This is a notification function registered on EVT_GROUP_READY_TO_BOOT event group. When the Boot Manager is about to load and execute a boot option, it reclaims variable storage if free size is below the threshold.
Event | Event whose notification function is being invoked. |
Context | Pointer to the notification function's context. |
Definition at line 297 of file VariableDxe.c.
EFI_STATUS EFIAPI ProtocolIsVariablePolicyEnabled | ( | OUT BOOLEAN * | State | ) |
This API function returns whether or not the policy engine is currently being enforced.
[out] | State | Pointer to a return value for whether the policy enforcement is currently enabled. |
EFI_SUCCESS | |
Others | An error has prevented this command from completing. |
Definition at line 516 of file VariableDxe.c.
VOID EFIAPI RecordSecureBootPolicyVarData | ( | VOID | ) |
Some Secure Boot Policy Variable may update following other variable changes(SecureBoot follows PK change, etc). Record their initial State when variable write service is ready.
Definition at line 347 of file Measurement.c.
Releases lock only at boot time. Simply returns at runtime.
This is a temperary function which will be removed when EfiReleaseLock() in UefiLib can handle the call in UEFI Runtimer driver in RT phase. It calls EfiReleaseLock() at boot time and simply returns at runtime.
Lock | A pointer to the lock to release. |
Definition at line 130 of file VariableDxe.c.
Notification function of EVT_SIGNAL_VIRTUAL_ADDRESS_CHANGE.
This is a notification function registered on EVT_SIGNAL_VIRTUAL_ADDRESS_CHANGE event. It convers pointer to new virtual address.
Event | Event whose notification function is being invoked. |
Context | Pointer to the notification function's context. |
Definition at line 243 of file VariableDxe.c.
EFI_STATUS EFIAPI VariableServiceInitialize | ( | IN EFI_HANDLE | ImageHandle, |
IN EFI_SYSTEM_TABLE * | SystemTable | ||
) |
Variable Driver main entry point. The Variable driver places the 4 EFI runtime services in the EFI System Table and installs arch protocols for variable read and write services being available. It also registers a notification function for an EVT_SIGNAL_VIRTUAL_ADDRESS_CHANGE event.
[in] | ImageHandle | The firmware allocated handle for the EFI image. |
[in] | SystemTable | A pointer to the EFI System Table. |
EFI_SUCCESS | Variable service successfully initialized. |
Definition at line 538 of file VariableDxe.c.
VOID VariableWriteServiceInitializeDxe | ( | VOID | ) |
Initializes variable write service for DXE.
Definition at line 372 of file VariableDxe.c.
VOID* mFtwRegistration = NULL |
Definition at line 26 of file VariableDxe.c.
EFI_HANDLE mHandle = NULL |
Handle for the Capsule Update Policy Protocol
Definition at line 24 of file VariableDxe.c.
EDKII_VAR_CHECK_PROTOCOL mVarCheck |
Definition at line 40 of file VariableDxe.c.
VOID*** mVarCheckAddressPointer = NULL |
Definition at line 27 of file VariableDxe.c.
UINTN mVarCheckAddressPointerCount = 0 |
Definition at line 28 of file VariableDxe.c.
EDKII_VARIABLE_LOCK_PROTOCOL mVariableLock = { VariableLockRequestToLock } |
Definition at line 29 of file VariableDxe.c.
EDKII_VARIABLE_POLICY_PROTOCOL mVariablePolicyProtocol |
Definition at line 30 of file VariableDxe.c.
Definition at line 25 of file VariableDxe.c.