Skip to content

Commit

Permalink
UefiPayloadPkg: Align relocation item with spec
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
gguo11837463 committed Sep 23, 2024
1 parent 222e285 commit 14bfcc4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion UefiPayloadPkg/PayloadLoaderPeim/FitLib.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion UefiPayloadPkg/UniversalPayloadBuild.py
Original file line number Diff line number Diff line change
Expand Up @@ -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))

#
Expand Down

0 comments on commit 14bfcc4

Please sign in to comment.