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.31; helo=mga06.intel.com; envelope-from=star.zeng@intel.com; receiver=edk2-devel@lists.01.org Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) (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 F2ADA211B5A46 for ; Wed, 9 Jan 2019 22:07:09 -0800 (PST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 09 Jan 2019 22:07:09 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,460,1539673200"; d="scan'208";a="133274702" Received: from shzintpr02.sh.intel.com (HELO [10.253.24.26]) ([10.239.4.160]) by fmsmga002.fm.intel.com with ESMTP; 09 Jan 2019 22:07:07 -0800 To: Ard Biesheuvel , edk2-devel@lists.01.org Cc: Hao Wu , Liming Gao , Michael D Kinney , Laszlo Ersek , star.zeng@intel.com References: <20190103182825.32231-1-ard.biesheuvel@linaro.org> <20190103182825.32231-3-ard.biesheuvel@linaro.org> From: "Zeng, Star" Message-ID: <5b608244-c6a3-94fb-4361-0dbbd80e4571@intel.com> Date: Thu, 10 Jan 2019 14:06:37 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.3.3 MIME-Version: 1.0 In-Reply-To: <20190103182825.32231-3-ard.biesheuvel@linaro.org> Subject: Re: [PATCH 1/6] MdePkg/Include: add MmServicesTableLib header file 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: Thu, 10 Jan 2019 06:07:10 -0000 Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Hi Ard, Some feedback added inline. On 2019/1/4 2:28, Ard Biesheuvel wrote: > From: Jagadeesh Ujja > > SMM has been rebranded as MM, and can be implemented in traditional > mode or standalone mode, using the same prototype for the services > table. Expose this table via MmServicesTableLib, permitting the > respective implementations to expose a traditional or standalone > version. > > Contributed-under: TianoCore Contribution Agreement 1.1 > Signed-off-by: Jagadeesh Ujja > Signed-off-by: Ard Biesheuvel > --- > MdePkg/Include/Library/MmServicesTableLib.h | 25 ++++++++++++++++++++ > MdePkg/MdePkg.dec | 4 ++++ > 2 files changed, 29 insertions(+) > > diff --git a/MdePkg/Include/Library/MmServicesTableLib.h b/MdePkg/Include/Library/MmServicesTableLib.h > new file mode 100644 > index 000000000000..12bd01e98641 > --- /dev/null > +++ b/MdePkg/Include/Library/MmServicesTableLib.h > @@ -0,0 +1,25 @@ > +/** @file > + Provides a service to retrieve a pointer to the Standalone MM Services Table. > + Only available to Standalone MM module types. This line should be "Only available to MM_STANDALONE, SMM/DXE Combined and SMM module types." to match the comments added in MdePkg.dec for this library class, right? With it handled, Reviewed-by: Star Zeng Thanks, Star > + > +Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.
> +Copyright (c) 2016 - 2018, ARM Limited. All rights reserved.
> + > +This program and the accompanying materials > +are licensed and made available under the terms and conditions of the BSD License > +which accompanies this distribution. The full text of the license may be found at > +http://opensource.org/licenses/bsd-license.php > + > +THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, > +WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. > + > +**/ > + > +#ifndef __MM_SERVICES_TABLE_LIB_H__ > +#define __MM_SERVICES_TABLE_LIB_H__ > + > +#include > + > +extern EFI_MM_SYSTEM_TABLE *gMmst; > + > +#endif > diff --git a/MdePkg/MdePkg.dec b/MdePkg/MdePkg.dec > index 712bd46dd3d3..a7383b6daafb 100644 > --- a/MdePkg/MdePkg.dec > +++ b/MdePkg/MdePkg.dec > @@ -243,6 +243,10 @@ [LibraryClasses] > ## > SafeIntLib|Include/Library/SafeIntLib.h > > + ## @libraryclass Provides a service to retrieve a pointer to the Standalone MM Services Table. > + # Only available to MM_STANDALONE, SMM/DXE Combined and SMM module types. > + MmServicesTableLib|Include/Library/MmServicesTableLib.h > + > [LibraryClasses.IA32, LibraryClasses.X64] > ## @libraryclass Abstracts both S/W SMI generation and detection. > ## >