From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=192.55.52.43; helo=mga05.intel.com; envelope-from=star.zeng@intel.com; receiver=edk2-devel@lists.01.org Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) (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 A178F2194D3B9 for ; Tue, 15 Jan 2019 21:00:48 -0800 (PST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 15 Jan 2019 21:00:48 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,484,1539673200"; d="scan'208";a="267473083" Received: from shzintpr03.sh.intel.com (HELO [10.7.209.38]) ([10.239.4.100]) by orsmga004.jf.intel.com with ESMTP; 15 Jan 2019 21:00:46 -0800 To: Ard Biesheuvel , edk2-devel@lists.01.org Cc: Hao Wu , Liming Gao , Michael D Kinney , Laszlo Ersek , star.zeng@intel.com References: <20190114132758.24054-1-ard.biesheuvel@linaro.org> <20190114132758.24054-9-ard.biesheuvel@linaro.org> From: "Zeng, Star" Message-ID: Date: Wed, 16 Jan 2019 13:00:16 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 MIME-Version: 1.0 In-Reply-To: <20190114132758.24054-9-ard.biesheuvel@linaro.org> Subject: Re: [PATCH v2 08/17] MdeModulePkg/VariableRuntimeDxe: implement standalone MM version 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: Wed, 16 Jan 2019 05:00:48 -0000 Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit One minor comment. With it handled, Reviewed-by: Star Zeng On 2019/1/14 21:27, Ard Biesheuvel wrote: > Reuse most of the existing code to implement a variable runtime > driver that will be able to execute in the context of standalone > MM. > > Contributed-under: TianoCore Contribution Agreement 1.1 > Signed-off-by: Ard Biesheuvel > Reviewed-by: Jian J Wang > Reviewed-by: Star Zeng > --- > MdeModulePkg/Universal/Variable/RuntimeDxe/VariableStandaloneMm.inf | 136 ++++++++++++++++++++ > MdeModulePkg/Universal/Variable/RuntimeDxe/VariableStandaloneMm.c | 89 +++++++++++++ > 2 files changed, 225 insertions(+) > [Trimmed] > + > +/** > + Variable service MM driver entry point The comments block should have description for the two parameters and return status (forgot to mention this for other places). Thanks, Star > +**/ > +EFI_STATUS > +EFIAPI > +VariableServiceInitialize ( > + IN EFI_HANDLE ImageHandle, > + IN EFI_MM_SYSTEM_TABLE *MmSystemTable > + ) > +{ > + return MmVariableServiceInitialize (); > +} > + > +/** > + Whether the TCG or TCG2 protocols are installed in the UEFI protocol database. > + This information is used by the MorLock code to infer whether an existing > + MOR variable is legitimate or not. > + > + @retval TRUE Either the TCG or TCG2 protocol is installed in the UEFI > + protocol database > + @retval FALSE Neither the TCG nor the TCG2 protocol is installed in the UEFI > + protocol database > +**/ > +BOOLEAN > +VariableHaveTcgProtocols ( > + VOID > + ) > +{ > + return FALSE; > +} >