From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web12.26436.1621876995340125769 for ; Mon, 24 May 2021 10:23:15 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: arm.com, ip: 217.140.110.172, mailfrom: sayanta.pattanayak@arm.com) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id F020BED1; Mon, 24 May 2021 10:23:14 -0700 (PDT) Received: from usa.arm.com (a077432.blr.arm.com [10.162.4.31]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id C0CE83F73B; Mon, 24 May 2021 10:23:13 -0700 (PDT) From: "Sayanta Pattanayak" To: devel@edk2.groups.io Cc: Ard Biesheuvel , Sami Mujawar Subject: [edk2-platforms][PATCH V1 1/3] Platform/Sgi: refactor StandaloneMM platform description file Date: Mon, 24 May 2021 22:52:58 +0530 Message-Id: <20210524172300.28754-2-sayanta.pattanayak@arm.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210524172300.28754-1-sayanta.pattanayak@arm.com> References: <20210524172300.28754-1-sayanta.pattanayak@arm.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable The RD-N2 platform has a different memory map from that of the other platforms supported under the SgiPkg. To enable the use of StandaloneMM as a secure partition on RD-N2 platform, refactor the existing StandaloneMM platform description file. The differing portions are split into two different files and the rest of the platform description file is converted into a include file. Signed-off-by: Sayanta Pattanayak --- Platform/ARM/SgiPkg/{PlatformStandaloneMm.dsc =3D> SgiPlatformMm.dsc.inc= } | 30 +---- Platform/ARM/SgiPkg/PlatformStandaloneMm.dsc = | 117 ++------------------ Platform/ARM/SgiPkg/PlatformStandaloneMm2.dsc = | 40 +++++++ 3 files changed, 53 insertions(+), 134 deletions(-) diff --git a/Platform/ARM/SgiPkg/PlatformStandaloneMm.dsc b/Platform/ARM/= SgiPkg/SgiPlatformMm.dsc.inc similarity index 83% copy from Platform/ARM/SgiPkg/PlatformStandaloneMm.dsc copy to Platform/ARM/SgiPkg/SgiPlatformMm.dsc.inc index e281d5490912..3389ff676a91 100644 --- a/Platform/ARM/SgiPkg/PlatformStandaloneMm.dsc +++ b/Platform/ARM/SgiPkg/SgiPlatformMm.dsc.inc @@ -1,37 +1,16 @@ +## @file +# StandaloneMM platform description include file for all supported plat= forms. # -# Copyright (c) 2018, ARM Limited. All rights reserved. +# Copyright (c) 2021, ARM Limited. All rights reserved. # # SPDX-License-Identifier: BSD-2-Clause-Patent -# - -########################################################################= ######## -# -# Defines Section - statements that will be processed to create a Makefi= le. -# -########################################################################= ######## -[Defines] - PLATFORM_NAME =3D SgiMmStandalone - PLATFORM_GUID =3D 34B78C8F-CFD5-49D5-8360-E91143F6106= D - PLATFORM_VERSION =3D 1.0 - DSC_SPECIFICATION =3D 0x00010011 - OUTPUT_DIRECTORY =3D Build/$(PLATFORM_NAME) - SUPPORTED_ARCHITECTURES =3D AARCH64 - BUILD_TARGETS =3D DEBUG|RELEASE|NOOPT - SKUID_IDENTIFIER =3D DEFAULT - FLASH_DEFINITION =3D Platform/ARM/SgiPkg/PlatformStandal= oneMm.fdf - DEFINE DEBUG_MESSAGE =3D TRUE - - # LzmaF86 - DEFINE COMPRESSION_TOOL_GUID =3D D42AE6BD-1352-4bfb-909A-CA72A6EAE88= 9 +## =20 ########################################################################= ######## # # Library Class section - list of all Library Classes needed by this Pla= tform. # ########################################################################= ######## - -!include MdePkg/MdeLibs.dsc.inc - [LibraryClasses] # # Basic @@ -92,7 +71,6 @@ gEfiMdePkgTokenSpaceGuid.PcdReportStatusCodePropertyMask|0x0f =20 ## PL011 - Serial Terminal - gEfiMdeModulePkgTokenSpaceGuid.PcdSerialRegisterBase|0x7FF70000 gEfiMdePkgTokenSpaceGuid.PcdUartDefaultBaudRate|115200 =20 gEfiMdePkgTokenSpaceGuid.PcdMaximumGuidedExtractHandler|0x2 diff --git a/Platform/ARM/SgiPkg/PlatformStandaloneMm.dsc b/Platform/ARM/= SgiPkg/PlatformStandaloneMm.dsc index e281d5490912..cdf8aaa88f03 100644 --- a/Platform/ARM/SgiPkg/PlatformStandaloneMm.dsc +++ b/Platform/ARM/SgiPkg/PlatformStandaloneMm.dsc @@ -1,8 +1,11 @@ +## @file +# StandaloneMM platform description file for SGI-575, RD-N1-Edge, RD-E1= -Edge +# and RD-V1 platforms. # -# Copyright (c) 2018, ARM Limited. All rights reserved. +# Copyright (c) 2021, ARM Limited. All rights reserved. # # SPDX-License-Identifier: BSD-2-Clause-Patent -# +## =20 ########################################################################= ######## # @@ -11,9 +14,9 @@ ########################################################################= ######## [Defines] PLATFORM_NAME =3D SgiMmStandalone - PLATFORM_GUID =3D 34B78C8F-CFD5-49D5-8360-E91143F6106= D + PLATFORM_GUID =3D 503b97f6-1be9-4661-97fd-9a55bbd2680= d PLATFORM_VERSION =3D 1.0 - DSC_SPECIFICATION =3D 0x00010011 + DSC_SPECIFICATION =3D 0x0001001B OUTPUT_DIRECTORY =3D Build/$(PLATFORM_NAME) SUPPORTED_ARCHITECTURES =3D AARCH64 BUILD_TARGETS =3D DEBUG|RELEASE|NOOPT @@ -24,62 +27,9 @@ # LzmaF86 DEFINE COMPRESSION_TOOL_GUID =3D D42AE6BD-1352-4bfb-909A-CA72A6EAE88= 9 =20 -########################################################################= ######## -# -# Library Class section - list of all Library Classes needed by this Pla= tform. -# -########################################################################= ######## - +# include common definitions. !include MdePkg/MdeLibs.dsc.inc - -[LibraryClasses] - # - # Basic - # - BaseLib|MdePkg/Library/BaseLib/BaseLib.inf - BaseMemoryLib|MdePkg/Library/BaseMemoryLib/BaseMemoryLib.inf - DebugLib|MdePkg/Library/BaseDebugLibSerialPort/BaseDebugLibSerialPort.= inf - DebugPrintErrorLevelLib|MdePkg/Library/BaseDebugPrintErrorLevelLib/Bas= eDebugPrintErrorLevelLib.inf - ExtractGuidedSectionLib|EmbeddedPkg/Library/PrePiExtractGuidedSectionL= ib/PrePiExtractGuidedSectionLib.inf - FvLib|StandaloneMmPkg/Library/FvLib/FvLib.inf - HobLib|StandaloneMmPkg/Library/StandaloneMmCoreHobLib/StandaloneMmCore= HobLib.inf - IoLib|MdePkg/Library/BaseIoLibIntrinsic/BaseIoLibIntrinsic.inf - MemLib|StandaloneMmPkg/Library/StandaloneMmMemLib/StandaloneMmMemLib.i= nf - MemoryAllocationLib|StandaloneMmPkg/Library/StandaloneMmCoreMemoryAllo= cationLib/StandaloneMmCoreMemoryAllocationLib.inf - PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf - PeCoffLib|MdePkg/Library/BasePeCoffLib/BasePeCoffLib.inf - PrintLib|MdePkg/Library/BasePrintLib/BasePrintLib.inf - ReportStatusCodeLib|MdePkg/Library/BaseReportStatusCodeLibNull/BaseRep= ortStatusCodeLibNull.inf - - # - # Entry point - # - StandaloneMmDriverEntryPoint|MdePkg/Library/StandaloneMmDriverEntryPoi= nt/StandaloneMmDriverEntryPoint.inf - - ArmLib|ArmPkg/Library/ArmLib/ArmBaseLib.inf - StandaloneMmMmuLib|ArmPkg/Library/StandaloneMmMmuLib/ArmMmuStandaloneM= mLib.inf - ArmSvcLib|ArmPkg/Library/ArmSvcLib/ArmSvcLib.inf - CacheMaintenanceLib|ArmPkg/Library/ArmCacheMaintenanceLib/ArmCacheMain= tenanceLib.inf - PeCoffExtraActionLib|StandaloneMmPkg/Library/StandaloneMmPeCoffExtraAc= tionLib/StandaloneMmPeCoffExtraActionLib.inf - - # ARM PL011 UART Driver - PL011UartClockLib|ArmPlatformPkg/Library/PL011UartClockLib/PL011UartCl= ockLib.inf - PL011UartLib|ArmPlatformPkg/Library/PL011UartLib/PL011UartLib.inf - SerialPortLib|ArmPlatformPkg/Library/PL011SerialPortLib/PL011SerialPor= tLib.inf - - StandaloneMmCoreEntryPoint|StandaloneMmPkg/Library/StandaloneMmCoreEnt= ryPoint/StandaloneMmCoreEntryPoint.inf - - # - # It is not possible to prevent the ARM compiler for generic intrinsic= functions. - # This library provides the instrinsic functions generate by a given c= ompiler. - # And NULL mean link this library into all ARM images. - # - NULL|ArmPkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf - -[LibraryClasses.common.MM_STANDALONE] - HobLib|StandaloneMmPkg/Library/StandaloneMmHobLib/StandaloneMmHobLib.i= nf - MmServicesTableLib|MdePkg/Library/StandaloneMmServicesTableLib/Standal= oneMmServicesTableLib.inf - MemoryAllocationLib|StandaloneMmPkg/Library/StandaloneMmMemoryAllocati= onLib/StandaloneMmMemoryAllocationLib.inf +!include Platform/ARM/SgiPkg/SgiPlatformMm.dsc.inc =20 ########################################################################= ######## # @@ -87,54 +37,5 @@ # ########################################################################= ######## [PcdsFixedAtBuild] - gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|0x800000CF - gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask|0xff - gEfiMdePkgTokenSpaceGuid.PcdReportStatusCodePropertyMask|0x0f - ## PL011 - Serial Terminal gEfiMdeModulePkgTokenSpaceGuid.PcdSerialRegisterBase|0x7FF70000 - gEfiMdePkgTokenSpaceGuid.PcdUartDefaultBaudRate|115200 - - gEfiMdePkgTokenSpaceGuid.PcdMaximumGuidedExtractHandler|0x2 - -########################################################################= ########################### -# -# Components Section - list of the modules and components that will be p= rocessed by compilation -# tools and the EDK II tools to generate PE32/PE32+= /Coff image files. -# -# Note: The EDK II DSC file is not used to specify how compiled binary i= mages get placed -# into firmware volume images. This section is just a list of modu= les to compile from -# source into UEFI-compliant binaries. -# It is the FDF file that contains information on combining binary= files into firmware -# volume images, whose concept is beyond UEFI and is described in = PI specification. -# Binary modules do not need to be listed in this section, as they= should be -# specified in the FDF file. For example: Shell binary (Shell_Full= .efi), FAT binary (Fat.efi), -# Logo (Logo.bmp), and etc. -# There may also be modules listed in this section that are not re= quired in the FDF file, -# When a module listed here is excluded from FDF file, then UEFI-c= ompliant binary will be -# generated for it, but the binary will not be put into any firmwa= re volume. -# -########################################################################= ########################### -[Components.common] - # - # MM Core - # - StandaloneMmPkg/Core/StandaloneMmCore.inf - -[Components.AARCH64] - StandaloneMmPkg/Drivers/StandaloneMmCpu/AArch64/StandaloneMmCpu.inf - -########################################################################= ########################### -# -# BuildOptions Section - Define the module specific tool chain flags tha= t should be used as -# the default flags for a module. These flags are= appended to any -# standard flags that are defined by the build pr= ocess. They can be -# applied for any modules or only those modules w= ith the specific -# module style (EDK or EDKII) specified in [Compo= nents] section. -# -########################################################################= ########################### -[BuildOptions.AARCH64] - GCC:*_*_*_DLINK_FLAGS =3D -z common-page-size=3D0x1000 -march=3Darmv8-= a+nofp - -[BuildOptions] - *_*_*_CC_FLAGS =3D -D DISABLE_NEW_DEPRECATED_INTERFACES diff --git a/Platform/ARM/SgiPkg/PlatformStandaloneMm2.dsc b/Platform/ARM= /SgiPkg/PlatformStandaloneMm2.dsc new file mode 100644 index 000000000000..bb359a15cc0d --- /dev/null +++ b/Platform/ARM/SgiPkg/PlatformStandaloneMm2.dsc @@ -0,0 +1,40 @@ +## @file +# StandaloneMM platform description file for RD-N2 platforms. +# +# Copyright (c) 2021, ARM Limited. All rights reserved. +# +# SPDX-License-Identifier: BSD-2-Clause-Patent +## + +########################################################################= ######## +# +# Defines Section - statements that will be processed to create a Makefi= le. +# +########################################################################= ######## +[Defines] + PLATFORM_NAME =3D SgiMmStandalone + PLATFORM_GUID =3D 67309f8a-d278-4df5-86ee-a1826cf481e= d + PLATFORM_VERSION =3D 1.0 + DSC_SPECIFICATION =3D 0x0001001B + OUTPUT_DIRECTORY =3D Build/$(PLATFORM_NAME) + SUPPORTED_ARCHITECTURES =3D AARCH64 + BUILD_TARGETS =3D DEBUG|RELEASE|NOOPT + SKUID_IDENTIFIER =3D DEFAULT + FLASH_DEFINITION =3D Platform/ARM/SgiPkg/PlatformStandal= oneMm.fdf + DEFINE DEBUG_MESSAGE =3D TRUE + + # LzmaF86 + DEFINE COMPRESSION_TOOL_GUID =3D D42AE6BD-1352-4bfb-909A-CA72A6EAE88= 9 + +# include common definitions. +!include MdePkg/MdeLibs.dsc.inc +!include Platform/ARM/SgiPkg/SgiPlatformMm.dsc.inc + +########################################################################= ######## +# +# Pcd Section - list of all EDK II PCD Entries defined by this Platform +# +########################################################################= ######## +[PcdsFixedAtBuild] + ## PL011 - Serial Terminal + gEfiMdeModulePkgTokenSpaceGuid.PcdSerialRegisterBase|0x0EF80000 --=20 2.17.1