diff options
author | Guomin Jiang <guomin.jiang@intel.com> | 2022-01-29 16:28:02 +0800 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2022-03-01 02:45:28 +0000 |
commit | 497ac7b6d7f9750f48f137db244931a5728b1968 (patch) | |
tree | 4a6483ea247e70772e6526d95777a6e31f063334 /UefiPayloadPkg | |
parent | 6a890db161cd6d378bec3499a1e774db3f5a27a7 (diff) | |
download | edk2-497ac7b6d7f9750f48f137db244931a5728b1968.tar.gz |
UefiPayloadPkg/PayloadLoaderPeim: Use INT64 as input parameter
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3818
It will have some potential issue when memory larger than 2G because
the high memory address will be fill with 0xFFFFFFFF when do the
operation of INTN + INT64 but it is 32 bit normal data in fact.
Should use same data type INT64 + INT64.
V3:
1. Use INT64 as input parameter because all date type is 64 bit
V2:
1. Force the data type to UINTN to avoid high dword be filled with
0xFFFFFFFF
2. Keep INTN because the offset may postive or negative.
Reviewed-by: Guo Dong <guo.dong@intel.com>
Reviewed-by: Ray Ni <ray.ni@intel.com>
Signed-off-by: Guomin Jiang <guomin.jiang@intel.com>
Diffstat (limited to 'UefiPayloadPkg')
-rw-r--r-- | UefiPayloadPkg/PayloadLoaderPeim/ElfLib/Elf64Lib.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/UefiPayloadPkg/PayloadLoaderPeim/ElfLib/Elf64Lib.c b/UefiPayloadPkg/PayloadLoaderPeim/ElfLib/Elf64Lib.c index dc47a05c6e..c8dbb88734 100644 --- a/UefiPayloadPkg/PayloadLoaderPeim/ElfLib/Elf64Lib.c +++ b/UefiPayloadPkg/PayloadLoaderPeim/ElfLib/Elf64Lib.c @@ -108,7 +108,7 @@ ProcessRelocation64 ( IN UINT64 RelaSize,
IN UINT64 RelaEntrySize,
IN UINT64 RelaType,
- IN INTN Delta,
+ IN INT64 Delta,
IN BOOLEAN DynamicLinking
)
{
|