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

Go to the source code of this file.

Functions

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)
 
VOID EFIAPI EsrtReadyToBootEventNotify (IN EFI_EVENT Event, IN VOID *Context)
 
EFI_STATUS EFIAPI EsrtDxeEntryPoint (IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable)
 

Variables

ESRT_PRIVATE_DATA mPrivate
 
ESRT_MANAGEMENT_PROTOCOL mEsrtManagementProtocolTemplate
 

Detailed Description

Esrt management module.

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

Definition in file EsrtDxe.c.

Function Documentation

◆ EsrtDxeEntryPoint()

EFI_STATUS EFIAPI EsrtDxeEntryPoint ( IN EFI_HANDLE  ImageHandle,
IN EFI_SYSTEM_TABLE SystemTable 
)

The module Entry Point of the Esrt DXE driver that manages cached ESRT repository & publishes ESRT table

Parameters
[in]ImageHandleThe firmware allocated handle for the EFI image.
[in]SystemTableA pointer to the EFI System Table.
Return values
EFI_SUCCESSThe entry point is executed successfully.
OtherSome error occurs when executing this entry point.

Definition at line 628 of file EsrtDxe.c.

◆ EsrtDxeGetEsrtEntry()

EFI_STATUS EFIAPI EsrtDxeGetEsrtEntry ( IN EFI_GUID FwClass,
IN OUT EFI_SYSTEM_RESOURCE_ENTRY Entry 
)

Get ESRT entry from ESRT Cache by FwClass Guid

Parameters
[in]FwClassFwClass of Esrt entry to get
[in,out]EntryEsrt entry returned
Return values
EFI_SUCCESSThe variable saving this Esrt Entry exists.
EF_NOT_FOUNDNo correct variable found.
EFI_WRITE_PROTECTEDESRT Cache repository is locked

Definition at line 38 of file EsrtDxe.c.

◆ EsrtDxeLockEsrtRepository()

EFI_STATUS EFIAPI EsrtDxeLockEsrtRepository ( VOID  )

This function locks up Esrt repository to be readonly. It should be called before gEfiEndOfDxeEventGroupGuid event signaled

Return values
EFI_SUCCESSLocks up FMP Non-FMP repository successfully

Definition at line 478 of file EsrtDxe.c.

◆ EsrtDxeRegisterEsrtEntry()

EFI_STATUS EFIAPI EsrtDxeRegisterEsrtEntry ( IN EFI_SYSTEM_RESOURCE_ENTRY Entry)

Non-FMP instance to register one ESRT entry into ESRT Cache.

Parameters
[in]EntryEsrt entry to be set
Return values
EFI_SUCCESSSuccessfully set a variable.
EFI_INVALID_PARAMETERESRT Entry is already exist
EFI_OUT_OF_RESOURCESNon-FMP ESRT repository is full

Definition at line 179 of file EsrtDxe.c.

◆ EsrtDxeSyncFmp()

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.

Return values
EFI_SUCCESSSuccessfully sync cache repository from FMP instances
EFI_NOT_FOUNDNo FMP Instance are found
EFI_OUT_OF_RESOURCESResource allocaton fail

Definition at line 222 of file EsrtDxe.c.

◆ EsrtDxeUnRegisterEsrtEntry()

EFI_STATUS EFIAPI EsrtDxeUnRegisterEsrtEntry ( IN EFI_GUID FwClass)

Non-FMP instance to unregister Esrt Entry from ESRT Cache.

Parameters
[in]FwClassFwClass of Esrt entry to Unregister
Return values
EFI_SUCCESSInsert all entries Successfully
EFI_NOT_FOUNDEntry of FwClass does not exsit

Definition at line 145 of file EsrtDxe.c.

◆ EsrtDxeUpdateEsrtEntry()

EFI_STATUS EFIAPI EsrtDxeUpdateEsrtEntry ( IN EFI_SYSTEM_RESOURCE_ENTRY Entry)

Update one ESRT entry in ESRT Cache.

Parameters
[in]EntryEsrt entry to be updated
Return values
EFI_SUCCESSSuccessfully update an ESRT entry in cache.
EFI_INVALID_PARAMETEREntry does't exist in ESRT Cache
EFI_WRITE_PROTECTEDESRT Cache repositoy is locked

Definition at line 98 of file EsrtDxe.c.

◆ EsrtReadyToBootEventNotify()

VOID EFIAPI EsrtReadyToBootEventNotify ( IN EFI_EVENT  Event,
IN VOID *  Context 
)

Notify function for event group EFI_EVENT_GROUP_READY_TO_BOOT. This is used to install the Esrt Table into system configuration table

Parameters
[in]EventThe Event that is being processed.
[in]ContextThe Event Context.

Definition at line 510 of file EsrtDxe.c.

Variable Documentation

◆ mEsrtManagementProtocolTemplate

ESRT_MANAGEMENT_PROTOCOL mEsrtManagementProtocolTemplate
Initial value:
= {
}
EFI_STATUS EFIAPI EsrtDxeLockEsrtRepository(VOID)
Definition: EsrtDxe.c:478
EFI_STATUS EFIAPI EsrtDxeUpdateEsrtEntry(IN EFI_SYSTEM_RESOURCE_ENTRY *Entry)
Definition: EsrtDxe.c:98
EFI_STATUS EFIAPI EsrtDxeSyncFmp(VOID)
Definition: EsrtDxe.c:222
EFI_STATUS EFIAPI EsrtDxeRegisterEsrtEntry(IN EFI_SYSTEM_RESOURCE_ENTRY *Entry)
Definition: EsrtDxe.c:179
EFI_STATUS EFIAPI EsrtDxeUnRegisterEsrtEntry(IN EFI_GUID *FwClass)
Definition: EsrtDxe.c:145
EFI_STATUS EFIAPI EsrtDxeGetEsrtEntry(IN EFI_GUID *FwClass, IN OUT EFI_SYSTEM_RESOURCE_ENTRY *Entry)
Definition: EsrtDxe.c:38

Definition at line 16 of file EsrtDxe.c.

◆ mPrivate

Definition at line 14 of file EsrtDxe.c.