The DxeCapsuleLibFmp code accesses the ESRT table to decide whether a certain capsule is an FMP capsule. Since the UEFI spec mandates that the ESRT resides in EfiBootServicesData memory, this results in problems at OS runtime, since the firmware implementation itself cannot access memory that has not been virtually remapped. So let's take a private copy of the ESRT at ReadyToBoot, and store it in EfiRuntimeServicesData memory. The ESRT's size is order 10s of bytes so the memory footprint is going to be negligigble. Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Acked-by: Hao Wu <hao.a.wu@intel.com> Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com>
74 lines
2.4 KiB
INI
74 lines
2.4 KiB
INI
## @file
|
|
# Capsule library instance for DXE_RUNTIME_DRIVER.
|
|
#
|
|
# Capsule library instance for DXE_RUNTIME_DRIVER module types.
|
|
#
|
|
# Copyright (c) 2016 - 2018, Intel Corporation. All rights reserved.<BR>
|
|
# SPDX-License-Identifier: BSD-2-Clause-Patent
|
|
#
|
|
##
|
|
|
|
[Defines]
|
|
INF_VERSION = 0x00010005
|
|
BASE_NAME = DxeRuntimeCapsuleLib
|
|
MODULE_UNI_FILE = DxeRuntimeCapsuleLib.uni
|
|
FILE_GUID = 19BE1E4B-1A9A-44c1-8F12-32DD0470516A
|
|
MODULE_TYPE = DXE_RUNTIME_DRIVER
|
|
VERSION_STRING = 1.0
|
|
LIBRARY_CLASS = CapsuleLib|DXE_RUNTIME_DRIVER
|
|
CONSTRUCTOR = DxeCapsuleLibConstructor
|
|
CONSTRUCTOR = DxeRuntimeCapsuleLibConstructor
|
|
DESTRUCTOR = DxeCapsuleLibDestructor
|
|
DESTRUCTOR = DxeRuntimeCapsuleLibDestructor
|
|
|
|
#
|
|
# The following information is for reference only and not required by the build tools.
|
|
#
|
|
# VALID_ARCHITECTURES = IA32 X64 EBC
|
|
#
|
|
|
|
[Sources]
|
|
DxeCapsuleLib.c
|
|
DxeCapsuleProcessLibNull.c
|
|
DxeCapsuleReportLibNull.c
|
|
DxeCapsuleRuntime.c
|
|
|
|
[Packages]
|
|
MdePkg/MdePkg.dec
|
|
MdeModulePkg/MdeModulePkg.dec
|
|
|
|
[LibraryClasses]
|
|
BaseLib
|
|
BaseMemoryLib
|
|
DebugLib
|
|
MemoryAllocationLib
|
|
DxeServicesTableLib
|
|
UefiBootServicesTableLib
|
|
DevicePathLib
|
|
ReportStatusCodeLib
|
|
PrintLib
|
|
HobLib
|
|
BmpSupportLib
|
|
|
|
|
|
[Protocols]
|
|
gEsrtManagementProtocolGuid ## CONSUMES
|
|
gEfiFirmwareManagementProtocolGuid ## CONSUMES
|
|
gEdkiiVariableLockProtocolGuid ## SOMETIMES_CONSUMES
|
|
gEdkiiFirmwareManagementProgressProtocolGuid ## SOMETIMES_CONSUMES
|
|
|
|
[Guids]
|
|
gEfiFmpCapsuleGuid ## SOMETIMES_CONSUMES ## GUID
|
|
gWindowsUxCapsuleGuid ## SOMETIMES_CONSUMES ## GUID
|
|
gEfiSystemResourceTableGuid ## SOMETIMES_CONSUMES ## GUID
|
|
## SOMETIMES_CONSUMES ## Variable:L"CapsuleMax"
|
|
## SOMETIMES_PRODUCES ## Variable:L"CapsuleMax"
|
|
gEfiCapsuleReportGuid
|
|
gEfiCapsuleVendorGuid ## SOMETIMES_CONSUMES ## Variable:L"CapsuleUpdateData"
|
|
gEfiEndOfDxeEventGroupGuid ## CONSUMES ## Event
|
|
gEfiEventReadyToBootGuid ## CONSUMES ## Event
|
|
gEfiEventVirtualAddressChangeGuid ## CONSUMES ## Event
|
|
|
|
[Depex]
|
|
gEfiVariableWriteArchProtocolGuid
|