From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=134.134.136.126; helo=mga18.intel.com; envelope-from=jiewen.yao@intel.com; receiver=edk2-devel@lists.01.org Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 00A0B21962301 for ; Fri, 18 Jan 2019 07:42:20 -0800 (PST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 18 Jan 2019 07:42:20 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,491,1539673200"; d="scan'208";a="311556380" Received: from fmsmsx104.amr.corp.intel.com ([10.18.124.202]) by fmsmga006.fm.intel.com with ESMTP; 18 Jan 2019 07:42:20 -0800 Received: from fmsmsx113.amr.corp.intel.com (10.18.116.7) by fmsmsx104.amr.corp.intel.com (10.18.124.202) with Microsoft SMTP Server (TLS) id 14.3.408.0; Fri, 18 Jan 2019 07:42:19 -0800 Received: from shsmsx104.ccr.corp.intel.com (10.239.4.70) by FMSMSX113.amr.corp.intel.com (10.18.116.7) with Microsoft SMTP Server (TLS) id 14.3.408.0; Fri, 18 Jan 2019 07:42:19 -0800 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.63]) by SHSMSX104.ccr.corp.intel.com ([169.254.5.159]) with mapi id 14.03.0415.000; Fri, 18 Jan 2019 23:42:17 +0800 From: "Yao, Jiewen" To: Achin Gupta , Ard Biesheuvel , "edk2-devel@lists.01.org" CC: Supreeth Venkatesh , Leif Lindholm , Jagadeesh Ujja , "Thomas Abraham" , Sami Mujawar , nd Thread-Topic: [PATCH v2 00/11] StandaloneMmPkg: assorted fixes and improvements Thread-Index: AQHUrdk+YJLeSVcTD0a4D8UkabsuyKW0PhAAgADudQA= Date: Fri, 18 Jan 2019 15:41:55 +0000 Message-ID: <74D8A39837DF1E4DA445A8C0B3885C503F4B1A81@shsmsx102.ccr.corp.intel.com> References: <20190116202236.6977-1-ard.biesheuvel@linaro.org> In-Reply-To: Accept-Language: zh-CN, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiZTJkZGYzMWEtMTU2OC00M2ZiLTliZDMtZmI3YWQ3NGRlZWExIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoidWZiV1U4M3JUdlB0ZWZHVFhZTWRCZ09xXC9zRFBwRG1VXC9QVlp4anJXOTJReWZJaWJlaTdIbXJVc0NhYjJcL21PQSJ9 x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.0.400.15 dlp-reaction: no-action x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [PATCH v2 00/11] StandaloneMmPkg: assorted fixes and improvements X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 Jan 2019 15:42:21 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Thanks to remind me. I took a look at all patches. I skipped all ARM specific patches, and reviewed rest of them. All my feedback is provided in the individual patch. Thank you Yao Jiewen > -----Original Message----- > From: Achin Gupta [mailto:Achin.Gupta@arm.com] > Sent: Friday, January 18, 2019 1:27 AM > To: Ard Biesheuvel ; edk2-devel@lists.01.org; > Yao, Jiewen > Cc: Supreeth Venkatesh ; Leif Lindholm > ; Jagadeesh Ujja ; > Thomas Abraham ; Sami Mujawar > ; nd > Subject: Re: [PATCH v2 00/11] StandaloneMmPkg: assorted fixes and > improvements >=20 > Hi Ard, >=20 > For all the patches... >=20 > Reviewed-by: Achin Gupta >=20 > Jiewen. There are changes to the generic Standalone MM code in this serie= s. > Do you want to have a look as well? >=20 > cheers, > Achin > ________________________________________ > From: Ard Biesheuvel > Sent: 16 January 2019 20:22 > To: edk2-devel@lists.01.org > Cc: Ard Biesheuvel; Achin Gupta; Jiewen Yao; Supreeth Venkatesh; Leif > Lindholm; Jagadeesh Ujja; Thomas Abraham; Sami Mujawar > Subject: [PATCH v2 00/11] StandaloneMmPkg: assorted fixes and > improvements >=20 > This series addresses a number of issues I ran into while bringing up > the standalone MM based authenticated variable store on the SynQuacer > (AArch64) platform. >=20 > Patches #1 - #3 are based on Jagadeesh's patch that imports some staging > code into StandaloneMmPkg, with the following changes: > - drop unused source files, GUID references are other unused bit, > - clean up comments referring to the MM core implementation. >=20 > Patches #4 - #9 are obvious fixes/improvements. >=20 > Patch #10 adds support for TE formatted MM_CORE_STANDALONE binaries. > This is useful given that the 4 KB section alignment we require in > AArch64 implementations of standalone MM (due to the strict separation > between code and date) results in 8 KB of wasted space at the start of > the firmware volume. This can be reduced to 4 KB when using a TE image > and the FIXED attribute in the associated [Rule] section, by leveraging > an existing optimization in the FFS generation code that aligns TE images > by reducing FFS padding rather than adding more. >=20 > Patch #11 is another space optimization: it reuses the existing support > for encapsulated compressed firmware volumes in FFS files to shrink the > size of the primary standalone MM FV considerably. Again, due to > alignment requirements, there is significant bloat in the uncompressed > images (4 KB for the PE/COFF header, and up to 4 KB per section for the > .text, .data and .reloc sections), making the absolute minimum size of > any trivial MM_STANDALONE module 16 KB. >=20 > Changes since v1: > - add patches #1 - #3 > - add Supreeth's ack to patches #4 - #7 >=20 > Cc: Achin Gupta > Cc: Jiewen Yao > Cc: Supreeth Venkatesh > Cc: Leif Lindholm > Cc: Jagadeesh Ujja > Cc: Thomas Panakamattam Abraham > Cc: Sami Mujawar >=20 > Ard Biesheuvel (11): > StandaloneMmPkg: add HobLib implementation for MM_STANDALONE > modules > StandaloneMmPkg: add MM_STANDALONE MemoryAllocationLib > implementation > StandaloneMmPkg/StandaloneMmCoreHobLib: restrict to > MM_CORE_STANDALONE > StandaloneMmPkg/StandaloneMmCpu: fix typo Standlone -> Standalone > StandaloneMmPkg/StandaloneMmCoreEntryPoint: add missing > SerialPortLib > ref > StandaloneMmPkg/StandaloneMmCoreEntryPoint: use %a modifier for > ASCII > strings > StandaloneMmPkg/StandaloneMmCoreEntryPoint: remove bogus > ASSERT_EFI_ERROR()s > StandaloneMmPkg/StandaloneMmPeCoffExtraActionLib: ignore runtime > attribute > StandaloneMmPkg/Core/Dispatcher: don't copy dispatched image twice > StandaloneMmPkg/StandaloneMmCoreEntryPoint: permit the use of TE > images > StandaloneMmPkg/Core: permit encapsulated firmware volumes >=20 > StandaloneMmPkg/Core/Dispatcher.c | 30 +- > StandaloneMmPkg/Core/FwVol.c | 99 ++- > StandaloneMmPkg/Core/StandaloneMmCore.inf | 1 + > .../StandaloneMmCpu/AArch64/EventHandle.c | 2 +- > .../StandaloneMmCpu/AArch64/StandaloneMmCpu.c | 6 +- > .../StandaloneMmCpu/AArch64/StandaloneMmCpu.h | 8 +- > .../AArch64/StandaloneMmCpu.inf | 4 +- > .../AArch64/SetPermissions.c | 109 +-- > .../AArch64/StandaloneMmCoreEntryPoint.c | 7 +- > .../StandaloneMmCoreEntryPoint.inf | 4 + > .../StandaloneMmCoreHobLib.inf | 2 +- > .../StandaloneMmHobLib/StandaloneMmHobLib.c | 649 > ++++++++++++++ > .../StandaloneMmHobLib/StandaloneMmHobLib.inf | 45 + > .../StandaloneMmMemoryAllocationLib.c | 822 > ++++++++++++++++++ > .../StandaloneMmMemoryAllocationLib.inf | 42 + > .../StandaloneMmPeCoffExtraActionLib.c | 9 +- > 16 files changed, 1716 insertions(+), 123 deletions(-) > create mode 100644 > StandaloneMmPkg/Library/StandaloneMmHobLib/StandaloneMmHobLib.c > create mode 100644 > StandaloneMmPkg/Library/StandaloneMmHobLib/StandaloneMmHobLib.inf > create mode 100644 > StandaloneMmPkg/Library/StandaloneMmMemoryAllocationLib/Standalone > MmMemoryAllocationLib.c > create mode 100644 > StandaloneMmPkg/Library/StandaloneMmMemoryAllocationLib/Standalone > MmMemoryAllocationLib.inf >=20 > -- > 2.17.1