From mboxrd@z Thu Jan 1 00:00:00 1970 Subject: Re: [edk2-devel] [edk2-platforms][PATCH V1 04/11] Platform/ARM/Morello: Add ConfigurationManager for Morello SoC To: chandni cherukuri ,devel@edk2.groups.io From: "Khasim Mohammed" X-Originating-Location: Bengaluru, Karnataka, IN (217.140.105.56) X-Originating-Platform: Linux Firefox 72 User-Agent: GROUPS.IO Web Poster MIME-Version: 1.0 Date: Tue, 07 Dec 2021 19:02:26 -0800 References: <20211204123042.32140-5-chandni.cherukuri@arm.com> In-Reply-To: <20211204123042.32140-5-chandni.cherukuri@arm.com> Message-ID: <30393.1638932546168277361@groups.io> Content-Type: multipart/alternative; boundary="nJeQJFDwnqXgONtNQWGf" --nJeQJFDwnqXgONtNQWGf Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Hi Chandni, One input, On Sat, Dec 4, 2021 at 04:31 AM, chandni cherukuri wrote: >=20 > This patch implements the configuration manager for Morello > SoC platform. It enables support for generating the following > ACPI tables for Morello SoC Platform: > 1. FADT > 2. DSDT > 3. GTDT > 4. MADT > 5. SPCR > 6. DBG2 > 7. PPTT >=20 > Signed-off-by: Chandni Cherukuri > --- > Platform/ARM/Morello/ConfigurationManager/ConfigurationManagerSoc.dsc.inc > | 16 ++ > Platform/ARM/Morello/ConfigurationManager/ConfigurationManagerDxe/Configu= rationManagerDxeSoc.inf > | 72 +++++++++ > Platform/ARM/Morello/ConfigurationManager/ConfigurationManagerDxe/Configu= rationManagerSoc.h > | 97 ++++++++++++ > Platform/ARM/Morello/ConfigurationManager/ConfigurationManagerDxe/Configu= rationManagerSoc.c > | 161 ++++++++++++++++++++ > Platform/ARM/Morello/ConfigurationManager/ConfigurationManagerDxe/AslTabl= es/DsdtSoc.asl > | 41 +++++ > 5 files changed, 387 insertions(+) >=20 > diff --git > a/Platform/ARM/Morello/ConfigurationManager/ConfigurationManagerSoc.dsc.i= nc > b/Platform/ARM/Morello/ConfigurationManager/ConfigurationManagerSoc.dsc.i= nc >=20 > new file mode 100644 > index 000000000000..f7e58185696e > --- /dev/null > +++ > b/Platform/ARM/Morello/ConfigurationManager/ConfigurationManagerSoc.dsc.i= nc >=20 I think there is no need for this separate .dsc.inc file, can you please re= fer to the N1SDP implementation, I had received a suggestion from Pierre af= ter which I had removed a similar file in N1SDP patch set. >=20 > @@ -0,0 +1,16 @@ > +## @file > +# dsc include file for Configuration Manager > +# > +# Copyright (c) 2021, ARM Limited. All rights reserved.
> +# > +# SPDX-License-Identifier: BSD-2-Clause-Patent > +# > +## > + > +[Defines] > + > +[BuildOptions] > + > +[Components.common] > + # Configuration Manager > + > Platform/ARM/Morello/ConfigurationManager/ConfigurationManagerDxe/Configu= rationManagerDxeSoc.inf >=20 > diff --git > a/Platform/ARM/Morello/ConfigurationManager/ConfigurationManagerDxe/Confi= gurationManagerDxeSoc.inf > b/Platform/ARM/Morello/ConfigurationManager/ConfigurationManagerDxe/Confi= gurationManagerDxeSoc.inf >=20 > new file mode 100644 > index 000000000000..6f9199a6fda2 > --- /dev/null > +++ > b/Platform/ARM/Morello/ConfigurationManager/ConfigurationManagerDxe/Confi= gurationManagerDxeSoc.inf >=20 > @@ -0,0 +1,72 @@ > +## @file > +# Configuration Manager Dxe > +# > +# Copyright (c) 2021, ARM Limited. All rights reserved.
> +# > +# SPDX-License-Identifier: BSD-2-Clause-Patent > +## > + > +[Defines] > + INF_VERSION =3D 0x0001001B > + BASE_NAME =3D ConfigurationManagerDxe > + FILE_GUID =3D BF8FBCEE-AD95-466B-9185-50A1BB651DDA > + MODULE_TYPE =3D DXE_DRIVER > + VERSION_STRING =3D 1.0 > + ENTRY_POINT =3D ConfigurationManagerDxeInitialize > + > +# > +# The following information is for reference only and not required by th= e > build tools. > +# > +# VALID_ARCHITECTURES =3D AARCH64 > +# > + > +[Sources] > + AslTables/DsdtSoc.asl > + ConfigurationManager.c > + ConfigurationManager.h > + ConfigurationManagerSoc.c > + ConfigurationManagerSoc.h > + Platform.h > + > +[Packages] > + ArmPkg/ArmPkg.dec > + ArmPlatformPkg/ArmPlatformPkg.dec > + DynamicTablesPkg/DynamicTablesPkg.dec > + MdeModulePkg/MdeModulePkg.dec > + MdePkg/MdePkg.dec > + Platform/ARM/Morello/MorelloPlatform.dec > + > +[LibraryClasses] > + UefiDriverEntryPoint > + > +[Protocols] > + gEdkiiConfigurationManagerProtocolGuid > + > +[FixedPcd] > + ## PL011 Serial Debug UART > + gArmPlatformTokenSpaceGuid.PcdSerialDbgRegisterBase > + gArmPlatformTokenSpaceGuid.PcdSerialDbgUartBaudRate > + gArmPlatformTokenSpaceGuid.PcdSerialDbgUartClkInHz > + > + gArmPlatformTokenSpaceGuid.PL011UartClkInHz > + gArmPlatformTokenSpaceGuid.PL011UartInterrupt > + > + gArmTokenSpaceGuid.PcdArmArchTimerHypIntrNum > + gArmTokenSpaceGuid.PcdArmArchTimerIntrNum > + gArmTokenSpaceGuid.PcdArmArchTimerSecIntrNum > + gArmTokenSpaceGuid.PcdArmArchTimerVirtIntrNum > + > + # SBSA Generic Watchdog > + gArmTokenSpaceGuid.PcdGenericWatchdogControlBase > + gArmTokenSpaceGuid.PcdGenericWatchdogEl2IntrNum > + gArmTokenSpaceGuid.PcdGenericWatchdogRefreshBase > + > + gArmTokenSpaceGuid.PcdGicDistributorBase > + gArmTokenSpaceGuid.PcdGicInterruptInterfaceBase > + gArmTokenSpaceGuid.PcdGicRedistributorsBase > + > + gEfiMdeModulePkgTokenSpaceGuid.PcdSerialRegisterBase > + gEfiMdePkgTokenSpaceGuid.PcdUartDefaultBaudRate > + > +[Depex] > + TRUE > diff --git > a/Platform/ARM/Morello/ConfigurationManager/ConfigurationManagerDxe/Confi= gurationManagerSoc.h > b/Platform/ARM/Morello/ConfigurationManager/ConfigurationManagerDxe/Confi= gurationManagerSoc.h >=20 > new file mode 100644 > index 000000000000..8a521b83c8dc > --- /dev/null > +++ > b/Platform/ARM/Morello/ConfigurationManager/ConfigurationManagerDxe/Confi= gurationManagerSoc.h >=20 > @@ -0,0 +1,97 @@ > +/** @file > + > + Copyright (c) 2021, ARM Limited. All rights reserved.
> + > + SPDX-License-Identifier: BSD-2-Clause-Patent > + > + @par Glossary: > + - Cm or CM - Configuration Manager > + - Obj or OBJ - Object > +**/ > + > +#ifndef SOC_CONFIGURATION_MANAGER_H_ > +#define SOC_CONFIGURATION_MANAGER_H_ > + > +#include "ConfigurationManager.h" > + > +/** The number of ACPI tables to install > +*/ > +#define PLAT_ACPI_TABLE_COUNT 7 > + > +/** A helper macro for mapping a reference token > +*/ > +#define REFERENCE_TOKEN_SOC(Field) \ > + (CM_OBJECT_TOKEN)((UINT8*)&MorelloSocRepositoryInfo + \ > + OFFSET_OF (EDKII_SOC_PLATFORM_REPOSITORY_INFO, Field)) > + > +/** C array containing the compiled AML template. > + These symbols are defined in the auto generated C file > + containing the AML bytecode array. > +*/ > +extern CHAR8 dsdtsoc_aml_code[]; > + > +/** A structure describing the SoC Platform specific information > +*/ > +typedef struct SocPlatformRepositoryInfo { > + /// List of ACPI tables > + CM_STD_OBJ_ACPI_TABLE_INFO CmAcpiTableList[PLAT_ACPI_TABLE_COUNT]; > +} EDKII_SOC_PLATFORM_REPOSITORY_INFO; > + > +/** A structure describing the platform configuration > + manager repository information > +*/ > +typedef struct PlatformRepositoryInfo { > + /// Common information > + EDKII_COMMON_PLATFORM_REPOSITORY_INFO *CommonPlatRepoInfo; > + > + /// SoC Platform specific information > + EDKII_SOC_PLATFORM_REPOSITORY_INFO *SocPlatRepoInfo; > +} EDKII_PLATFORM_REPOSITORY_INFO; > + > +extern EDKII_COMMON_PLATFORM_REPOSITORY_INFO CommonPlatformInfo; > + > +/** Return platform specific ARM namespace object. > + > + @param [in] This Pointer to the Configuration Manager Protocol. > + @param [in] CmObjectId The Configuration Manager Object ID. > + @param [in] Token An optional token identifying the object. If > + unused this must be CM_NULL_TOKEN. > + @param [in, out] CmObject Pointer to the Configuration Manager Object > + descriptor describing the requested Object. > + > + @retval EFI_SUCCESS Success. > + @retval EFI_INVALID_PARAMETER A parameter is invalid. > + @retval EFI_NOT_FOUND The required object information is not found. > +**/ > +EFI_STATUS > +EFIAPI > +GetArmNameSpaceObjectPlat ( > + IN CONST EDKII_CONFIGURATION_MANAGER_PROTOCOL *CONST This, > + IN CONST CM_OBJECT_ID CmObjectId, > + IN CONST CM_OBJECT_TOKEN Token OPTIONAL, > + IN OUT CM_OBJ_DESCRIPTOR *CONST CmObject > + ); > + > +/** Return platform specific standard namespace object. > + > + @param [in] This Pointer to the Configuration Manager Protocol. > + @param [in] CmObjectId The Configuration Manager Object ID. > + @param [in] Token An optional token identifying the object. If > + unused this must be CM_NULL_TOKEN. > + @param [in, out] CmObject Pointer to the Configuration Manager Object > + descriptor describing the requested Object. > + > + @retval EFI_SUCCESS Success. > + @retval EFI_INVALID_PARAMETER A parameter is invalid. > + @retval EFI_NOT_FOUND The required object information is not found. > +**/ > +EFI_STATUS > +EFIAPI > +GetStandardNameSpaceObjectPlat ( > + IN CONST EDKII_CONFIGURATION_MANAGER_PROTOCOL *CONST This, > + IN CONST CM_OBJECT_ID CmObjectId, > + IN CONST CM_OBJECT_TOKEN Token OPTIONAL, > + IN OUT CM_OBJ_DESCRIPTOR *CONST CmObject > + ); > + > +#endif // SOC_CONFIGURATION_MANAGER_H_ > diff --git > a/Platform/ARM/Morello/ConfigurationManager/ConfigurationManagerDxe/Confi= gurationManagerSoc.c > b/Platform/ARM/Morello/ConfigurationManager/ConfigurationManagerDxe/Confi= gurationManagerSoc.c >=20 > new file mode 100644 > index 000000000000..7ca8ae212a61 > --- /dev/null > +++ > b/Platform/ARM/Morello/ConfigurationManager/ConfigurationManagerDxe/Confi= gurationManagerSoc.c >=20 > @@ -0,0 +1,161 @@ > +/** @file > + Configuration Manager Dxe > + > + Copyright (c) 2021, ARM Limited. All rights reserved.
> + > + SPDX-License-Identifier: BSD-2-Clause-Patent > + > + @par Glossary: > + - Cm or CM - Configuration Manager > + - Obj or OBJ - Object > +**/ > + > +#include > +#include > +#include > +#include > +#include > +#include > +#include > + > +#include "ConfigurationManagerSoc.h" > +#include "Platform.h" > + > +EDKII_SOC_PLATFORM_REPOSITORY_INFO MorelloSocRepositoryInfo =3D { > + // ACPI Table List > + { > + // FADT Table > + { > + EFI_ACPI_6_3_FIXED_ACPI_DESCRIPTION_TABLE_SIGNATURE, > + EFI_ACPI_6_3_FIXED_ACPI_DESCRIPTION_TABLE_REVISION, > + CREATE_STD_ACPI_TABLE_GEN_ID (EStdAcpiTableIdFadt), > + NULL > + }, > + // GTDT Table > + { > + EFI_ACPI_6_3_GENERIC_TIMER_DESCRIPTION_TABLE_SIGNATURE, > + EFI_ACPI_6_3_GENERIC_TIMER_DESCRIPTION_TABLE_REVISION, > + CREATE_STD_ACPI_TABLE_GEN_ID (EStdAcpiTableIdGtdt), > + NULL > + }, > + // MADT Table > + { > + EFI_ACPI_6_3_MULTIPLE_APIC_DESCRIPTION_TABLE_SIGNATURE, > + EFI_ACPI_6_3_MULTIPLE_APIC_DESCRIPTION_TABLE_REVISION, > + CREATE_STD_ACPI_TABLE_GEN_ID (EStdAcpiTableIdMadt), > + NULL > + }, > + // SPCR Table > + { > + EFI_ACPI_6_3_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_SIGNATURE, > + EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_REVISION, > + CREATE_STD_ACPI_TABLE_GEN_ID (EStdAcpiTableIdSpcr), > + NULL > + }, > + // DSDT Table > + { > + EFI_ACPI_6_3_DIFFERENTIATED_SYSTEM_DESCRIPTION_TABLE_SIGNATURE, > + 0, // Unused > + CREATE_STD_ACPI_TABLE_GEN_ID (EStdAcpiTableIdDsdt), > + (EFI_ACPI_DESCRIPTION_HEADER *)dsdtsoc_aml_code > + }, > + // DBG2 Table > + { > + EFI_ACPI_6_3_DEBUG_PORT_2_TABLE_SIGNATURE, > + EFI_ACPI_DBG2_DEBUG_DEVICE_INFORMATION_STRUCT_REVISION, > + CREATE_STD_ACPI_TABLE_GEN_ID (EStdAcpiTableIdDbg2), > + NULL > + }, > + // PPTT Table > + { > + EFI_ACPI_6_3_PROCESSOR_PROPERTIES_TOPOLOGY_TABLE_STRUCTURE_SIGNATURE, > + EFI_ACPI_6_3_PROCESSOR_PROPERTIES_TOPOLOGY_TABLE_REVISION, > + CREATE_STD_ACPI_TABLE_GEN_ID (EStdAcpiTableIdPptt), > + NULL > + }, > + }, > +}; > + > +EDKII_PLATFORM_REPOSITORY_INFO MorelloRepositoryInfo =3D { > + &CommonPlatformInfo, > + &MorelloSocRepositoryInfo > +}; > + > +/** Return platform specific ARM namespace object. > + > + @param [in] This Pointer to the Configuration Manager Protocol. > + @param [in] CmObjectId The Configuration Manager Object ID. > + @param [in] Token An optional token identifying the object. If > + unused this must be CM_NULL_TOKEN. > + @param [in, out] CmObject Pointer to the Configuration Manager Object > + descriptor describing the requested Object. > + > + @retval EFI_SUCCESS Success. > + @retval EFI_INVALID_PARAMETER A parameter is invalid. > + @retval EFI_NOT_FOUND The required object information is not found. > +**/ > +EFI_STATUS > +EFIAPI > +GetArmNameSpaceObjectPlat ( > + IN CONST EDKII_CONFIGURATION_MANAGER_PROTOCOL *CONST This, > + IN CONST CM_OBJECT_ID CmObjectId, > + IN CONST CM_OBJECT_TOKEN Token OPTIONAL, > + IN OUT CM_OBJ_DESCRIPTOR *CONST CmObject > + ) > +{ > + return EFI_NOT_FOUND; > +} > + > +/** Return platform specific standard namespace object. > + > + @param [in] This Pointer to the Configuration Manager Protocol. > + @param [in] CmObjectId The Configuration Manager Object ID. > + @param [in] Token An optional token identifying the object. If > + unused this must be CM_NULL_TOKEN. > + @param [in, out] CmObject Pointer to the Configuration Manager Object > + descriptor describing the requested Object. > + > + @retval EFI_SUCCESS Success. > + @retval EFI_INVALID_PARAMETER A parameter is invalid. > + @retval EFI_NOT_FOUND The required object information is not found. > +**/ > +EFI_STATUS > +EFIAPI > +GetStandardNameSpaceObjectPlat ( > + IN CONST EDKII_CONFIGURATION_MANAGER_PROTOCOL *CONST This, > + IN CONST CM_OBJECT_ID CmObjectId, > + IN CONST CM_OBJECT_TOKEN Token OPTIONAL, > + IN OUT CM_OBJ_DESCRIPTOR *CONST CmObject > + ) > +{ > + EFI_STATUS Status; > + EDKII_SOC_PLATFORM_REPOSITORY_INFO *PlatformRepo; > + > + if ((This =3D=3D NULL) || (CmObject =3D=3D NULL)) { > + ASSERT (This !=3D NULL); > + ASSERT (CmObject !=3D NULL); > + return EFI_INVALID_PARAMETER; > + } > + > + Status =3D EFI_NOT_FOUND; > + PlatformRepo =3D This->PlatRepoInfo->SocPlatRepoInfo; > + > + switch (GET_CM_OBJECT_ID (CmObjectId)) { > + case EStdObjAcpiTableList: > + Status =3D HandleCmObject ( > + CmObjectId, > + PlatformRepo->CmAcpiTableList, > + sizeof (PlatformRepo->CmAcpiTableList), > + ARRAY_SIZE (PlatformRepo->CmAcpiTableList), > + CmObject > + ); > + break; > + > + default: > + { > + break; > + } > + } > + > + return Status; > +} > diff --git > a/Platform/ARM/Morello/ConfigurationManager/ConfigurationManagerDxe/AslTa= bles/DsdtSoc.asl > b/Platform/ARM/Morello/ConfigurationManager/ConfigurationManagerDxe/AslTa= bles/DsdtSoc.asl >=20 > new file mode 100644 > index 000000000000..806e170515b7 > --- /dev/null > +++ > b/Platform/ARM/Morello/ConfigurationManager/ConfigurationManagerDxe/AslTa= bles/DsdtSoc.asl >=20 > @@ -0,0 +1,41 @@ > +/** @file > + Differentiated System Description Table Fields (DSDT) > + > + Copyright (c) 2021, ARM Ltd. All rights reserved.
> + > + SPDX-License-Identifier: BSD-2-Clause-Patent > + > + @par Reference(s): > + - ACPI for Arm Components 1.0, Platform Design Document > + > +**/ > + > +#include "ConfigurationManager.h" > + > +DefinitionBlock("Dsdt.aml", "DSDT", 1, "ARMLTD", "MORELLO", > CFG_MGR_OEM_REVISION) { > + Scope(_SB) { > + Device(CP00) { // Cluster 0, Cpu 0 > + Name(_HID, "ACPI0007") > + Name(_UID, 0) > + Name(_STA, 0xF) > + } > + > + Device(CP01) { // Cluster 0, Cpu 1 > + Name(_HID, "ACPI0007") > + Name(_UID, 1) > + Name(_STA, 0xF) > + } > + > + Device(CP02) { // Cluster 1, Cpu 0 > + Name(_HID, "ACPI0007") > + Name(_UID, 2) > + Name(_STA, 0xF) > + } > + > + Device(CP03) { // Cluster 1, Cpu 1 > + Name(_HID, "ACPI0007") > + Name(_UID, 3) > + Name(_STA, 0xF) > + } > + } // Scope(_SB) > +} > -- > 2.17.1 --nJeQJFDwnqXgONtNQWGf Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: quoted-printable Hi Chandni,

