summaryrefslogtreecommitdiffstats
path: root/UefiPayloadPkg
diff options
context:
space:
mode:
authorGua Guo <gua.guo@intel.com>2024-09-21 17:16:01 +0800
committerGua Guo <gua.guo@intel.com>2024-09-23 09:47:47 +0800
commit14bfcc402163d5e4fdefb1258740a24b6ee7261d (patch)
treedf6fbc44c90eb0572b0b4540c8c11c7e372af990 /UefiPayloadPkg
parent222e2854fe6bed443686e3809f155fd7b824fabd (diff)
downloadedk2-14bfcc402163d5e4fdefb1258740a24b6ee7261d.tar.gz
edk2-14bfcc402163d5e4fdefb1258740a24b6ee7261d.tar.bz2
edk2-14bfcc402163d5e4fdefb1258740a24b6ee7261d.zip
UefiPayloadPkg: Align relocation item with spec
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>
Diffstat (limited to 'UefiPayloadPkg')
-rw-r--r--UefiPayloadPkg/PayloadLoaderPeim/FitLib.h2
-rw-r--r--UefiPayloadPkg/UniversalPayloadBuild.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/UefiPayloadPkg/PayloadLoaderPeim/FitLib.h b/UefiPayloadPkg/PayloadLoaderPeim/FitLib.h
index 6a93b41590..05b790b42e 100644
--- a/UefiPayloadPkg/PayloadLoaderPeim/FitLib.h
+++ b/UefiPayloadPkg/PayloadLoaderPeim/FitLib.h
@@ -12,8 +12,8 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
#include <Library/FdtLib.h>
typedef struct {
- UINT64 RelocateType;
UINT64 Offset;
+ UINT64 RelocateType;
} FIT_RELOCATE_ITEM;
typedef struct {
diff --git a/UefiPayloadPkg/UniversalPayloadBuild.py b/UefiPayloadPkg/UniversalPayloadBuild.py
index 59c78a21b4..c3d02cbc29 100644
--- a/UefiPayloadPkg/UniversalPayloadBuild.py
+++ b/UefiPayloadPkg/UniversalPayloadBuild.py
@@ -269,7 +269,7 @@ def BuildUniversalPayload(Args):
continue
Type = entry.type
Offset = entry.rva + fit_image_info_header.DataOffset
- RelocBinary += Type.to_bytes (8, 'little') + Offset.to_bytes (8, 'little')
+ RelocBinary += Offset.to_bytes (8, 'little') + Type.to_bytes (8, 'little')
RelocBinary += b'\x00' * (0x1000 - (len(RelocBinary) % 0x1000))
#