]> xenbits.xensource.com Git - people/aperard/ovmf.git/commitdiff
UefiPayloadPkg: Align relocation item with spec
authorGua Guo <gua.guo@intel.com>
Sat, 21 Sep 2024 09:16:01 +0000 (17:16 +0800)
committerGua Guo <gua.guo@intel.com>
Mon, 23 Sep 2024 01:47:47 +0000 (09:47 +0800)
Currently, FIT Payload data relocation data has
some minor error with Universal Payload
Specification v0.9.1 section 2.4.3.

Signed-off-by: Gua Guo <gua.guo@intel.com>
UefiPayloadPkg/PayloadLoaderPeim/FitLib.h
UefiPayloadPkg/UniversalPayloadBuild.py

index 6a93b41590110f19aa59e4bd106f3745de49e75c..05b790b42e2f5d8fae7c2f814cb2f84374100ab4 100644 (file)
@@ -12,8 +12,8 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
 #include <Library/FdtLib.h>\r
 \r
 typedef struct {\r
-  UINT64    RelocateType;\r
   UINT64    Offset;\r
+  UINT64    RelocateType;\r
 } FIT_RELOCATE_ITEM;\r
 \r
 typedef struct {\r
index 59c78a21b405e9b21d5244d7902352fdb4db1a67..c3d02cbc2915e8294ebafaecfdcec2b3b386139d 100644 (file)
@@ -269,7 +269,7 @@ def BuildUniversalPayload(Args):
                     continue\r
                 Type = entry.type\r
                 Offset = entry.rva + fit_image_info_header.DataOffset\r
-                RelocBinary += Type.to_bytes (8, 'little') + Offset.to_bytes (8, 'little')\r
+                RelocBinary += Offset.to_bytes (8, 'little') + Type.to_bytes (8, 'little')\r
         RelocBinary += b'\x00' * (0x1000 - (len(RelocBinary) % 0x1000))\r
 \r
         #\r