One input,

On Sat, Dec 4, 2021 at 04:31 A= M, chandni cherukuri wrote:
This patch implements the configuration manager for Morello
SoC platform. It enables support for generating the following
ACPI t= ables for Morello SoC Platform:
1. FADT
2. DSDT
3. GTDT
4. MADT
5. SPCR
6. DBG2
7. PPTT

Signed-off-by: C= handni Cherukuri <chandni.cherukuri@arm.com>
---
Platform/A= RM/Morello/ConfigurationManager/ConfigurationManagerSoc.dsc.inc | 16 ++
Platform/ARM/Morello/ConfigurationManager/ConfigurationManagerDxe/Configu= rationManagerDxeSoc.inf | 72 +++++++++
Platform/ARM/Morello/Configurat= ionManager/ConfigurationManagerDxe/ConfigurationManagerSoc.h | 97 +++++++++= +++
Platform/ARM/Morello/ConfigurationManager/ConfigurationManagerDxe/= ConfigurationManagerSoc.c | 161 ++++++++++++++++++++
Platform/ARM/More= llo/ConfigurationManager/ConfigurationManagerDxe/AslTables/DsdtSoc.asl | 41= +++++
5 files changed, 387 insertions(+)

diff --git a/Plat= form/ARM/Morello/ConfigurationManager/ConfigurationManagerSoc.dsc.inc b/Pla= tform/ARM/Morello/ConfigurationManager/ConfigurationManagerSoc.dsc.inc
new file mode 100644
index 000000000000..f7e58185696e
--- /dev/n= ull
+++ b/Platform/ARM/Morello/ConfigurationManager/ConfigurationManag= erSoc.dsc.inc
I think there is no need for this separate .dsc.inc file, can you please re= fer to the N1SDP implementation, I had received a suggestion from Pierre af= ter which I had removed a similar file in N1SDP patch set.



