mirror of
https://github.com/acidanthera/audk.git
synced 2025-07-27 07:34:06 +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;
|
EFI_PEI_HOB_POINTERS Hob;
|
||||||
UINTN HobLength;
|
|
||||||
|
|
||||||
if ((HobList == NULL) || (HobSize == 0)) {
|
if ((HobList == NULL) || (HobSize == 0)) {
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
Hob.Raw = (UINT8 *)HobList;
|
|
||||||
HobLength = GET_HOB_LENGTH (Hob);
|
|
||||||
//
|
//
|
||||||
// Parse the HOB list until end of list or matching type is found.
|
// 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) {
|
if (Hob.Header->HobType == EFI_HOB_TYPE_FV) {
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
Hob.Raw = GET_NEXT_HOB (Hob);
|
Hob.Raw = GET_NEXT_HOB (Hob);
|
||||||
HobLength += GET_HOB_LENGTH (Hob);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user