TianoCore EDK2 master
Loading...
Searching...
No Matches
EsrtImpl.c File Reference
#include "EsrtImpl.h"

Go to the source code of this file.

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)
 
BOOLEAN IsSystemFmp (IN EFI_FIRMWARE_IMAGE_DESCRIPTOR *FmpImageInfo)
 
VOID SetEsrtEntryFromFmpInfo (IN OUT EFI_SYSTEM_RESOURCE_ENTRY *EsrtEntry, IN EFI_FIRMWARE_IMAGE_DESCRIPTOR *FmpImageInfo, IN UINT32 DescriptorVersion)
 

Detailed Description

Esrt management implementation.

Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent

Definition in file EsrtImpl.c.

Function Documentation

◆ DeleteEsrtEntry()

EFI_STATUS DeleteEsrtEntry ( IN EFI_GUID FwClass,
IN UINTN  Attribute 
)

Delete ESRT Entry from ESRT repository.

Parameters
[in]FwClassFwClass of Esrt entry to delete
[in]AttributeEsrt from Esrt private protocol or FMP instance
Return values
EFI_SUCCESSInsert all entries Successfully
EFI_NOT_FOUNDESRT entry with FwClass doesn't exsit

Definition at line 209 of file EsrtImpl.c.

◆ GetEsrtEntry()

EFI_STATUS GetEsrtEntry ( IN EFI_GUID FwClass,
IN UINTN  Attribute,
OUT EFI_SYSTEM_RESOURCE_ENTRY Entry 
)

Find Esrt Entry stored in ESRT repository.

Parameters
[in]FwClassFirmware class guid in Esrt entry
[in]AttributeEsrt from Non FMP or FMP instance
[out]EntryEsrt entry returned
Return values
EFI_SUCCESSSuccessfully find an Esrt entry
EF_NOT_FOUNDNo Esrt entry found

Definition at line 23 of file EsrtImpl.c.

◆ InsertEsrtEntry()

EFI_STATUS InsertEsrtEntry ( IN EFI_SYSTEM_RESOURCE_ENTRY Entry,
UINTN  Attribute 
)

Insert a new ESRT entry into ESRT Cache repository.

Parameters
[in]EntryEsrt entry to be set
[in]AttributeEsrt from Esrt private protocol or FMP instance
Return values
EFI_SUCCESSSuccessfully set a variable.

Definition at line 92 of file EsrtImpl.c.

◆ IsSystemFmp()

BOOLEAN IsSystemFmp ( IN EFI_FIRMWARE_IMAGE_DESCRIPTOR FmpImageInfo)

Return if this FMP is a system FMP or a device FMP, based upon FmpImageInfo.

Parameters
[in]FmpImageInfoA pointer to EFI_FIRMWARE_IMAGE_DESCRIPTOR
Returns
TRUE It is a system FMP.
FALSE It is a device FMP.

Definition at line 405 of file EsrtImpl.c.

◆ SetEsrtEntryFromFmpInfo()

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) .

Parameters
[in,out]EsrtEntryEsrt entry to be Init
[in]FmpImageInfoFMP image info descriptor
[in]DescriptorVersionFMP Image info descriptor version

Definition at line 434 of file EsrtImpl.c.

◆ UpdateEsrtEntry()

EFI_STATUS UpdateEsrtEntry ( IN EFI_SYSTEM_RESOURCE_ENTRY Entry,
UINTN  Attribute 
)

Update one ESRT entry in ESRT repository

Parameters
[in]EntryEsrt entry to be set
[in]AttributeEsrt from Non Esrt or FMP instance
Return values
EFI_SUCCESSSuccessfully Update a variable.
EFI_NOT_FOUNDThe Esrt enry doesn't exist

Definition at line 310 of file EsrtImpl.c.