* [edk2-devel] [PATCH v1 1/1] DynamicTablesPkg: Fix X64 compilation errors
2024-01-02 4:52 [edk2-devel] [PATCH v1 0/1] DynamicTablesPkg: Fix X64 compilation errors Abdul Lateef Attar via groups.io
@ 2024-01-02 4:52 ` Abdul Lateef Attar via groups.io
0 siblings, 0 replies; 2+ messages in thread
From: Abdul Lateef Attar via groups.io @ 2024-01-02 4:52 UTC (permalink / raw)
To: devel; +Cc: Abdul Lateef Attar, Pierre Gondois, Sami Mujawar
From: Abdul Lateef Attar <AbdulLateef.Attar@amd.com>
Add the support for X64 compilation to the CI.
Fix the compilation errors.
Cc: Pierre Gondois <pierre.gondois@arm.com>
Cc: Sami Mujawar <sami.mujawar@arm.com>
Signed-off-by: Abdul Lateef Attar <AbdulLateef.Attar@amd.com>
---
DynamicTablesPkg/DynamicTables.dsc.inc | 17 ++++++++++++-----
DynamicTablesPkg/DynamicTablesPkg.dsc | 7 +++++--
.../Library/Common/AmlLib/AmlLib.inf | 2 ++
.../Library/Common/AmlLib/CodeGen/AmlCodeGen.c | 4 ++--
.../Common/DynamicPlatRepoLib/DynamicPlatRepo.c | 7 ++++---
.../Library/Common/TableHelperLib/TableHelper.c | 2 ++
.../Common/TableHelperLib/TableHelperLib.inf | 2 ++
7 files changed, 29 insertions(+), 12 deletions(-)
diff --git a/DynamicTablesPkg/DynamicTables.dsc.inc b/DynamicTablesPkg/DynamicTables.dsc.inc
index 9d4312c4e8..804fb00a85 100644
--- a/DynamicTablesPkg/DynamicTables.dsc.inc
+++ b/DynamicTablesPkg/DynamicTables.dsc.inc
@@ -2,6 +2,7 @@
# Dsc include file for Dynamic Tables Framework.
#
# Copyright (c) 2017 - 2022, Arm Limited. All rights reserved.<BR>
+# Copyright (C) 2024 Advanced Micro Devices, Inc. All rights reserved.<BR>
#
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
@@ -21,6 +22,17 @@
SmbiosStringTableLib|DynamicTablesPkg/Library/Common/SmbiosStringTableLib/SmbiosStringTableLib.inf
[Components.common]
+ #
+ # Dynamic Table Factory Dxe
+ #
+ DynamicTablesPkg/Drivers/DynamicTableFactoryDxe/DynamicTableFactoryDxe.inf
+
+ #
+ # Dynamic Tables Manager Dxe
+ #
+ DynamicTablesPkg/Drivers/DynamicTableManagerDxe/DynamicTableManagerDxe.inf
+
+[Components.ARM, Components.AARCH64]
#
# Generators
#
@@ -70,8 +82,3 @@
NULL|DynamicTablesPkg/Library/Acpi/Arm/AcpiSsdtPcieLibArm/SsdtPcieLibArm.inf
}
- #
- # Dynamic Tables Manager Dxe
- #
- DynamicTablesPkg/Drivers/DynamicTableManagerDxe/DynamicTableManagerDxe.inf
-
diff --git a/DynamicTablesPkg/DynamicTablesPkg.dsc b/DynamicTablesPkg/DynamicTablesPkg.dsc
index bd5084a900..a2db14efaf 100644
--- a/DynamicTablesPkg/DynamicTablesPkg.dsc
+++ b/DynamicTablesPkg/DynamicTablesPkg.dsc
@@ -3,6 +3,7 @@
#
# Copyright (c) 2019, Linaro Limited. All rights reserved.<BR>
# Copyright (c) 2019 - 2022, Arm Limited. All rights reserved.<BR>
+# Copyright (C) 2024 Advanced Micro Devices, Inc. All rights reserved.<BR>
#
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
@@ -14,7 +15,7 @@
PLATFORM_VERSION = 0.1
DSC_SPECIFICATION = 0x0001001a
OUTPUT_DIRECTORY = Build/DynamicTables
- SUPPORTED_ARCHITECTURES = ARM|AARCH64
+ SUPPORTED_ARCHITECTURES = ARM|AARCH64|X64
BUILD_TARGETS = DEBUG|RELEASE|NOOPT
SKUID_IDENTIFIER = DEFAULT
@@ -44,10 +45,12 @@
DynamicTablesPkg/Library/Common/SsdtPcieSupportLib/SsdtPcieSupportLib.inf
DynamicTablesPkg/Library/Common/SsdtSerialPortFixupLib/SsdtSerialPortFixupLib.inf
DynamicTablesPkg/Library/Common/TableHelperLib/TableHelperLib.inf
- DynamicTablesPkg/Library/FdtHwInfoParserLib/FdtHwInfoParserLib.inf
DynamicTablesPkg/Library/Common/DynamicPlatRepoLib/DynamicPlatRepoLib.inf
DynamicTablesPkg/Library/Common/SmbiosStringTableLib/SmbiosStringTableLib.inf
+[Components.ARM, Components.AARCH64]
+ DynamicTablesPkg/Library/FdtHwInfoParserLib/FdtHwInfoParserLib.inf
+
[BuildOptions]
*_*_*_CC_FLAGS = -D DISABLE_NEW_DEPRECATED_INTERFACES
diff --git a/DynamicTablesPkg/Library/Common/AmlLib/AmlLib.inf b/DynamicTablesPkg/Library/Common/AmlLib/AmlLib.inf
index 723de3ad44..6d0aa6ff93 100644
--- a/DynamicTablesPkg/Library/Common/AmlLib/AmlLib.inf
+++ b/DynamicTablesPkg/Library/Common/AmlLib/AmlLib.inf
@@ -2,6 +2,7 @@
# AML Generation Library
#
# Copyright (c) 2019 - 2021, Arm Limited. All rights reserved.<BR>
+# Copyright (C) 2024 Advanced Micro Devices, Inc. All rights reserved.<BR>
#
# SPDX-License-Identifier: BSD-2-Clause-Patent
##
@@ -68,6 +69,7 @@
[LibraryClasses]
AcpiHelperLib
BaseLib
+ MemoryAllocationLib
[BuildOptions]
*_*_*_CC_FLAGS = -DAML_HANDLE
diff --git a/DynamicTablesPkg/Library/Common/AmlLib/CodeGen/AmlCodeGen.c b/DynamicTablesPkg/Library/Common/AmlLib/CodeGen/AmlCodeGen.c
index 893ace20ae..d4e3e252cb 100644
--- a/DynamicTablesPkg/Library/Common/AmlLib/CodeGen/AmlCodeGen.c
+++ b/DynamicTablesPkg/Library/Common/AmlLib/CodeGen/AmlCodeGen.c
@@ -2,7 +2,7 @@
AML Code Generation.
Copyright (c) 2020 - 2022, Arm Limited. All rights reserved.<BR>
- Copyright (C) 2023 Advanced Micro Devices, Inc. All rights reserved.<BR>
+ Copyright (C) 2023 - 2024, Advanced Micro Devices, Inc. All rights reserved.<BR>
SPDX-License-Identifier: BSD-2-Clause-Patent
**/
@@ -922,7 +922,7 @@ AmlCodeGenNameUnicodeString (
Status = AmlCreateDataNode (
EAmlNodeDataTypeRaw,
(CONST UINT8 *)String,
- StrSize (String),
+ (UINT32)StrSize (String),
&DataNode
);
if (EFI_ERROR (Status)) {
diff --git a/DynamicTablesPkg/Library/Common/DynamicPlatRepoLib/DynamicPlatRepo.c b/DynamicTablesPkg/Library/Common/DynamicPlatRepoLib/DynamicPlatRepo.c
index bc713f30b2..bdeb5c78ae 100644
--- a/DynamicTablesPkg/Library/Common/DynamicPlatRepoLib/DynamicPlatRepo.c
+++ b/DynamicTablesPkg/Library/Common/DynamicPlatRepoLib/DynamicPlatRepo.c
@@ -2,6 +2,7 @@
Dynamic Platform Info Repository
Copyright (c) 2021, Arm Limited. All rights reserved.<BR>
+ Copyright (C) 2024 Advanced Micro Devices, Inc. All rights reserved.<BR>
SPDX-License-Identifier: BSD-2-Clause-Patent
@@ -287,8 +288,8 @@ GroupCmObjNodes (
CmObjDesc = &This->ArmCmObjArray[ArmObjIndex];
CmObjDesc->ObjectId = CmObjId;
- CmObjDesc->Size = Size;
- CmObjDesc->Count = Count;
+ CmObjDesc->Size = (UINT32)Size;
+ CmObjDesc->Count = (UINT32)Count;
CmObjDesc->Data = GroupedData;
return Status;
@@ -340,7 +341,7 @@ DynamicPlatRepoFinalise (
// (the array is wrapped in a CmObjDesc).
// - Add the Token/CmObj binding to the token mapper.
for (ArmObjIndex = 0; ArmObjIndex < EArmObjMax; ArmObjIndex++) {
- Status = GroupCmObjNodes (This, ArmObjIndex);
+ Status = GroupCmObjNodes (This, (UINT32)ArmObjIndex);
if (EFI_ERROR (Status)) {
ASSERT (0);
// Free the TokenMapper.
diff --git a/DynamicTablesPkg/Library/Common/TableHelperLib/TableHelper.c b/DynamicTablesPkg/Library/Common/TableHelperLib/TableHelper.c
index 0decd3dc0e..e33d6e656b 100644
--- a/DynamicTablesPkg/Library/Common/TableHelperLib/TableHelper.c
+++ b/DynamicTablesPkg/Library/Common/TableHelperLib/TableHelper.c
@@ -2,6 +2,7 @@
Table Helper
Copyright (c) 2017 - 2021, Arm Limited. All rights reserved.<BR>
+ Copyright (C) 2024 Advanced Micro Devices, Inc. All rights reserved.<BR>
SPDX-License-Identifier: BSD-2-Clause-Patent
**/
@@ -16,6 +17,7 @@
#include <ConfigurationManagerObject.h>
#include <Library/TableHelperLib.h>
#include <Protocol/ConfigurationManagerProtocol.h>
+#include <Library/AmlLib/AmlLib.h>
/** The GetCgfMgrInfo function gets the CM_STD_OBJ_CONFIGURATION_MANAGER_INFO
object from the Configuration Manager.
diff --git a/DynamicTablesPkg/Library/Common/TableHelperLib/TableHelperLib.inf b/DynamicTablesPkg/Library/Common/TableHelperLib/TableHelperLib.inf
index abbf4bc38c..8df5ab848e 100644
--- a/DynamicTablesPkg/Library/Common/TableHelperLib/TableHelperLib.inf
+++ b/DynamicTablesPkg/Library/Common/TableHelperLib/TableHelperLib.inf
@@ -2,6 +2,7 @@
# Table Helper
#
# Copyright (c) 2017 - 2021, ARM Limited. All rights reserved.
+# Copyright (C) 2024 Advanced Micro Devices, Inc. All rights reserved.<BR>
#
# SPDX-License-Identifier: BSD-2-Clause-Patent
##
@@ -25,3 +26,4 @@
[LibraryClasses]
BaseLib
+ AmlLib
--
2.34.1
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#113027): https://edk2.groups.io/g/devel/message/113027
Mute This Topic: https://groups.io/mt/103476725/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-
^ permalink raw reply related [flat|nested] 2+ messages in thread