TianoCore EDK2 master
|
#include <Guid/EventGroup.h>
#include <Guid/SystemResourceTable.h>
#include <Library/UefiLib.h>
#include <Library/UefiRuntimeServicesTableLib.h>
#include <Library/PcdLib.h>
#include <Library/BaseLib.h>
#include <Library/BaseMemoryLib.h>
#include <Library/MemoryAllocationLib.h>
#include <Library/UefiBootServicesTableLib.h>
#include <Library/DebugLib.h>
#include <Library/CapsuleLib.h>
#include <Protocol/FirmwareManagement.h>
#include <Protocol/EsrtManagement.h>
#include <Protocol/VariableLock.h>
Go to the source code of this file.
Data Structures | |
struct | ESRT_PRIVATE_DATA |
Macros | |
#define | EFI_ESRT_NONFMP_VARIABLE_NAME L"EsrtNonFmp" |
#define | EFI_ESRT_FMP_VARIABLE_NAME L"EsrtFmp" |
#define | ESRT_FROM_FMP 0x00000001 |
#define | ESRT_FROM_NONFMP 0x00000002 |
Functions | |
EFI_STATUS | GetEsrtEntry (IN EFI_GUID *FwClass, IN UINTN Attribute, OUT EFI_SYSTEM_RESOURCE_ENTRY *Entry) |
EFI_STATUS | InsertEsrtEntry (IN EFI_SYSTEM_RESOURCE_ENTRY *Entry, UINTN Attribute) |
EFI_STATUS | DeleteEsrtEntry (IN EFI_GUID *FwClass, IN UINTN Attribute) |
EFI_STATUS | UpdateEsrtEntry (IN EFI_SYSTEM_RESOURCE_ENTRY *Entry, UINTN Attribute) |
VOID | SetEsrtEntryFromFmpInfo (IN OUT EFI_SYSTEM_RESOURCE_ENTRY *EsrtEntry, IN EFI_FIRMWARE_IMAGE_DESCRIPTOR *FmpImageInfo, IN UINT32 DescriptorVersion) |
EFI_STATUS EFIAPI | EsrtDxeGetEsrtEntry (IN EFI_GUID *FwClass, IN OUT EFI_SYSTEM_RESOURCE_ENTRY *Entry) |
EFI_STATUS EFIAPI | EsrtDxeUpdateEsrtEntry (IN EFI_SYSTEM_RESOURCE_ENTRY *Entry) |
EFI_STATUS EFIAPI | EsrtDxeUnRegisterEsrtEntry (IN EFI_GUID *FwClass) |
EFI_STATUS EFIAPI | EsrtDxeRegisterEsrtEntry (IN EFI_SYSTEM_RESOURCE_ENTRY *Entry) |
EFI_STATUS EFIAPI | EsrtDxeSyncFmp (VOID) |
EFI_STATUS EFIAPI | EsrtDxeLockEsrtRepository (VOID) |
Esrt management implementation head file.
Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
Definition in file EsrtImpl.h.
#define EFI_ESRT_FMP_VARIABLE_NAME L"EsrtFmp" |
Definition at line 38 of file EsrtImpl.h.
#define EFI_ESRT_NONFMP_VARIABLE_NAME L"EsrtNonFmp" |
Definition at line 33 of file EsrtImpl.h.
#define ESRT_FROM_FMP 0x00000001 |
Definition at line 43 of file EsrtImpl.h.
#define ESRT_FROM_NONFMP 0x00000002 |
Definition at line 44 of file EsrtImpl.h.
EFI_STATUS DeleteEsrtEntry | ( | IN EFI_GUID * | FwClass, |
IN UINTN | Attribute | ||
) |
Delete ESRT Entry from ESRT repository.
[in] | FwClass | FwClass of Esrt entry to delete |
[in] | Attribute | Esrt from Esrt private protocol or FMP instance |
EFI_SUCCESS | Insert all entries Successfully |
EFI_NOT_FOUND | ESRT entry with FwClass doesn't exsit |
Definition at line 209 of file EsrtImpl.c.
EFI_STATUS EFIAPI EsrtDxeGetEsrtEntry | ( | IN EFI_GUID * | FwClass, |
IN OUT EFI_SYSTEM_RESOURCE_ENTRY * | Entry | ||
) |
Get ESRT entry from ESRT Cache by FwClass Guid
[in] | FwClass | FwClass of Esrt entry to get |
[in,out] | Entry | Esrt entry returned |
EFI_SUCCESS | The variable saving this Esrt Entry exists. |
EF_NOT_FOUND | No correct variable found. |
EFI_WRITE_PROTECTED | ESRT Cache repository is locked |
EFI_STATUS EFIAPI EsrtDxeLockEsrtRepository | ( | VOID | ) |
EFI_STATUS EFIAPI EsrtDxeRegisterEsrtEntry | ( | IN EFI_SYSTEM_RESOURCE_ENTRY * | Entry | ) |
Non-FMP instance to register one ESRT entry into ESRT Cache.
[in] | Entry | Esrt entry to be set |
EFI_SUCCESS | Successfully set a variable. |
EFI_INVALID_PARAMETER | ESRT Entry is already exist |
Non-FMP instance to register one ESRT entry into ESRT Cache.
[in] | Entry | Esrt entry to be set |
EFI_SUCCESS | Successfully set a variable. |
EFI_INVALID_PARAMETER | ESRT Entry is already exist |
EFI_OUT_OF_RESOURCES | Non-FMP ESRT repository is full |
EFI_STATUS EFIAPI EsrtDxeSyncFmp | ( | VOID | ) |
This function syn up Cached ESRT with data from FMP instances Function should be called after Connect All in order to locate all FMP protocols installed.
EFI_SUCCESS | Successfully sync cache repository from FMP instances |
EFI_NOT_FOUND | No FMP Instance are found |
EFI_OUT_OF_RESOURCES | Resource allocaton fail |
EFI_STATUS EFIAPI EsrtDxeUnRegisterEsrtEntry | ( | IN EFI_GUID * | FwClass | ) |
EFI_STATUS EFIAPI EsrtDxeUpdateEsrtEntry | ( | IN EFI_SYSTEM_RESOURCE_ENTRY * | Entry | ) |
Update one ESRT entry in ESRT Cache.
[in] | Entry | Esrt entry to be updated |
EFI_SUCCESS | Successfully update an ESRT entry in cache. |
EFI_INVALID_PARAMETER | Entry does't exist in ESRT Cache |
EFI_WRITE_PROTECTED | ESRT Cache is locked |
Update one ESRT entry in ESRT Cache.
[in] | Entry | Esrt entry to be updated |
EFI_SUCCESS | Successfully update an ESRT entry in cache. |
EFI_INVALID_PARAMETER | Entry does't exist in ESRT Cache |
EFI_WRITE_PROTECTED | ESRT Cache repositoy is locked |
EFI_STATUS GetEsrtEntry | ( | IN EFI_GUID * | FwClass, |
IN UINTN | Attribute, | ||
OUT EFI_SYSTEM_RESOURCE_ENTRY * | Entry | ||
) |
Find Esrt Entry stored in ESRT repository.
[in] | FwClass | Firmware class guid in Esrt entry |
[in] | Attribute | Esrt from Non FMP or FMP instance |
[out] | Entry | Esrt entry returned |
EFI_SUCCESS | Successfully find an Esrt entry |
EF_NOT_FOUND | No Esrt entry found |
Definition at line 23 of file EsrtImpl.c.
EFI_STATUS InsertEsrtEntry | ( | IN EFI_SYSTEM_RESOURCE_ENTRY * | Entry, |
UINTN | Attribute | ||
) |
Insert a new ESRT entry into ESRT Cache repository.
[in] | Entry | Esrt entry to be set |
[in] | Attribute | Esrt from Esrt private protocol or FMP instance |
EFI_SUCCESS | Successfully set a variable. |
Definition at line 92 of file EsrtImpl.c.
VOID SetEsrtEntryFromFmpInfo | ( | IN OUT EFI_SYSTEM_RESOURCE_ENTRY * | EsrtEntry, |
IN EFI_FIRMWARE_IMAGE_DESCRIPTOR * | FmpImageInfo, | ||
IN UINT32 | DescriptorVersion | ||
) |
Init one ESRT entry according to input FmpImageInfo (V1, V2, V3) .
[in,out] | EsrtEntry | Esrt entry to be Init |
[in] | FmpImageInfo | FMP image info descriptor |
[in] | DescriptorVersion | FMP Image info descriptor version |
Definition at line 434 of file EsrtImpl.c.
EFI_STATUS UpdateEsrtEntry | ( | IN EFI_SYSTEM_RESOURCE_ENTRY * | Entry, |
UINTN | Attribute | ||
) |
Update one ESRT entry in ESRT repository
[in] | Entry | Esrt entry to be set |
[in] | Attribute | Esrt from Non Esrt or FMP instance |
EFI_SUCCESS | Successfully Update a variable. |
EFI_NOT_FOUND | The Esrt enry doesn't exist |
Definition at line 310 of file EsrtImpl.c.