In DxeIplFindDxeCore function, there exists different behavior between Debug and Release built BIOS.
This change is used to unify both of the code flow and fix the potential overflow of "Instance" variable.
In this change,
Move the ASSERT_EFI_ERROR (Status) in failure to find DxeCore in any firmware volume condition.
Break the while-loop when not found required DxeCore. This would make the Instance variable not overflow in while-loop.
Add the ASSERT (FALSE) and CpuDeadLoop () in the end of the function and do not return since DxeCore is mandatory for the following booting to hand-off the PEI phase to DXE phase.
In case of the CpuDeadLoop () is de-assert by debugger, return the NULL pointer.
[ ] Breaking change?
No, it is changed the internal function code flow within module only
[X] Impacts security?
Yes, this change would make the "Instance" variable would not happen overflow when DxeCore not found
[X] Includes tests?
Tested on QEMU platform, it is booting fine after the code change
How This Was Tested
Tested on QEMU platform without wrapping the DxeCore module.
It is asserted in expected location and would reach break to escape from while-loop.
Description
Bugzilla#4653
In DxeIplFindDxeCore function, there exists different behavior between Debug and Release built BIOS.
This change is used to unify both of the code flow and fix the potential overflow of "Instance" variable.
In this change,
[ ] Breaking change?
[X] Impacts security?
[X] Includes tests?
How This Was Tested
Integration Instructions