mirror of
https://github.com/acidanthera/audk.git
synced 2025-04-08 17:05:09 +02:00
StandaloneMmPkg/MmIpl: Correct FV HOB check founction
When at last hob, the FV HOB check function should exit from the loop Signed-off-by: Hongbin1 Zhang <hongbin1.zhang@intel.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Ray Ni <ray.ni@intel.com> Cc: Star Zeng <star.zeng@intel.com> Cc: Jiaxin Wu <jiaxin.wu@intel.com> Cc: Wei6 Xu <wei6.xu@intel.com> Cc: Sami Mujawar <sami.mujawar@arm.com> Cc: Ard Biesheuvel <ardb+tianocore@kernel.org> Cc: Supreeth Venkatesh <supreeth.venkatesh@arm.com>
This commit is contained in:
parent
3c8f47bf21
commit
8c180acf1d
@ -823,24 +823,21 @@ IsFvHobExist (
|
||||
)
|
||||
{
|
||||
EFI_PEI_HOB_POINTERS Hob;
|
||||
UINTN HobLength;
|
||||
|
||||
if ((HobList == NULL) || (HobSize == 0)) {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
Hob.Raw = (UINT8 *)HobList;
|
||||
HobLength = GET_HOB_LENGTH (Hob);
|
||||
//
|
||||
// Parse the HOB list until end of list or matching type is found.
|
||||
//
|
||||
while (HobLength <= HobSize) {
|
||||
Hob.Raw = HobList;
|
||||
while ((UINTN)(Hob.Raw - HobList) < HobSize) {
|
||||
if (Hob.Header->HobType == EFI_HOB_TYPE_FV) {
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
Hob.Raw = GET_NEXT_HOB (Hob);
|
||||
HobLength += GET_HOB_LENGTH (Hob);
|
||||
Hob.Raw = GET_NEXT_HOB (Hob);
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
|
Loading…
x
Reference in New Issue
Block a user