From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=missing; spf=fail (domain: intel.com, ip: , mailfrom: zhichao.gao@intel.com) Received: from mga04.intel.com (mga04.intel.com []) by groups.io with SMTP; Fri, 19 Jul 2019 01:09:54 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 19 Jul 2019 01:09:53 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,281,1559545200"; d="scan'208";a="187951050" Received: from fieedk001.ccr.corp.intel.com ([10.239.33.119]) by fmsmga001.fm.intel.com with ESMTP; 19 Jul 2019 01:09:52 -0700 From: "Gao, Zhichao" To: devel@edk2.groups.io Cc: Michael D Kinney , Liming Gao , Sean Brogan , Michael Turner , Bret Barkelew Subject: [PATCH V2 2/4] MdePkg: Add new pcd PcdRuntimeServicesSupport Date: Fri, 19 Jul 2019 16:09:19 +0800 Message-Id: <20190719080921.17516-3-zhichao.gao@intel.com> X-Mailer: git-send-email 2.21.0.windows.1 In-Reply-To: <20190719080921.17516-1-zhichao.gao@intel.com> References: <20190719080921.17516-1-zhichao.gao@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1907 Add pcd PcdRuntimeServicesSupport to control whether runtime services is supported at runtime phase. It is a UINT16 type bitmask value. Refer to Uefi Spec 2.8, Section 8.1.1. Cc: Michael D Kinney Cc: Liming Gao Cc: Sean Brogan Cc: Michael Turner Cc: Bret Barkelew Signed-off-by: Zhichao Gao --- MdePkg/MdePkg.dec | 19 +++++++++++++++++++ MdePkg/MdePkg.uni | 19 +++++++++++++++++++ 2 files changed, 38 insertions(+) diff --git a/MdePkg/MdePkg.dec b/MdePkg/MdePkg.dec index b382efd578..c66c88970e 100644 --- a/MdePkg/MdePkg.dec +++ b/MdePkg/MdePkg.dec @@ -2079,6 +2079,25 @@ # @Prompt Speculation Barrier Type. gEfiMdePkgTokenSpaceGuid.PcdSpeculationBarrierType|0x01|UINT8|0x30001018 + ## Indicates the supported runtime services after exit boot services. + # Uefi Spec 2.8, Section 8.1.1, RuntimeServicesSupported variable realted definitions.

+ # 0x0001 (EFI_RT_SUPPORTED_GET_TIME)
+ # 0x0002 (EFI_RT_SUPPORTED_SET_TIME)
+ # 0x0004 (EFI_RT_SUPPORTED_GET_WAKEUP_TIME)
+ # 0x0008 (EFI_RT_SUPPORTED_SET_WAKEUP_TIME)
+ # 0x0010 (EFI_RT_SUPPORTED_GET_VARIABLE)
+ # 0x0020 (EFI_RT_SUPPORTED_GET_NEXT_VARIABLE_NAME)
+ # 0x0040 (EFI_RT_SUPPORTED_SET_VARIABLE)
+ # 0x0080 (EFI_RT_SUPPORTED_SET_VIRTUAL_ADDRESS_MAP)
+ # 0x0100 (EFI_RT_SUPPORTED_CONVERT_POINTER)
+ # 0x0200 (EFI_RT_SUPPORTED_GET_NEXT_HIGH_MONOTONIC_COUNT)
+ # 0x0400 (EFI_RT_SUPPORTED_RESET_SYSTEM)
+ # 0x0800 (EFI_RT_SUPPORTED_UPDATE_CAPSULE)
+ # 0x1000 (EFI_RT_SUPPORTED_QUERY_CAPSULE_CAPABILITIES)
+ # 0x2000 (EFI_RT_SUPPORTED_QUERY_VARIABLE_INFO) + # @Prompt Runtime Services support. + gEfiMdePkgTokenSpaceGuid.PcdRuntimeServicesSupport|0x3FFF|UINT16|0x30001019 + [PcdsFixedAtBuild,PcdsPatchableInModule] ## Indicates the maximum length of unicode string used in the following # BaseLib functions: StrLen(), StrSize(), StrCmp(), StrnCmp(), StrCpy(), StrnCpy()

diff --git a/MdePkg/MdePkg.uni b/MdePkg/MdePkg.uni index 5c1fa24065..09e0cf22f1 100644 --- a/MdePkg/MdePkg.uni +++ b/MdePkg/MdePkg.uni @@ -157,6 +157,25 @@ "0x02 - CPUID (IA32/X64).
\n" "Other - reserved" +#string STR_gEfiMdePkgTokenSpaceGuid_PcdRuntimeServicesSupport_PROMPT #language en-US "Runtime Services support." + +#string STR_gEfiMdePkgTokenSpaceGuid_PcdRuntimeServicesSupport_HELP #language en-US "Indicates the supported runtime services after exit boot services." + "Uefi Spec 2.8, Section 8.1.1, RuntimeServicesSupported variable realted definitions.

" + " 0x0001 (EFI_RT_SUPPORTED_GET_TIME)
" + " 0x0002 (EFI_RT_SUPPORTED_SET_TIME)
" + " 0x0004 (EFI_RT_SUPPORTED_GET_WAKEUP_TIME)
" + " 0x0008 (EFI_RT_SUPPORTED_SET_WAKEUP_TIME)
" + " 0x0010 (EFI_RT_SUPPORTED_GET_VARIABLE)
" + " 0x0020 (EFI_RT_SUPPORTED_GET_NEXT_VARIABLE_NAME)
" + " 0x0040 (EFI_RT_SUPPORTED_SET_VARIABLE)
" + " 0x0080 (EFI_RT_SUPPORTED_SET_VIRTUAL_ADDRESS_MAP)
" + " 0x0100 (EFI_RT_SUPPORTED_CONVERT_POINTER)
" + " 0x0200 (EFI_RT_SUPPORTED_GET_NEXT_HIGH_MONOTONIC_COUNT)
" + " 0x0400 (EFI_RT_SUPPORTED_RESET_SYSTEM)
" + " 0x0800 (EFI_RT_SUPPORTED_UPDATE_CAPSULE)
" + " 0x1000 (EFI_RT_SUPPORTED_QUERY_CAPSULE_CAPABILITIES)
" + " 0x2000 (EFI_RT_SUPPORTED_QUERY_VARIABLE_INFO)" + #string STR_gEfiMdePkgTokenSpaceGuid_PcdMaximumAsciiStringLength_PROMPT #language en-US "Maximum Length of Ascii String" #string STR_gEfiMdePkgTokenSpaceGuid_PcdMaximumAsciiStringLength_HELP #language en-US "Sets the maximum number of ASCII characters used for string functions. This affects the following BaseLib functions: AsciiStrLen(), AsciiStrSize(), AsciiStrCmp(), AsciiStrnCmp(), AsciiStrCpy(), AsciiStrnCpy().

\n" -- 2.21.0.windows.1