mirror of https://github.com/acidanthera/audk.git
UefiPayloadPkg: Fix LoadDxeCore for payload size > 16MB
Fix calculation of first section in FileFindSection for FILE2 headers in UefiPayloadEntry module. Signed-off-by: Sebastian Witt <sebastian.witt@siemens.com> Reviewed-by: Guo Dong <guo.dong@intel.com> Cc: Sean Rhodes <sean@starlabs.systems> Cc: James Lu <james.lu@intel.com> Reviewed-by: Gua Guo <gua.guo@intel.com>
This commit is contained in:
parent
3dcc7b73df
commit
6d15276ced
|
@ -211,13 +211,14 @@ FileFindSection (
|
|||
|
||||
if (IS_FFS_FILE2 (FileHeader)) {
|
||||
FileSize = FFS_FILE2_SIZE (FileHeader);
|
||||
Section = (EFI_COMMON_SECTION_HEADER *)(((EFI_FFS_FILE_HEADER2 *)FileHeader) + 1);
|
||||
} else {
|
||||
FileSize = FFS_FILE_SIZE (FileHeader);
|
||||
Section = (EFI_COMMON_SECTION_HEADER *)(FileHeader + 1);
|
||||
}
|
||||
|
||||
FileSize -= sizeof (EFI_FFS_FILE_HEADER);
|
||||
|
||||
Section = (EFI_COMMON_SECTION_HEADER *)(FileHeader + 1);
|
||||
Index = 0;
|
||||
while (Index < FileSize) {
|
||||
if (Section->Type == SectionType) {
|
||||
|
|
Loading…
Reference in New Issue