public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [edk2-devel] [PATCH] UefiPayloadPkg: Fix LoadDxeCore for payload size > 16MB
@ 2024-06-03 15:51 Witt, Sebastian via groups.io
  2024-06-05 14:18 ` Lean Sheng Tan
  0 siblings, 1 reply; 7+ messages in thread
From: Witt, Sebastian via groups.io @ 2024-06-03 15:51 UTC (permalink / raw)
  To: devel@edk2.groups.io


Fix calculation of first section in FileFindSection for FILE2 headers in UefiPayloadEntry module.

Signed-of-by: Sebastian Witt <sebastian.witt@siemens.com>
---
 UefiPayloadPkg/UefiPayloadEntry/LoadDxeCore.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/UefiPayloadPkg/UefiPayloadEntry/LoadDxeCore.c b/UefiPayloadPkg/UefiPayloadEntry/LoadDxeCore.c
index 898d610951..9cb6edefcf 100644
--- a/UefiPayloadPkg/UefiPayloadEntry/LoadDxeCore.c
+++ b/UefiPayloadPkg/UefiPayloadEntry/LoadDxeCore.c
@@ -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) {
-- 
2.39.2



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#119435): https://edk2.groups.io/g/devel/message/119435
Mute This Topic: https://groups.io/mt/106471262/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-



^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2024-06-10 15:31 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-03 15:51 [edk2-devel] [PATCH] UefiPayloadPkg: Fix LoadDxeCore for payload size > 16MB Witt, Sebastian via groups.io
2024-06-05 14:18 ` Lean Sheng Tan
2024-06-05 14:22   ` Guo, Gua
2024-06-05 23:08     ` Guo Dong
2024-06-06 13:38     ` Witt, Sebastian via groups.io
2024-06-10 15:28       ` Lean Sheng Tan via groups.io
2024-06-10 15:31         ` Guo, Gua

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox