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.115; helo=mga14.intel.com; envelope-from=ruiyu.ni@intel.com; receiver=edk2-devel@lists.01.org Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) (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 2361322361E4F for ; Thu, 8 Feb 2018 19:01:08 -0800 (PST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 08 Feb 2018 19:06:54 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.46,481,1511856000"; d="scan'208";a="16775829" Received: from ray-dev.ccr.corp.intel.com (HELO [10.239.9.37]) ([10.239.9.37]) by orsmga008.jf.intel.com with ESMTP; 08 Feb 2018 19:06:53 -0800 To: "Zeng, Star" , edk2-devel@lists.01.org Cc: Michael D Kinney , Liming Gao References: <20180202064530.407028-1-ruiyu.ni@intel.com> <20180202064530.407028-9-ruiyu.ni@intel.com> From: "Ni, Ruiyu" Message-ID: Date: Fri, 9 Feb 2018 11:06:52 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: Subject: Re: [PATCH 08/10] MdePkg/UefiRuntimeLib: Support more module types. X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Feb 2018 03:01:09 -0000 Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit On 2/7/2018 8:24 PM, Zeng, Star wrote: > On 2018/2/2 14:45, Ruiyu Ni wrote: >> Because DxeResetSystemLib links to this library to provide >> reset system services, change UefiRuntimeLib to support >> the same set of module types as what DxeResetSystemLib does. >> >> Cc: Liming Gao >> Cc: Michael D Kinney >> Cc: Star Zeng >> Contributed-under: TianoCore Contribution Agreement 1.1 >> Signed-off-by: Ruiyu Ni > > Do you think it is ok or not to let DxeResetSystemLib consume > UefiRuntimeServicesTableLib and use gRT->ResetSystem? Then this patch > will be not needed. RuntimeLib handles the gRT pointer conversion when entering RT phase. DxeResetSystemLib actually can also be used by a RT driver. Directly calling gRT->ResetSystem from DxeResetSystemLib loses the capability. > > If we still prefer to let DxeResetSystemLib consume UefiRuntimeLib, I am > also ok. Reviewed-by: Star Zeng > > Thanks, > Star > >> --- >>   MdePkg/Library/UefiRuntimeLib/UefiRuntimeLib.inf | 4 ++-- >>   1 file changed, 2 insertions(+), 2 deletions(-) >> >> diff --git a/MdePkg/Library/UefiRuntimeLib/UefiRuntimeLib.inf >> b/MdePkg/Library/UefiRuntimeLib/UefiRuntimeLib.inf >> index 8f46495fc5..d053da545a 100644 >> --- a/MdePkg/Library/UefiRuntimeLib/UefiRuntimeLib.inf >> +++ b/MdePkg/Library/UefiRuntimeLib/UefiRuntimeLib.inf >> @@ -5,7 +5,7 @@ >>   #  EVT_SIGNAL_EXIT_BOOT_SERVICES event, to provide runtime services. >>   # This instance also supports SAL drivers for better performance. >>   # >> -# Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.
>> +# Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.
>>   # >>   #  This program and the accompanying materials >>   #  are licensed and made available under the terms and conditions of >> the BSD License >> @@ -24,7 +24,7 @@ [Defines] >>     FILE_GUID                      = b1ee6c28-54aa-4d17-b705-3e28ccb27b2e >>     MODULE_TYPE                    = DXE_RUNTIME_DRIVER >>     VERSION_STRING                 = 1.0 >> -  LIBRARY_CLASS                  = UefiRuntimeLib|DXE_RUNTIME_DRIVER >> DXE_SAL_DRIVER >> +  LIBRARY_CLASS                  = UefiRuntimeLib|DXE_RUNTIME_DRIVER >> DXE_SAL_DRIVER DXE_CORE DXE_DRIVER DXE_SMM_DRIVER >>     CONSTRUCTOR                    = RuntimeDriverLibConstruct >>     DESTRUCTOR                     = RuntimeDriverLibDeconstruct >> > -- Thanks, Ray