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.web11.4830.1614766756726523920 for ; Wed, 03 Mar 2021 02:19:16 -0800 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: arm.com, ip: 217.140.110.172, mailfrom: pierre.gondois@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 3F7E5101E; Wed, 3 Mar 2021 02:19:06 -0800 (PST) Received: from [192.168.1.169] (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 4EBE53F73B; Wed, 3 Mar 2021 02:19:05 -0800 (PST) From: "PierreGondois" Subject: Re: [edk2-devel] [PATCH 2/2 v5] StMMRpmb: Add support for building StandaloneMm image for OP-TEE References: <20210212173459.508205-1-ilias.apalodimas@linaro.org> <20210212173459.508205-3-ilias.apalodimas@linaro.org> To: ilias.apalodimas@linaro.org, devel@edk2.groups.io, Sami.Mujawar@arm.com Message-ID: <05ede192-6a8f-ec8e-ed97-bfe52c9fc9de@arm.com> Date: Wed, 3 Mar 2021 10:18:57 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.0 MIME-Version: 1.0 In-Reply-To: <20210212173459.508205-3-ilias.apalodimas@linaro.org> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Language: en-US Content-Transfer-Encoding: quoted-printable Hello Ilias, I would have some (inlined) remarks about your patch, Regards, Pierre On 3/2/21 3:35 PM, Pierre Gondois wrote: > > -----------------------------------------------------------------------= - > *From:* devel@edk2.groups.io on behalf of Ilias=20 > Apalodimas via groups.io > *Sent:* Friday, February 12, 2021 5:34 PM > *To:* devel@edk2.groups.io ; Sami Mujawar=20 > > *Cc:* ardb+tianocore@kernel.org ;=20 > sughosh.ganu@linaro.org ; leif@nuviainc.com=20 > ; Ilias Apalodimas > *Subject:* [edk2-devel] [PATCH 2/2 v5] StMMRpmb: Add support for=20 > building StandaloneMm image for OP-TEE > With some recent changes in OP-TEE [1] and U-Boot [2] we can compile St= MM > and launch it from an OP-TEE secure partition which is mimicking SPM. > > There's a number of advantages in this approach. In Arm world SPM, > currently used for dispatching StMM, and SPD used for OP-TEE, are > mutually exclusive. Since there's no application in OP-TEE for managing > EFI variables, this means that one can have a secure OS or secure > variable storage. > > By re-using StMM we have EDK2s approved application controlling > variable storage and the ability to run a secure world OS. This also > allows various firmware implementations to adopt EDK2 way of storing > variables (including the FTW implementation), as long as OP-TEE is > available on that given platform (or any other secure OS that can launc= h > StMM and has a supplicant for handling the RPMB partition). > Another advantage is that OP-TEE has the ability to access an eMMC RPMB > partition to store those variables. This requires a normal world > supplicant, which is implemented in U-Boot currently. The supplicant > picks up the encrypted buffer from OP-TEE and wires it to the eMMC > driver(s). Similar functionality can be added in EDK2 by porting the > supplicant and adapt it to using the native eMMC drivers. > > There's is one drawback in using OP-TEE. The current SPM calls need to = run > to completion. This contradicts the current OP-TEE RPC call requirement= s, > used to access the RPMB storage. Thats leads to two different SMC=20 > calls for > entering secure world to access StMM. > > So let's add support for a platform that compiles StMM and an RPMB > driver that communicates with OP-TEE to read/write the variables. > For anyone interested in testing this there's repo that builds all the > sources and works on QEMU [3]. > > [1] https://github.com/OP-TEE/optee_os/pull/3973=20 > > [2]=20 > http://u-boot.10912.n7.nabble.com/PATCH-0-7-v4-EFI-variable-support-via= -OP-TEE-td412499.html=20 > > [3]=20 > https://git.linaro.org/people/ilias.apalodimas/efi_optee_variables.git/= =20 > > > Reviewed-by: Sami Mujawar > Signed-off-by: Ilias Apalodimas > --- > =A0Platform/StMMRpmb/PlatformStandaloneMm.dsc | 165 +++++++++++++++++++= ++ > =A0Platform/StMMRpmb/PlatformStandaloneMm.fdf | 111 ++++++++++++++ > =A02 files changed, 276 insertions(+) > =A0create mode 100644 Platform/StMMRpmb/PlatformStandaloneMm.dsc > =A0create mode 100644 Platform/StMMRpmb/PlatformStandaloneMm.fdf > > diff --git a/Platform/StMMRpmb/PlatformStandaloneMm.dsc=20 > b/Platform/StMMRpmb/PlatformStandaloneMm.dsc > new file mode 100644 > index 000000000000..1f1ddf968c1f > --- /dev/null > +++ b/Platform/StMMRpmb/PlatformStandaloneMm.dsc > @@ -0,0 +1,165 @@ > +# > > +#=A0 Copyright (c) 2018, ARM Limited. All rights reserved. > > +#=A0 Copyright (c) 2020, Linaro Ltd. All rights reserved. > > +# > > +#=A0 SPDX-License-Identifier: BSD-2-Clause-Patent > > +# > > + > > +######################################################################= ########## > > +# > > +# Defines Section - statements that will be processed to create a=20 > Makefile. > > +# > > +######################################################################= ########## > > +[Defines] > > +=A0 PLATFORM_NAME=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 =3D= MmStandaloneRpmb > > +=A0 PLATFORM_GUID=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 =3D= A27A486E-D7B9-4D70-9F37-FED9ABE041A2 > > +=A0 PLATFORM_VERSION=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 =3D 1.0 > > +=A0 DSC_SPECIFICATION=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 =3D 0x000= 10011 I think we are at the revision 0x0001001C, cf=20 https://edk2-docs.gitbook.io/edk-ii-dsc-specification/3_edk_ii_dsc_file_f= ormat/35_-defines-_section=20 > > +=A0 OUTPUT_DIRECTORY=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 =3D Bui= ld/$(PLATFORM_NAME) > > +=A0 SUPPORTED_ARCHITECTURES=A0=A0=A0=A0=A0=A0=A0 =3D AARCH64 > > +=A0 BUILD_TARGETS=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 =3D= DEBUG|RELEASE|NOOPT > > +=A0 SKUID_IDENTIFIER=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 =3D DEF= AULT > > +=A0 FLASH_DEFINITION=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 =3D=20 > Platform/StMMRpmb/PlatformStandaloneMm.fdf > > +=A0 DEFINE DEBUG_MESSAGE=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 =3D TRUE > > + > > +=A0 # LzmaF86 > > +=A0 DEFINE COMPRESSION_TOOL_GUID=A0=A0 =3D D42AE6BD-1352-4bfb-909A-CA7= 2A6EAE889 > > + > > +######################################################################= ########## > > +# > > +# Library Class section - list of all Library Classes needed by this=20 > Platform. > > +# > > +######################################################################= ########## > > +[LibraryClasses] > > +=A0 ArmSvcLib|ArmPkg/Library/ArmSvcLib/ArmSvcLib.inf > > +=A0 ArmLib|ArmPkg/Library/ArmLib/ArmBaseLib.inf > > +=A0 BaseLib|MdePkg/Library/BaseLib/BaseLib.inf > > + SafeIntLib|MdePkg/Library/BaseSafeIntLib/BaseSafeIntLib.inf > > +=20 > VariablePolicyHelperLib|MdeModulePkg/Library/VariablePolicyHelperLib/Va= riablePolicyHelperLib.inf > > + BaseMemoryLib|MdePkg/Library/BaseMemoryLib/BaseMemoryLib.inf > > +=20 > DebugPrintErrorLevelLib|MdePkg/Library/BaseDebugPrintErrorLevelLib/Base= DebugPrintErrorLevelLib.inf > > +=20 > ExtractGuidedSectionLib|EmbeddedPkg/Library/PrePiExtractGuidedSectionLi= b/PrePiExtractGuidedSectionLib.inf > > +=A0 FvLib|StandaloneMmPkg/Library/FvLib/FvLib.inf > > +=20 > HobLib|StandaloneMmPkg/Library/StandaloneMmCoreHobLib/StandaloneMmCoreH= obLib.inf > > + IoLib|MdePkg/Library/BaseIoLibIntrinsic/BaseIoLibIntrinsic.inf > > + MemLib|StandaloneMmPkg/Library/StandaloneMmMemLib/StandaloneMmMemLib.= inf > > +=20 > MemoryAllocationLib|StandaloneMmPkg/Library/StandaloneMmCoreMemoryAlloc= ationLib/StandaloneMmCoreMemoryAllocationLib.inf > > +=A0 PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf > > + PeCoffLib|MdePkg/Library/BasePeCoffLib/BasePeCoffLib.inf > > +=A0 PrintLib|MdePkg/Library/BasePrintLib/BasePrintLib.inf > > +=20 > VariablePolicyLib|MdeModulePkg/Library/VariablePolicyLib/VariablePolicy= Lib.inf > > +=20 > ReportStatusCodeLib|MdePkg/Library/BaseReportStatusCodeLibNull/BaseRepo= rtStatusCodeLibNull.inf > > + > > +=A0 # > > +=A0 # Entry point > > +=A0 # > > +=20 > StandaloneMmCoreEntryPoint|StandaloneMmPkg/Library/StandaloneMmCoreEntr= yPoint/StandaloneMmCoreEntryPoint.inf > > +=20 > StandaloneMmDriverEntryPoint|MdePkg/Library/StandaloneMmDriverEntryPoin= t/StandaloneMmDriverEntryPoint.inf > > + > > +=20 > StandaloneMmMmuLib|ArmPkg/Library/StandaloneMmMmuLib/ArmMmuStandaloneMm= Lib.inf > > +=20 > CacheMaintenanceLib|MdePkg/Library/BaseCacheMaintenanceLibNull/BaseCach= eMaintenanceLibNull.inf > > +=20 > PeCoffExtraActionLib|StandaloneMmPkg/Library/StandaloneMmPeCoffExtraAct= ionLib/StandaloneMmPeCoffExtraActionLib.inf > > +=A0 RngLib|MdePkg/Library/BaseRngLibNull/BaseRngLibNull.inf > > + > > +=20 > SerialPortLib|MdePkg/Library/BaseSerialPortLibNull/BaseSerialPortLibNul= l.inf > > + DebugLib|MdePkg/Library/BaseDebugLibNull/BaseDebugLibNull.inf It seems in the previous patch you are using some 'DEBUG ()' and 'ASSERT=20 () statements. Wouldn't using BaseDebugLibNull and BaseSerialPortLibNull=20 make them useless for DEBUG and RELEASE build ? > > + > > +=A0 # > > +=A0 # It is not possible to prevent the ARM compiler for generic=20 > intrinsic functions. > > +=A0 # This library provides the intrinsic functions generate by a give= n=20 > compiler. > > +=A0 # NULL means link this library into all ARM images. > > +=A0 # > > + NULL|ArmPkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf > > + > > +[LibraryClasses.common.MM_STANDALONE] > > + HobLib|StandaloneMmPkg/Library/StandaloneMmHobLib/StandaloneMmHobLib.= inf > > +=20 > MmServicesTableLib|MdePkg/Library/StandaloneMmServicesTableLib/Standalo= neMmServicesTableLib.inf > > +=20 > MemoryAllocationLib|StandaloneMmPkg/Library/StandaloneMmMemoryAllocatio= nLib/StandaloneMmMemoryAllocationLib.inf > > + > > + IntrinsicLib|CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf > > +=A0 OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLib.inf > > +=20 > PlatformSecureLib|SecurityPkg/Library/PlatformSecureLibNull/PlatformSec= ureLibNull.inf > > +=20 > SynchronizationLib|MdePkg/Library/BaseSynchronizationLib/BaseSynchroniz= ationLib.inf > > +=20 > TimerLib|MdePkg/Library/BaseTimerLibNullTemplate/BaseTimerLibNullTempla= te.inf > > +######################################################################= ########## > > +# > > +# Pcd Section - list of all EDK II PCD Entries defined by this Platfor= m > > +# > > +######################################################################= ########## > Since this comment is for the PCD section, I think it would be better to=20 remove the empty line after the comment and add one at the top of this=20 comment. > + > > +[PcdsFeatureFlag.common] > > +=A0 gArmTokenSpaceGuid.PcdFfaEnable|TRUE > > + > > +[PcdsFixedAtBuild] > > + gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|0x800000CF > > +=A0 gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask|0xff > > + gEfiMdePkgTokenSpaceGuid.PcdReportStatusCodePropertyMask|0x0f > > + > > + gEfiMdePkgTokenSpaceGuid.PcdMaximumGuidedExtractHandler|0x2 > > +=A0 # Secure Storage > > + gEfiSecurityPkgTokenSpaceGuid.PcdUserPhysicalPresence|TRUE > > + gEfiMdeModulePkgTokenSpaceGuid.PcdMaxVariableSize|0x2000 > > + gEfiMdeModulePkgTokenSpaceGuid.PcdMaxAuthVariableSize|0x2800 > > + > > + gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableSize|0x000040= 00 > > +=20 > gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingSize|0x000040= 00 > > + gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareSize|0x000040= 00 > > + gEfiMdeModulePkgTokenSpaceGuid.PcdVariableStoreSize|0x00004000 > > + > > +[PcdsPatchableInModule] > > +=A0 # Allocated memory for EDK2 uppers layers > > + gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBase64|0x0 > > + gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingBase64|0x0 > > + gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareBase64|0x0 > > + > > +######################################################################= ############################# > > +# > > +# Components Section - list of the modules and components that will=20 > be processed by compilation > > +#=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 tools= and the EDK II tools to generate=20 > PE32/PE32+/Coff image files. > > +# > > +# Note: The EDK II DSC file is not used to specify how compiled=20 > binary images get placed > > +#=A0=A0=A0=A0=A0=A0 into firmware volume images. This section is just = a list of=20 > modules to compile from > > +#=A0=A0=A0=A0=A0=A0 source into UEFI-compliant binaries. > > +#=A0=A0=A0=A0=A0=A0 It is the FDF file that contains information on co= mbining=20 > binary files into firmware > > +#=A0=A0=A0=A0=A0=A0 volume images, whose concept is beyond UEFI and is= described=20 > in PI specification. > > +#=A0=A0=A0=A0=A0=A0 Binary modules do not need to be listed in this se= ction, as=20 > they should be > > +#=A0=A0=A0=A0=A0=A0 specified in the FDF file. For example: Shell bina= ry=20 > (Shell_Full.efi), FAT binary (Fat.efi), > > +#=A0=A0=A0=A0=A0=A0 Logo (Logo.bmp), and etc. > > +#=A0=A0=A0=A0=A0=A0 There may also be modules listed in this section t= hat are not=20 > required in the FDF file, > > +#=A0=A0=A0=A0=A0=A0 When a module listed here is excluded from FDF fil= e, then=20 > UEFI-compliant binary will be > > +#=A0=A0=A0=A0=A0=A0 generated for it, but the binary will not be put i= nto any=20 > firmware volume. > > +# > > +######################################################################= ############################# > > +[Components.common] > > +=A0 # > > +=A0 # Standalone MM components > > +=A0 # > > +=A0 Drivers/OpTeeRpmb/OpTeeRpmbFv.inf > > +=A0 StandaloneMmPkg/Core/StandaloneMmCore.inf > > + StandaloneMmPkg/Drivers/StandaloneMmCpu/AArch64/StandaloneMmCpu.inf > > +=20 > MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteStandalo= neMm.inf=20 > { > > +=A0=A0=A0 > > +=A0=A0=A0=A0=A0 NULL|Drivers/OpTeeRpmb/FixupPcd.inf > > +=A0 } > > + MdeModulePkg/Universal/Variable/RuntimeDxe/VariableStandaloneMm.inf { > > +=A0=A0=A0 > > + AuthVariableLib|SecurityPkg/Library/AuthVariableLib/AuthVariableLib.i= nf > > + BaseCryptLib|CryptoPkg/Library/BaseCryptLib/SmmCryptLib.inf > > + DevicePathLib|MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.inf > > + VarCheckLib|MdeModulePkg/Library/VarCheckLib/VarCheckLib.inf > > + NULL|MdeModulePkg/Library/VarCheckUefiLib/VarCheckUefiLib.inf > > +=A0=A0=A0=A0=A0 NULL|Drivers/OpTeeRpmb/FixupPcd.inf > > +=A0 } > > + > > +######################################################################= ############################# > > +# > > +# BuildOptions Section - Define the module specific tool chain flags=20 > that should be used asOn 3/2/21 4:43 PM, Pierre wrote: > > +#=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= the default flags for a module. These flags=20 > are appended to any > > +#=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= standard flags that are defined by the build=20 > process. They can be > > +#=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= applied for any modules or only those=20 > modules with the specific > > +#=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= module style (EDK or EDKII) specified in=20 > [Components] section. > > +# > > +######################################################################= ############################# > > +[BuildOptions.AARCH64] > > +GCC:*_*_*_DLINK_FLAGS =3D -z common-page-size=3D0x1000 -march=3Darmv8-= a+nofp > > +GCC:*_*_*_CC_FLAGS =3D -mstrict-align > > diff --git a/Platform/StMMRpmb/PlatformStandaloneMm.fdf=20 > b/Platform/StMMRpmb/PlatformStandaloneMm.fdf > new file mode 100644 > index 000000000000..febc6d0d959b > --- /dev/null > +++ b/Platform/StMMRpmb/PlatformStandaloneMm.fdf > @@ -0,0 +1,111 @@ > +# > > +#=A0 Copyright (c) 2018, ARM Limited. All rights reserved. > > +#=A0 Copyright (c) 2020, Linaro Ltd. All rights reserved. > > +# > > +#=A0 SPDX-License-Identifier: BSD-2-Clause-Patent > > +# > > + > > +######################################################################= ########## > > +# > > +# FD Section > > +# The [FD] Section is made up of the definition statements and a > > +# description of what goes into=A0 the Flash Device Image. Each FD sec= tion > > +# defines one flash "device" image.=A0 A flash device image may be one= of > > +# the following: Removable media bootable image (like a boot floppy > > +# image,) an Option ROM image (that would be "flashed" into an add-in > > +# card,) a System "Flash"=A0 image (that would be burned into a system= 's > > +# flash) or an Update ("Capsule") image that will be used to update an= d > > +# existing system flash. > > +# > > +######################################################################= ########## > > + > > +[FD.BL32_AP_MM] > > +BaseAddress=A0=A0 =3D 0x1000 # any address apart from 0x0 > > +Size=A0=A0=A0=A0=A0=A0=A0=A0=A0 =3D 0x00300000 > > +ErasePolarity =3D 1 > > + > > +BlockSize=A0=A0=A0=A0 =3D 0x00001000 > > +NumBlocks=A0=A0=A0=A0 =3D 0x0300 > > + > > +######################################################################= ########## > > +# > > +# Following are lists of FD Region layout which correspond to the=20 > locations of different > > +# images within the flash device. > > +# > > +# Regions must be defined in ascending order and may not overlap. > > +# > > +# A Layout Region start with a eight digit hex offset (leading "0x"=20 > required) followed by > > +# the pipe "|" character, followed by the size of the region, also in=20 > hex with the leading > > +# "0x" characters. Like: > > +# Offset|Size > > +# PcdOffsetCName|PcdSizeCName > > +# RegionType > > +# > > +######################################################################= ########## > > + > > +0x00000000|0x00280000 > > +FV =3D FVMAIN_COMPACT > > + > > +[FV.FVMAIN_COMPACT] > > +FvAlignment=A0=A0=A0=A0=A0=A0=A0 =3D 8 > > +ERASE_POLARITY=A0=A0=A0=A0 =3D 1 > > +MEMORY_MAPPED=A0=A0=A0=A0=A0 =3D TRUE > > +STICKY_WRITE=A0=A0=A0=A0=A0=A0 =3D TRUE > > +LOCK_CAP=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 =3D TRUE > > +LOCK_STATUS=A0=A0=A0=A0=A0=A0=A0 =3D TRUE > > +WRITE_DISABLED_CAP =3D TRUE > > +WRITE_ENABLED_CAP=A0 =3D TRUE > > +WRITE_STATUS=A0=A0=A0=A0=A0=A0 =3D TRUE > > +WRITE_LOCK_CAP=A0=A0=A0=A0 =3D TRUE > > +WRITE_LOCK_STATUS=A0 =3D TRUE > > +READ_DISABLED_CAP=A0 =3D TRUE > > +READ_ENABLED_CAP=A0=A0 =3D TRUE > > +READ_STATUS=A0=A0=A0=A0=A0=A0=A0 =3D TRUE > > +READ_LOCK_CAP=A0=A0=A0=A0=A0 =3D TRUE > > +READ_LOCK_STATUS=A0=A0 =3D TRUE > > + > > +=A0 INF StandaloneMmPkg/Core/StandaloneMmCore.inf > > +=A0 INF Drivers/OpTeeRpmb/OpTeeRpmbFv.inf > > +=A0 INF=20 > MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteStandalo= neMm.inf > > +=A0 INF MdeModulePkg/Universal/Variable/RuntimeDxe/VariableStandaloneM= m.inf > > +=A0 INF StandaloneMmPkg/Drivers/StandaloneMmCpu/AArch64/StandaloneMmCp= u.inf > > +######################################################################= ########## > > +# > > +# Rules are use with the [FV] section's module INF type to define > > +# how an FFS file is created for a given INF file. The following Rule=20 > are the default > > +# rules for the different module type. User can add the customized=20 > rules to define the > > +# content of the FFS file. > > +# > > +######################################################################= ########## > > + > > + > > +######################################################################= ###### > > +# Example of a DXE_DRIVER FFS file with a Checksum encapsulation=20 > section=A0=A0 # > > +######################################################################= ###### > > +# > > +#[Rule.Common.DXE_DRIVER] > > +#=A0 FILE DRIVER =3D $(NAMED_GUID) { > > +#=A0=A0=A0 DXE_DEPEX=A0=A0=A0 DXE_DEPEX=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0 Optional=20 > $(INF_OUTPUT)/$(MODULE_NAME).depex > > +#=A0=A0=A0 COMPRESS PI_STD { > > +#=A0=A0=A0=A0=A0 GUIDED { > > +#=A0=A0=A0=A0=A0=A0=A0 PE32=A0=A0=A0=A0 PE32 $(INF_OUTPUT)/$(MODULE_NA= ME).efi > > +#=A0=A0=A0=A0=A0=A0=A0 UI=A0=A0=A0=A0=A0=A0 STRING=3D"$(MODULE_NAME)" = Optional > > +#=A0=A0=A0=A0=A0=A0=A0 VERSION=A0 STRING=3D"$(INF_VERSION)" Optional=20 > BUILD_NUM=3D$(BUILD_NUMBER) > > +#=A0=A0=A0=A0=A0 } > > +#=A0=A0=A0 } > > +#=A0 } > > +# > > +######################################################################= ###### > > + > > +[Rule.Common.MM_CORE_STANDALONE] > > +=A0 FILE SEC =3D $(NAMED_GUID) FIXED { > > +=A0=A0=A0 PE32=A0 PE32 Align =3D Auto $(INF_OUTPUT)/$(MODULE_NAME).efi > > +=A0 } > > + > > +[Rule.Common.MM_STANDALONE] > > +=A0 FILE MM_STANDALONE =3D $(NAMED_GUID) { > > +=A0=A0=A0 SMM_DEPEX SMM_DEPEX Optional $(INF_OUTPUT)/$(MODULE_NAME).de= pex > > +=A0=A0=A0 PE32=A0=A0=A0=A0=A0 PE32 $(INF_OUTPUT)/$(MODULE_NAME).efi > > +=A0=A0=A0 UI=A0=A0=A0=A0=A0=A0=A0 STRING=3D"$(MODULE_NAME)" Optional > > +=A0=A0=A0 VERSION=A0=A0 STRING=3D"$(INF_VERSION)" Optional BUILD_NUM=3D= $(BUILD_NUMBER) > > +=A0 } > > --=20 > 2.30.0 > > > > -=3D-=3D-=3D-=3D-=3D-=3D > Groups.io Links: You receive all messages sent to this group. > View/Reply Online (#71652):=20 > https://edk2.groups.io/g/devel/message/71652=20 > > Mute This Topic: https://groups.io/mt/80588995/1821310=20 > > Group Owner: devel+owner@edk2.groups.io > Unsubscribe: https://edk2.groups.io/g/devel/unsub=20 > [pierre.gondois@arm.com] > -=3D-=3D-=3D-=3D-=3D-=3D > >