@@ -0,0 +1,16 @@
+## @file
+# dsc include file for Co= nfiguration Manager
+#
+# Copyright (c) 2021, ARM Limited. All ri= ghts reserved.<BR>
+#
+# SPDX-License-Identifier: BSD-2-Cla= use-Patent
+#
+##
+
+[Defines]
+
+[BuildOptio= ns]
+
+[Components.common]
+ # Configuration Manager
+ = Platform/ARM/Morello/ConfigurationManager/ConfigurationManagerDxe/Configura= tionManagerDxeSoc.inf
diff --git a/Platform/ARM/Morello/ConfigurationM= anager/ConfigurationManagerDxe/ConfigurationManagerDxeSoc.inf b/Platform/AR= M/Morello/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager= DxeSoc.inf
new file mode 100644
index 000000000000..6f9199a6fda2<= br />--- /dev/null
+++ b/Platform/ARM/Morello/ConfigurationManager/Con= figurationManagerDxe/ConfigurationManagerDxeSoc.inf
@@ -0,0 +1,72 @@+## @file
+# Configuration Manager Dxe
+#
+# Copyright (= c) 2021, ARM Limited. All rights reserved.<BR>
+#
+# SPDX-L= icense-Identifier: BSD-2-Clause-Patent
+##
+
+[Defines]
+ INF_VERSION =3D 0x0001001B
+ BASE_NAME =3D ConfigurationManagerDxe<= br />+ FILE_GUID =3D BF8FBCEE-AD95-466B-9185-50A1BB651DDA
+ MODULE_TYP= E =3D DXE_DRIVER
+ VERSION_STRING =3D 1.0
+ ENTRY_POINT =3D Confi= gurationManagerDxeInitialize
+
+#
+# The following informati= on is for reference only and not required by the build tools.
+#
= +# VALID_ARCHITECTURES =3D AARCH64
+#
+
+[Sources]
+ As= lTables/DsdtSoc.asl
+ ConfigurationManager.c
+ ConfigurationManag= er.h
+ ConfigurationManagerSoc.c
+ ConfigurationManagerSoc.h
+ Platform.h
+
+[Packages]
+ ArmPkg/ArmPkg.dec
+ ArmPl= atformPkg/ArmPlatformPkg.dec
+ DynamicTablesPkg/DynamicTablesPkg.dec+ MdeModulePkg/MdeModulePkg.dec
+ MdePkg/MdePkg.dec
+ Platfor= m/ARM/Morello/MorelloPlatform.dec
+
+[LibraryClasses]
+ Uefi= DriverEntryPoint
+
+[Protocols]
+ gEdkiiConfigurationManager= ProtocolGuid
+
+[FixedPcd]
+ ## PL011 Serial Debug UART
+ gArmPlatformTokenSpaceGuid.PcdSerialDbgRegisterBase
+ gArmPlatformT= okenSpaceGuid.PcdSerialDbgUartBaudRate
+ gArmPlatformTokenSpaceGuid.Pc= dSerialDbgUartClkInHz
+
+ gArmPlatformTokenSpaceGuid.PL011UartClk= InHz
+ gArmPlatformTokenSpaceGuid.PL011UartInterrupt
+
+ gAr= mTokenSpaceGuid.PcdArmArchTimerHypIntrNum
+ gArmTokenSpaceGuid.PcdArmA= rchTimerIntrNum
+ gArmTokenSpaceGuid.PcdArmArchTimerSecIntrNum
+ = gArmTokenSpaceGuid.PcdArmArchTimerVirtIntrNum
+
+ # SBSA Generic = Watchdog
+ gArmTokenSpaceGuid.PcdGenericWatchdogControlBase
+ gAr= mTokenSpaceGuid.PcdGenericWatchdogEl2IntrNum
+ gArmTokenSpaceGuid.PcdG= enericWatchdogRefreshBase
+
+ gArmTokenSpaceGuid.PcdGicDistributo= rBase
+ gArmTokenSpaceGuid.PcdGicInterruptInterfaceBase
+ gArmTok= enSpaceGuid.PcdGicRedistributorsBase
+
+ gEfiMdeModulePkgTokenSpa= ceGuid.PcdSerialRegisterBase
+ gEfiMdePkgTokenSpaceGuid.PcdUartDefault= BaudRate
+
+[Depex]
+ TRUE
diff --git a/Platform/ARM/Mo= rello/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManagerSoc.= h b/Platform/ARM/Morello/ConfigurationManager/ConfigurationManagerDxe/Confi= gurationManagerSoc.h
new file mode 100644
index 000000000000..8a5= 21b83c8dc
--- /dev/null
+++ b/Platform/ARM/Morello/ConfigurationM= anager/ConfigurationManagerDxe/ConfigurationManagerSoc.h
@@ -0,0 +1,97= @@
+/** @file
+
+ Copyright (c) 2021, ARM Limited. All righ= ts reserved.<BR>
+
+ SPDX-License-Identifier: BSD-2-Clause-= Patent
+
+ @par Glossary:
+ - Cm or CM - Configuration Manag= er
+ - Obj or OBJ - Object
+**/
+
+#ifndef SOC_CONFIGUR= ATION_MANAGER_H_
+#define SOC_CONFIGURATION_MANAGER_H_
+
+#i= nclude "ConfigurationManager.h"
+
+/** The number of ACPI tables = to install
+*/
+#define PLAT_ACPI_TABLE_COUNT 7
+
+/** = A helper macro for mapping a reference token
+*/
+#define REFEREN= CE_TOKEN_SOC(Field) \
+ (CM_OBJECT_TOKEN)((UINT8*)&MorelloSocRepos= itoryInfo + \
+ OFFSET_OF (EDKII_SOC_PLATFORM_REPOSITORY_INFO, Field))=
+
+/** C array containing the compiled AML template.
+ Thes= e symbols are defined in the auto generated C file
+ containing the AM= L bytecode array.
+*/
+extern CHAR8 dsdtsoc_aml_code[];
++/** A structure describing the SoC Platform specific information
+= */
+typedef struct SocPlatformRepositoryInfo {
+ /// List of ACPI= tables
+ CM_STD_OBJ_ACPI_TABLE_INFO CmAcpiTableList[PLAT_ACPI_TABLE_C= OUNT];
+} EDKII_SOC_PLATFORM_REPOSITORY_INFO;
+
+/** A struc= ture describing the platform configuration
+ manager repository inform= ation
+*/
+typedef struct PlatformRepositoryInfo {
+ /// Com= mon information
+ EDKII_COMMON_PLATFORM_REPOSITORY_INFO *CommonPlatRep= oInfo;
+
+ /// SoC Platform specific information
+ EDKII_SOC= _PLATFORM_REPOSITORY_INFO *SocPlatRepoInfo;
+} EDKII_PLATFORM_REPOSITO= RY_INFO;
+
+extern EDKII_COMMON_PLATFORM_REPOSITORY_INFO CommonPl= atformInfo;
+
+/** Return platform specific ARM namespace object.=
+
+ @param [in] This Pointer to the Configuration Manager Protoc= ol.
+ @param [in] CmObjectId The Configuration Manager Object ID.
+ @param [in] Token An optional token identifying the object. If
+ un= used this must be CM_NULL_TOKEN.
+ @param [in, out] CmObject Pointer t= o the Configuration Manager Object
+ descriptor describing the request= ed Object.
+
+ @retval EFI_SUCCESS Success.
+ @retval EFI_IN= VALID_PARAMETER A parameter is invalid.
+ @retval EFI_NOT_FOUND The re= quired object information is not found.
+**/
+EFI_STATUS
+EF= IAPI
+GetArmNameSpaceObjectPlat (
+ IN CONST EDKII_CONFIGURATION_= MANAGER_PROTOCOL *CONST This,
+ IN CONST CM_OBJECT_ID CmObjectId,
+ IN CONST CM_OBJECT_TOKEN Token OPTIONAL,
+ IN OUT CM_OBJ_DESCRIPTOR= *CONST CmObject
+ );
+
+/** Return platform specific standa= rd namespace object.
+
+ @param [in] This Pointer to the Configur= ation Manager Protocol.
+ @param [in] CmObjectId The Configuration Man= ager Object ID.
+ @param [in] Token An optional token identifying the = object. If
+ unused this must be CM_NULL_TOKEN.
+ @param [in, out= ] CmObject Pointer to the Configuration Manager Object
+ descriptor de= scribing the requested Object.
+
+ @retval EFI_SUCCESS Success.+ @retval EFI_INVALID_PARAMETER A parameter is invalid.
+ @retval = EFI_NOT_FOUND The required object information is not found.
+**/
= +EFI_STATUS
+EFIAPI
+GetStandardNameSpaceObjectPlat (
+ IN C= ONST EDKII_CONFIGURATION_MANAGER_PROTOCOL *CONST This,
+ IN CONST CM_O= BJECT_ID CmObjectId,
+ IN CONST CM_OBJECT_TOKEN Token OPTIONAL,
+= IN OUT CM_OBJ_DESCRIPTOR *CONST CmObject
+ );
+
+#endif // = SOC_CONFIGURATION_MANAGER_H_
diff --git a/Platform/ARM/Morello/Configu= rationManager/ConfigurationManagerDxe/ConfigurationManagerSoc.c b/Platform/= ARM/Morello/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManag= erSoc.c
new file mode 100644
index 000000000000..7ca8ae212a61
--- /dev/null
+++ b/Platform/ARM/Morello/ConfigurationManager/Config= urationManagerDxe/ConfigurationManagerSoc.c
@@ -0,0 +1,161 @@
+/*= * @file
+ Configuration Manager Dxe
+
+ Copyright (c) 2021, = ARM Limited. All rights reserved.<BR>
+
+ SPDX-License-Iden= tifier: BSD-2-Clause-Patent
+
+ @par Glossary:
+ - Cm or CM = - Configuration Manager
+ - Obj or OBJ - Object
+**/
+
= +#include <IndustryStandard/DebugPort2Table.h>
+#include <Ind= ustryStandard/IoRemappingTable.h>
+#include <IndustryStandard/Me= moryMappedConfigurationSpaceAccessTable.h>
+#include <IndustrySt= andard/SerialPortConsoleRedirectionTable.h>
+#include <Library/D= ebugLib.h>
+#include <Library/UefiBootServicesTableLib.h>
+#include <Protocol/ConfigurationManagerProtocol.h>
+
+#i= nclude "ConfigurationManagerSoc.h"
+#include "Platform.h"
+
= +EDKII_SOC_PLATFORM_REPOSITORY_INFO MorelloSocRepositoryInfo =3D {
+ /= / ACPI Table List
+ {
+ // FADT Table
+ {
+ EFI_ACPI_6_= 3_FIXED_ACPI_DESCRIPTION_TABLE_SIGNATURE,
+ EFI_ACPI_6_3_FIXED_ACPI_DE= SCRIPTION_TABLE_REVISION,
+ CREATE_STD_ACPI_TABLE_GEN_ID (EStdAcpiTabl= eIdFadt),
+ NULL
+ },
+ // GTDT Table
+ {
+ EFI_AC= PI_6_3_GENERIC_TIMER_DESCRIPTION_TABLE_SIGNATURE,
+ EFI_ACPI_6_3_GENER= IC_TIMER_DESCRIPTION_TABLE_REVISION,
+ CREATE_STD_ACPI_TABLE_GEN_ID (E= StdAcpiTableIdGtdt),
+ NULL
+ },
+ // MADT Table
+ {+ EFI_ACPI_6_3_MULTIPLE_APIC_DESCRIPTION_TABLE_SIGNATURE,
+ EFI_ACP= I_6_3_MULTIPLE_APIC_DESCRIPTION_TABLE_REVISION,
+ CREATE_STD_ACPI_TABL= E_GEN_ID (EStdAcpiTableIdMadt),
+ NULL
+ },
+ // SPCR Table<= br />+ {
+ EFI_ACPI_6_3_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_SIGNATUR= E,
+ EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_REVISION,
+ C= REATE_STD_ACPI_TABLE_GEN_ID (EStdAcpiTableIdSpcr),
+ NULL
+ },+ // DSDT Table
+ {
+ EFI_ACPI_6_3_DIFFERENTIATED_SYSTEM_DESCR= IPTION_TABLE_SIGNATURE,
+ 0, // Unused
+ CREATE_STD_ACPI_TABLE_GE= N_ID (EStdAcpiTableIdDsdt),
+ (EFI_ACPI_DESCRIPTION_HEADER *)dsdtsoc_a= ml_code
+ },
+ // DBG2 Table
+ {
+ EFI_ACPI_6_3_DEBUG_P= ORT_2_TABLE_SIGNATURE,
+ EFI_ACPI_DBG2_DEBUG_DEVICE_INFORMATION_STRUCT= _REVISION,
+ CREATE_STD_ACPI_TABLE_GEN_ID (EStdAcpiTableIdDbg2),
= + NULL
+ },
+ // PPTT Table
+ {
+ EFI_ACPI_6_3_PROCESSO= R_PROPERTIES_TOPOLOGY_TABLE_STRUCTURE_SIGNATURE,
+ EFI_ACPI_6_3_PROCES= SOR_PROPERTIES_TOPOLOGY_TABLE_REVISION,
+ CREATE_STD_ACPI_TABLE_GEN_ID= (EStdAcpiTableIdPptt),
+ NULL
+ },
+ },
+};
+
+EDKII_PLATFORM_REPOSITORY_INFO MorelloRepositoryInfo =3D {
+ &C= ommonPlatformInfo,
+ &MorelloSocRepositoryInfo
+};
+
+/** Return platform specific ARM namespace object.
+
+ @param = [in] This Pointer to the Configuration Manager Protocol.
+ @param [in]= CmObjectId The Configuration Manager Object ID.
+ @param [in] Token A= n optional token identifying the object. If
+ unused this must be CM_N= ULL_TOKEN.
+ @param [in, out] CmObject Pointer to the Configuration Ma= nager Object
+ descriptor describing the requested Object.
+
+ @retval EFI_SUCCESS Success.
+ @retval EFI_INVALID_PARAMETER A para= meter is invalid.
+ @retval EFI_NOT_FOUND The required object informat= ion is not found.
+**/
+EFI_STATUS
+EFIAPI
+GetArmNameS= paceObjectPlat (
+ IN CONST EDKII_CONFIGURATION_MANAGER_PROTOCOL *CONS= T This,
+ IN CONST CM_OBJECT_ID CmObjectId,
+ IN CONST CM_OBJECT_= TOKEN Token OPTIONAL,
+ IN OUT CM_OBJ_DESCRIPTOR *CONST CmObject
= + )
+{
+ return EFI_NOT_FOUND;
+}
+
+/** Return pl= atform specific standard namespace object.
+
+ @param [in] This P= ointer to the Configuration Manager Protocol.
+ @param [in] CmObjectId= The Configuration Manager Object ID.
+ @param [in] Token An optional = token identifying the object. If
+ unused this must be CM_NULL_TOKEN.<= br />+ @param [in, out] CmObject Pointer to the Configuration Manager Objec= t
+ descriptor describing the requested Object.
+
+ @retval = EFI_SUCCESS Success.
+ @retval EFI_INVALID_PARAMETER A parameter is in= valid.
+ @retval EFI_NOT_FOUND The required object information is not = found.
+**/
+EFI_STATUS
+EFIAPI
+GetStandardNameSpaceOb= jectPlat (
+ IN CONST EDKII_CONFIGURATION_MANAGER_PROTOCOL *CONST This= ,
+ IN CONST CM_OBJECT_ID CmObjectId,
+ IN CONST CM_OBJECT_TOKEN = Token OPTIONAL,
+ IN OUT CM_OBJ_DESCRIPTOR *CONST CmObject
+ )+{
+ EFI_STATUS Status;
+ EDKII_SOC_PLATFORM_REPOSITORY_INFO *= PlatformRepo;
+
+ if ((This =3D=3D NULL) || (CmObject =3D=3D NULL= )) {
+ ASSERT (This !=3D NULL);
+ ASSERT (CmObject !=3D NULL);+ return EFI_INVALID_PARAMETER;
+ }
+
+ Status =3D EFI_NO= T_FOUND;
+ PlatformRepo =3D This->PlatRepoInfo->SocPlatRepoInfo;=
+
+ switch (GET_CM_OBJECT_ID (CmObjectId)) {
+ case EStdObj= AcpiTableList:
+ Status =3D HandleCmObject (
+ CmObjectId,
+= PlatformRepo->CmAcpiTableList,
+ sizeof (PlatformRepo->CmAcpiTa= bleList),
+ ARRAY_SIZE (PlatformRepo->CmAcpiTableList),
+ CmOb= ject
+ );
+ break;
+
+ default:
+ {
+ break;<= br />+ }
+ }
+
+ return Status;
+}
diff --git a/Pl= atform/ARM/Morello/ConfigurationManager/ConfigurationManagerDxe/AslTables/D= sdtSoc.asl b/Platform/ARM/Morello/ConfigurationManager/ConfigurationManager= Dxe/AslTables/DsdtSoc.asl
new file mode 100644
index 000000000000= ..806e170515b7
--- /dev/null
+++ b/Platform/ARM/Morello/Configura= tionManager/ConfigurationManagerDxe/AslTables/DsdtSoc.asl
@@ -0,0 +1,4= 1 @@
+/** @file
+ Differentiated System Description Table Fields = (DSDT)
+
+ Copyright (c) 2021, ARM Ltd. All rights reserved.<B= R>
+
+ SPDX-License-Identifier: BSD-2-Clause-Patent
+
+ @par Reference(s):
+ - ACPI for Arm Components 1.0, Platform Desig= n Document
+
+**/
+
+#include "ConfigurationManager.h"<= br />+
+DefinitionBlock("Dsdt.aml", "DSDT", 1, "ARMLTD", "MORELLO", CF= G_MGR_OEM_REVISION) {
+ Scope(_SB) {
+ Device(CP00) { // Cluster = 0, Cpu 0
+ Name(_HID, "ACPI0007")
+ Name(_UID, 0)
+ Name(_ST= A, 0xF)
+ }
+
+ Device(CP01) { // Cluster 0, Cpu 1
+ Na= me(_HID, "ACPI0007")
+ Name(_UID, 1)
+ Name(_STA, 0xF)
+ }+
+ Device(CP02) { // Cluster 1, Cpu 0
+ Name(_HID, "ACPI0007= ")
+ Name(_UID, 2)
+ Name(_STA, 0xF)
+ }
+
+ Devic= e(CP03) { // Cluster 1, Cpu 1
+ Name(_HID, "ACPI0007")
+ Name(_UI= D, 3)
+ Name(_STA, 0xF)
+ }
+ } // Scope(_SB)
+}
-= -
2.17.1
--nJeQJFDwnqXgONtNQWGf--