audk/MdePkg/Library
Star Zeng d7b96017cc MdePkg DxeServicesLib: Handle potential NULL FvHandle
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=514

The FvHandle input to InternalGetSectionFromFv() may be NULL,
then ASSERT will appear. It is because the LoadedImage->DeviceHandle
returned from InternalImageHandleToFvHandle() may be NULL.
For example for DxeCore, there is LoadedImage protocol installed
for it, but the LoadedImage->DeviceHandle could not be initialized
before the FV2 (contain DxeCore) protocol is installed.

This patch is to update InternalGetSectionFromFv() to return
EFI_NOT_FOUND directly for NULL FvHandle.

Cc: Liming Gao <liming.gao@intel.com>
Cc: Michael Kinney <michael.d.kinney@intel.com>
Cc: Michael Turner <Michael.Turner@microsoft.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
2017-05-08 08:57:03 +08:00
..
BaseCacheMaintenanceLib
BaseCpuLib MdePkg BaseCpuLib: Convert X64/CpuSleep.asm to NASM 2016-06-28 09:51:45 +08:00
BaseDebugLibNull
BaseDebugLibSerialPort
BaseDebugPrintErrorLevelLib
BaseExtractGuidedSectionLib MdePkg: Fix some typing errors 2016-10-07 18:05:37 -07:00
BaseIoLibIntrinsic MdePkg: BaseIoLibIntrinsic (IoLib class) library 2017-04-13 13:16:00 +08:00
BaseLib MdePkg: Convert files to CRLF line ending 2017-04-06 15:43:27 +08:00
BaseMemoryLib MdePkg/MemoryLib: Refine InternalMemSetMem16|32|64 functions logic 2016-12-22 16:17:16 +08:00
BaseMemoryLibMmx MdePkg/BaseMemoryLib*: check for zero length in ZeroMem () 2016-11-04 09:53:01 +00:00
BaseMemoryLibOptDxe MdePkg/BaseMemoryLib*: check for zero length in ZeroMem () 2016-11-04 09:53:01 +00:00
BaseMemoryLibOptPei MdePkg/BaseMemoryLib*: check for zero length in ZeroMem () 2016-11-04 09:53:01 +00:00
BaseMemoryLibRepStr MdePkg/BaseMemoryLib*: check for zero length in ZeroMem () 2016-11-04 09:53:01 +00:00
BaseMemoryLibSse2 MdePkg/BaseMemoryLib*: check for zero length in ZeroMem () 2016-11-04 09:53:01 +00:00
BaseOrderedCollectionRedBlackTreeLib
BasePalLibNull
BasePcdLibNull MdePkg: Follow PI1.4a to fix artificial limitation of SkuId range 2016-05-23 10:48:53 +08:00
BasePciCf8Lib
BasePciExpressLib
BasePciLibCf8
BasePciLibPciExpress
BasePciSegmentLibPci MdePkg: Add PciSegmentLib instance based on PciLib 2016-01-18 04:50:04 +00:00
BasePeCoffExtraActionLibNull
BasePeCoffGetEntryPointLib PeCoffGetEntryPointLib: Fix spelling issue 2017-04-26 08:58:18 +08:00
BasePeCoffLib MdePkg: Refine casting expression result to bigger size 2017-03-06 14:18:45 +08:00
BasePerformanceLibNull
BasePostCodeLibDebug
BasePostCodeLibPort80
BasePrintLib MdePkg/BasePrintLib: Refine the comment for AsciiValueToStringS API 2017-03-13 11:09:23 +08:00
BaseReportStatusCodeLibNull
BaseRngLib
BaseS3BootScriptLibNull MdePkg, MdeModulePkg: S3BootScriptSaveMemPoll(): accept 64-bit LoopTimes 2017-01-03 12:22:47 +01:00
BaseS3IoLib
BaseS3PciLib MdePkg: Refine casting expression result to bigger size 2017-03-06 14:18:45 +08:00
BaseS3SmbusLib
BaseS3StallLib
BaseSerialPortLibNull
BaseSmbusLibNull
BaseStackCheckLib
BaseSynchronizationLib MdePkg/BaseSynchronizationLib: Fix function names in function headers 2016-11-17 17:08:26 -08:00
BaseTimerLibNullTemplate
BaseUefiDecompressLib MdePkg: Fix typos in comments 2016-10-21 16:40:51 +08:00
DxeCoreEntryPoint
DxeCoreHobLib MdePkg HobLib: Check FV alignment when building FV HOB 2016-11-17 09:27:12 +08:00
DxeExtendedSalLib
DxeExtractGuidedSectionLib MdePkg: Fix typos in comments 2016-10-21 16:40:51 +08:00
DxeHobLib MdePkg DxeHobLib: Make GetHobList working before Constructor is called 2017-01-20 15:39:23 +08:00
DxeHstiLib MdePkg/Hsti: Fix a memory allocation check issue. 2016-06-06 09:18:24 +08:00
DxeIoLibCpuIo2 MdePkg: Avoid Non-Boolean type used as Boolean 2017-01-20 15:40:59 +08:00
DxeIoLibEsal MdePkg/DxeIoLibEsal: Add new Fifo routines in IoLib class 2017-01-17 10:11:20 +08:00
DxePalLibEsal
DxePcdLib MdePkg: Follow PI1.4a to fix artificial limitation of SkuId range 2016-05-23 10:48:53 +08:00
DxePciLibEsal MdePkg: Fix typos in comments 2016-10-21 16:40:51 +08:00
DxePciSegmentLibEsal MdePkg: Fix typos in comments 2016-10-21 16:40:51 +08:00
DxeRuntimeExtendedSalLib
DxeRuntimePciExpressLib
DxeSalLibEsal
DxeServicesLib MdePkg DxeServicesLib: Handle potential NULL FvHandle 2017-05-08 08:57:03 +08:00
DxeServicesTableLib
DxeSmbusLib
DxeTimerLibEsal
PeiCoreEntryPoint
PeiDxePostCodeLibReportStatusCode MdePkg PeiDxePostCodeLibReportStatusCode: Correct files with CRLF line ending 2016-07-29 09:18:12 +08:00
PeiExtractGuidedSectionLib MdePkg: Fix typos in comments 2016-10-21 16:40:51 +08:00
PeiHobLib MdePkg HobLib: Check FV alignment when building FV HOB 2016-11-17 09:27:12 +08:00
PeiIoLibCpuIo MdePkg/PeiIoLibCpuIo: Add new Fifo routines in IoLib class 2017-01-17 10:11:14 +08:00
PeiMemoryAllocationLib
PeiMemoryLib MdePkg/MemoryLib: Refine InternalMemSetMem16|32|64 functions logic 2016-12-22 16:17:16 +08:00
PeiPalLib
PeiPcdLib MdePkg: Follow PI1.4a to fix artificial limitation of SkuId range 2016-05-23 10:48:53 +08:00
PeiPciLibPciCfg2 MdePkg: Fix typos in comments 2016-10-21 16:40:51 +08:00
PeiPciSegmentLibPciCfg2
PeiResourcePublicationLib
PeiServicesLib MdePkg PeiServicesLib: Make sure FvInfo has FFS2 format if NULL FvFormat 2016-10-27 21:47:48 +08:00
PeiServicesTablePointerLib
PeiServicesTablePointerLibIdt
PeiServicesTablePointerLibKr7
PeiSmbusLibSmbus2Ppi
PeimEntryPoint
SecPeiDxeTimerLibCpu
SmiHandlerProfileLibNull MdePkg/SmiHandlerProfile: Add Context support in Unregister 2017-03-13 16:04:11 +08:00
SmmIoLib MdePkg/SmmIoLib: Add sample instance. 2017-04-26 09:22:20 +08:00
SmmIoLibSmmCpuIo2 MdePkg: Avoid Non-Boolean type used as Boolean 2017-01-20 15:40:59 +08:00
SmmLibNull
SmmMemLib MdePkg-SmmMemLib: Enhance SmmIsBufferOutsideSmmValid() check for fixed comm buffer. 2016-04-29 12:49:26 +08:00
SmmMemoryAllocationLib MdePkg: Refine casting expression result to bigger size 2017-03-06 14:18:45 +08:00
SmmPciExpressLib MdePkg: Add SMM PciExpressLib Instance 2016-09-27 11:01:23 +08:00
SmmPciLibPciRootBridgeIo MdePkg: Fix typos in comments 2016-10-21 16:40:51 +08:00
SmmPeriodicSmiLib MdePkg: Fix typos in comments 2016-10-21 16:40:51 +08:00
SmmServicesTableLib
UefiApplicationEntryPoint
UefiBootServicesTableLib
UefiDebugLibConOut
UefiDebugLibDebugPortProtocol
UefiDebugLibStdErr
UefiDevicePathLib MdePkg/UefiDevicePathLib: Refine the DevPathFromTextiSCSI protocol parsing 2017-03-30 11:32:24 +08:00
UefiDevicePathLibDevicePathProtocol MdePkg DevicePathLib: Validate before touch input buffer. 2016-11-09 17:49:15 +08:00
UefiDriverEntryPoint
UefiFileHandleLib MdePkg/UefiFileHandleLib: Refine the check for valid Ascii character 2017-01-12 21:26:26 +08:00
UefiLib MdePkg/UefiLib: Avoid mis-calculate of graphic console size 2017-04-14 13:16:05 +08:00
UefiMemoryAllocationLib MdePkg: Refine casting expression result to bigger size 2017-03-06 14:18:45 +08:00
UefiMemoryLib MdePkg/MemoryLib: Refine InternalMemSetMem16|32|64 functions logic 2016-12-22 16:17:16 +08:00
UefiPalLib
UefiPciLibPciRootBridgeIo MdePkg: Fix typos in comments 2016-10-21 16:40:51 +08:00
UefiPciSegmentLibPciRootBridgeIo
UefiRuntimeLib
UefiRuntimeServicesTableLib
UefiSalLib
UefiScsiLib MdePkg UefiScsiLib: Raise the Tpl of async IO callback to TPL_NOTIFY 2015-12-22 13:58:09 +00:00
UefiUsbLib MdePkg: Fix some typing errors 2016-10-07 18:05:37 -07:00