diff options
author | Abdul Lateef Attar <AbdulLateef.Attar@amd.com> | 2024-01-03 15:22:39 +0530 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2024-01-03 14:30:45 +0000 |
commit | 16c8cfc81054aa76e133eab1033560052727cab5 (patch) | |
tree | 5bc50aeec848fec380bcaad605cb5d0faf091f86 | |
parent | ea658e35a991377ea7beea7cbd7ba56dc1071f10 (diff) | |
download | edk2-16c8cfc81054aa76e133eab1033560052727cab5.zip edk2-16c8cfc81054aa76e133eab1033560052727cab5.tar.gz edk2-16c8cfc81054aa76e133eab1033560052727cab5.tar.bz2 |
DynamicTablesPkg: Fix IA32 compilation errors
Add the support for X64 compilation to the CI.
- Fix the signed and unsigned variable comparision.
warning C4018: '>': signed/unsigned mismatch
- Fix the NOOPT build error for IA32 by replacing
64bit shift operator with LShiftU64.
Cc: Pierre Gondois <pierre.gondois@arm.com>
Cc: Sami Mujawar <sami.mujawar@arm.com>
Signed-off-by: Abdul Lateef Attar <AbdulLateef.Attar@amd.com>
Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
4 files changed, 8 insertions, 5 deletions
diff --git a/DynamicTablesPkg/DynamicTables.dsc.inc b/DynamicTablesPkg/DynamicTables.dsc.inc index 0e67207..8c99574 100644 --- a/DynamicTablesPkg/DynamicTables.dsc.inc +++ b/DynamicTablesPkg/DynamicTables.dsc.inc @@ -27,7 +27,7 @@ #
DynamicTablesPkg/Drivers/DynamicTableManagerDxe/DynamicTableManagerDxe.inf
-[Components.X64]
+[Components.IA32, Components.X64]
#
# Dynamic Table Factory Dxe
#
diff --git a/DynamicTablesPkg/DynamicTablesPkg.dsc b/DynamicTablesPkg/DynamicTablesPkg.dsc index a2db14e..2f35ac8 100644 --- a/DynamicTablesPkg/DynamicTablesPkg.dsc +++ b/DynamicTablesPkg/DynamicTablesPkg.dsc @@ -15,7 +15,7 @@ PLATFORM_VERSION = 0.1
DSC_SPECIFICATION = 0x0001001a
OUTPUT_DIRECTORY = Build/DynamicTables
- SUPPORTED_ARCHITECTURES = ARM|AARCH64|X64
+ SUPPORTED_ARCHITECTURES = ARM|AARCH64|IA32|X64
BUILD_TARGETS = DEBUG|RELEASE|NOOPT
SKUID_IDENTIFIER = DEFAULT
diff --git a/DynamicTablesPkg/Library/Common/TableHelperLib/ConfigurationManagerObjectParser.c b/DynamicTablesPkg/Library/Common/TableHelperLib/ConfigurationManagerObjectParser.c index ce49481..c1a7528 100644 --- a/DynamicTablesPkg/Library/Common/TableHelperLib/ConfigurationManagerObjectParser.c +++ b/DynamicTablesPkg/Library/Common/TableHelperLib/ConfigurationManagerObjectParser.c @@ -1130,7 +1130,7 @@ ParseCmObjDesc ( &RemainingSize,
1
);
- if ((RemainingSize > CmObjDesc->Size) ||
+ if ((RemainingSize > (INTN)CmObjDesc->Size) ||
(RemainingSize < 0))
{
ASSERT (0);
diff --git a/DynamicTablesPkg/Library/Common/TableHelperLib/TableHelper.c b/DynamicTablesPkg/Library/Common/TableHelperLib/TableHelper.c index d264975..549cee1 100644 --- a/DynamicTablesPkg/Library/Common/TableHelperLib/TableHelper.c +++ b/DynamicTablesPkg/Library/Common/TableHelperLib/TableHelper.c @@ -170,7 +170,10 @@ AddAcpiHeader ( CfgMfrInfo->OemId[2],
CfgMfrInfo->OemId[3]
) |
- ((UINT64)Generator->AcpiTableSignature << 32);
+ LShiftU64 (
+ (UINT64)Generator->AcpiTableSignature,
+ 32
+ );
}
// UINT32 OemRevision
@@ -257,7 +260,7 @@ AddSsdtAcpiHeader ( CfgMfrInfo->OemId[2],
CfgMfrInfo->OemId[3]
) |
- ((UINT64)Generator->AcpiTableSignature << 32);
+ LShiftU64 ((UINT64)Generator->AcpiTableSignature, 32);
}
if (AcpiTableInfo->OemRevision != 0) {
|