public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [edk2-devel] [PATCH V2 0/5] Add EFI_UNSUPPORTED return for some Runtime Service functions
@ 2024-01-29  2:29 Ren, Suqiang
  2024-01-29  2:29 ` [edk2-devel] [PATCH V2 1/5] MdePkg: " Ren, Suqiang
                   ` (7 more replies)
  0 siblings, 8 replies; 15+ messages in thread
From: Ren, Suqiang @ 2024-01-29  2:29 UTC (permalink / raw)
  To: devel
  Cc: Michael D Kinney, Liming Gao, Zhiguang Liu, Leif Lindholm,
	Ard Biesheuvel, Abner Chang, Jiewen Yao, Laszlo Ersek

According to UEFI Spec 2.10 page 206, if any EFI_RUNTIME_SERVICES* calls
are not supported for use by the OS at runtime, an EFI_RT_PROPERTIES_TABLE
configuration table should be published describing which runtime services
are supported at runtime. So need to add EFI_UNSUPPORTED return for some
Runtime Service functions.

REF: UEFI spec 2.10 section 8 Services — Runtime Services

V2:
Update some Runtime Service functions header return
on both C and H header files.

V1:
Add EFI_UNSUPPORTED return for some Runtime Service
functions on UefiSpec.h file.

Signed-off-by: Suqiang Ren <suqiangx.ren@intel.com>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Zhiguang Liu <zhiguang.liu@intel.com>
Cc: Leif Lindholm <quic_llindhol@quicinc.com>
Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
Cc: Abner Chang <abner.chang@amd.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Laszlo Ersek <lersek@redhat.com>

Suqiang Ren (5):
  MdePkg: Add EFI_UNSUPPORTED return for some Runtime Service functions
  MdeModulePkg: Update some Runtime Service functions header
  EmbeddedPkg: Update some Runtime Service functions header
  ArmPlatformPkg: Update some Runtime Service functions header
  OvmfPkg: Update some Runtime Service functions header

 .../PL031RealTimeClockLib.c                   | 22 ++++-
 .../Include/Library/RealTimeClockLib.h        | 21 +++-
 .../RealTimeClockRuntimeDxe/RealTimeClock.c   | 13 ++-
 MdeModulePkg/Core/RuntimeDxe/Runtime.c        | 10 +-
 MdeModulePkg/Core/RuntimeDxe/Runtime.h        | 10 +-
 .../CapsuleRuntimeDxe/CapsuleService.c        | 13 +++
 .../MonotonicCounter.c                        |  3 +
 .../Universal/Variable/RuntimeDxe/Variable.c  | 40 ++++++--
 .../Universal/Variable/RuntimeDxe/Variable.h  | 40 ++++++--
 .../RuntimeDxe/VariableSmmRuntimeDxe.c        | 99 +++++++++++++++----
 MdePkg/Include/Library/UefiRuntimeLib.h       | 44 ++++++++-
 MdePkg/Include/Uefi/UefiSpec.h                | 46 ++++++++-
 MdePkg/Library/UefiRuntimeLib/RuntimeLib.c    | 43 +++++++-
 .../XenRealTimeClockLib/XenRealTimeClockLib.c | 22 ++++-
 14 files changed, 362 insertions(+), 64 deletions(-)

-- 
2.26.2.windows.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#114657): https://edk2.groups.io/g/devel/message/114657
Mute This Topic: https://groups.io/mt/104024793/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-



^ permalink raw reply	[flat|nested] 15+ messages in thread

* [edk2-devel] [PATCH V2 1/5] MdePkg: Add EFI_UNSUPPORTED return for some Runtime Service functions
  2024-01-29  2:29 [edk2-devel] [PATCH V2 0/5] Add EFI_UNSUPPORTED return for some Runtime Service functions Ren, Suqiang
@ 2024-01-29  2:29 ` Ren, Suqiang
  2024-01-29  3:48   ` Michael D Kinney
  2024-01-29  2:29 ` [edk2-devel] [PATCH V2 2/5] MdeModulePkg: Update some Runtime Service functions header Ren, Suqiang
                   ` (6 subsequent siblings)
  7 siblings, 1 reply; 15+ messages in thread
From: Ren, Suqiang @ 2024-01-29  2:29 UTC (permalink / raw)
  To: devel; +Cc: Michael D Kinney, Liming Gao, Zhiguang Liu

According to UEFI Spec 2.10 page 206, if any EFI_RUNTIME_SERVICES* calls
are not supported for use by the OS at runtime, an EFI_RT_PROPERTIES_TABLE
configuration table should be published describing which runtime services
are supported at runtime. So need to add EFI_UNSUPPORTED return for some
Runtime Service functions.

REF: UEFI spec 2.10 section 8 Services — Runtime Services

Signed-off-by: Suqiang Ren <suqiangx.ren@intel.com>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Zhiguang Liu <zhiguang.liu@intel.com>
---
 MdePkg/Include/Library/UefiRuntimeLib.h    | 44 +++++++++++++++++++--
 MdePkg/Include/Uefi/UefiSpec.h             | 46 +++++++++++++++++++---
 MdePkg/Library/UefiRuntimeLib/RuntimeLib.c | 43 ++++++++++++++++++--
 3 files changed, 122 insertions(+), 11 deletions(-)

diff --git a/MdePkg/Include/Library/UefiRuntimeLib.h b/MdePkg/Include/Library/UefiRuntimeLib.h
index 2b95b63f9f05..c5aca42aa1e9 100644
--- a/MdePkg/Include/Library/UefiRuntimeLib.h
+++ b/MdePkg/Include/Library/UefiRuntimeLib.h
@@ -64,6 +64,9 @@ EfiGoneVirtual (
   @retval  EFI_SUCCESS            The operation completed successfully.
   @retval  EFI_INVALID_PARAMETER  Time is NULL.
   @retval  EFI_DEVICE_ERROR       The time could not be retrieved due to a hardware error.
+  @retval  EFI_UNSUPPORTED        This call is not supported by this platform at the time the call is made.
+                                  The platform should describe this runtime service as unsupported at runtime
+                                  via an EFI_RT_PROPERTIES_TABLE configuration table.
 
 **/
 EFI_STATUS
@@ -93,6 +96,9 @@ EfiGetTime (
   @retval  EFI_SUCCESS            The operation completed successfully.
   @retval  EFI_INVALID_PARAMETER  A time field is out of range.
   @retval  EFI_DEVICE_ERROR       The time could not be set due to a hardware error.
+  @retval  EFI_UNSUPPORTED        This call is not supported by this platform at the time the call is made.
+                                  The platform should describe this runtime service as unsupported at runtime
+                                  via an EFI_RT_PROPERTIES_TABLE configuration table.
 
 **/
 EFI_STATUS
@@ -119,7 +125,9 @@ EfiSetTime (
   @retval  EFI_INVALID_PARAMETER  Pending is NULL.
   @retval  EFI_INVALID_PARAMETER  Time is NULL.
   @retval  EFI_DEVICE_ERROR       The wakeup time could not be retrieved due to a hardware error.
-  @retval  EFI_UNSUPPORTED        A wakeup timer is not supported on this platform.
+  @retval  EFI_UNSUPPORTED        This call is not supported by this platform at the time the call is made.
+                                  The platform should describe this runtime service as unsupported at runtime
+                                  via an EFI_RT_PROPERTIES_TABLE configuration table.
 
 **/
 EFI_STATUS
@@ -149,7 +157,9 @@ EfiGetWakeupTime (
                                   If Enable is FALSE, then the wakeup alarm was disabled.
   @retval  EFI_INVALID_PARAMETER  A time field is out of range.
   @retval  EFI_DEVICE_ERROR       The wakeup time could not be set due to a hardware error.
-  @retval  EFI_UNSUPPORTED        A wakeup timer is not supported on this platform.
+  @retval  EFI_UNSUPPORTED        This call is not supported by this platform at the time the call is made.
+                                  The platform should describe this runtime service as unsupported at runtime
+                                  via an EFI_RT_PROPERTIES_TABLE configuration table.
 
 **/
 EFI_STATUS
@@ -188,6 +198,10 @@ EfiSetWakeupTime (
   @retval  EFI_INVALID_PARAMETER  The DataSize is not too small and Data is NULL.
   @retval  EFI_DEVICE_ERROR       The variable could not be retrieved due to a hardware error.
   @retval  EFI_SECURITY_VIOLATION The variable could not be retrieved due to an authentication failure.
+  @retval  EFI_UNSUPPORTED        After ExitBootServices() has been called, this return code may be returned
+                                  if no variable storage is supported. The platform should describe this
+                                  runtime service as unsupported at runtime via an EFI_RT_PROPERTIES_TABLE
+                                  configuration table.
 **/
 EFI_STATUS
 EFIAPI
@@ -227,6 +241,10 @@ EfiGetVariable (
   @retval  EFI_INVALID_PARAMETER VariableName is NULL.
   @retval  EFI_INVALID_PARAMETER VendorGuid is NULL.
   @retval  EFI_DEVICE_ERROR      The variable name could not be retrieved due to a hardware error.
+  @retval  EFI_UNSUPPORTED       After ExitBootServices() has been called, this return code may be returned
+                                 if no variable storage is supported. The platform should describe this
+                                 runtime service as unsupported at runtime via an EFI_RT_PROPERTIES_TABLE
+                                 configuration table.
 
 **/
 EFI_STATUS
@@ -264,6 +282,9 @@ EfiGetNextVariableName (
                                   set but the AuthInfo does NOT pass the validation check carried
                                   out by the firmware.
   @retval  EFI_NOT_FOUND          The variable trying to be updated or deleted was not found.
+  @retval  EFI_UNSUPPORTED        This call is not supported by this platform at the time the call is made.
+                                  The platform should describe this runtime service as unsupported at runtime
+                                  via an EFI_RT_PROPERTIES_TABLE configuration table.
 
 **/
 EFI_STATUS
@@ -290,6 +311,10 @@ EfiSetVariable (
   @retval  EFI_SUCCESS           The next high monotonic count was returned.
   @retval  EFI_DEVICE_ERROR      The device is not functioning properly.
   @retval  EFI_INVALID_PARAMETER HighCount is NULL.
+  @retval  EFI_UNSUPPORTED       This call is not supported by this platform at the time the call is made.
+                                 The platform should describe this runtime service as unsupported at runtime
+                                 via an EFI_RT_PROPERTIES_TABLE configuration table.
+
 
 **/
 EFI_STATUS
@@ -350,7 +375,11 @@ EfiResetSystem (
   @retval  EFI_NOT_FOUND          The pointer pointed to by Address was not found to be part of
                                   the current memory map. This is normally fatal.
   @retval  EFI_INVALID_PARAMETER  Address is NULL.
-  @retval  EFI_INVALID_PARAMETER  *Address is NULL and DebugDispositio
+  @retval  EFI_INVALID_PARAMETER  *Address is NULL and DebugDisposition does
+                                  not have the EFI_OPTIONAL_PTR bit set.
+  @retval  EFI_UNSUPPORTED        This call is not supported by this platform at the time the call is made.
+                                  The platform should describe this runtime service as unsupported at runtime
+                                  via an EFI_RT_PROPERTIES_TABLE configuration table.
 
 **/
 EFI_STATUS
@@ -414,6 +443,9 @@ EfiConvertFunctionPointer (
                                 map that requires a mapping.
   @retval EFI_NOT_FOUND         A virtual address was supplied for an address that is not found
                                 in the memory map.
+  @retval EFI_UNSUPPORTED       This call is not supported by this platform at the time the call is made.
+                                The platform should describe this runtime service as unsupported at runtime
+                                via an EFI_RT_PROPERTIES_TABLE configuration table.
 **/
 EFI_STATUS
 EFIAPI
@@ -478,6 +510,9 @@ EfiConvertList (
   @retval EFI_DEVICE_ERROR      The capsule update was started, but failed due to a device error.
   @retval EFI_UNSUPPORTED       The capsule type is not supported on this platform.
   @retval EFI_OUT_OF_RESOURCES  There were insufficient resources to process the capsule.
+  @retval EFI_UNSUPPORTED       This call is not supported by this platform at the time the call is made.
+                                The platform should describe this runtime service as unsupported at runtime
+                                via an EFI_RT_PROPERTIES_TABLE configuration table.
 
 **/
 EFI_STATUS
@@ -520,6 +555,9 @@ EfiUpdateCapsule (
   @retval EFI_UNSUPPORTED       The capsule type is not supported on this platform, and
                                 MaximumCapsuleSize and ResetType are undefined.
   @retval EFI_OUT_OF_RESOURCES  There were insufficient resources to process the query request.
+  @retval EFI_UNSUPPORTED       This call is not supported by this platform at the time the call is made.
+                                The platform should describe this runtime service as unsupported at runtime
+                                via an EFI_RT_PROPERTIES_TABLE configuration table.
 
 **/
 EFI_STATUS
diff --git a/MdePkg/Include/Uefi/UefiSpec.h b/MdePkg/Include/Uefi/UefiSpec.h
index ad80afbe3499..7fcdeab93e83 100644
--- a/MdePkg/Include/Uefi/UefiSpec.h
+++ b/MdePkg/Include/Uefi/UefiSpec.h
@@ -320,6 +320,9 @@ EFI_STATUS
                                 map that requires a mapping.
   @retval EFI_NOT_FOUND         A virtual address was supplied for an address that is not found
                                 in the memory map.
+  @retval EFI_UNSUPPORTED       This call is not supported by this platform at the time the call is made.
+                                The platform should describe this runtime service as unsupported at runtime
+                                via an EFI_RT_PROPERTIES_TABLE configuration table.
 
 **/
 typedef
@@ -410,11 +413,14 @@ EFI_STATUS
                                      for the new virtual address mappings being applied.
 
   @retval EFI_SUCCESS           The pointer pointed to by Address was modified.
-  @retval EFI_INVALID_PARAMETER 1) Address is NULL.
-                                2) *Address is NULL and DebugDisposition does
-                                not have the EFI_OPTIONAL_PTR bit set.
   @retval EFI_NOT_FOUND         The pointer pointed to by Address was not found to be part
                                 of the current memory map. This is normally fatal.
+  @retval EFI_INVALID_PARAMETER Address is NULL.
+  @retval EFI_INVALID_PARAMETER *Address is NULL and DebugDisposition does
+                                not have the EFI_OPTIONAL_PTR bit set.
+  @retval EFI_UNSUPPORTED       This call is not supported by this platform at the time the call is made.
+                                The platform should describe this runtime service as unsupported at runtime
+                                via an EFI_RT_PROPERTIES_TABLE configuration table.
 
 **/
 typedef
@@ -679,6 +685,10 @@ VOID
   @retval EFI_INVALID_PARAMETER  The DataSize is not too small and Data is NULL.
   @retval EFI_DEVICE_ERROR       The variable could not be retrieved due to a hardware error.
   @retval EFI_SECURITY_VIOLATION The variable could not be retrieved due to an authentication failure.
+  @retval EFI_UNSUPPORTED        After ExitBootServices() has been called, this return code may be returned
+                                 if no variable storage is supported. The platform should describe this
+                                 runtime service as unsupported at runtime via an EFI_RT_PROPERTIES_TABLE
+                                 configuration table.
 
 **/
 typedef
@@ -715,6 +725,10 @@ EFI_STATUS
   @retval EFI_INVALID_PARAMETER Null-terminator is not found in the first VariableNameSize bytes of
                                 the input VariableName buffer.
   @retval EFI_DEVICE_ERROR      The variable could not be retrieved due to a hardware error.
+  @retval EFI_UNSUPPORTED       After ExitBootServices() has been called, this return code may be returned
+                                if no variable storage is supported. The platform should describe this
+                                runtime service as unsupported at runtime via an EFI_RT_PROPERTIES_TABLE
+                                configuration table.
 
 **/
 typedef
@@ -757,6 +771,9 @@ EFI_STATUS
                                  but the AuthInfo does NOT pass the validation check carried out by the firmware.
 
   @retval EFI_NOT_FOUND          The variable trying to be updated or deleted was not found.
+  @retval EFI_UNSUPPORTED        This call is not supported by this platform at the time the call is made.
+                                 The platform should describe this runtime service as unsupported at runtime
+                                 via an EFI_RT_PROPERTIES_TABLE configuration table.
 
 **/
 typedef
@@ -809,6 +826,9 @@ typedef struct {
   @retval EFI_SUCCESS           The operation completed successfully.
   @retval EFI_INVALID_PARAMETER Time is NULL.
   @retval EFI_DEVICE_ERROR      The time could not be retrieved due to hardware error.
+  @retval EFI_UNSUPPORTED       This call is not supported by this platform at the time the call is made.
+                                The platform should describe this runtime service as unsupported at runtime
+                                via an EFI_RT_PROPERTIES_TABLE configuration table.
 
 **/
 typedef
@@ -826,6 +846,9 @@ EFI_STATUS
   @retval EFI_SUCCESS           The operation completed successfully.
   @retval EFI_INVALID_PARAMETER A time field is out of range.
   @retval EFI_DEVICE_ERROR      The time could not be set due due to hardware error.
+  @retval EFI_UNSUPPORTED       This call is not supported by this platform at the time the call is made.
+                                The platform should describe this runtime service as unsupported at runtime
+                                via an EFI_RT_PROPERTIES_TABLE configuration table.
 
 **/
 typedef
@@ -846,7 +869,9 @@ EFI_STATUS
   @retval EFI_INVALID_PARAMETER Pending is NULL.
   @retval EFI_INVALID_PARAMETER Time is NULL.
   @retval EFI_DEVICE_ERROR      The wakeup time could not be retrieved due to a hardware error.
-  @retval EFI_UNSUPPORTED       A wakeup timer is not supported on this platform.
+  @retval EFI_UNSUPPORTED       This call is not supported by this platform at the time the call is made.
+                                The platform should describe this runtime service as unsupported at runtime
+                                via an EFI_RT_PROPERTIES_TABLE configuration table.
 
 **/
 typedef
@@ -868,7 +893,9 @@ EFI_STATUS
                                 Enable is FALSE, then the wakeup alarm was disabled.
   @retval EFI_INVALID_PARAMETER A time field is out of range.
   @retval EFI_DEVICE_ERROR      The wakeup time could not be set due to a hardware error.
-  @retval EFI_UNSUPPORTED       A wakeup timer is not supported on this platform.
+  @retval EFI_UNSUPPORTED       This call is not supported by this platform at the time the call is made.
+                                The platform should describe this runtime service as unsupported at runtime
+                                via an EFI_RT_PROPERTIES_TABLE configuration table.
 
 **/
 typedef
@@ -1090,6 +1117,9 @@ EFI_STATUS
   @retval EFI_SUCCESS           The next high monotonic count was returned.
   @retval EFI_INVALID_PARAMETER HighCount is NULL.
   @retval EFI_DEVICE_ERROR      The device is not functioning properly.
+  @retval EFI_UNSUPPORTED       This call is not supported by this platform at the time the call is made.
+                                The platform should describe this runtime service as unsupported at runtime
+                                via an EFI_RT_PROPERTIES_TABLE configuration table.
 
 **/
 typedef
@@ -1716,6 +1746,9 @@ typedef struct {
                                 in runtime. The caller may resubmit the capsule prior to ExitBootServices().
   @retval EFI_OUT_OF_RESOURCES  When ExitBootServices() has not been previously called then this error indicates
                                 the capsule is compatible with this platform but there are insufficient resources to process.
+  @retval EFI_UNSUPPORTED       This call is not supported by this platform at the time the call is made.
+                                The platform should describe this runtime service as unsupported at runtime
+                                via an EFI_RT_PROPERTIES_TABLE configuration table.
 
 **/
 typedef
@@ -1747,6 +1780,9 @@ EFI_STATUS
                                 in runtime. The caller may resubmit the capsule prior to ExitBootServices().
   @retval EFI_OUT_OF_RESOURCES  When ExitBootServices() has not been previously called then this error indicates
                                 the capsule is compatible with this platform but there are insufficient resources to process.
+  @retval EFI_UNSUPPORTED       This call is not supported by this platform at the time the call is made.
+                                The platform should describe this runtime service as unsupported at runtime
+                                via an EFI_RT_PROPERTIES_TABLE configuration table.
 
 **/
 typedef
diff --git a/MdePkg/Library/UefiRuntimeLib/RuntimeLib.c b/MdePkg/Library/UefiRuntimeLib/RuntimeLib.c
index ffc4cf4d2af3..2563f6e0606d 100644
--- a/MdePkg/Library/UefiRuntimeLib/RuntimeLib.c
+++ b/MdePkg/Library/UefiRuntimeLib/RuntimeLib.c
@@ -252,6 +252,9 @@ EfiResetSystem (
   @retval  EFI_SUCCESS            The operation completed successfully.
   @retval  EFI_INVALID_PARAMETER  Time is NULL.
   @retval  EFI_DEVICE_ERROR       The time could not be retrieved due to a hardware error.
+  @retval  EFI_UNSUPPORTED        This call is not supported by this platform at the time the call is made.
+                                  The platform should describe this runtime service as unsupported at runtime
+                                  via an EFI_RT_PROPERTIES_TABLE configuration table.
 
 **/
 EFI_STATUS
@@ -284,6 +287,9 @@ EfiGetTime (
   @retval  EFI_SUCCESS            The operation completed successfully.
   @retval  EFI_INVALID_PARAMETER  A time field is out of range.
   @retval  EFI_DEVICE_ERROR       The time could not be set due to a hardware error.
+  @retval  EFI_UNSUPPORTED        This call is not supported by this platform at the time the call is made.
+                                  The platform should describe this runtime service as unsupported at runtime
+                                  via an EFI_RT_PROPERTIES_TABLE configuration table.
 
 **/
 EFI_STATUS
@@ -313,7 +319,9 @@ EfiSetTime (
   @retval  EFI_INVALID_PARAMETER  Pending is NULL.
   @retval  EFI_INVALID_PARAMETER  Time is NULL.
   @retval  EFI_DEVICE_ERROR       The wakeup time could not be retrieved due to a hardware error.
-  @retval  EFI_UNSUPPORTED        A wakeup timer is not supported on this platform.
+  @retval  EFI_UNSUPPORTED        This call is not supported by this platform at the time the call is made.
+                                  The platform should describe this runtime service as unsupported at runtime
+                                  via an EFI_RT_PROPERTIES_TABLE configuration table.
 
 **/
 EFI_STATUS
@@ -346,7 +354,9 @@ EfiGetWakeupTime (
                                   If Enable is FALSE, then the wakeup alarm was disabled.
   @retval  EFI_INVALID_PARAMETER  A time field is out of range.
   @retval  EFI_DEVICE_ERROR       The wakeup time could not be set due to a hardware error.
-  @retval  EFI_UNSUPPORTED        A wakeup timer is not supported on this platform.
+  @retval  EFI_UNSUPPORTED        This call is not supported by this platform at the time the call is made.
+                                  The platform should describe this runtime service as unsupported at runtime
+                                  via an EFI_RT_PROPERTIES_TABLE configuration table.
 
 **/
 EFI_STATUS
@@ -388,6 +398,10 @@ EfiSetWakeupTime (
   @retval  EFI_INVALID_PARAMETER  The DataSize is not too small and Data is NULL.
   @retval  EFI_DEVICE_ERROR       The variable could not be retrieved due to a hardware error.
   @retval  EFI_SECURITY_VIOLATION The variable could not be retrieved due to an authentication failure.
+  @retval  EFI_UNSUPPORTED        After ExitBootServices() has been called, this return code may be returned
+                                  if no variable storage is supported. The platform should describe this
+                                  runtime service as unsupported at runtime via an EFI_RT_PROPERTIES_TABLE
+                                  configuration table.
 **/
 EFI_STATUS
 EFIAPI
@@ -430,6 +444,10 @@ EfiGetVariable (
   @retval  EFI_INVALID_PARAMETER VariableName is NULL.
   @retval  EFI_INVALID_PARAMETER VendorGuid is NULL.
   @retval  EFI_DEVICE_ERROR      The variable name could not be retrieved due to a hardware error.
+  @retval  EFI_UNSUPPORTED       After ExitBootServices() has been called, this return code may be returned
+                                 if no variable storage is supported. The platform should describe this
+                                 runtime service as unsupported at runtime via an EFI_RT_PROPERTIES_TABLE
+                                 configuration table.
 
 **/
 EFI_STATUS
@@ -470,6 +488,9 @@ EfiGetNextVariableName (
                                   set but the AuthInfo does NOT pass the validation check carried
                                   out by the firmware.
   @retval  EFI_NOT_FOUND          The variable trying to be updated or deleted was not found.
+  @retval  EFI_UNSUPPORTED        This call is not supported by this platform at the time the call is made.
+                                  The platform should describe this runtime service as unsupported at runtime
+                                  via an EFI_RT_PROPERTIES_TABLE configuration table.
 
 **/
 EFI_STATUS
@@ -499,6 +520,9 @@ EfiSetVariable (
   @retval  EFI_SUCCESS           The next high monotonic count was returned.
   @retval  EFI_DEVICE_ERROR      The device is not functioning properly.
   @retval  EFI_INVALID_PARAMETER HighCount is NULL.
+  @retval  EFI_UNSUPPORTED       This call is not supported by this platform at the time the call is made.
+                                 The platform should describe this runtime service as unsupported at runtime
+                                 via an EFI_RT_PROPERTIES_TABLE configuration table.
 
 **/
 EFI_STATUS
@@ -525,7 +549,11 @@ EfiGetNextHighMonotonicCount (
   @retval  EFI_NOT_FOUND          The pointer pointed to by Address was not found to be part of
                                   the current memory map. This is normally fatal.
   @retval  EFI_INVALID_PARAMETER  Address is NULL.
-  @retval  EFI_INVALID_PARAMETER  *Address is NULL and DebugDispositio
+  @retval  EFI_INVALID_PARAMETER  *Address is NULL and DebugDisposition does
+                                  not have the EFI_OPTIONAL_PTR bit set.
+  @retval  EFI_UNSUPPORTED        This call is not supported by this platform at the time the call is made.
+                                  The platform should describe this runtime service as unsupported at runtime
+                                  via an EFI_RT_PROPERTIES_TABLE configuration table.
 
 **/
 EFI_STATUS
@@ -649,6 +677,9 @@ EfiConvertList (
                                 map that requires a mapping.
   @retval EFI_NOT_FOUND         A virtual address was supplied for an address that is not found
                                 in the memory map.
+  @retval EFI_UNSUPPORTED       This call is not supported by this platform at the time the call is made.
+                                The platform should describe this runtime service as unsupported at runtime
+                                via an EFI_RT_PROPERTIES_TABLE configuration table.
 **/
 EFI_STATUS
 EFIAPI
@@ -699,6 +730,9 @@ EfiSetVirtualAddressMap (
   @retval EFI_DEVICE_ERROR      The capsule update was started, but failed due to a device error.
   @retval EFI_UNSUPPORTED       The capsule type is not supported on this platform.
   @retval EFI_OUT_OF_RESOURCES  There were insufficient resources to process the capsule.
+  @retval EFI_UNSUPPORTED       This call is not supported by this platform at the time the call is made.
+                                The platform should describe this runtime service as unsupported at runtime
+                                via an EFI_RT_PROPERTIES_TABLE configuration table.
 
 **/
 EFI_STATUS
@@ -748,6 +782,9 @@ EfiUpdateCapsule (
   @retval EFI_UNSUPPORTED       The capsule type is not supported on this platform, and
                                 MaximumCapsuleSize and ResetType are undefined.
   @retval EFI_OUT_OF_RESOURCES  There were insufficient resources to process the query request.
+  @retval EFI_UNSUPPORTED       This call is not supported by this platform at the time the call is made.
+                                The platform should describe this runtime service as unsupported at runtime
+                                via an EFI_RT_PROPERTIES_TABLE configuration table.
 
 **/
 EFI_STATUS
-- 
2.26.2.windows.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#114658): https://edk2.groups.io/g/devel/message/114658
Mute This Topic: https://groups.io/mt/104024795/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-



^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [edk2-devel] [PATCH V2 2/5] MdeModulePkg: Update some Runtime Service functions header
  2024-01-29  2:29 [edk2-devel] [PATCH V2 0/5] Add EFI_UNSUPPORTED return for some Runtime Service functions Ren, Suqiang
  2024-01-29  2:29 ` [edk2-devel] [PATCH V2 1/5] MdePkg: " Ren, Suqiang
@ 2024-01-29  2:29 ` Ren, Suqiang
  2024-01-29  2:29 ` [edk2-devel] [PATCH V2 3/5] EmbeddedPkg: " Ren, Suqiang
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 15+ messages in thread
From: Ren, Suqiang @ 2024-01-29  2:29 UTC (permalink / raw)
  To: devel; +Cc: Liming Gao, Michael D Kinney

Update some Runtime Service functions header to align with UEFI spec 2.10.

REF: UEFI spec 2.10 section 8 Services — Runtime Services

Signed-off-by: Suqiang Ren <suqiangx.ren@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
---
 MdeModulePkg/Core/RuntimeDxe/Runtime.c        | 10 +-
 MdeModulePkg/Core/RuntimeDxe/Runtime.h        | 10 +-
 .../CapsuleRuntimeDxe/CapsuleService.c        | 13 +++
 .../MonotonicCounter.c                        |  3 +
 .../Universal/Variable/RuntimeDxe/Variable.c  | 40 ++++++--
 .../Universal/Variable/RuntimeDxe/Variable.h  | 40 ++++++--
 .../RuntimeDxe/VariableSmmRuntimeDxe.c        | 99 +++++++++++++++----
 7 files changed, 174 insertions(+), 41 deletions(-)

diff --git a/MdeModulePkg/Core/RuntimeDxe/Runtime.c b/MdeModulePkg/Core/RuntimeDxe/Runtime.c
index de8f2bfce0f8..c66ed71e35e1 100644
--- a/MdeModulePkg/Core/RuntimeDxe/Runtime.c
+++ b/MdeModulePkg/Core/RuntimeDxe/Runtime.c
@@ -117,7 +117,12 @@ RuntimeDriverCalculateEfiHdrCrc (
   @retval  EFI_SUCCESS              The pointer pointed to by Address was modified.
   @retval  EFI_NOT_FOUND            The pointer pointed to by Address was not found to be part
                                     of the current memory map. This is normally fatal.
-  @retval  EFI_INVALID_PARAMETER    One of the parameters has an invalid value.
+  @retval  EFI_INVALID_PARAMETER    1) Address is NULL.
+                                    2) *Address is NULL and DebugDisposition does
+                                    not have the EFI_OPTIONAL_PTR bit set.
+  @retval  EFI_UNSUPPORTED          This call is not supported by this platform at the time the call is made.
+                                    The platform should describe this runtime service as unsupported at runtime
+                                    via an EFI_RT_PROPERTIES_TABLE configuration table.
 
 **/
 EFI_STATUS
@@ -227,6 +232,9 @@ RuntimeDriverConvertInternalPointer (
                                   map that requires a mapping.
   @retval  EFI_NOT_FOUND          A virtual address was supplied for an address that is not found
                                   in the memory map.
+  @retval  EFI_UNSUPPORTED        This call is not supported by this platform at the time the call is made.
+                                  The platform should describe this runtime service as unsupported at runtime
+                                  via an EFI_RT_PROPERTIES_TABLE configuration table.
 
 **/
 EFI_STATUS
diff --git a/MdeModulePkg/Core/RuntimeDxe/Runtime.h b/MdeModulePkg/Core/RuntimeDxe/Runtime.h
index cc422e783f65..1e28b98d78e8 100644
--- a/MdeModulePkg/Core/RuntimeDxe/Runtime.h
+++ b/MdeModulePkg/Core/RuntimeDxe/Runtime.h
@@ -59,7 +59,12 @@ RuntimeDriverCalculateCrc32 (
   @retval  EFI_SUCCESS              The pointer pointed to by Address was modified.
   @retval  EFI_NOT_FOUND            The pointer pointed to by Address was not found to be part
                                     of the current memory map. This is normally fatal.
-  @retval  EFI_INVALID_PARAMETER    One of the parameters has an invalid value.
+  @retval  EFI_INVALID_PARAMETER    1) Address is NULL.
+                                    2) *Address is NULL and DebugDisposition does
+                                    not have the EFI_OPTIONAL_PTR bit set.
+  @retval  EFI_UNSUPPORTED          This call is not supported by this platform at the time the call is made.
+                                    The platform should describe this runtime service as unsupported at runtime
+                                    via an EFI_RT_PROPERTIES_TABLE configuration table.
 
 **/
 EFI_STATUS
@@ -86,6 +91,9 @@ RuntimeDriverConvertPointer (
                                   map that requires a mapping.
   @retval  EFI_NOT_FOUND          A virtual address was supplied for an address that is not found
                                   in the memory map.
+  @retval  EFI_UNSUPPORTED        This call is not supported by this platform at the time the call is made.
+                                  The platform should describe this runtime service as unsupported at runtime
+                                  via an EFI_RT_PROPERTIES_TABLE configuration table.
 
 **/
 EFI_STATUS
diff --git a/MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleService.c b/MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleService.c
index 50968a839e84..f8047c23e17c 100644
--- a/MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleService.c
+++ b/MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleService.c
@@ -53,6 +53,9 @@ UINT32  mMaxSizeNonPopulateCapsule = 0;
                                 in runtime. The caller may resubmit the capsule prior to ExitBootServices().
   @retval EFI_OUT_OF_RESOURCES  When ExitBootServices() has not been previously called then this error indicates
                                 the capsule is compatible with this platform but there are insufficient resources to process.
+  @retval EFI_UNSUPPORTED       This call is not supported by this platform at the time the call is made.
+                                The platform should describe this runtime service as unsupported at runtime
+                                via an EFI_RT_PROPERTIES_TABLE configuration table.
 
 **/
 EFI_STATUS
@@ -247,6 +250,16 @@ UpdateCapsule (
                                 MaximumCapsuleSize and ResetType are undefined.
   @retval EFI_INVALID_PARAMETER MaximumCapsuleSize is NULL, or ResetTyep is NULL,
                                 Or CapsuleCount is Zero, or CapsuleImage is not valid.
+  @retval EFI_OUT_OF_RESOURCES  When ExitBootServices() has been previously called this error indicates
+                                the capsule is compatible with this platform but is not capable of
+                                being submitted or processed in runtime.
+                                The caller may resubmit the capsule prior to ExitBootServices().
+  @retval EFI_OUT_OF_RESOURCES  When ExitBootServices() has not been previously called then this error
+                                indicates the capsule is compatible with this platform but there are
+                                insufficient resources to process.
+  @retval EFI_UNSUPPORTED       This call is not supported by this platform at the time the call is made.
+                                The platform should describe this runtime service as unsupported at runtime
+                                via an EFI_RT_PROPERTIES_TABLE configuration table.
 
 **/
 EFI_STATUS
diff --git a/MdeModulePkg/Universal/MonotonicCounterRuntimeDxe/MonotonicCounter.c b/MdeModulePkg/Universal/MonotonicCounterRuntimeDxe/MonotonicCounter.c
index 60b6e9350b7f..3e74713cc5be 100644
--- a/MdeModulePkg/Universal/MonotonicCounterRuntimeDxe/MonotonicCounter.c
+++ b/MdeModulePkg/Universal/MonotonicCounterRuntimeDxe/MonotonicCounter.c
@@ -125,6 +125,9 @@ MonotonicCounterDriverGetNextMonotonicCount (
   @retval EFI_DEVICE_ERROR      The variable could not be saved due to a hardware failure.
   @retval EFI_OUT_OF_RESOURCES  If variable service reports that not enough storage
                                 is available to hold the variable and its data.
+  @retval EFI_UNSUPPORTED       This call is not supported by this platform at the time the call is made.
+                                The platform should describe this runtime service as unsupported at runtime
+                                via an EFI_RT_PROPERTIES_TABLE configuration table.
 
 **/
 EFI_STATUS
diff --git a/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c b/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c
index 3c360481f482..d394d237a53f 100644
--- a/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c
+++ b/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c
@@ -2385,10 +2385,19 @@ Done:
   @param Data                       The buffer to return the contents of the variable. May be NULL
                                     with a zero DataSize in order to determine the size buffer needed.
 
-  @return EFI_INVALID_PARAMETER     Invalid parameter.
-  @return EFI_SUCCESS               Find the specified variable.
-  @return EFI_NOT_FOUND             Not found.
-  @return EFI_BUFFER_TO_SMALL       DataSize is too small for the result.
+  @retval EFI_SUCCESS               The function completed successfully.
+  @retval EFI_NOT_FOUND             The variable was not found.
+  @retval EFI_BUFFER_TOO_SMALL      The DataSize is too small for the result.
+  @retval EFI_INVALID_PARAMETER     VariableName is NULL.
+  @retval EFI_INVALID_PARAMETER     VendorGuid is NULL.
+  @retval EFI_INVALID_PARAMETER     DataSize is NULL.
+  @retval EFI_INVALID_PARAMETER     The DataSize is not too small and Data is NULL.
+  @retval EFI_DEVICE_ERROR          The variable could not be retrieved due to a hardware error.
+  @retval EFI_SECURITY_VIOLATION    The variable could not be retrieved due to an authentication failure.
+  @retval EFI_UNSUPPORTED           After ExitBootServices() has been called, this return code may be returned
+                                    if no variable storage is supported. The platform should describe this
+                                    runtime service as unsupported at runtime via an EFI_RT_PROPERTIES_TABLE
+                                    configuration table.
 
 **/
 EFI_STATUS
@@ -2479,6 +2488,11 @@ Done:
                                     GUID of an existing variable.
   @retval EFI_INVALID_PARAMETER     Null-terminator is not found in the first VariableNameSize bytes of
                                     the input VariableName buffer.
+  @retval EFI_DEVICE_ERROR          The variable could not be retrieved due to a hardware error.
+  @retval EFI_UNSUPPORTED           After ExitBootServices() has been called, this return code may be returned
+                                    if no variable storage is supported. The platform should describe this
+                                    runtime service as unsupported at runtime via an EFI_RT_PROPERTIES_TABLE
+                                    configuration table.
 
 **/
 EFI_STATUS
@@ -2576,11 +2590,19 @@ VariableServiceGetNextVariableName (
                                           data, this value contains the required size.
   @param Data                             Data pointer.
 
-  @return EFI_INVALID_PARAMETER           Invalid parameter.
-  @return EFI_SUCCESS                     Set successfully.
-  @return EFI_OUT_OF_RESOURCES            Resource not enough to set variable.
-  @return EFI_NOT_FOUND                   Not found.
-  @return EFI_WRITE_PROTECTED             Variable is read-only.
+  @retval EFI_SUCCESS                     The function completed successfully.
+  @retval EFI_NOT_FOUND                   The variable was not found.
+  @retval EFI_BUFFER_TOO_SMALL            The DataSize is too small for the result.
+  @retval EFI_INVALID_PARAMETER           VariableName is NULL.
+  @retval EFI_INVALID_PARAMETER           VendorGuid is NULL.
+  @retval EFI_INVALID_PARAMETER           DataSize is NULL.
+  @retval EFI_INVALID_PARAMETER           The DataSize is not too small and Data is NULL.
+  @retval EFI_DEVICE_ERROR                The variable could not be retrieved due to a hardware error.
+  @retval EFI_SECURITY_VIOLATION          The variable could not be retrieved due to an authentication failure.
+  @retval EFI_UNSUPPORTED                 After ExitBootServices() has been called, this return code may be returned
+                                          if no variable storage is supported. The platform should describe this
+                                          runtime service as unsupported at runtime via an EFI_RT_PROPERTIES_TABLE
+                                          configuration table.
 
 **/
 EFI_STATUS
diff --git a/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.h b/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.h
index a668abb82b15..033c0625afb8 100644
--- a/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.h
+++ b/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.h
@@ -446,10 +446,19 @@ GetFvbInfoByAddress (
   @param Data                       The buffer to return the contents of the variable. May be NULL
                                     with a zero DataSize in order to determine the size buffer needed.
 
-  @return EFI_INVALID_PARAMETER     Invalid parameter.
-  @return EFI_SUCCESS               Find the specified variable.
-  @return EFI_NOT_FOUND             Not found.
-  @return EFI_BUFFER_TO_SMALL       DataSize is too small for the result.
+  @retval EFI_SUCCESS            The function completed successfully.
+  @retval EFI_NOT_FOUND          The variable was not found.
+  @retval EFI_BUFFER_TOO_SMALL   The DataSize is too small for the result.
+  @retval EFI_INVALID_PARAMETER  VariableName is NULL.
+  @retval EFI_INVALID_PARAMETER  VendorGuid is NULL.
+  @retval EFI_INVALID_PARAMETER  DataSize is NULL.
+  @retval EFI_INVALID_PARAMETER  The DataSize is not too small and Data is NULL.
+  @retval EFI_DEVICE_ERROR       The variable could not be retrieved due to a hardware error.
+  @retval EFI_SECURITY_VIOLATION The variable could not be retrieved due to an authentication failure.
+  @retval EFI_UNSUPPORTED        After ExitBootServices() has been called, this return code may be returned
+                                 if no variable storage is supported. The platform should describe this
+                                 runtime service as unsupported at runtime via an EFI_RT_PROPERTIES_TABLE
+                                 configuration table.
 
 **/
 EFI_STATUS
@@ -485,6 +494,11 @@ VariableServiceGetVariable (
                                     GUID of an existing variable.
   @retval EFI_INVALID_PARAMETER     Null-terminator is not found in the first VariableNameSize bytes of
                                     the input VariableName buffer.
+  @retval EFI_DEVICE_ERROR          The variable could not be retrieved due to a hardware error.
+  @retval EFI_UNSUPPORTED           After ExitBootServices() has been called, this return code may be returned
+                                    if no variable storage is supported. The platform should describe this
+                                    runtime service as unsupported at runtime via an EFI_RT_PROPERTIES_TABLE
+                                    configuration table.
 
 **/
 EFI_STATUS
@@ -513,11 +527,19 @@ VariableServiceGetNextVariableName (
                                           data, this value contains the required size.
   @param Data                             Data pointer.
 
-  @return EFI_INVALID_PARAMETER           Invalid parameter.
-  @return EFI_SUCCESS                     Set successfully.
-  @return EFI_OUT_OF_RESOURCES            Resource not enough to set variable.
-  @return EFI_NOT_FOUND                   Not found.
-  @return EFI_WRITE_PROTECTED             Variable is read-only.
+  @retval EFI_SUCCESS                     The function completed successfully.
+  @retval EFI_NOT_FOUND                   The variable was not found.
+  @retval EFI_BUFFER_TOO_SMALL            The DataSize is too small for the result.
+  @retval EFI_INVALID_PARAMETER           VariableName is NULL.
+  @retval EFI_INVALID_PARAMETER           VendorGuid is NULL.
+  @retval EFI_INVALID_PARAMETER           DataSize is NULL.
+  @retval EFI_INVALID_PARAMETER           The DataSize is not too small and Data is NULL.
+  @retval EFI_DEVICE_ERROR                The variable could not be retrieved due to a hardware error.
+  @retval EFI_SECURITY_VIOLATION          The variable could not be retrieved due to an authentication failure.
+  @retval EFI_UNSUPPORTED                 After ExitBootServices() has been called, this return code may be returned
+                                          if no variable storage is supported. The platform should describe this
+                                          runtime service as unsupported at runtime via an EFI_RT_PROPERTIES_TABLE
+                                          configuration table.
 
 **/
 EFI_STATUS
diff --git a/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmmRuntimeDxe.c b/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmmRuntimeDxe.c
index 4aaeb5ba8806..6930875e9fe0 100644
--- a/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmmRuntimeDxe.c
+++ b/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmmRuntimeDxe.c
@@ -831,10 +831,19 @@ Done:
                                      data, this value contains the required size.
   @param[out]     Data               Data pointer.
 
-  @retval EFI_INVALID_PARAMETER      Invalid parameter.
-  @retval EFI_SUCCESS                Find the specified variable.
-  @retval EFI_NOT_FOUND              Not found.
-  @retval EFI_BUFFER_TO_SMALL        DataSize is too small for the result.
+  @retval EFI_SUCCESS                The function completed successfully.
+  @retval EFI_NOT_FOUND              The variable was not found.
+  @retval EFI_BUFFER_TOO_SMALL       The DataSize is too small for the result.
+  @retval EFI_INVALID_PARAMETER      VariableName is NULL.
+  @retval EFI_INVALID_PARAMETER      VendorGuid is NULL.
+  @retval EFI_INVALID_PARAMETER      DataSize is NULL.
+  @retval EFI_INVALID_PARAMETER      The DataSize is not too small and Data is NULL.
+  @retval EFI_DEVICE_ERROR           The variable could not be retrieved due to a hardware error.
+  @retval EFI_SECURITY_VIOLATION     The variable could not be retrieved due to an authentication failure.
+  @retval EFI_UNSUPPORTED            After ExitBootServices() has been called, this return code may be returned
+                                     if no variable storage is supported. The platform should describe this
+                                     runtime service as unsupported at runtime via an EFI_RT_PROPERTIES_TABLE
+                                     configuration table.
 
 **/
 EFI_STATUS
@@ -876,10 +885,22 @@ RuntimeServiceGetVariable (
   @param[in, out] VariableName       Pointer to variable name.
   @param[in, out] VendorGuid         Variable Vendor Guid.
 
-  @retval EFI_INVALID_PARAMETER      Invalid parameter.
-  @retval EFI_SUCCESS                Find the specified variable.
-  @retval EFI_NOT_FOUND              Not found.
-  @retval EFI_BUFFER_TO_SMALL        DataSize is too small for the result.
+  @retval EFI_SUCCESS                The function completed successfully.
+  @retval EFI_NOT_FOUND              The next variable was not found.
+  @retval EFI_BUFFER_TOO_SMALL       The VariableNameSize is too small for the result.
+                                     VariableNameSize has been updated with the size needed to complete the request.
+  @retval EFI_INVALID_PARAMETER      VariableNameSize is NULL.
+  @retval EFI_INVALID_PARAMETER      VariableName is NULL.
+  @retval EFI_INVALID_PARAMETER      VendorGuid is NULL.
+  @retval EFI_INVALID_PARAMETER      The input values of VariableName and VendorGuid are not a name and
+                                     GUID of an existing variable.
+  @retval EFI_INVALID_PARAMETER      Null-terminator is not found in the first VariableNameSize bytes of
+                                     the input VariableName buffer.
+  @retval EFI_DEVICE_ERROR           The variable could not be retrieved due to a hardware error.
+  @retval EFI_UNSUPPORTED            After ExitBootServices() has been called, this return code may be returned
+                                     if no variable storage is supported. The platform should describe this
+                                     runtime service as unsupported at runtime via an EFI_RT_PROPERTIES_TABLE
+                                     configuration table.
 
 **/
 EFI_STATUS
@@ -951,10 +972,22 @@ GetNextVariableNameInRuntimeCache (
   @param[in, out] VariableName       Pointer to variable name.
   @param[in, out] VendorGuid         Variable Vendor Guid.
 
-  @retval EFI_INVALID_PARAMETER      Invalid parameter.
-  @retval EFI_SUCCESS                Find the specified variable.
-  @retval EFI_NOT_FOUND              Not found.
-  @retval EFI_BUFFER_TO_SMALL        DataSize is too small for the result.
+  @retval EFI_SUCCESS                The function completed successfully.
+  @retval EFI_NOT_FOUND              The next variable was not found.
+  @retval EFI_BUFFER_TOO_SMALL       The VariableNameSize is too small for the result.
+                                     VariableNameSize has been updated with the size needed to complete the request.
+  @retval EFI_INVALID_PARAMETER      VariableNameSize is NULL.
+  @retval EFI_INVALID_PARAMETER      VariableName is NULL.
+  @retval EFI_INVALID_PARAMETER      VendorGuid is NULL.
+  @retval EFI_INVALID_PARAMETER      The input values of VariableName and VendorGuid are not a name and
+                                     GUID of an existing variable.
+  @retval EFI_INVALID_PARAMETER      Null-terminator is not found in the first VariableNameSize bytes of
+                                     the input VariableName buffer.
+  @retval EFI_DEVICE_ERROR           The variable could not be retrieved due to a hardware error.
+  @retval EFI_UNSUPPORTED            After ExitBootServices() has been called, this return code may be returned
+                                     if no variable storage is supported. The platform should describe this
+                                     runtime service as unsupported at runtime via an EFI_RT_PROPERTIES_TABLE
+                                     configuration table.
 
 **/
 EFI_STATUS
@@ -1052,10 +1085,22 @@ Done:
   @param[in, out] VariableName       Pointer to variable name.
   @param[in, out] VendorGuid         Variable Vendor Guid.
 
-  @retval EFI_INVALID_PARAMETER      Invalid parameter.
-  @retval EFI_SUCCESS                Find the specified variable.
-  @retval EFI_NOT_FOUND              Not found.
-  @retval EFI_BUFFER_TO_SMALL        DataSize is too small for the result.
+  @retval EFI_SUCCESS                The function completed successfully.
+  @retval EFI_NOT_FOUND              The next variable was not found.
+  @retval EFI_BUFFER_TOO_SMALL       The VariableNameSize is too small for the result.
+                                     VariableNameSize has been updated with the size needed to complete the request.
+  @retval EFI_INVALID_PARAMETER      VariableNameSize is NULL.
+  @retval EFI_INVALID_PARAMETER      VariableName is NULL.
+  @retval EFI_INVALID_PARAMETER      VendorGuid is NULL.
+  @retval EFI_INVALID_PARAMETER      The input values of VariableName and VendorGuid are not a name and
+                                     GUID of an existing variable.
+  @retval EFI_INVALID_PARAMETER      Null-terminator is not found in the first VariableNameSize bytes of
+                                     the input VariableName buffer.
+  @retval EFI_DEVICE_ERROR           The variable could not be retrieved due to a hardware error.
+  @retval EFI_UNSUPPORTED            After ExitBootServices() has been called, this return code may be returned
+                                     if no variable storage is supported. The platform should describe this
+                                     runtime service as unsupported at runtime via an EFI_RT_PROPERTIES_TABLE
+                                     configuration table.
 
 **/
 EFI_STATUS
@@ -1112,11 +1157,23 @@ RuntimeServiceGetNextVariableName (
                                           data, this value contains the required size.
   @param[in] Data                         Data pointer.
 
-  @retval EFI_INVALID_PARAMETER           Invalid parameter.
-  @retval EFI_SUCCESS                     Set successfully.
-  @retval EFI_OUT_OF_RESOURCES            Resource not enough to set variable.
-  @retval EFI_NOT_FOUND                   Not found.
-  @retval EFI_WRITE_PROTECTED             Variable is read-only.
+  @retval EFI_SUCCESS                     The firmware has successfully stored the variable and its data as
+                                          defined by the Attributes.
+  @retval EFI_INVALID_PARAMETER           An invalid combination of attribute bits, name, and GUID was supplied, or the
+                                          DataSize exceeds the maximum allowed.
+  @retval EFI_INVALID_PARAMETER           VariableName is an empty string.
+  @retval EFI_OUT_OF_RESOURCES            Not enough storage is available to hold the variable and its data.
+  @retval EFI_DEVICE_ERROR                The variable could not be retrieved due to a hardware error.
+  @retval EFI_WRITE_PROTECTED             The variable in question is read-only.
+  @retval EFI_WRITE_PROTECTED             The variable in question cannot be deleted.
+  @retval EFI_SECURITY_VIOLATION          The variable could not be written due to
+                                          EFI_VARIABLE_TIME_BASED_AUTHENTICATED_WRITE_ACESS being set,
+                                          but the AuthInfo does NOT pass the validation check carried out by the firmware.
+
+  @retval EFI_NOT_FOUND                   The variable trying to be updated or deleted was not found.
+  @retval EFI_UNSUPPORTED                 This call is not supported by this platform at the time the call is made.
+                                          The platform should describe this runtime service as unsupported at runtime
+                                          via an EFI_RT_PROPERTIES_TABLE configuration table.
 
 **/
 EFI_STATUS
-- 
2.26.2.windows.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#114659): https://edk2.groups.io/g/devel/message/114659
Mute This Topic: https://groups.io/mt/104024797/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-



^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [edk2-devel] [PATCH V2 3/5] EmbeddedPkg: Update some Runtime Service functions header
  2024-01-29  2:29 [edk2-devel] [PATCH V2 0/5] Add EFI_UNSUPPORTED return for some Runtime Service functions Ren, Suqiang
  2024-01-29  2:29 ` [edk2-devel] [PATCH V2 1/5] MdePkg: " Ren, Suqiang
  2024-01-29  2:29 ` [edk2-devel] [PATCH V2 2/5] MdeModulePkg: Update some Runtime Service functions header Ren, Suqiang
@ 2024-01-29  2:29 ` Ren, Suqiang
  2024-01-29  2:46   ` Chang, Abner via groups.io
  2024-01-29  2:29 ` [edk2-devel] [PATCH V2 4/5] ArmPlatformPkg: " Ren, Suqiang
                   ` (4 subsequent siblings)
  7 siblings, 1 reply; 15+ messages in thread
From: Ren, Suqiang @ 2024-01-29  2:29 UTC (permalink / raw)
  To: devel; +Cc: Leif Lindholm, Ard Biesheuvel, Abner Chang

Update some Runtime Service functions header to align with UEFI spec 2.10.

REF: UEFI spec 2.10 section 8 Services — Runtime Services

Signed-off-by: Suqiang Ren <suqiangx.ren@intel.com>
Cc: Leif Lindholm <quic_llindhol@quicinc.com>
Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
Cc: Abner Chang <abner.chang@amd.com>
---
 .../Include/Library/RealTimeClockLib.h        | 21 ++++++++++++++++---
 .../RealTimeClockRuntimeDxe/RealTimeClock.c   | 13 +++++++++++-
 2 files changed, 30 insertions(+), 4 deletions(-)

diff --git a/EmbeddedPkg/Include/Library/RealTimeClockLib.h b/EmbeddedPkg/Include/Library/RealTimeClockLib.h
index b2ff3f233bea..6c034513f51c 100644
--- a/EmbeddedPkg/Include/Library/RealTimeClockLib.h
+++ b/EmbeddedPkg/Include/Library/RealTimeClockLib.h
@@ -23,6 +23,9 @@
   @retval EFI_SUCCESS           The operation completed successfully.
   @retval EFI_INVALID_PARAMETER Time is NULL.
   @retval EFI_DEVICE_ERROR      The time could not be retrieved due to hardware error.
+  @retval EFI_UNSUPPORTED       This call is not supported by this platform at the time the call is made.
+                                The platform should describe this runtime service as unsupported at runtime
+                                via an EFI_RT_PROPERTIES_TABLE configuration table.
 
 **/
 EFI_STATUS
@@ -40,6 +43,9 @@ LibGetTime (
   @retval EFI_SUCCESS           The operation completed successfully.
   @retval EFI_INVALID_PARAMETER A time field is out of range.
   @retval EFI_DEVICE_ERROR      The time could not be set due to hardware error.
+  @retval EFI_UNSUPPORTED       This call is not supported by this platform at the time the call is made.
+                                The platform should describe this runtime service as unsupported at runtime
+                                via an EFI_RT_PROPERTIES_TABLE configuration table.
 
 **/
 EFI_STATUS
@@ -56,8 +62,13 @@ LibSetTime (
   @param  Time                  The current alarm setting.
 
   @retval EFI_SUCCESS           The alarm settings were returned.
-  @retval EFI_INVALID_PARAMETER Any parameter is NULL.
+  @retval EFI_INVALID_PARAMETER Enabled is NULL.
+  @retval EFI_INVALID_PARAMETER Pending is NULL.
+  @retval EFI_INVALID_PARAMETER Time is NULL.
   @retval EFI_DEVICE_ERROR      The wakeup time could not be retrieved due to a hardware error.
+  @retval EFI_UNSUPPORTED       This call is not supported by this platform at the time the call is made.
+                                The platform should describe this runtime service as unsupported at runtime
+                                via an EFI_RT_PROPERTIES_TABLE configuration table.
 
 **/
 EFI_STATUS
@@ -76,9 +87,13 @@ LibGetWakeupTime (
 
   @retval EFI_SUCCESS           If Enable is TRUE, then the wakeup alarm was enabled. If
                                 Enable is FALSE, then the wakeup alarm was disabled.
-  @retval EFI_INVALID_PARAMETER A time field is out of range.
+  @retval EFI_INVALID_PARAMETER Enabled is NULL.
+  @retval EFI_INVALID_PARAMETER Pending is NULL.
+  @retval EFI_INVALID_PARAMETER Time is NULL.
   @retval EFI_DEVICE_ERROR      The wakeup time could not be set due to a hardware error.
-  @retval EFI_UNSUPPORTED       A wakeup timer is not supported on this platform.
+  @retval EFI_UNSUPPORTED       This call is not supported by this platform at the time the call is made.
+                                The platform should describe this runtime service as unsupported at runtime
+                                via an EFI_RT_PROPERTIES_TABLE configuration table.
 
 **/
 EFI_STATUS
diff --git a/EmbeddedPkg/RealTimeClockRuntimeDxe/RealTimeClock.c b/EmbeddedPkg/RealTimeClockRuntimeDxe/RealTimeClock.c
index 17dde432c4eb..0b2e4d1fcc38 100644
--- a/EmbeddedPkg/RealTimeClockRuntimeDxe/RealTimeClock.c
+++ b/EmbeddedPkg/RealTimeClockRuntimeDxe/RealTimeClock.c
@@ -44,6 +44,9 @@ STATIC NON_VOLATILE_TIME_SETTINGS  mTimeSettings;
   @retval EFI_SUCCESS           The operation completed successfully.
   @retval EFI_INVALID_PARAMETER Time is NULL.
   @retval EFI_DEVICE_ERROR      The time could not be retrieved due to hardware error.
+  @retval EFI_UNSUPPORTED       This call is not supported by this platform at the time the call is made.
+                                The platform should describe this runtime service as unsupported at runtime
+                                via an EFI_RT_PROPERTIES_TABLE configuration table.
 
 **/
 EFI_STATUS
@@ -75,6 +78,9 @@ GetTime (
   @retval EFI_SUCCESS           The operation completed successfully.
   @retval EFI_INVALID_PARAMETER A time field is out of range.
   @retval EFI_DEVICE_ERROR      The time could not be set due to hardware error.
+  @retval EFI_UNSUPPORTED       This call is not supported by this platform at the time the call is made.
+                                The platform should describe this runtime service as unsupported at runtime
+                                via an EFI_RT_PROPERTIES_TABLE configuration table.
 
 **/
 EFI_STATUS
@@ -132,6 +138,9 @@ SetTime (
   @retval EFI_SUCCESS           The alarm settings were returned.
   @retval EFI_INVALID_PARAMETER Any parameter is NULL.
   @retval EFI_DEVICE_ERROR      The wakeup time could not be retrieved due to a hardware error.
+  @retval EFI_UNSUPPORTED       This call is not supported by this platform at the time the call is made.
+                                The platform should describe this runtime service as unsupported at runtime
+                                via an EFI_RT_PROPERTIES_TABLE configuration table.
 
 **/
 EFI_STATUS
@@ -166,7 +175,9 @@ GetWakeupTime (
                                 Enable is FALSE, then the wakeup alarm was disabled.
   @retval EFI_INVALID_PARAMETER A time field is out of range.
   @retval EFI_DEVICE_ERROR      The wakeup time could not be set due to a hardware error.
-  @retval EFI_UNSUPPORTED       A wakeup timer is not supported on this platform.
+  @retval EFI_UNSUPPORTED       This call is not supported by this platform at the time the call is made.
+                                The platform should describe this runtime service as unsupported at runtime
+                                via an EFI_RT_PROPERTIES_TABLE configuration table.
 
 **/
 EFI_STATUS
-- 
2.26.2.windows.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#114660): https://edk2.groups.io/g/devel/message/114660
Mute This Topic: https://groups.io/mt/104024798/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-



^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [edk2-devel] [PATCH V2 4/5] ArmPlatformPkg: Update some Runtime Service functions header
  2024-01-29  2:29 [edk2-devel] [PATCH V2 0/5] Add EFI_UNSUPPORTED return for some Runtime Service functions Ren, Suqiang
                   ` (2 preceding siblings ...)
  2024-01-29  2:29 ` [edk2-devel] [PATCH V2 3/5] EmbeddedPkg: " Ren, Suqiang
@ 2024-01-29  2:29 ` Ren, Suqiang
  2024-01-29  2:29 ` [edk2-devel] [PATCH V2 5/5] OvmfPkg: " Ren, Suqiang
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 15+ messages in thread
From: Ren, Suqiang @ 2024-01-29  2:29 UTC (permalink / raw)
  To: devel; +Cc: Leif Lindholm, Ard Biesheuvel

Update some Runtime Service functions header to align with UEFI spec 2.10.

REF: UEFI spec 2.10 section 8 Services — Runtime Services

Signed-off-by: Suqiang Ren <suqiangx.ren@intel.com>
Cc: Leif Lindholm <quic_llindhol@quicinc.com>
Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
---
 .../PL031RealTimeClockLib.c                   | 22 +++++++++++++++----
 1 file changed, 18 insertions(+), 4 deletions(-)

diff --git a/ArmPlatformPkg/Library/PL031RealTimeClockLib/PL031RealTimeClockLib.c b/ArmPlatformPkg/Library/PL031RealTimeClockLib/PL031RealTimeClockLib.c
index 1896f9d16d3b..6ab3e9948335 100644
--- a/ArmPlatformPkg/Library/PL031RealTimeClockLib/PL031RealTimeClockLib.c
+++ b/ArmPlatformPkg/Library/PL031RealTimeClockLib/PL031RealTimeClockLib.c
@@ -111,7 +111,9 @@ EXIT:
   @retval EFI_SUCCESS            The operation completed successfully.
   @retval EFI_INVALID_PARAMETER  Time is NULL.
   @retval EFI_DEVICE_ERROR       The time could not be retrieved due to hardware error.
-  @retval EFI_SECURITY_VIOLATION The time could not be retrieved due to an authentication failure.
+  @retval EFI_UNSUPPORTED        This call is not supported by this platform at the time the call is made.
+                                 The platform should describe this runtime service as unsupported at runtime
+                                 via an EFI_RT_PROPERTIES_TABLE configuration table.
 
 **/
 EFI_STATUS
@@ -172,6 +174,9 @@ LibGetTime (
   @retval EFI_SUCCESS           The operation completed successfully.
   @retval EFI_INVALID_PARAMETER A time field is out of range.
   @retval EFI_DEVICE_ERROR      The time could not be set due to hardware error.
+  @retval EFI_UNSUPPORTED       This call is not supported by this platform at the time the call is made.
+                                The platform should describe this runtime service as unsupported at runtime
+                                via an EFI_RT_PROPERTIES_TABLE configuration table.
 
 **/
 EFI_STATUS
@@ -224,8 +229,13 @@ LibSetTime (
   @param  Time                  The current alarm setting.
 
   @retval EFI_SUCCESS           The alarm settings were returned.
-  @retval EFI_INVALID_PARAMETER Any parameter is NULL.
+  @retval EFI_INVALID_PARAMETER Enabled is NULL.
+  @retval EFI_INVALID_PARAMETER Pending is NULL.
+  @retval EFI_INVALID_PARAMETER Time is NULL.
   @retval EFI_DEVICE_ERROR      The wakeup time could not be retrieved due to a hardware error.
+  @retval EFI_UNSUPPORTED       This call is not supported by this platform at the time the call is made.
+                                The platform should describe this runtime service as unsupported at runtime
+                                via an EFI_RT_PROPERTIES_TABLE configuration table.
 
 **/
 EFI_STATUS
@@ -248,9 +258,13 @@ LibGetWakeupTime (
 
   @retval EFI_SUCCESS           If Enable is TRUE, then the wakeup alarm was enabled. If
                                 Enable is FALSE, then the wakeup alarm was disabled.
-  @retval EFI_INVALID_PARAMETER A time field is out of range.
+  @retval EFI_INVALID_PARAMETER Enabled is NULL.
+  @retval EFI_INVALID_PARAMETER Pending is NULL.
+  @retval EFI_INVALID_PARAMETER Time is NULL.
   @retval EFI_DEVICE_ERROR      The wakeup time could not be set due to a hardware error.
-  @retval EFI_UNSUPPORTED       A wakeup timer is not supported on this platform.
+  @retval EFI_UNSUPPORTED       This call is not supported by this platform at the time the call is made.
+                                The platform should describe this runtime service as unsupported at runtime
+                                via an EFI_RT_PROPERTIES_TABLE configuration table.
 
 **/
 EFI_STATUS
-- 
2.26.2.windows.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#114661): https://edk2.groups.io/g/devel/message/114661
Mute This Topic: https://groups.io/mt/104024800/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-



^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [edk2-devel] [PATCH V2 5/5] OvmfPkg: Update some Runtime Service functions header
  2024-01-29  2:29 [edk2-devel] [PATCH V2 0/5] Add EFI_UNSUPPORTED return for some Runtime Service functions Ren, Suqiang
                   ` (3 preceding siblings ...)
  2024-01-29  2:29 ` [edk2-devel] [PATCH V2 4/5] ArmPlatformPkg: " Ren, Suqiang
@ 2024-01-29  2:29 ` Ren, Suqiang
  2024-01-29  2:39   ` Yao, Jiewen
  2024-01-30  1:36 ` 回复: [edk2-devel] [PATCH V2 0/5] Add EFI_UNSUPPORTED return for some Runtime Service functions gaoliming via groups.io
                   ` (2 subsequent siblings)
  7 siblings, 1 reply; 15+ messages in thread
From: Ren, Suqiang @ 2024-01-29  2:29 UTC (permalink / raw)
  To: devel; +Cc: Ard Biesheuvel, Jiewen Yao, Laszlo Ersek

Update some Runtime Service functions header to align with UEFI spec 2.10.

REF: UEFI spec 2.10 section 8 Services — Runtime Services

Signed-off-by: Suqiang Ren <suqiangx.ren@intel.com>
Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Laszlo Ersek <lersek@redhat.com>
---
 .../XenRealTimeClockLib/XenRealTimeClockLib.c | 22 +++++++++++++++----
 1 file changed, 18 insertions(+), 4 deletions(-)

diff --git a/OvmfPkg/Library/XenRealTimeClockLib/XenRealTimeClockLib.c b/OvmfPkg/Library/XenRealTimeClockLib/XenRealTimeClockLib.c
index 30c258313135..6d7f452a7550 100644
--- a/OvmfPkg/Library/XenRealTimeClockLib/XenRealTimeClockLib.c
+++ b/OvmfPkg/Library/XenRealTimeClockLib/XenRealTimeClockLib.c
@@ -80,6 +80,9 @@ EpochToEfiTime (
   @retval EFI_SUCCESS           The operation completed successfully.
   @retval EFI_INVALID_PARAMETER Time is NULL.
   @retval EFI_DEVICE_ERROR      The time could not be retrieved due to hardware error.
+  @retval EFI_UNSUPPORTED       This call is not supported by this platform at the time the call is made.
+                                The platform should describe this runtime service as unsupported at runtime
+                                via an EFI_RT_PROPERTIES_TABLE configuration table.
 
 **/
 EFI_STATUS
@@ -109,6 +112,9 @@ LibGetTime (
   @retval EFI_SUCCESS           The operation completed successfully.
   @retval EFI_INVALID_PARAMETER A time field is out of range.
   @retval EFI_DEVICE_ERROR      The time could not be set due to hardware error.
+  @retval EFI_UNSUPPORTED       This call is not supported by this platform at the time the call is made.
+                                The platform should describe this runtime service as unsupported at runtime
+                                via an EFI_RT_PROPERTIES_TABLE configuration table.
 
 **/
 EFI_STATUS
@@ -128,9 +134,13 @@ LibSetTime (
   @param  Time                  The current alarm setting.
 
   @retval EFI_SUCCESS           The alarm settings were returned.
-  @retval EFI_INVALID_PARAMETER Any parameter is NULL.
+  @retval EFI_INVALID_PARAMETER Enabled is NULL.
+  @retval EFI_INVALID_PARAMETER Pending is NULL.
+  @retval EFI_INVALID_PARAMETER Time is NULL.
   @retval EFI_DEVICE_ERROR      The wakeup time could not be retrieved due to a hardware error.
-  @retval EFI_UNSUPPORTED       A wakeup timer is not supported on this platform.
+  @retval EFI_UNSUPPORTED       This call is not supported by this platform at the time the call is made.
+                                The platform should describe this runtime service as unsupported at runtime
+                                via an EFI_RT_PROPERTIES_TABLE configuration table.
 
 **/
 EFI_STATUS
@@ -152,9 +162,13 @@ LibGetWakeupTime (
 
   @retval EFI_SUCCESS           If Enable is TRUE, then the wakeup alarm was enabled. If
                                 Enable is FALSE, then the wakeup alarm was disabled.
-  @retval EFI_INVALID_PARAMETER A time field is out of range.
+  @retval EFI_INVALID_PARAMETER Enabled is NULL.
+  @retval EFI_INVALID_PARAMETER Pending is NULL.
+  @retval EFI_INVALID_PARAMETER Time is NULL.
   @retval EFI_DEVICE_ERROR      The wakeup time could not be set due to a hardware error.
-  @retval EFI_UNSUPPORTED       A wakeup timer is not supported on this platform.
+  @retval EFI_UNSUPPORTED       This call is not supported by this platform at the time the call is made.
+                                The platform should describe this runtime service as unsupported at runtime
+                                via an EFI_RT_PROPERTIES_TABLE configuration table.
 
 **/
 EFI_STATUS
-- 
2.26.2.windows.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#114662): https://edk2.groups.io/g/devel/message/114662
Mute This Topic: https://groups.io/mt/104024801/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-



^ permalink raw reply related	[flat|nested] 15+ messages in thread

* Re: [edk2-devel] [PATCH V2 5/5] OvmfPkg: Update some Runtime Service functions header
  2024-01-29  2:29 ` [edk2-devel] [PATCH V2 5/5] OvmfPkg: " Ren, Suqiang
@ 2024-01-29  2:39   ` Yao, Jiewen
  0 siblings, 0 replies; 15+ messages in thread
From: Yao, Jiewen @ 2024-01-29  2:39 UTC (permalink / raw)
  To: Ren, SuqiangX, devel@edk2.groups.io; +Cc: Ard Biesheuvel, Laszlo Ersek

Reviewed-by: Jiewen Yao <Jiewen.yao@intel.com>

> -----Original Message-----
> From: Ren, SuqiangX <suqiangx.ren@intel.com>
> Sent: Monday, January 29, 2024 10:30 AM
> To: devel@edk2.groups.io
> Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>; Yao, Jiewen
> <jiewen.yao@intel.com>; Laszlo Ersek <lersek@redhat.com>
> Subject: [PATCH V2 5/5] OvmfPkg: Update some Runtime Service functions
> header
> 
> Update some Runtime Service functions header to align with UEFI spec 2.10.
> 
> REF: UEFI spec 2.10 section 8 Services - Runtime Services
> 
> Signed-off-by: Suqiang Ren <suqiangx.ren@intel.com>
> Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
> Cc: Jiewen Yao <jiewen.yao@intel.com>
> Cc: Laszlo Ersek <lersek@redhat.com>
> ---
>  .../XenRealTimeClockLib/XenRealTimeClockLib.c | 22 +++++++++++++++----
>  1 file changed, 18 insertions(+), 4 deletions(-)
> 
> diff --git a/OvmfPkg/Library/XenRealTimeClockLib/XenRealTimeClockLib.c
> b/OvmfPkg/Library/XenRealTimeClockLib/XenRealTimeClockLib.c
> index 30c258313135..6d7f452a7550 100644
> --- a/OvmfPkg/Library/XenRealTimeClockLib/XenRealTimeClockLib.c
> +++ b/OvmfPkg/Library/XenRealTimeClockLib/XenRealTimeClockLib.c
> @@ -80,6 +80,9 @@ EpochToEfiTime (
>    @retval EFI_SUCCESS           The operation completed successfully.
>    @retval EFI_INVALID_PARAMETER Time is NULL.
>    @retval EFI_DEVICE_ERROR      The time could not be retrieved due to
> hardware error.
> +  @retval EFI_UNSUPPORTED       This call is not supported by this platform at
> the time the call is made.
> +                                The platform should describe this runtime service as
> unsupported at runtime
> +                                via an EFI_RT_PROPERTIES_TABLE configuration table.
> 
>  **/
>  EFI_STATUS
> @@ -109,6 +112,9 @@ LibGetTime (
>    @retval EFI_SUCCESS           The operation completed successfully.
>    @retval EFI_INVALID_PARAMETER A time field is out of range.
>    @retval EFI_DEVICE_ERROR      The time could not be set due to hardware
> error.
> +  @retval EFI_UNSUPPORTED       This call is not supported by this platform at
> the time the call is made.
> +                                The platform should describe this runtime service as
> unsupported at runtime
> +                                via an EFI_RT_PROPERTIES_TABLE configuration table.
> 
>  **/
>  EFI_STATUS
> @@ -128,9 +134,13 @@ LibSetTime (
>    @param  Time                  The current alarm setting.
> 
>    @retval EFI_SUCCESS           The alarm settings were returned.
> -  @retval EFI_INVALID_PARAMETER Any parameter is NULL.
> +  @retval EFI_INVALID_PARAMETER Enabled is NULL.
> +  @retval EFI_INVALID_PARAMETER Pending is NULL.
> +  @retval EFI_INVALID_PARAMETER Time is NULL.
>    @retval EFI_DEVICE_ERROR      The wakeup time could not be retrieved due to
> a hardware error.
> -  @retval EFI_UNSUPPORTED       A wakeup timer is not supported on this
> platform.
> +  @retval EFI_UNSUPPORTED       This call is not supported by this platform at
> the time the call is made.
> +                                The platform should describe this runtime service as
> unsupported at runtime
> +                                via an EFI_RT_PROPERTIES_TABLE configuration table.
> 
>  **/
>  EFI_STATUS
> @@ -152,9 +162,13 @@ LibGetWakeupTime (
> 
>    @retval EFI_SUCCESS           If Enable is TRUE, then the wakeup alarm was
> enabled. If
>                                  Enable is FALSE, then the wakeup alarm was disabled.
> -  @retval EFI_INVALID_PARAMETER A time field is out of range.
> +  @retval EFI_INVALID_PARAMETER Enabled is NULL.
> +  @retval EFI_INVALID_PARAMETER Pending is NULL.
> +  @retval EFI_INVALID_PARAMETER Time is NULL.
>    @retval EFI_DEVICE_ERROR      The wakeup time could not be set due to a
> hardware error.
> -  @retval EFI_UNSUPPORTED       A wakeup timer is not supported on this
> platform.
> +  @retval EFI_UNSUPPORTED       This call is not supported by this platform at
> the time the call is made.
> +                                The platform should describe this runtime service as
> unsupported at runtime
> +                                via an EFI_RT_PROPERTIES_TABLE configuration table.
> 
>  **/
>  EFI_STATUS
> --
> 2.26.2.windows.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#114663): https://edk2.groups.io/g/devel/message/114663
Mute This Topic: https://groups.io/mt/104024801/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-



^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [edk2-devel] [PATCH V2 3/5] EmbeddedPkg: Update some Runtime Service functions header
  2024-01-29  2:29 ` [edk2-devel] [PATCH V2 3/5] EmbeddedPkg: " Ren, Suqiang
@ 2024-01-29  2:46   ` Chang, Abner via groups.io
  0 siblings, 0 replies; 15+ messages in thread
From: Chang, Abner via groups.io @ 2024-01-29  2:46 UTC (permalink / raw)
  To: Suqiang Ren, devel@edk2.groups.io; +Cc: Leif Lindholm, Ard Biesheuvel

[AMD Official Use Only - General]

Reviewed-by: Abner Chang <abner.chang@amd.com>

> -----Original Message-----
> From: Suqiang Ren <suqiangx.ren@intel.com>
> Sent: Monday, January 29, 2024 10:30 AM
> To: devel@edk2.groups.io
> Cc: Leif Lindholm <quic_llindhol@quicinc.com>; Ard Biesheuvel
> <ardb+tianocore@kernel.org>; Chang, Abner <Abner.Chang@amd.com>
> Subject: [PATCH V2 3/5] EmbeddedPkg: Update some Runtime Service
> functions header
>
> Caution: This message originated from an External Source. Use proper caution
> when opening attachments, clicking links, or responding.
>
>
> Update some Runtime Service functions header to align with UEFI spec 2.10.
>
> REF: UEFI spec 2.10 section 8 Services — Runtime Services
>
> Signed-off-by: Suqiang Ren <suqiangx.ren@intel.com>
> Cc: Leif Lindholm <quic_llindhol@quicinc.com>
> Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
> Cc: Abner Chang <abner.chang@amd.com>
> ---
>  .../Include/Library/RealTimeClockLib.h        | 21 ++++++++++++++++---
>  .../RealTimeClockRuntimeDxe/RealTimeClock.c   | 13 +++++++++++-
>  2 files changed, 30 insertions(+), 4 deletions(-)
>
> diff --git a/EmbeddedPkg/Include/Library/RealTimeClockLib.h
> b/EmbeddedPkg/Include/Library/RealTimeClockLib.h
> index b2ff3f233bea..6c034513f51c 100644
> --- a/EmbeddedPkg/Include/Library/RealTimeClockLib.h
> +++ b/EmbeddedPkg/Include/Library/RealTimeClockLib.h
> @@ -23,6 +23,9 @@
>    @retval EFI_SUCCESS           The operation completed successfully.
>    @retval EFI_INVALID_PARAMETER Time is NULL.
>    @retval EFI_DEVICE_ERROR      The time could not be retrieved due to
> hardware error.
> +  @retval EFI_UNSUPPORTED       This call is not supported by this platform at
> the time the call is made.
> +                                The platform should describe this runtime service as
> unsupported at runtime
> +                                via an EFI_RT_PROPERTIES_TABLE configuration table.
>
>  **/
>  EFI_STATUS
> @@ -40,6 +43,9 @@ LibGetTime (
>    @retval EFI_SUCCESS           The operation completed successfully.
>    @retval EFI_INVALID_PARAMETER A time field is out of range.
>    @retval EFI_DEVICE_ERROR      The time could not be set due to hardware
> error.
> +  @retval EFI_UNSUPPORTED       This call is not supported by this platform at
> the time the call is made.
> +                                The platform should describe this runtime service as
> unsupported at runtime
> +                                via an EFI_RT_PROPERTIES_TABLE configuration table.
>
>  **/
>  EFI_STATUS
> @@ -56,8 +62,13 @@ LibSetTime (
>    @param  Time                  The current alarm setting.
>
>    @retval EFI_SUCCESS           The alarm settings were returned.
> -  @retval EFI_INVALID_PARAMETER Any parameter is NULL.
> +  @retval EFI_INVALID_PARAMETER Enabled is NULL.
> +  @retval EFI_INVALID_PARAMETER Pending is NULL.
> +  @retval EFI_INVALID_PARAMETER Time is NULL.
>    @retval EFI_DEVICE_ERROR      The wakeup time could not be retrieved due
> to a hardware error.
> +  @retval EFI_UNSUPPORTED       This call is not supported by this platform at
> the time the call is made.
> +                                The platform should describe this runtime service as
> unsupported at runtime
> +                                via an EFI_RT_PROPERTIES_TABLE configuration table.
>
>  **/
>  EFI_STATUS
> @@ -76,9 +87,13 @@ LibGetWakeupTime (
>
>    @retval EFI_SUCCESS           If Enable is TRUE, then the wakeup alarm was
> enabled. If
>                                  Enable is FALSE, then the wakeup alarm was disabled.
> -  @retval EFI_INVALID_PARAMETER A time field is out of range.
> +  @retval EFI_INVALID_PARAMETER Enabled is NULL.
> +  @retval EFI_INVALID_PARAMETER Pending is NULL.
> +  @retval EFI_INVALID_PARAMETER Time is NULL.
>    @retval EFI_DEVICE_ERROR      The wakeup time could not be set due to a
> hardware error.
> -  @retval EFI_UNSUPPORTED       A wakeup timer is not supported on this
> platform.
> +  @retval EFI_UNSUPPORTED       This call is not supported by this platform at
> the time the call is made.
> +                                The platform should describe this runtime service as
> unsupported at runtime
> +                                via an EFI_RT_PROPERTIES_TABLE configuration table.
>
>  **/
>  EFI_STATUS
> diff --git a/EmbeddedPkg/RealTimeClockRuntimeDxe/RealTimeClock.c
> b/EmbeddedPkg/RealTimeClockRuntimeDxe/RealTimeClock.c
> index 17dde432c4eb..0b2e4d1fcc38 100644
> --- a/EmbeddedPkg/RealTimeClockRuntimeDxe/RealTimeClock.c
> +++ b/EmbeddedPkg/RealTimeClockRuntimeDxe/RealTimeClock.c
> @@ -44,6 +44,9 @@ STATIC NON_VOLATILE_TIME_SETTINGS
> mTimeSettings;
>    @retval EFI_SUCCESS           The operation completed successfully.
>    @retval EFI_INVALID_PARAMETER Time is NULL.
>    @retval EFI_DEVICE_ERROR      The time could not be retrieved due to
> hardware error.
> +  @retval EFI_UNSUPPORTED       This call is not supported by this platform at
> the time the call is made.
> +                                The platform should describe this runtime service as
> unsupported at runtime
> +                                via an EFI_RT_PROPERTIES_TABLE configuration table.
>
>  **/
>  EFI_STATUS
> @@ -75,6 +78,9 @@ GetTime (
>    @retval EFI_SUCCESS           The operation completed successfully.
>    @retval EFI_INVALID_PARAMETER A time field is out of range.
>    @retval EFI_DEVICE_ERROR      The time could not be set due to hardware
> error.
> +  @retval EFI_UNSUPPORTED       This call is not supported by this platform at
> the time the call is made.
> +                                The platform should describe this runtime service as
> unsupported at runtime
> +                                via an EFI_RT_PROPERTIES_TABLE configuration table.
>
>  **/
>  EFI_STATUS
> @@ -132,6 +138,9 @@ SetTime (
>    @retval EFI_SUCCESS           The alarm settings were returned.
>    @retval EFI_INVALID_PARAMETER Any parameter is NULL.
>    @retval EFI_DEVICE_ERROR      The wakeup time could not be retrieved due
> to a hardware error.
> +  @retval EFI_UNSUPPORTED       This call is not supported by this platform at
> the time the call is made.
> +                                The platform should describe this runtime service as
> unsupported at runtime
> +                                via an EFI_RT_PROPERTIES_TABLE configuration table.
>
>  **/
>  EFI_STATUS
> @@ -166,7 +175,9 @@ GetWakeupTime (
>                                  Enable is FALSE, then the wakeup alarm was disabled.
>    @retval EFI_INVALID_PARAMETER A time field is out of range.
>    @retval EFI_DEVICE_ERROR      The wakeup time could not be set due to a
> hardware error.
> -  @retval EFI_UNSUPPORTED       A wakeup timer is not supported on this
> platform.
> +  @retval EFI_UNSUPPORTED       This call is not supported by this platform at
> the time the call is made.
> +                                The platform should describe this runtime service as
> unsupported at runtime
> +                                via an EFI_RT_PROPERTIES_TABLE configuration table.
>
>  **/
>  EFI_STATUS
> --
> 2.26.2.windows.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#114666): https://edk2.groups.io/g/devel/message/114666
Mute This Topic: https://groups.io/mt/104024798/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-



^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [edk2-devel] [PATCH V2 1/5] MdePkg: Add EFI_UNSUPPORTED return for some Runtime Service functions
  2024-01-29  2:29 ` [edk2-devel] [PATCH V2 1/5] MdePkg: " Ren, Suqiang
@ 2024-01-29  3:48   ` Michael D Kinney
  0 siblings, 0 replies; 15+ messages in thread
From: Michael D Kinney @ 2024-01-29  3:48 UTC (permalink / raw)
  To: Ren, SuqiangX, devel@edk2.groups.io
  Cc: Liming Gao, Liu, Zhiguang, Kinney, Michael D

Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com>

> -----Original Message-----
> From: Ren, SuqiangX <suqiangx.ren@intel.com>
> Sent: Sunday, January 28, 2024 6:30 PM
> To: devel@edk2.groups.io
> Cc: Kinney, Michael D <michael.d.kinney@intel.com>; Liming Gao
> <gaoliming@byosoft.com.cn>; Liu, Zhiguang <zhiguang.liu@intel.com>
> Subject: [PATCH V2 1/5] MdePkg: Add EFI_UNSUPPORTED return for some
> Runtime Service functions
> 
> According to UEFI Spec 2.10 page 206, if any EFI_RUNTIME_SERVICES* calls
> are not supported for use by the OS at runtime, an
> EFI_RT_PROPERTIES_TABLE
> configuration table should be published describing which runtime
> services
> are supported at runtime. So need to add EFI_UNSUPPORTED return for some
> Runtime Service functions.
> 
> REF: UEFI spec 2.10 section 8 Services — Runtime Services
> 
> Signed-off-by: Suqiang Ren <suqiangx.ren@intel.com>
> Cc: Michael D Kinney <michael.d.kinney@intel.com>
> Cc: Liming Gao <gaoliming@byosoft.com.cn>
> Cc: Zhiguang Liu <zhiguang.liu@intel.com>
> ---
>  MdePkg/Include/Library/UefiRuntimeLib.h    | 44 +++++++++++++++++++--
>  MdePkg/Include/Uefi/UefiSpec.h             | 46 +++++++++++++++++++---
>  MdePkg/Library/UefiRuntimeLib/RuntimeLib.c | 43 ++++++++++++++++++--
>  3 files changed, 122 insertions(+), 11 deletions(-)
> 
> diff --git a/MdePkg/Include/Library/UefiRuntimeLib.h
> b/MdePkg/Include/Library/UefiRuntimeLib.h
> index 2b95b63f9f05..c5aca42aa1e9 100644
> --- a/MdePkg/Include/Library/UefiRuntimeLib.h
> +++ b/MdePkg/Include/Library/UefiRuntimeLib.h
> @@ -64,6 +64,9 @@ EfiGoneVirtual (
>    @retval  EFI_SUCCESS            The operation completed successfully.
>    @retval  EFI_INVALID_PARAMETER  Time is NULL.
>    @retval  EFI_DEVICE_ERROR       The time could not be retrieved due
> to a hardware error.
> +  @retval  EFI_UNSUPPORTED        This call is not supported by this
> platform at the time the call is made.
> +                                  The platform should describe this
> runtime service as unsupported at runtime
> +                                  via an EFI_RT_PROPERTIES_TABLE
> configuration table.
> 
>  **/
>  EFI_STATUS
> @@ -93,6 +96,9 @@ EfiGetTime (
>    @retval  EFI_SUCCESS            The operation completed successfully.
>    @retval  EFI_INVALID_PARAMETER  A time field is out of range.
>    @retval  EFI_DEVICE_ERROR       The time could not be set due to a
> hardware error.
> +  @retval  EFI_UNSUPPORTED        This call is not supported by this
> platform at the time the call is made.
> +                                  The platform should describe this
> runtime service as unsupported at runtime
> +                                  via an EFI_RT_PROPERTIES_TABLE
> configuration table.
> 
>  **/
>  EFI_STATUS
> @@ -119,7 +125,9 @@ EfiSetTime (
>    @retval  EFI_INVALID_PARAMETER  Pending is NULL.
>    @retval  EFI_INVALID_PARAMETER  Time is NULL.
>    @retval  EFI_DEVICE_ERROR       The wakeup time could not be
> retrieved due to a hardware error.
> -  @retval  EFI_UNSUPPORTED        A wakeup timer is not supported on
> this platform.
> +  @retval  EFI_UNSUPPORTED        This call is not supported by this
> platform at the time the call is made.
> +                                  The platform should describe this
> runtime service as unsupported at runtime
> +                                  via an EFI_RT_PROPERTIES_TABLE
> configuration table.
> 
>  **/
>  EFI_STATUS
> @@ -149,7 +157,9 @@ EfiGetWakeupTime (
>                                    If Enable is FALSE, then the wakeup
> alarm was disabled.
>    @retval  EFI_INVALID_PARAMETER  A time field is out of range.
>    @retval  EFI_DEVICE_ERROR       The wakeup time could not be set due
> to a hardware error.
> -  @retval  EFI_UNSUPPORTED        A wakeup timer is not supported on
> this platform.
> +  @retval  EFI_UNSUPPORTED        This call is not supported by this
> platform at the time the call is made.
> +                                  The platform should describe this
> runtime service as unsupported at runtime
> +                                  via an EFI_RT_PROPERTIES_TABLE
> configuration table.
> 
>  **/
>  EFI_STATUS
> @@ -188,6 +198,10 @@ EfiSetWakeupTime (
>    @retval  EFI_INVALID_PARAMETER  The DataSize is not too small and
> Data is NULL.
>    @retval  EFI_DEVICE_ERROR       The variable could not be retrieved
> due to a hardware error.
>    @retval  EFI_SECURITY_VIOLATION The variable could not be retrieved
> due to an authentication failure.
> +  @retval  EFI_UNSUPPORTED        After ExitBootServices() has been
> called, this return code may be returned
> +                                  if no variable storage is supported.
> The platform should describe this
> +                                  runtime service as unsupported at
> runtime via an EFI_RT_PROPERTIES_TABLE
> +                                  configuration table.
>  **/
>  EFI_STATUS
>  EFIAPI
> @@ -227,6 +241,10 @@ EfiGetVariable (
>    @retval  EFI_INVALID_PARAMETER VariableName is NULL.
>    @retval  EFI_INVALID_PARAMETER VendorGuid is NULL.
>    @retval  EFI_DEVICE_ERROR      The variable name could not be
> retrieved due to a hardware error.
> +  @retval  EFI_UNSUPPORTED       After ExitBootServices() has been
> called, this return code may be returned
> +                                 if no variable storage is supported.
> The platform should describe this
> +                                 runtime service as unsupported at
> runtime via an EFI_RT_PROPERTIES_TABLE
> +                                 configuration table.
> 
>  **/
>  EFI_STATUS
> @@ -264,6 +282,9 @@ EfiGetNextVariableName (
>                                    set but the AuthInfo does NOT pass
> the validation check carried
>                                    out by the firmware.
>    @retval  EFI_NOT_FOUND          The variable trying to be updated or
> deleted was not found.
> +  @retval  EFI_UNSUPPORTED        This call is not supported by this
> platform at the time the call is made.
> +                                  The platform should describe this
> runtime service as unsupported at runtime
> +                                  via an EFI_RT_PROPERTIES_TABLE
> configuration table.
> 
>  **/
>  EFI_STATUS
> @@ -290,6 +311,10 @@ EfiSetVariable (
>    @retval  EFI_SUCCESS           The next high monotonic count was
> returned.
>    @retval  EFI_DEVICE_ERROR      The device is not functioning
> properly.
>    @retval  EFI_INVALID_PARAMETER HighCount is NULL.
> +  @retval  EFI_UNSUPPORTED       This call is not supported by this
> platform at the time the call is made.
> +                                 The platform should describe this
> runtime service as unsupported at runtime
> +                                 via an EFI_RT_PROPERTIES_TABLE
> configuration table.
> +
> 
>  **/
>  EFI_STATUS
> @@ -350,7 +375,11 @@ EfiResetSystem (
>    @retval  EFI_NOT_FOUND          The pointer pointed to by Address was
> not found to be part of
>                                    the current memory map. This is
> normally fatal.
>    @retval  EFI_INVALID_PARAMETER  Address is NULL.
> -  @retval  EFI_INVALID_PARAMETER  *Address is NULL and DebugDispositio
> +  @retval  EFI_INVALID_PARAMETER  *Address is NULL and DebugDisposition
> does
> +                                  not have the EFI_OPTIONAL_PTR bit
> set.
> +  @retval  EFI_UNSUPPORTED        This call is not supported by this
> platform at the time the call is made.
> +                                  The platform should describe this
> runtime service as unsupported at runtime
> +                                  via an EFI_RT_PROPERTIES_TABLE
> configuration table.
> 
>  **/
>  EFI_STATUS
> @@ -414,6 +443,9 @@ EfiConvertFunctionPointer (
>                                  map that requires a mapping.
>    @retval EFI_NOT_FOUND         A virtual address was supplied for an
> address that is not found
>                                  in the memory map.
> +  @retval EFI_UNSUPPORTED       This call is not supported by this
> platform at the time the call is made.
> +                                The platform should describe this
> runtime service as unsupported at runtime
> +                                via an EFI_RT_PROPERTIES_TABLE
> configuration table.
>  **/
>  EFI_STATUS
>  EFIAPI
> @@ -478,6 +510,9 @@ EfiConvertList (
>    @retval EFI_DEVICE_ERROR      The capsule update was started, but
> failed due to a device error.
>    @retval EFI_UNSUPPORTED       The capsule type is not supported on
> this platform.
>    @retval EFI_OUT_OF_RESOURCES  There were insufficient resources to
> process the capsule.
> +  @retval EFI_UNSUPPORTED       This call is not supported by this
> platform at the time the call is made.
> +                                The platform should describe this
> runtime service as unsupported at runtime
> +                                via an EFI_RT_PROPERTIES_TABLE
> configuration table.
> 
>  **/
>  EFI_STATUS
> @@ -520,6 +555,9 @@ EfiUpdateCapsule (
>    @retval EFI_UNSUPPORTED       The capsule type is not supported on
> this platform, and
>                                  MaximumCapsuleSize and ResetType are
> undefined.
>    @retval EFI_OUT_OF_RESOURCES  There were insufficient resources to
> process the query request.
> +  @retval EFI_UNSUPPORTED       This call is not supported by this
> platform at the time the call is made.
> +                                The platform should describe this
> runtime service as unsupported at runtime
> +                                via an EFI_RT_PROPERTIES_TABLE
> configuration table.
> 
>  **/
>  EFI_STATUS
> diff --git a/MdePkg/Include/Uefi/UefiSpec.h
> b/MdePkg/Include/Uefi/UefiSpec.h
> index ad80afbe3499..7fcdeab93e83 100644
> --- a/MdePkg/Include/Uefi/UefiSpec.h
> +++ b/MdePkg/Include/Uefi/UefiSpec.h
> @@ -320,6 +320,9 @@ EFI_STATUS
>                                  map that requires a mapping.
>    @retval EFI_NOT_FOUND         A virtual address was supplied for an
> address that is not found
>                                  in the memory map.
> +  @retval EFI_UNSUPPORTED       This call is not supported by this
> platform at the time the call is made.
> +                                The platform should describe this
> runtime service as unsupported at runtime
> +                                via an EFI_RT_PROPERTIES_TABLE
> configuration table.
> 
>  **/
>  typedef
> @@ -410,11 +413,14 @@ EFI_STATUS
>                                       for the new virtual address
> mappings being applied.
> 
>    @retval EFI_SUCCESS           The pointer pointed to by Address was
> modified.
> -  @retval EFI_INVALID_PARAMETER 1) Address is NULL.
> -                                2) *Address is NULL and
> DebugDisposition does
> -                                not have the EFI_OPTIONAL_PTR bit set.
>    @retval EFI_NOT_FOUND         The pointer pointed to by Address was
> not found to be part
>                                  of the current memory map. This is
> normally fatal.
> +  @retval EFI_INVALID_PARAMETER Address is NULL.
> +  @retval EFI_INVALID_PARAMETER *Address is NULL and DebugDisposition
> does
> +                                not have the EFI_OPTIONAL_PTR bit set.
> +  @retval EFI_UNSUPPORTED       This call is not supported by this
> platform at the time the call is made.
> +                                The platform should describe this
> runtime service as unsupported at runtime
> +                                via an EFI_RT_PROPERTIES_TABLE
> configuration table.
> 
>  **/
>  typedef
> @@ -679,6 +685,10 @@ VOID
>    @retval EFI_INVALID_PARAMETER  The DataSize is not too small and Data
> is NULL.
>    @retval EFI_DEVICE_ERROR       The variable could not be retrieved
> due to a hardware error.
>    @retval EFI_SECURITY_VIOLATION The variable could not be retrieved
> due to an authentication failure.
> +  @retval EFI_UNSUPPORTED        After ExitBootServices() has been
> called, this return code may be returned
> +                                 if no variable storage is supported.
> The platform should describe this
> +                                 runtime service as unsupported at
> runtime via an EFI_RT_PROPERTIES_TABLE
> +                                 configuration table.
> 
>  **/
>  typedef
> @@ -715,6 +725,10 @@ EFI_STATUS
>    @retval EFI_INVALID_PARAMETER Null-terminator is not found in the
> first VariableNameSize bytes of
>                                  the input VariableName buffer.
>    @retval EFI_DEVICE_ERROR      The variable could not be retrieved due
> to a hardware error.
> +  @retval EFI_UNSUPPORTED       After ExitBootServices() has been
> called, this return code may be returned
> +                                if no variable storage is supported.
> The platform should describe this
> +                                runtime service as unsupported at
> runtime via an EFI_RT_PROPERTIES_TABLE
> +                                configuration table.
> 
>  **/
>  typedef
> @@ -757,6 +771,9 @@ EFI_STATUS
>                                   but the AuthInfo does NOT pass the
> validation check carried out by the firmware.
> 
>    @retval EFI_NOT_FOUND          The variable trying to be updated or
> deleted was not found.
> +  @retval EFI_UNSUPPORTED        This call is not supported by this
> platform at the time the call is made.
> +                                 The platform should describe this
> runtime service as unsupported at runtime
> +                                 via an EFI_RT_PROPERTIES_TABLE
> configuration table.
> 
>  **/
>  typedef
> @@ -809,6 +826,9 @@ typedef struct {
>    @retval EFI_SUCCESS           The operation completed successfully.
>    @retval EFI_INVALID_PARAMETER Time is NULL.
>    @retval EFI_DEVICE_ERROR      The time could not be retrieved due to
> hardware error.
> +  @retval EFI_UNSUPPORTED       This call is not supported by this
> platform at the time the call is made.
> +                                The platform should describe this
> runtime service as unsupported at runtime
> +                                via an EFI_RT_PROPERTIES_TABLE
> configuration table.
> 
>  **/
>  typedef
> @@ -826,6 +846,9 @@ EFI_STATUS
>    @retval EFI_SUCCESS           The operation completed successfully.
>    @retval EFI_INVALID_PARAMETER A time field is out of range.
>    @retval EFI_DEVICE_ERROR      The time could not be set due due to
> hardware error.
> +  @retval EFI_UNSUPPORTED       This call is not supported by this
> platform at the time the call is made.
> +                                The platform should describe this
> runtime service as unsupported at runtime
> +                                via an EFI_RT_PROPERTIES_TABLE
> configuration table.
> 
>  **/
>  typedef
> @@ -846,7 +869,9 @@ EFI_STATUS
>    @retval EFI_INVALID_PARAMETER Pending is NULL.
>    @retval EFI_INVALID_PARAMETER Time is NULL.
>    @retval EFI_DEVICE_ERROR      The wakeup time could not be retrieved
> due to a hardware error.
> -  @retval EFI_UNSUPPORTED       A wakeup timer is not supported on this
> platform.
> +  @retval EFI_UNSUPPORTED       This call is not supported by this
> platform at the time the call is made.
> +                                The platform should describe this
> runtime service as unsupported at runtime
> +                                via an EFI_RT_PROPERTIES_TABLE
> configuration table.
> 
>  **/
>  typedef
> @@ -868,7 +893,9 @@ EFI_STATUS
>                                  Enable is FALSE, then the wakeup alarm
> was disabled.
>    @retval EFI_INVALID_PARAMETER A time field is out of range.
>    @retval EFI_DEVICE_ERROR      The wakeup time could not be set due to
> a hardware error.
> -  @retval EFI_UNSUPPORTED       A wakeup timer is not supported on this
> platform.
> +  @retval EFI_UNSUPPORTED       This call is not supported by this
> platform at the time the call is made.
> +                                The platform should describe this
> runtime service as unsupported at runtime
> +                                via an EFI_RT_PROPERTIES_TABLE
> configuration table.
> 
>  **/
>  typedef
> @@ -1090,6 +1117,9 @@ EFI_STATUS
>    @retval EFI_SUCCESS           The next high monotonic count was
> returned.
>    @retval EFI_INVALID_PARAMETER HighCount is NULL.
>    @retval EFI_DEVICE_ERROR      The device is not functioning properly.
> +  @retval EFI_UNSUPPORTED       This call is not supported by this
> platform at the time the call is made.
> +                                The platform should describe this
> runtime service as unsupported at runtime
> +                                via an EFI_RT_PROPERTIES_TABLE
> configuration table.
> 
>  **/
>  typedef
> @@ -1716,6 +1746,9 @@ typedef struct {
>                                  in runtime. The caller may resubmit the
> capsule prior to ExitBootServices().
>    @retval EFI_OUT_OF_RESOURCES  When ExitBootServices() has not been
> previously called then this error indicates
>                                  the capsule is compatible with this
> platform but there are insufficient resources to process.
> +  @retval EFI_UNSUPPORTED       This call is not supported by this
> platform at the time the call is made.
> +                                The platform should describe this
> runtime service as unsupported at runtime
> +                                via an EFI_RT_PROPERTIES_TABLE
> configuration table.
> 
>  **/
>  typedef
> @@ -1747,6 +1780,9 @@ EFI_STATUS
>                                  in runtime. The caller may resubmit the
> capsule prior to ExitBootServices().
>    @retval EFI_OUT_OF_RESOURCES  When ExitBootServices() has not been
> previously called then this error indicates
>                                  the capsule is compatible with this
> platform but there are insufficient resources to process.
> +  @retval EFI_UNSUPPORTED       This call is not supported by this
> platform at the time the call is made.
> +                                The platform should describe this
> runtime service as unsupported at runtime
> +                                via an EFI_RT_PROPERTIES_TABLE
> configuration table.
> 
>  **/
>  typedef
> diff --git a/MdePkg/Library/UefiRuntimeLib/RuntimeLib.c
> b/MdePkg/Library/UefiRuntimeLib/RuntimeLib.c
> index ffc4cf4d2af3..2563f6e0606d 100644
> --- a/MdePkg/Library/UefiRuntimeLib/RuntimeLib.c
> +++ b/MdePkg/Library/UefiRuntimeLib/RuntimeLib.c
> @@ -252,6 +252,9 @@ EfiResetSystem (
>    @retval  EFI_SUCCESS            The operation completed successfully.
>    @retval  EFI_INVALID_PARAMETER  Time is NULL.
>    @retval  EFI_DEVICE_ERROR       The time could not be retrieved due
> to a hardware error.
> +  @retval  EFI_UNSUPPORTED        This call is not supported by this
> platform at the time the call is made.
> +                                  The platform should describe this
> runtime service as unsupported at runtime
> +                                  via an EFI_RT_PROPERTIES_TABLE
> configuration table.
> 
>  **/
>  EFI_STATUS
> @@ -284,6 +287,9 @@ EfiGetTime (
>    @retval  EFI_SUCCESS            The operation completed successfully.
>    @retval  EFI_INVALID_PARAMETER  A time field is out of range.
>    @retval  EFI_DEVICE_ERROR       The time could not be set due to a
> hardware error.
> +  @retval  EFI_UNSUPPORTED        This call is not supported by this
> platform at the time the call is made.
> +                                  The platform should describe this
> runtime service as unsupported at runtime
> +                                  via an EFI_RT_PROPERTIES_TABLE
> configuration table.
> 
>  **/
>  EFI_STATUS
> @@ -313,7 +319,9 @@ EfiSetTime (
>    @retval  EFI_INVALID_PARAMETER  Pending is NULL.
>    @retval  EFI_INVALID_PARAMETER  Time is NULL.
>    @retval  EFI_DEVICE_ERROR       The wakeup time could not be
> retrieved due to a hardware error.
> -  @retval  EFI_UNSUPPORTED        A wakeup timer is not supported on
> this platform.
> +  @retval  EFI_UNSUPPORTED        This call is not supported by this
> platform at the time the call is made.
> +                                  The platform should describe this
> runtime service as unsupported at runtime
> +                                  via an EFI_RT_PROPERTIES_TABLE
> configuration table.
> 
>  **/
>  EFI_STATUS
> @@ -346,7 +354,9 @@ EfiGetWakeupTime (
>                                    If Enable is FALSE, then the wakeup
> alarm was disabled.
>    @retval  EFI_INVALID_PARAMETER  A time field is out of range.
>    @retval  EFI_DEVICE_ERROR       The wakeup time could not be set due
> to a hardware error.
> -  @retval  EFI_UNSUPPORTED        A wakeup timer is not supported on
> this platform.
> +  @retval  EFI_UNSUPPORTED        This call is not supported by this
> platform at the time the call is made.
> +                                  The platform should describe this
> runtime service as unsupported at runtime
> +                                  via an EFI_RT_PROPERTIES_TABLE
> configuration table.
> 
>  **/
>  EFI_STATUS
> @@ -388,6 +398,10 @@ EfiSetWakeupTime (
>    @retval  EFI_INVALID_PARAMETER  The DataSize is not too small and
> Data is NULL.
>    @retval  EFI_DEVICE_ERROR       The variable could not be retrieved
> due to a hardware error.
>    @retval  EFI_SECURITY_VIOLATION The variable could not be retrieved
> due to an authentication failure.
> +  @retval  EFI_UNSUPPORTED        After ExitBootServices() has been
> called, this return code may be returned
> +                                  if no variable storage is supported.
> The platform should describe this
> +                                  runtime service as unsupported at
> runtime via an EFI_RT_PROPERTIES_TABLE
> +                                  configuration table.
>  **/
>  EFI_STATUS
>  EFIAPI
> @@ -430,6 +444,10 @@ EfiGetVariable (
>    @retval  EFI_INVALID_PARAMETER VariableName is NULL.
>    @retval  EFI_INVALID_PARAMETER VendorGuid is NULL.
>    @retval  EFI_DEVICE_ERROR      The variable name could not be
> retrieved due to a hardware error.
> +  @retval  EFI_UNSUPPORTED       After ExitBootServices() has been
> called, this return code may be returned
> +                                 if no variable storage is supported.
> The platform should describe this
> +                                 runtime service as unsupported at
> runtime via an EFI_RT_PROPERTIES_TABLE
> +                                 configuration table.
> 
>  **/
>  EFI_STATUS
> @@ -470,6 +488,9 @@ EfiGetNextVariableName (
>                                    set but the AuthInfo does NOT pass
> the validation check carried
>                                    out by the firmware.
>    @retval  EFI_NOT_FOUND          The variable trying to be updated or
> deleted was not found.
> +  @retval  EFI_UNSUPPORTED        This call is not supported by this
> platform at the time the call is made.
> +                                  The platform should describe this
> runtime service as unsupported at runtime
> +                                  via an EFI_RT_PROPERTIES_TABLE
> configuration table.
> 
>  **/
>  EFI_STATUS
> @@ -499,6 +520,9 @@ EfiSetVariable (
>    @retval  EFI_SUCCESS           The next high monotonic count was
> returned.
>    @retval  EFI_DEVICE_ERROR      The device is not functioning
> properly.
>    @retval  EFI_INVALID_PARAMETER HighCount is NULL.
> +  @retval  EFI_UNSUPPORTED       This call is not supported by this
> platform at the time the call is made.
> +                                 The platform should describe this
> runtime service as unsupported at runtime
> +                                 via an EFI_RT_PROPERTIES_TABLE
> configuration table.
> 
>  **/
>  EFI_STATUS
> @@ -525,7 +549,11 @@ EfiGetNextHighMonotonicCount (
>    @retval  EFI_NOT_FOUND          The pointer pointed to by Address was
> not found to be part of
>                                    the current memory map. This is
> normally fatal.
>    @retval  EFI_INVALID_PARAMETER  Address is NULL.
> -  @retval  EFI_INVALID_PARAMETER  *Address is NULL and DebugDispositio
> +  @retval  EFI_INVALID_PARAMETER  *Address is NULL and DebugDisposition
> does
> +                                  not have the EFI_OPTIONAL_PTR bit
> set.
> +  @retval  EFI_UNSUPPORTED        This call is not supported by this
> platform at the time the call is made.
> +                                  The platform should describe this
> runtime service as unsupported at runtime
> +                                  via an EFI_RT_PROPERTIES_TABLE
> configuration table.
> 
>  **/
>  EFI_STATUS
> @@ -649,6 +677,9 @@ EfiConvertList (
>                                  map that requires a mapping.
>    @retval EFI_NOT_FOUND         A virtual address was supplied for an
> address that is not found
>                                  in the memory map.
> +  @retval EFI_UNSUPPORTED       This call is not supported by this
> platform at the time the call is made.
> +                                The platform should describe this
> runtime service as unsupported at runtime
> +                                via an EFI_RT_PROPERTIES_TABLE
> configuration table.
>  **/
>  EFI_STATUS
>  EFIAPI
> @@ -699,6 +730,9 @@ EfiSetVirtualAddressMap (
>    @retval EFI_DEVICE_ERROR      The capsule update was started, but
> failed due to a device error.
>    @retval EFI_UNSUPPORTED       The capsule type is not supported on
> this platform.
>    @retval EFI_OUT_OF_RESOURCES  There were insufficient resources to
> process the capsule.
> +  @retval EFI_UNSUPPORTED       This call is not supported by this
> platform at the time the call is made.
> +                                The platform should describe this
> runtime service as unsupported at runtime
> +                                via an EFI_RT_PROPERTIES_TABLE
> configuration table.
> 
>  **/
>  EFI_STATUS
> @@ -748,6 +782,9 @@ EfiUpdateCapsule (
>    @retval EFI_UNSUPPORTED       The capsule type is not supported on
> this platform, and
>                                  MaximumCapsuleSize and ResetType are
> undefined.
>    @retval EFI_OUT_OF_RESOURCES  There were insufficient resources to
> process the query request.
> +  @retval EFI_UNSUPPORTED       This call is not supported by this
> platform at the time the call is made.
> +                                The platform should describe this
> runtime service as unsupported at runtime
> +                                via an EFI_RT_PROPERTIES_TABLE
> configuration table.
> 
>  **/
>  EFI_STATUS
> --
> 2.26.2.windows.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#114671): https://edk2.groups.io/g/devel/message/114671
Mute This Topic: https://groups.io/mt/104024795/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/leave/12367111/7686176/1913456212/xyzzy [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-



^ permalink raw reply	[flat|nested] 15+ messages in thread

* 回复: [edk2-devel] [PATCH V2 0/5] Add EFI_UNSUPPORTED return for some Runtime Service functions
  2024-01-29  2:29 [edk2-devel] [PATCH V2 0/5] Add EFI_UNSUPPORTED return for some Runtime Service functions Ren, Suqiang
                   ` (4 preceding siblings ...)
  2024-01-29  2:29 ` [edk2-devel] [PATCH V2 5/5] OvmfPkg: " Ren, Suqiang
@ 2024-01-30  1:36 ` gaoliming via groups.io
       [not found] ` <17AEB08976789B0D.21687@groups.io>
       [not found] ` <17AEB088A9F5F269.10155@groups.io>
  7 siblings, 0 replies; 15+ messages in thread
From: gaoliming via groups.io @ 2024-01-30  1:36 UTC (permalink / raw)
  To: devel, suqiangx.ren
  Cc: 'Michael D Kinney', 'Zhiguang Liu',
	'Leif Lindholm', 'Ard Biesheuvel',
	'Abner Chang', 'Jiewen Yao',
	'Laszlo Ersek'

The change is good to me. Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>

> -----邮件原件-----
> 发件人: devel@edk2.groups.io <devel@edk2.groups.io> 代表 Ren, Suqiang
> 发送时间: 2024年1月29日 10:30
> 收件人: devel@edk2.groups.io
> 抄送: Michael D Kinney <michael.d.kinney@intel.com>; Liming Gao
> <gaoliming@byosoft.com.cn>; Zhiguang Liu <zhiguang.liu@intel.com>; Leif
> Lindholm <quic_llindhol@quicinc.com>; Ard Biesheuvel
> <ardb+tianocore@kernel.org>; Abner Chang <abner.chang@amd.com>;
> Jiewen Yao <jiewen.yao@intel.com>; Laszlo Ersek <lersek@redhat.com>
> 主题: [edk2-devel] [PATCH V2 0/5] Add EFI_UNSUPPORTED return for some
> Runtime Service functions
> 
> According to UEFI Spec 2.10 page 206, if any EFI_RUNTIME_SERVICES* calls
> are not supported for use by the OS at runtime, an
> EFI_RT_PROPERTIES_TABLE
> configuration table should be published describing which runtime services
> are supported at runtime. So need to add EFI_UNSUPPORTED return for some
> Runtime Service functions.
> 
> REF: UEFI spec 2.10 section 8 Services — Runtime Services
> 
> V2:
> Update some Runtime Service functions header return
> on both C and H header files.
> 
> V1:
> Add EFI_UNSUPPORTED return for some Runtime Service
> functions on UefiSpec.h file.
> 
> Signed-off-by: Suqiang Ren <suqiangx.ren@intel.com>
> Cc: Michael D Kinney <michael.d.kinney@intel.com>
> Cc: Liming Gao <gaoliming@byosoft.com.cn>
> Cc: Zhiguang Liu <zhiguang.liu@intel.com>
> Cc: Leif Lindholm <quic_llindhol@quicinc.com>
> Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
> Cc: Abner Chang <abner.chang@amd.com>
> Cc: Jiewen Yao <jiewen.yao@intel.com>
> Cc: Laszlo Ersek <lersek@redhat.com>
> 
> Suqiang Ren (5):
>   MdePkg: Add EFI_UNSUPPORTED return for some Runtime Service
> functions
>   MdeModulePkg: Update some Runtime Service functions header
>   EmbeddedPkg: Update some Runtime Service functions header
>   ArmPlatformPkg: Update some Runtime Service functions header
>   OvmfPkg: Update some Runtime Service functions header
> 
>  .../PL031RealTimeClockLib.c                   | 22 ++++-
>  .../Include/Library/RealTimeClockLib.h        | 21 +++-
>  .../RealTimeClockRuntimeDxe/RealTimeClock.c   | 13 ++-
>  MdeModulePkg/Core/RuntimeDxe/Runtime.c        | 10 +-
>  MdeModulePkg/Core/RuntimeDxe/Runtime.h        | 10 +-
>  .../CapsuleRuntimeDxe/CapsuleService.c        | 13 +++
>  .../MonotonicCounter.c                        |  3 +
>  .../Universal/Variable/RuntimeDxe/Variable.c  | 40 ++++++--
>  .../Universal/Variable/RuntimeDxe/Variable.h  | 40 ++++++--
>  .../RuntimeDxe/VariableSmmRuntimeDxe.c        | 99
> +++++++++++++++----
>  MdePkg/Include/Library/UefiRuntimeLib.h       | 44 ++++++++-
>  MdePkg/Include/Uefi/UefiSpec.h                | 46 ++++++++-
>  MdePkg/Library/UefiRuntimeLib/RuntimeLib.c    | 43 +++++++-
>  .../XenRealTimeClockLib/XenRealTimeClockLib.c | 22 ++++-
>  14 files changed, 362 insertions(+), 64 deletions(-)
> 
> --
> 2.26.2.windows.1
> 
> 
> 
> 
> 





-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#114756): https://edk2.groups.io/g/devel/message/114756
Mute This Topic: https://groups.io/mt/104045657/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-



^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: FW: [edk2-devel] [PATCH V2 4/5] ArmPlatformPkg: Update some Runtime Service functions header
       [not found]   ` <CO1PR11MB49166BBE9770EA9FB2113FD9967D2@CO1PR11MB4916.namprd11.prod.outlook.com>
@ 2024-01-31 19:13     ` Leif Lindholm
  2024-01-31 20:04       ` Michael D Kinney
  0 siblings, 1 reply; 15+ messages in thread
From: Leif Lindholm @ 2024-01-31 19:13 UTC (permalink / raw)
  To: Ren, SuqiangX, ardb+tianocore@kernel.org, devel@edk2.groups.io

On 2024-01-30 08:33, Ren, SuqiangX wrote:
> Hi All,
> 
> 	Could you please help to review this patch on edk2?
> 	https://edk2.groups.io/g/devel/message/114661
> 
> Thanks
> Ren, Suqiang

Hi,

Sorry, your original email seems to be corrupted in my mailbox, so 
replying here.

> -----Original Message-----
> From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Ren, Suqiang
> Sent: Monday, January 29, 2024 10:30 AM
> To: devel@edk2.groups.io
> Cc: Leif Lindholm <quic_llindhol@quicinc.com>; Ard Biesheuvel <ardb+tianocore@kernel.org>
> Subject: [edk2-devel] [PATCH V2 4/5] ArmPlatformPkg: Update some Runtime Service functions header
> 
> Update some Runtime Service functions header to align with UEFI spec 2.10.
> 
> REF: UEFI spec 2.10 section 8 Services — Runtime Services

Nothing that is being changed by this patch is described by the UEFI 
specification. The commit message should describe what a patch does,
the overall purpose of the set should be described in the cover letter 
(and you do describe that here).

Here is my proposed changed commit message:
---
ArmPlatformPkg: align PL031 library function headers with UEFI return values

RealTimeClockLib is used to back the runtime services time functions,
so align the description of the function return values with the defined
values for these services as described in UEFI 2.10.
---

Apart from that, the function comment headers exist both in the .h and 
the .c. If the .h is being updated, so should the .c.

Best Regards,

Leif

> Signed-off-by: Suqiang Ren <suqiangx.ren@intel.com>
> Cc: Leif Lindholm <quic_llindhol@quicinc.com>
> Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
> ---
>   .../PL031RealTimeClockLib.c                   | 22 +++++++++++++++----
>   1 file changed, 18 insertions(+), 4 deletions(-)
> 
> diff --git a/ArmPlatformPkg/Library/PL031RealTimeClockLib/PL031RealTimeClockLib.c b/ArmPlatformPkg/Library/PL031RealTimeClockLib/PL031RealTimeClockLib.c
> index 1896f9d16d3b..6ab3e9948335 100644
> --- a/ArmPlatformPkg/Library/PL031RealTimeClockLib/PL031RealTimeClockLib.c
> +++ b/ArmPlatformPkg/Library/PL031RealTimeClockLib/PL031RealTimeClockLib.c
> @@ -111,7 +111,9 @@ EXIT:
>     @retval EFI_SUCCESS            The operation completed successfully.
>     @retval EFI_INVALID_PARAMETER  Time is NULL.
>     @retval EFI_DEVICE_ERROR       The time could not be retrieved due to hardware error.
> -  @retval EFI_SECURITY_VIOLATION The time could not be retrieved due to an authentication failure.
> +  @retval EFI_UNSUPPORTED        This call is not supported by this platform at the time the call is made.
> +                                 The platform should describe this runtime service as unsupported at runtime
> +                                 via an EFI_RT_PROPERTIES_TABLE configuration table.
>   
>   **/
>   EFI_STATUS
> @@ -172,6 +174,9 @@ LibGetTime (
>     @retval EFI_SUCCESS           The operation completed successfully.
>     @retval EFI_INVALID_PARAMETER A time field is out of range.
>     @retval EFI_DEVICE_ERROR      The time could not be set due to hardware error.
> +  @retval EFI_UNSUPPORTED       This call is not supported by this platform at the time the call is made.
> +                                The platform should describe this runtime service as unsupported at runtime
> +                                via an EFI_RT_PROPERTIES_TABLE configuration table.
>   
>   **/
>   EFI_STATUS
> @@ -224,8 +229,13 @@ LibSetTime (
>     @param  Time                  The current alarm setting.
>   
>     @retval EFI_SUCCESS           The alarm settings were returned.
> -  @retval EFI_INVALID_PARAMETER Any parameter is NULL.
> +  @retval EFI_INVALID_PARAMETER Enabled is NULL.
> +  @retval EFI_INVALID_PARAMETER Pending is NULL.
> +  @retval EFI_INVALID_PARAMETER Time is NULL.
>     @retval EFI_DEVICE_ERROR      The wakeup time could not be retrieved due to a hardware error.
> +  @retval EFI_UNSUPPORTED       This call is not supported by this platform at the time the call is made.
> +                                The platform should describe this runtime service as unsupported at runtime
> +                                via an EFI_RT_PROPERTIES_TABLE configuration table.
>   
>   **/
>   EFI_STATUS
> @@ -248,9 +258,13 @@ LibGetWakeupTime (
>   
>     @retval EFI_SUCCESS           If Enable is TRUE, then the wakeup alarm was enabled. If
>                                   Enable is FALSE, then the wakeup alarm was disabled.
> -  @retval EFI_INVALID_PARAMETER A time field is out of range.
> +  @retval EFI_INVALID_PARAMETER Enabled is NULL.
> +  @retval EFI_INVALID_PARAMETER Pending is NULL.
> +  @retval EFI_INVALID_PARAMETER Time is NULL.
>     @retval EFI_DEVICE_ERROR      The wakeup time could not be set due to a hardware error.
> -  @retval EFI_UNSUPPORTED       A wakeup timer is not supported on this platform.
> +  @retval EFI_UNSUPPORTED       This call is not supported by this platform at the time the call is made.
> +                                The platform should describe this runtime service as unsupported at runtime
> +                                via an EFI_RT_PROPERTIES_TABLE configuration table.
>   
>   **/
>   EFI_STATUS



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#114916): https://edk2.groups.io/g/devel/message/114916
Mute This Topic: https://groups.io/mt/104081753/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-



^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: FW: [edk2-devel] [PATCH V2 4/5] ArmPlatformPkg: Update some Runtime Service functions header
  2024-01-31 19:13     ` FW: [edk2-devel] [PATCH V2 4/5] ArmPlatformPkg: Update some Runtime Service functions header Leif Lindholm
@ 2024-01-31 20:04       ` Michael D Kinney
  2024-02-01 18:35         ` Leif Lindholm
  0 siblings, 1 reply; 15+ messages in thread
From: Michael D Kinney @ 2024-01-31 20:04 UTC (permalink / raw)
  To: devel@edk2.groups.io, quic_llindhol@quicinc.com, Ren, SuqiangX,
	ardb+tianocore@kernel.org
  Cc: Kinney, Michael D

Hi Leif,

The only reference to these APIs are in the .c files in ArmPlatformPkg.

RealTimeClockLib.h that defines these APIs is in EmbeddedPkg and this
patch series also has changes against EmbeddedPkg.

So other than the commit message, are the code changes correct?

Mike

> -----Original Message-----
> From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Leif
> Lindholm
> Sent: Wednesday, January 31, 2024 11:13 AM
> To: Ren, SuqiangX <suqiangx.ren@intel.com>; ardb+tianocore@kernel.org;
> devel@edk2.groups.io
> Subject: Re: FW: [edk2-devel] [PATCH V2 4/5] ArmPlatformPkg: Update some
> Runtime Service functions header
> 
> On 2024-01-30 08:33, Ren, SuqiangX wrote:
> > Hi All,
> >
> > 	Could you please help to review this patch on edk2?
> > 	https://edk2.groups.io/g/devel/message/114661
> >
> > Thanks
> > Ren, Suqiang
> 
> Hi,
> 
> Sorry, your original email seems to be corrupted in my mailbox, so
> replying here.
> 
> > -----Original Message-----
> > From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Ren,
> Suqiang
> > Sent: Monday, January 29, 2024 10:30 AM
> > To: devel@edk2.groups.io
> > Cc: Leif Lindholm <quic_llindhol@quicinc.com>; Ard Biesheuvel
> <ardb+tianocore@kernel.org>
> > Subject: [edk2-devel] [PATCH V2 4/5] ArmPlatformPkg: Update some
> Runtime Service functions header
> >
> > Update some Runtime Service functions header to align with UEFI spec
> 2.10.
> >
> > REF: UEFI spec 2.10 section 8 Services — Runtime Services
> 
> Nothing that is being changed by this patch is described by the UEFI
> specification. The commit message should describe what a patch does,
> the overall purpose of the set should be described in the cover letter
> (and you do describe that here).
> 
> Here is my proposed changed commit message:
> ---
> ArmPlatformPkg: align PL031 library function headers with UEFI return
> values
> 
> RealTimeClockLib is used to back the runtime services time functions,
> so align the description of the function return values with the defined
> values for these services as described in UEFI 2.10.
> ---
> 
> Apart from that, the function comment headers exist both in the .h and
> the .c. If the .h is being updated, so should the .c.
> 
> Best Regards,
> 
> Leif
> 
> > Signed-off-by: Suqiang Ren <suqiangx.ren@intel.com>
> > Cc: Leif Lindholm <quic_llindhol@quicinc.com>
> > Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
> > ---
> >   .../PL031RealTimeClockLib.c                   | 22 +++++++++++++++--
> --
> >   1 file changed, 18 insertions(+), 4 deletions(-)
> >
> > diff --git
> a/ArmPlatformPkg/Library/PL031RealTimeClockLib/PL031RealTimeClockLib.c
> b/ArmPlatformPkg/Library/PL031RealTimeClockLib/PL031RealTimeClockLib.c
> > index 1896f9d16d3b..6ab3e9948335 100644
> > ---
> a/ArmPlatformPkg/Library/PL031RealTimeClockLib/PL031RealTimeClockLib.c
> > +++
> b/ArmPlatformPkg/Library/PL031RealTimeClockLib/PL031RealTimeClockLib.c
> > @@ -111,7 +111,9 @@ EXIT:
> >     @retval EFI_SUCCESS            The operation completed
> successfully.
> >     @retval EFI_INVALID_PARAMETER  Time is NULL.
> >     @retval EFI_DEVICE_ERROR       The time could not be retrieved due
> to hardware error.
> > -  @retval EFI_SECURITY_VIOLATION The time could not be retrieved due
> to an authentication failure.
> > +  @retval EFI_UNSUPPORTED        This call is not supported by this
> platform at the time the call is made.
> > +                                 The platform should describe this
> runtime service as unsupported at runtime
> > +                                 via an EFI_RT_PROPERTIES_TABLE
> configuration table.
> >
> >   **/
> >   EFI_STATUS
> > @@ -172,6 +174,9 @@ LibGetTime (
> >     @retval EFI_SUCCESS           The operation completed
> successfully.
> >     @retval EFI_INVALID_PARAMETER A time field is out of range.
> >     @retval EFI_DEVICE_ERROR      The time could not be set due to
> hardware error.
> > +  @retval EFI_UNSUPPORTED       This call is not supported by this
> platform at the time the call is made.
> > +                                The platform should describe this
> runtime service as unsupported at runtime
> > +                                via an EFI_RT_PROPERTIES_TABLE
> configuration table.
> >
> >   **/
> >   EFI_STATUS
> > @@ -224,8 +229,13 @@ LibSetTime (
> >     @param  Time                  The current alarm setting.
> >
> >     @retval EFI_SUCCESS           The alarm settings were returned.
> > -  @retval EFI_INVALID_PARAMETER Any parameter is NULL.
> > +  @retval EFI_INVALID_PARAMETER Enabled is NULL.
> > +  @retval EFI_INVALID_PARAMETER Pending is NULL.
> > +  @retval EFI_INVALID_PARAMETER Time is NULL.
> >     @retval EFI_DEVICE_ERROR      The wakeup time could not be
> retrieved due to a hardware error.
> > +  @retval EFI_UNSUPPORTED       This call is not supported by this
> platform at the time the call is made.
> > +                                The platform should describe this
> runtime service as unsupported at runtime
> > +                                via an EFI_RT_PROPERTIES_TABLE
> configuration table.
> >
> >   **/
> >   EFI_STATUS
> > @@ -248,9 +258,13 @@ LibGetWakeupTime (
> >
> >     @retval EFI_SUCCESS           If Enable is TRUE, then the wakeup
> alarm was enabled. If
> >                                   Enable is FALSE, then the wakeup
> alarm was disabled.
> > -  @retval EFI_INVALID_PARAMETER A time field is out of range.
> > +  @retval EFI_INVALID_PARAMETER Enabled is NULL.
> > +  @retval EFI_INVALID_PARAMETER Pending is NULL.
> > +  @retval EFI_INVALID_PARAMETER Time is NULL.
> >     @retval EFI_DEVICE_ERROR      The wakeup time could not be set due
> to a hardware error.
> > -  @retval EFI_UNSUPPORTED       A wakeup timer is not supported on
> this platform.
> > +  @retval EFI_UNSUPPORTED       This call is not supported by this
> platform at the time the call is made.
> > +                                The platform should describe this
> runtime service as unsupported at runtime
> > +                                via an EFI_RT_PROPERTIES_TABLE
> configuration table.
> >
> >   **/
> >   EFI_STATUS
> 
> 
> 
> 
> 



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#114919): https://edk2.groups.io/g/devel/message/114919
Mute This Topic: https://groups.io/mt/104081753/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-



^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: FW: [edk2-devel] [PATCH V2 4/5] ArmPlatformPkg: Update some Runtime Service functions header
  2024-01-31 20:04       ` Michael D Kinney
@ 2024-02-01 18:35         ` Leif Lindholm
  0 siblings, 0 replies; 15+ messages in thread
From: Leif Lindholm @ 2024-02-01 18:35 UTC (permalink / raw)
  To: Kinney, Michael D, devel@edk2.groups.io, Ren, SuqiangX,
	ardb+tianocore@kernel.org

On 2024-01-31 20:04, Kinney, Michael D wrote:
> Hi Leif,
> 
> The only reference to these APIs are in the .c files in ArmPlatformPkg.
> 
> RealTimeClockLib.h that defines these APIs is in EmbeddedPkg and this
> patch series also has changes against EmbeddedPkg.

Oh, you're absolutely correct.
My bad, I must have been distracted while grepping. Apologies.

> So other than the commit message, are the code changes correct?

The commit message is all that needs changing.

/
     Leif

> Mike
> 
>> -----Original Message-----
>> From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Leif
>> Lindholm
>> Sent: Wednesday, January 31, 2024 11:13 AM
>> To: Ren, SuqiangX <suqiangx.ren@intel.com>; ardb+tianocore@kernel.org;
>> devel@edk2.groups.io
>> Subject: Re: FW: [edk2-devel] [PATCH V2 4/5] ArmPlatformPkg: Update some
>> Runtime Service functions header
>>
>> On 2024-01-30 08:33, Ren, SuqiangX wrote:
>>> Hi All,
>>>
>>> 	Could you please help to review this patch on edk2?
>>> 	https://edk2.groups.io/g/devel/message/114661
>>>
>>> Thanks
>>> Ren, Suqiang
>>
>> Hi,
>>
>> Sorry, your original email seems to be corrupted in my mailbox, so
>> replying here.
>>
>>> -----Original Message-----
>>> From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Ren,
>> Suqiang
>>> Sent: Monday, January 29, 2024 10:30 AM
>>> To: devel@edk2.groups.io
>>> Cc: Leif Lindholm <quic_llindhol@quicinc.com>; Ard Biesheuvel
>> <ardb+tianocore@kernel.org>
>>> Subject: [edk2-devel] [PATCH V2 4/5] ArmPlatformPkg: Update some
>> Runtime Service functions header
>>>
>>> Update some Runtime Service functions header to align with UEFI spec
>> 2.10.
>>>
>>> REF: UEFI spec 2.10 section 8 Services — Runtime Services
>>
>> Nothing that is being changed by this patch is described by the UEFI
>> specification. The commit message should describe what a patch does,
>> the overall purpose of the set should be described in the cover letter
>> (and you do describe that here).
>>
>> Here is my proposed changed commit message:
>> ---
>> ArmPlatformPkg: align PL031 library function headers with UEFI return
>> values
>>
>> RealTimeClockLib is used to back the runtime services time functions,
>> so align the description of the function return values with the defined
>> values for these services as described in UEFI 2.10.
>> ---
>>
>> Apart from that, the function comment headers exist both in the .h and
>> the .c. If the .h is being updated, so should the .c.
>>
>> Best Regards,
>>
>> Leif
>>
>>> Signed-off-by: Suqiang Ren <suqiangx.ren@intel.com>
>>> Cc: Leif Lindholm <quic_llindhol@quicinc.com>
>>> Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
>>> ---
>>>    .../PL031RealTimeClockLib.c                   | 22 +++++++++++++++--
>> --
>>>    1 file changed, 18 insertions(+), 4 deletions(-)
>>>
>>> diff --git
>> a/ArmPlatformPkg/Library/PL031RealTimeClockLib/PL031RealTimeClockLib.c
>> b/ArmPlatformPkg/Library/PL031RealTimeClockLib/PL031RealTimeClockLib.c
>>> index 1896f9d16d3b..6ab3e9948335 100644
>>> ---
>> a/ArmPlatformPkg/Library/PL031RealTimeClockLib/PL031RealTimeClockLib.c
>>> +++
>> b/ArmPlatformPkg/Library/PL031RealTimeClockLib/PL031RealTimeClockLib.c
>>> @@ -111,7 +111,9 @@ EXIT:
>>>      @retval EFI_SUCCESS            The operation completed
>> successfully.
>>>      @retval EFI_INVALID_PARAMETER  Time is NULL.
>>>      @retval EFI_DEVICE_ERROR       The time could not be retrieved due
>> to hardware error.
>>> -  @retval EFI_SECURITY_VIOLATION The time could not be retrieved due
>> to an authentication failure.
>>> +  @retval EFI_UNSUPPORTED        This call is not supported by this
>> platform at the time the call is made.
>>> +                                 The platform should describe this
>> runtime service as unsupported at runtime
>>> +                                 via an EFI_RT_PROPERTIES_TABLE
>> configuration table.
>>>
>>>    **/
>>>    EFI_STATUS
>>> @@ -172,6 +174,9 @@ LibGetTime (
>>>      @retval EFI_SUCCESS           The operation completed
>> successfully.
>>>      @retval EFI_INVALID_PARAMETER A time field is out of range.
>>>      @retval EFI_DEVICE_ERROR      The time could not be set due to
>> hardware error.
>>> +  @retval EFI_UNSUPPORTED       This call is not supported by this
>> platform at the time the call is made.
>>> +                                The platform should describe this
>> runtime service as unsupported at runtime
>>> +                                via an EFI_RT_PROPERTIES_TABLE
>> configuration table.
>>>
>>>    **/
>>>    EFI_STATUS
>>> @@ -224,8 +229,13 @@ LibSetTime (
>>>      @param  Time                  The current alarm setting.
>>>
>>>      @retval EFI_SUCCESS           The alarm settings were returned.
>>> -  @retval EFI_INVALID_PARAMETER Any parameter is NULL.
>>> +  @retval EFI_INVALID_PARAMETER Enabled is NULL.
>>> +  @retval EFI_INVALID_PARAMETER Pending is NULL.
>>> +  @retval EFI_INVALID_PARAMETER Time is NULL.
>>>      @retval EFI_DEVICE_ERROR      The wakeup time could not be
>> retrieved due to a hardware error.
>>> +  @retval EFI_UNSUPPORTED       This call is not supported by this
>> platform at the time the call is made.
>>> +                                The platform should describe this
>> runtime service as unsupported at runtime
>>> +                                via an EFI_RT_PROPERTIES_TABLE
>> configuration table.
>>>
>>>    **/
>>>    EFI_STATUS
>>> @@ -248,9 +258,13 @@ LibGetWakeupTime (
>>>
>>>      @retval EFI_SUCCESS           If Enable is TRUE, then the wakeup
>> alarm was enabled. If
>>>                                    Enable is FALSE, then the wakeup
>> alarm was disabled.
>>> -  @retval EFI_INVALID_PARAMETER A time field is out of range.
>>> +  @retval EFI_INVALID_PARAMETER Enabled is NULL.
>>> +  @retval EFI_INVALID_PARAMETER Pending is NULL.
>>> +  @retval EFI_INVALID_PARAMETER Time is NULL.
>>>      @retval EFI_DEVICE_ERROR      The wakeup time could not be set due
>> to a hardware error.
>>> -  @retval EFI_UNSUPPORTED       A wakeup timer is not supported on
>> this platform.
>>> +  @retval EFI_UNSUPPORTED       This call is not supported by this
>> platform at the time the call is made.
>>> +                                The platform should describe this
>> runtime service as unsupported at runtime
>>> +                                via an EFI_RT_PROPERTIES_TABLE
>> configuration table.
>>>
>>>    **/
>>>    EFI_STATUS
>>
>>
>>
>> 
>>
> 



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#114953): https://edk2.groups.io/g/devel/message/114953
Mute This Topic: https://groups.io/mt/104081753/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-



^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [edk2-devel] [PATCH V2 2/5] MdeModulePkg: Update some Runtime Service functions header
       [not found] ` <17AEB088A9F5F269.10155@groups.io>
@ 2024-02-02  1:23   ` Ren, Suqiang
  2024-02-02  2:40     ` Michael D Kinney
  0 siblings, 1 reply; 15+ messages in thread
From: Ren, Suqiang @ 2024-02-02  1:23 UTC (permalink / raw)
  To: devel@edk2.groups.io, Kinney, Michael D
  Cc: Liming Gao, Ren, SuqiangX, Tan, Ming

Hi Mike,

	Do you have any comment about this package's change?

	If yes, I will sent a V3 patch change both this package and ArmPlatformPkg.

	If no, I will only change ArmPlatformPkg's commit message suggested by Leif.


Thanks
Ren, Suqiang

-----Original Message-----
From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Ren, Suqiang
Sent: Monday, January 29, 2024 10:30 AM
To: devel@edk2.groups.io
Cc: Liming Gao <gaoliming@byosoft.com.cn>; Kinney, Michael D <michael.d.kinney@intel.com>
Subject: [edk2-devel] [PATCH V2 2/5] MdeModulePkg: Update some Runtime Service functions header

Update some Runtime Service functions header to align with UEFI spec 2.10.

REF: UEFI spec 2.10 section 8 Services — Runtime Services

Signed-off-by: Suqiang Ren <suqiangx.ren@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
---
 MdeModulePkg/Core/RuntimeDxe/Runtime.c        | 10 +-
 MdeModulePkg/Core/RuntimeDxe/Runtime.h        | 10 +-
 .../CapsuleRuntimeDxe/CapsuleService.c        | 13 +++
 .../MonotonicCounter.c                        |  3 +
 .../Universal/Variable/RuntimeDxe/Variable.c  | 40 ++++++--  .../Universal/Variable/RuntimeDxe/Variable.h  | 40 ++++++--
 .../RuntimeDxe/VariableSmmRuntimeDxe.c        | 99 +++++++++++++++----
 7 files changed, 174 insertions(+), 41 deletions(-)

diff --git a/MdeModulePkg/Core/RuntimeDxe/Runtime.c b/MdeModulePkg/Core/RuntimeDxe/Runtime.c
index de8f2bfce0f8..c66ed71e35e1 100644
--- a/MdeModulePkg/Core/RuntimeDxe/Runtime.c
+++ b/MdeModulePkg/Core/RuntimeDxe/Runtime.c
@@ -117,7 +117,12 @@ RuntimeDriverCalculateEfiHdrCrc (
   @retval  EFI_SUCCESS              The pointer pointed to by Address was modified.
   @retval  EFI_NOT_FOUND            The pointer pointed to by Address was not found to be part
                                     of the current memory map. This is normally fatal.
-  @retval  EFI_INVALID_PARAMETER    One of the parameters has an invalid value.
+  @retval  EFI_INVALID_PARAMETER    1) Address is NULL.
+                                    2) *Address is NULL and DebugDisposition does
+                                    not have the EFI_OPTIONAL_PTR bit set.
+  @retval  EFI_UNSUPPORTED          This call is not supported by this platform at the time the call is made.
+                                    The platform should describe this runtime service as unsupported at runtime
+                                    via an EFI_RT_PROPERTIES_TABLE configuration table.
 
 **/
 EFI_STATUS
@@ -227,6 +232,9 @@ RuntimeDriverConvertInternalPointer (
                                   map that requires a mapping.
   @retval  EFI_NOT_FOUND          A virtual address was supplied for an address that is not found
                                   in the memory map.
+  @retval  EFI_UNSUPPORTED        This call is not supported by this platform at the time the call is made.
+                                  The platform should describe this runtime service as unsupported at runtime
+                                  via an EFI_RT_PROPERTIES_TABLE configuration table.
 
 **/
 EFI_STATUS
diff --git a/MdeModulePkg/Core/RuntimeDxe/Runtime.h b/MdeModulePkg/Core/RuntimeDxe/Runtime.h
index cc422e783f65..1e28b98d78e8 100644
--- a/MdeModulePkg/Core/RuntimeDxe/Runtime.h
+++ b/MdeModulePkg/Core/RuntimeDxe/Runtime.h
@@ -59,7 +59,12 @@ RuntimeDriverCalculateCrc32 (
   @retval  EFI_SUCCESS              The pointer pointed to by Address was modified.
   @retval  EFI_NOT_FOUND            The pointer pointed to by Address was not found to be part
                                     of the current memory map. This is normally fatal.
-  @retval  EFI_INVALID_PARAMETER    One of the parameters has an invalid value.
+  @retval  EFI_INVALID_PARAMETER    1) Address is NULL.
+                                    2) *Address is NULL and DebugDisposition does
+                                    not have the EFI_OPTIONAL_PTR bit set.
+  @retval  EFI_UNSUPPORTED          This call is not supported by this platform at the time the call is made.
+                                    The platform should describe this runtime service as unsupported at runtime
+                                    via an EFI_RT_PROPERTIES_TABLE configuration table.
 
 **/
 EFI_STATUS
@@ -86,6 +91,9 @@ RuntimeDriverConvertPointer (
                                   map that requires a mapping.
   @retval  EFI_NOT_FOUND          A virtual address was supplied for an address that is not found
                                   in the memory map.
+  @retval  EFI_UNSUPPORTED        This call is not supported by this platform at the time the call is made.
+                                  The platform should describe this runtime service as unsupported at runtime
+                                  via an EFI_RT_PROPERTIES_TABLE configuration table.
 
 **/
 EFI_STATUS
diff --git a/MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleService.c b/MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleService.c
index 50968a839e84..f8047c23e17c 100644
--- a/MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleService.c
+++ b/MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleService.c
@@ -53,6 +53,9 @@ UINT32  mMaxSizeNonPopulateCapsule = 0;
                                 in runtime. The caller may resubmit the capsule prior to ExitBootServices().
   @retval EFI_OUT_OF_RESOURCES  When ExitBootServices() has not been previously called then this error indicates
                                 the capsule is compatible with this platform but there are insufficient resources to process.
+  @retval EFI_UNSUPPORTED       This call is not supported by this platform at the time the call is made.
+                                The platform should describe this runtime service as unsupported at runtime
+                                via an EFI_RT_PROPERTIES_TABLE configuration table.
 
 **/
 EFI_STATUS
@@ -247,6 +250,16 @@ UpdateCapsule (
                                 MaximumCapsuleSize and ResetType are undefined.
   @retval EFI_INVALID_PARAMETER MaximumCapsuleSize is NULL, or ResetTyep is NULL,
                                 Or CapsuleCount is Zero, or CapsuleImage is not valid.
+  @retval EFI_OUT_OF_RESOURCES  When ExitBootServices() has been previously called this error indicates
+                                the capsule is compatible with this platform but is not capable of
+                                being submitted or processed in runtime.
+                                The caller may resubmit the capsule prior to ExitBootServices().
+  @retval EFI_OUT_OF_RESOURCES  When ExitBootServices() has not been previously called then this error
+                                indicates the capsule is compatible with this platform but there are
+                                insufficient resources to process.
+  @retval EFI_UNSUPPORTED       This call is not supported by this platform at the time the call is made.
+                                The platform should describe this runtime service as unsupported at runtime
+                                via an EFI_RT_PROPERTIES_TABLE configuration table.
 
 **/
 EFI_STATUS
diff --git a/MdeModulePkg/Universal/MonotonicCounterRuntimeDxe/MonotonicCounter.c b/MdeModulePkg/Universal/MonotonicCounterRuntimeDxe/MonotonicCounter.c
index 60b6e9350b7f..3e74713cc5be 100644
--- a/MdeModulePkg/Universal/MonotonicCounterRuntimeDxe/MonotonicCounter.c
+++ b/MdeModulePkg/Universal/MonotonicCounterRuntimeDxe/MonotonicCounter
+++ .c
@@ -125,6 +125,9 @@ MonotonicCounterDriverGetNextMonotonicCount (
   @retval EFI_DEVICE_ERROR      The variable could not be saved due to a hardware failure.
   @retval EFI_OUT_OF_RESOURCES  If variable service reports that not enough storage
                                 is available to hold the variable and its data.
+  @retval EFI_UNSUPPORTED       This call is not supported by this platform at the time the call is made.
+                                The platform should describe this runtime service as unsupported at runtime
+                                via an EFI_RT_PROPERTIES_TABLE configuration table.
 
 **/
 EFI_STATUS
diff --git a/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c b/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c
index 3c360481f482..d394d237a53f 100644
--- a/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c
+++ b/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c
@@ -2385,10 +2385,19 @@ Done:
   @param Data                       The buffer to return the contents of the variable. May be NULL
                                     with a zero DataSize in order to determine the size buffer needed.
 
-  @return EFI_INVALID_PARAMETER     Invalid parameter.
-  @return EFI_SUCCESS               Find the specified variable.
-  @return EFI_NOT_FOUND             Not found.
-  @return EFI_BUFFER_TO_SMALL       DataSize is too small for the result.
+  @retval EFI_SUCCESS               The function completed successfully.
+  @retval EFI_NOT_FOUND             The variable was not found.
+  @retval EFI_BUFFER_TOO_SMALL      The DataSize is too small for the result.
+  @retval EFI_INVALID_PARAMETER     VariableName is NULL.
+  @retval EFI_INVALID_PARAMETER     VendorGuid is NULL.
+  @retval EFI_INVALID_PARAMETER     DataSize is NULL.
+  @retval EFI_INVALID_PARAMETER     The DataSize is not too small and Data is NULL.
+  @retval EFI_DEVICE_ERROR          The variable could not be retrieved due to a hardware error.
+  @retval EFI_SECURITY_VIOLATION    The variable could not be retrieved due to an authentication failure.
+  @retval EFI_UNSUPPORTED           After ExitBootServices() has been called, this return code may be returned
+                                    if no variable storage is supported. The platform should describe this
+                                    runtime service as unsupported at runtime via an EFI_RT_PROPERTIES_TABLE
+                                    configuration table.
 
 **/
 EFI_STATUS
@@ -2479,6 +2488,11 @@ Done:
                                     GUID of an existing variable.
   @retval EFI_INVALID_PARAMETER     Null-terminator is not found in the first VariableNameSize bytes of
                                     the input VariableName buffer.
+  @retval EFI_DEVICE_ERROR          The variable could not be retrieved due to a hardware error.
+  @retval EFI_UNSUPPORTED           After ExitBootServices() has been called, this return code may be returned
+                                    if no variable storage is supported. The platform should describe this
+                                    runtime service as unsupported at runtime via an EFI_RT_PROPERTIES_TABLE
+                                    configuration table.
 
 **/
 EFI_STATUS
@@ -2576,11 +2590,19 @@ VariableServiceGetNextVariableName (
                                           data, this value contains the required size.
   @param Data                             Data pointer.
 
-  @return EFI_INVALID_PARAMETER           Invalid parameter.
-  @return EFI_SUCCESS                     Set successfully.
-  @return EFI_OUT_OF_RESOURCES            Resource not enough to set variable.
-  @return EFI_NOT_FOUND                   Not found.
-  @return EFI_WRITE_PROTECTED             Variable is read-only.
+  @retval EFI_SUCCESS                     The function completed successfully.
+  @retval EFI_NOT_FOUND                   The variable was not found.
+  @retval EFI_BUFFER_TOO_SMALL            The DataSize is too small for the result.
+  @retval EFI_INVALID_PARAMETER           VariableName is NULL.
+  @retval EFI_INVALID_PARAMETER           VendorGuid is NULL.
+  @retval EFI_INVALID_PARAMETER           DataSize is NULL.
+  @retval EFI_INVALID_PARAMETER           The DataSize is not too small and Data is NULL.
+  @retval EFI_DEVICE_ERROR                The variable could not be retrieved due to a hardware error.
+  @retval EFI_SECURITY_VIOLATION          The variable could not be retrieved due to an authentication failure.
+  @retval EFI_UNSUPPORTED                 After ExitBootServices() has been called, this return code may be returned
+                                          if no variable storage is supported. The platform should describe this
+                                          runtime service as unsupported at runtime via an EFI_RT_PROPERTIES_TABLE
+                                          configuration table.
 
 **/
 EFI_STATUS
diff --git a/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.h b/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.h
index a668abb82b15..033c0625afb8 100644
--- a/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.h
+++ b/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.h
@@ -446,10 +446,19 @@ GetFvbInfoByAddress (
   @param Data                       The buffer to return the contents of the variable. May be NULL
                                     with a zero DataSize in order to determine the size buffer needed.
 
-  @return EFI_INVALID_PARAMETER     Invalid parameter.
-  @return EFI_SUCCESS               Find the specified variable.
-  @return EFI_NOT_FOUND             Not found.
-  @return EFI_BUFFER_TO_SMALL       DataSize is too small for the result.
+  @retval EFI_SUCCESS            The function completed successfully.
+  @retval EFI_NOT_FOUND          The variable was not found.
+  @retval EFI_BUFFER_TOO_SMALL   The DataSize is too small for the result.
+  @retval EFI_INVALID_PARAMETER  VariableName is NULL.
+  @retval EFI_INVALID_PARAMETER  VendorGuid is NULL.
+  @retval EFI_INVALID_PARAMETER  DataSize is NULL.
+  @retval EFI_INVALID_PARAMETER  The DataSize is not too small and Data is NULL.
+  @retval EFI_DEVICE_ERROR       The variable could not be retrieved due to a hardware error.
+  @retval EFI_SECURITY_VIOLATION The variable could not be retrieved due to an authentication failure.
+  @retval EFI_UNSUPPORTED        After ExitBootServices() has been called, this return code may be returned
+                                 if no variable storage is supported. The platform should describe this
+                                 runtime service as unsupported at runtime via an EFI_RT_PROPERTIES_TABLE
+                                 configuration table.
 
 **/
 EFI_STATUS
@@ -485,6 +494,11 @@ VariableServiceGetVariable (
                                     GUID of an existing variable.
   @retval EFI_INVALID_PARAMETER     Null-terminator is not found in the first VariableNameSize bytes of
                                     the input VariableName buffer.
+  @retval EFI_DEVICE_ERROR          The variable could not be retrieved due to a hardware error.
+  @retval EFI_UNSUPPORTED           After ExitBootServices() has been called, this return code may be returned
+                                    if no variable storage is supported. The platform should describe this
+                                    runtime service as unsupported at runtime via an EFI_RT_PROPERTIES_TABLE
+                                    configuration table.
 
 **/
 EFI_STATUS
@@ -513,11 +527,19 @@ VariableServiceGetNextVariableName (
                                           data, this value contains the required size.
   @param Data                             Data pointer.
 
-  @return EFI_INVALID_PARAMETER           Invalid parameter.
-  @return EFI_SUCCESS                     Set successfully.
-  @return EFI_OUT_OF_RESOURCES            Resource not enough to set variable.
-  @return EFI_NOT_FOUND                   Not found.
-  @return EFI_WRITE_PROTECTED             Variable is read-only.
+  @retval EFI_SUCCESS                     The function completed successfully.
+  @retval EFI_NOT_FOUND                   The variable was not found.
+  @retval EFI_BUFFER_TOO_SMALL            The DataSize is too small for the result.
+  @retval EFI_INVALID_PARAMETER           VariableName is NULL.
+  @retval EFI_INVALID_PARAMETER           VendorGuid is NULL.
+  @retval EFI_INVALID_PARAMETER           DataSize is NULL.
+  @retval EFI_INVALID_PARAMETER           The DataSize is not too small and Data is NULL.
+  @retval EFI_DEVICE_ERROR                The variable could not be retrieved due to a hardware error.
+  @retval EFI_SECURITY_VIOLATION          The variable could not be retrieved due to an authentication failure.
+  @retval EFI_UNSUPPORTED                 After ExitBootServices() has been called, this return code may be returned
+                                          if no variable storage is supported. The platform should describe this
+                                          runtime service as unsupported at runtime via an EFI_RT_PROPERTIES_TABLE
+                                          configuration table.
 
 **/
 EFI_STATUS
diff --git a/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmmRuntimeDxe.c b/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmmRuntimeDxe.c
index 4aaeb5ba8806..6930875e9fe0 100644
--- a/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmmRuntimeDxe.c
+++ b/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmmRuntimeDxe.c
@@ -831,10 +831,19 @@ Done:
                                      data, this value contains the required size.
   @param[out]     Data               Data pointer.
 
-  @retval EFI_INVALID_PARAMETER      Invalid parameter.
-  @retval EFI_SUCCESS                Find the specified variable.
-  @retval EFI_NOT_FOUND              Not found.
-  @retval EFI_BUFFER_TO_SMALL        DataSize is too small for the result.
+  @retval EFI_SUCCESS                The function completed successfully.
+  @retval EFI_NOT_FOUND              The variable was not found.
+  @retval EFI_BUFFER_TOO_SMALL       The DataSize is too small for the result.
+  @retval EFI_INVALID_PARAMETER      VariableName is NULL.
+  @retval EFI_INVALID_PARAMETER      VendorGuid is NULL.
+  @retval EFI_INVALID_PARAMETER      DataSize is NULL.
+  @retval EFI_INVALID_PARAMETER      The DataSize is not too small and Data is NULL.
+  @retval EFI_DEVICE_ERROR           The variable could not be retrieved due to a hardware error.
+  @retval EFI_SECURITY_VIOLATION     The variable could not be retrieved due to an authentication failure.
+  @retval EFI_UNSUPPORTED            After ExitBootServices() has been called, this return code may be returned
+                                     if no variable storage is supported. The platform should describe this
+                                     runtime service as unsupported at runtime via an EFI_RT_PROPERTIES_TABLE
+                                     configuration table.
 
 **/
 EFI_STATUS
@@ -876,10 +885,22 @@ RuntimeServiceGetVariable (
   @param[in, out] VariableName       Pointer to variable name.
   @param[in, out] VendorGuid         Variable Vendor Guid.
 
-  @retval EFI_INVALID_PARAMETER      Invalid parameter.
-  @retval EFI_SUCCESS                Find the specified variable.
-  @retval EFI_NOT_FOUND              Not found.
-  @retval EFI_BUFFER_TO_SMALL        DataSize is too small for the result.
+  @retval EFI_SUCCESS                The function completed successfully.
+  @retval EFI_NOT_FOUND              The next variable was not found.
+  @retval EFI_BUFFER_TOO_SMALL       The VariableNameSize is too small for the result.
+                                     VariableNameSize has been updated with the size needed to complete the request.
+  @retval EFI_INVALID_PARAMETER      VariableNameSize is NULL.
+  @retval EFI_INVALID_PARAMETER      VariableName is NULL.
+  @retval EFI_INVALID_PARAMETER      VendorGuid is NULL.
+  @retval EFI_INVALID_PARAMETER      The input values of VariableName and VendorGuid are not a name and
+                                     GUID of an existing variable.
+  @retval EFI_INVALID_PARAMETER      Null-terminator is not found in the first VariableNameSize bytes of
+                                     the input VariableName buffer.
+  @retval EFI_DEVICE_ERROR           The variable could not be retrieved due to a hardware error.
+  @retval EFI_UNSUPPORTED            After ExitBootServices() has been called, this return code may be returned
+                                     if no variable storage is supported. The platform should describe this
+                                     runtime service as unsupported at runtime via an EFI_RT_PROPERTIES_TABLE
+                                     configuration table.
 
 **/
 EFI_STATUS
@@ -951,10 +972,22 @@ GetNextVariableNameInRuntimeCache (
   @param[in, out] VariableName       Pointer to variable name.
   @param[in, out] VendorGuid         Variable Vendor Guid.
 
-  @retval EFI_INVALID_PARAMETER      Invalid parameter.
-  @retval EFI_SUCCESS                Find the specified variable.
-  @retval EFI_NOT_FOUND              Not found.
-  @retval EFI_BUFFER_TO_SMALL        DataSize is too small for the result.
+  @retval EFI_SUCCESS                The function completed successfully.
+  @retval EFI_NOT_FOUND              The next variable was not found.
+  @retval EFI_BUFFER_TOO_SMALL       The VariableNameSize is too small for the result.
+                                     VariableNameSize has been updated with the size needed to complete the request.
+  @retval EFI_INVALID_PARAMETER      VariableNameSize is NULL.
+  @retval EFI_INVALID_PARAMETER      VariableName is NULL.
+  @retval EFI_INVALID_PARAMETER      VendorGuid is NULL.
+  @retval EFI_INVALID_PARAMETER      The input values of VariableName and VendorGuid are not a name and
+                                     GUID of an existing variable.
+  @retval EFI_INVALID_PARAMETER      Null-terminator is not found in the first VariableNameSize bytes of
+                                     the input VariableName buffer.
+  @retval EFI_DEVICE_ERROR           The variable could not be retrieved due to a hardware error.
+  @retval EFI_UNSUPPORTED            After ExitBootServices() has been called, this return code may be returned
+                                     if no variable storage is supported. The platform should describe this
+                                     runtime service as unsupported at runtime via an EFI_RT_PROPERTIES_TABLE
+                                     configuration table.
 
 **/
 EFI_STATUS
@@ -1052,10 +1085,22 @@ Done:
   @param[in, out] VariableName       Pointer to variable name.
   @param[in, out] VendorGuid         Variable Vendor Guid.
 
-  @retval EFI_INVALID_PARAMETER      Invalid parameter.
-  @retval EFI_SUCCESS                Find the specified variable.
-  @retval EFI_NOT_FOUND              Not found.
-  @retval EFI_BUFFER_TO_SMALL        DataSize is too small for the result.
+  @retval EFI_SUCCESS                The function completed successfully.
+  @retval EFI_NOT_FOUND              The next variable was not found.
+  @retval EFI_BUFFER_TOO_SMALL       The VariableNameSize is too small for the result.
+                                     VariableNameSize has been updated with the size needed to complete the request.
+  @retval EFI_INVALID_PARAMETER      VariableNameSize is NULL.
+  @retval EFI_INVALID_PARAMETER      VariableName is NULL.
+  @retval EFI_INVALID_PARAMETER      VendorGuid is NULL.
+  @retval EFI_INVALID_PARAMETER      The input values of VariableName and VendorGuid are not a name and
+                                     GUID of an existing variable.
+  @retval EFI_INVALID_PARAMETER      Null-terminator is not found in the first VariableNameSize bytes of
+                                     the input VariableName buffer.
+  @retval EFI_DEVICE_ERROR           The variable could not be retrieved due to a hardware error.
+  @retval EFI_UNSUPPORTED            After ExitBootServices() has been called, this return code may be returned
+                                     if no variable storage is supported. The platform should describe this
+                                     runtime service as unsupported at runtime via an EFI_RT_PROPERTIES_TABLE
+                                     configuration table.
 
 **/
 EFI_STATUS
@@ -1112,11 +1157,23 @@ RuntimeServiceGetNextVariableName (
                                           data, this value contains the required size.
   @param[in] Data                         Data pointer.
 
-  @retval EFI_INVALID_PARAMETER           Invalid parameter.
-  @retval EFI_SUCCESS                     Set successfully.
-  @retval EFI_OUT_OF_RESOURCES            Resource not enough to set variable.
-  @retval EFI_NOT_FOUND                   Not found.
-  @retval EFI_WRITE_PROTECTED             Variable is read-only.
+  @retval EFI_SUCCESS                     The firmware has successfully stored the variable and its data as
+                                          defined by the Attributes.
+  @retval EFI_INVALID_PARAMETER           An invalid combination of attribute bits, name, and GUID was supplied, or the
+                                          DataSize exceeds the maximum allowed.
+  @retval EFI_INVALID_PARAMETER           VariableName is an empty string.
+  @retval EFI_OUT_OF_RESOURCES            Not enough storage is available to hold the variable and its data.
+  @retval EFI_DEVICE_ERROR                The variable could not be retrieved due to a hardware error.
+  @retval EFI_WRITE_PROTECTED             The variable in question is read-only.
+  @retval EFI_WRITE_PROTECTED             The variable in question cannot be deleted.
+  @retval EFI_SECURITY_VIOLATION          The variable could not be written due to
+                                          EFI_VARIABLE_TIME_BASED_AUTHENTICATED_WRITE_ACESS being set,
+                                          but the AuthInfo does NOT pass the validation check carried out by the firmware.
+
+  @retval EFI_NOT_FOUND                   The variable trying to be updated or deleted was not found.
+  @retval EFI_UNSUPPORTED                 This call is not supported by this platform at the time the call is made.
+                                          The platform should describe this runtime service as unsupported at runtime
+                                          via an EFI_RT_PROPERTIES_TABLE configuration table.
 
 **/
 EFI_STATUS
--
2.26.2.windows.1








-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#114984): https://edk2.groups.io/g/devel/message/114984
Mute This Topic: https://groups.io/mt/104111192/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-



^ permalink raw reply related	[flat|nested] 15+ messages in thread

* Re: [edk2-devel] [PATCH V2 2/5] MdeModulePkg: Update some Runtime Service functions header
  2024-02-02  1:23   ` [edk2-devel] [PATCH V2 2/5] MdeModulePkg: " Ren, Suqiang
@ 2024-02-02  2:40     ` Michael D Kinney
  0 siblings, 0 replies; 15+ messages in thread
From: Michael D Kinney @ 2024-02-02  2:40 UTC (permalink / raw)
  To: Ren, SuqiangX, devel@edk2.groups.io
  Cc: Liming Gao, Tan, Ming, Kinney, Michael D

I think Leif's feedback on the commit message applies to
all patches in the series.

Please review and update based on that feedback.

Thanks,

Mike

> -----Original Message-----
> From: Ren, SuqiangX <suqiangx.ren@intel.com>
> Sent: Thursday, February 1, 2024 5:24 PM
> To: devel@edk2.groups.io; Kinney, Michael D <michael.d.kinney@intel.com>
> Cc: Liming Gao <gaoliming@byosoft.com.cn>; Ren, SuqiangX
> <suqiangx.ren@intel.com>; Tan, Ming <ming.tan@intel.com>
> Subject: RE: [edk2-devel] [PATCH V2 2/5] MdeModulePkg: Update some Runtime
> Service functions header
> 
> Hi Mike,
> 
> 	Do you have any comment about this package's change?
> 
> 	If yes, I will sent a V3 patch change both this package and
> ArmPlatformPkg.
> 
> 	If no, I will only change ArmPlatformPkg's commit message suggested by
> Leif.
> 
> 
> Thanks
> Ren, Suqiang
> 
> -----Original Message-----
> From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Ren, Suqiang
> Sent: Monday, January 29, 2024 10:30 AM
> To: devel@edk2.groups.io
> Cc: Liming Gao <gaoliming@byosoft.com.cn>; Kinney, Michael D
> <michael.d.kinney@intel.com>
> Subject: [edk2-devel] [PATCH V2 2/5] MdeModulePkg: Update some Runtime
> Service functions header
> 
> Update some Runtime Service functions header to align with UEFI spec 2.10.
> 
> REF: UEFI spec 2.10 section 8 Services — Runtime Services
> 
> Signed-off-by: Suqiang Ren <suqiangx.ren@intel.com>
> Cc: Liming Gao <gaoliming@byosoft.com.cn>
> Cc: Michael D Kinney <michael.d.kinney@intel.com>
> ---
>  MdeModulePkg/Core/RuntimeDxe/Runtime.c        | 10 +-
>  MdeModulePkg/Core/RuntimeDxe/Runtime.h        | 10 +-
>  .../CapsuleRuntimeDxe/CapsuleService.c        | 13 +++
>  .../MonotonicCounter.c                        |  3 +
>  .../Universal/Variable/RuntimeDxe/Variable.c  | 40 ++++++--
> .../Universal/Variable/RuntimeDxe/Variable.h  | 40 ++++++--
>  .../RuntimeDxe/VariableSmmRuntimeDxe.c        | 99 +++++++++++++++----
>  7 files changed, 174 insertions(+), 41 deletions(-)
> 
> diff --git a/MdeModulePkg/Core/RuntimeDxe/Runtime.c
> b/MdeModulePkg/Core/RuntimeDxe/Runtime.c
> index de8f2bfce0f8..c66ed71e35e1 100644
> --- a/MdeModulePkg/Core/RuntimeDxe/Runtime.c
> +++ b/MdeModulePkg/Core/RuntimeDxe/Runtime.c
> @@ -117,7 +117,12 @@ RuntimeDriverCalculateEfiHdrCrc (
>    @retval  EFI_SUCCESS              The pointer pointed to by Address was
> modified.
>    @retval  EFI_NOT_FOUND            The pointer pointed to by Address was
> not found to be part
>                                      of the current memory map. This is
> normally fatal.
> -  @retval  EFI_INVALID_PARAMETER    One of the parameters has an invalid
> value.
> +  @retval  EFI_INVALID_PARAMETER    1) Address is NULL.
> +                                    2) *Address is NULL and DebugDisposition
> does
> +                                    not have the EFI_OPTIONAL_PTR bit set.
> +  @retval  EFI_UNSUPPORTED          This call is not supported by this
> platform at the time the call is made.
> +                                    The platform should describe this
> runtime service as unsupported at runtime
> +                                    via an EFI_RT_PROPERTIES_TABLE
> configuration table.
> 
>  **/
>  EFI_STATUS
> @@ -227,6 +232,9 @@ RuntimeDriverConvertInternalPointer (
>                                    map that requires a mapping.
>    @retval  EFI_NOT_FOUND          A virtual address was supplied for an
> address that is not found
>                                    in the memory map.
> +  @retval  EFI_UNSUPPORTED        This call is not supported by this
> platform at the time the call is made.
> +                                  The platform should describe this runtime
> service as unsupported at runtime
> +                                  via an EFI_RT_PROPERTIES_TABLE
> configuration table.
> 
>  **/
>  EFI_STATUS
> diff --git a/MdeModulePkg/Core/RuntimeDxe/Runtime.h
> b/MdeModulePkg/Core/RuntimeDxe/Runtime.h
> index cc422e783f65..1e28b98d78e8 100644
> --- a/MdeModulePkg/Core/RuntimeDxe/Runtime.h
> +++ b/MdeModulePkg/Core/RuntimeDxe/Runtime.h
> @@ -59,7 +59,12 @@ RuntimeDriverCalculateCrc32 (
>    @retval  EFI_SUCCESS              The pointer pointed to by Address was
> modified.
>    @retval  EFI_NOT_FOUND            The pointer pointed to by Address was
> not found to be part
>                                      of the current memory map. This is
> normally fatal.
> -  @retval  EFI_INVALID_PARAMETER    One of the parameters has an invalid
> value.
> +  @retval  EFI_INVALID_PARAMETER    1) Address is NULL.
> +                                    2) *Address is NULL and DebugDisposition
> does
> +                                    not have the EFI_OPTIONAL_PTR bit set.
> +  @retval  EFI_UNSUPPORTED          This call is not supported by this
> platform at the time the call is made.
> +                                    The platform should describe this
> runtime service as unsupported at runtime
> +                                    via an EFI_RT_PROPERTIES_TABLE
> configuration table.
> 
>  **/
>  EFI_STATUS
> @@ -86,6 +91,9 @@ RuntimeDriverConvertPointer (
>                                    map that requires a mapping.
>    @retval  EFI_NOT_FOUND          A virtual address was supplied for an
> address that is not found
>                                    in the memory map.
> +  @retval  EFI_UNSUPPORTED        This call is not supported by this
> platform at the time the call is made.
> +                                  The platform should describe this runtime
> service as unsupported at runtime
> +                                  via an EFI_RT_PROPERTIES_TABLE
> configuration table.
> 
>  **/
>  EFI_STATUS
> diff --git a/MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleService.c
> b/MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleService.c
> index 50968a839e84..f8047c23e17c 100644
> --- a/MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleService.c
> +++ b/MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleService.c
> @@ -53,6 +53,9 @@ UINT32  mMaxSizeNonPopulateCapsule = 0;
>                                  in runtime. The caller may resubmit the
> capsule prior to ExitBootServices().
>    @retval EFI_OUT_OF_RESOURCES  When ExitBootServices() has not been
> previously called then this error indicates
>                                  the capsule is compatible with this platform
> but there are insufficient resources to process.
> +  @retval EFI_UNSUPPORTED       This call is not supported by this platform
> at the time the call is made.
> +                                The platform should describe this runtime
> service as unsupported at runtime
> +                                via an EFI_RT_PROPERTIES_TABLE configuration
> table.
> 
>  **/
>  EFI_STATUS
> @@ -247,6 +250,16 @@ UpdateCapsule (
>                                  MaximumCapsuleSize and ResetType are
> undefined.
>    @retval EFI_INVALID_PARAMETER MaximumCapsuleSize is NULL, or ResetTyep is
> NULL,
>                                  Or CapsuleCount is Zero, or CapsuleImage is
> not valid.
> +  @retval EFI_OUT_OF_RESOURCES  When ExitBootServices() has been previously
> called this error indicates
> +                                the capsule is compatible with this platform
> but is not capable of
> +                                being submitted or processed in runtime.
> +                                The caller may resubmit the capsule prior to
> ExitBootServices().
> +  @retval EFI_OUT_OF_RESOURCES  When ExitBootServices() has not been
> previously called then this error
> +                                indicates the capsule is compatible with
> this platform but there are
> +                                insufficient resources to process.
> +  @retval EFI_UNSUPPORTED       This call is not supported by this platform
> at the time the call is made.
> +                                The platform should describe this runtime
> service as unsupported at runtime
> +                                via an EFI_RT_PROPERTIES_TABLE configuration
> table.
> 
>  **/
>  EFI_STATUS
> diff --git
> a/MdeModulePkg/Universal/MonotonicCounterRuntimeDxe/MonotonicCounter.c
> b/MdeModulePkg/Universal/MonotonicCounterRuntimeDxe/MonotonicCounter.c
> index 60b6e9350b7f..3e74713cc5be 100644
> --- a/MdeModulePkg/Universal/MonotonicCounterRuntimeDxe/MonotonicCounter.c
> +++ b/MdeModulePkg/Universal/MonotonicCounterRuntimeDxe/MonotonicCounter
> +++ .c
> @@ -125,6 +125,9 @@ MonotonicCounterDriverGetNextMonotonicCount (
>    @retval EFI_DEVICE_ERROR      The variable could not be saved due to a
> hardware failure.
>    @retval EFI_OUT_OF_RESOURCES  If variable service reports that not enough
> storage
>                                  is available to hold the variable and its
> data.
> +  @retval EFI_UNSUPPORTED       This call is not supported by this platform
> at the time the call is made.
> +                                The platform should describe this runtime
> service as unsupported at runtime
> +                                via an EFI_RT_PROPERTIES_TABLE configuration
> table.
> 
>  **/
>  EFI_STATUS
> diff --git a/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c
> b/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c
> index 3c360481f482..d394d237a53f 100644
> --- a/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c
> +++ b/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c
> @@ -2385,10 +2385,19 @@ Done:
>    @param Data                       The buffer to return the contents of the
> variable. May be NULL
>                                      with a zero DataSize in order to
> determine the size buffer needed.
> 
> -  @return EFI_INVALID_PARAMETER     Invalid parameter.
> -  @return EFI_SUCCESS               Find the specified variable.
> -  @return EFI_NOT_FOUND             Not found.
> -  @return EFI_BUFFER_TO_SMALL       DataSize is too small for the result.
> +  @retval EFI_SUCCESS               The function completed successfully.
> +  @retval EFI_NOT_FOUND             The variable was not found.
> +  @retval EFI_BUFFER_TOO_SMALL      The DataSize is too small for the
> result.
> +  @retval EFI_INVALID_PARAMETER     VariableName is NULL.
> +  @retval EFI_INVALID_PARAMETER     VendorGuid is NULL.
> +  @retval EFI_INVALID_PARAMETER     DataSize is NULL.
> +  @retval EFI_INVALID_PARAMETER     The DataSize is not too small and Data
> is NULL.
> +  @retval EFI_DEVICE_ERROR          The variable could not be retrieved due
> to a hardware error.
> +  @retval EFI_SECURITY_VIOLATION    The variable could not be retrieved due
> to an authentication failure.
> +  @retval EFI_UNSUPPORTED           After ExitBootServices() has been
> called, this return code may be returned
> +                                    if no variable storage is supported. The
> platform should describe this
> +                                    runtime service as unsupported at
> runtime via an EFI_RT_PROPERTIES_TABLE
> +                                    configuration table.
> 
>  **/
>  EFI_STATUS
> @@ -2479,6 +2488,11 @@ Done:
>                                      GUID of an existing variable.
>    @retval EFI_INVALID_PARAMETER     Null-terminator is not found in the
> first VariableNameSize bytes of
>                                      the input VariableName buffer.
> +  @retval EFI_DEVICE_ERROR          The variable could not be retrieved due
> to a hardware error.
> +  @retval EFI_UNSUPPORTED           After ExitBootServices() has been
> called, this return code may be returned
> +                                    if no variable storage is supported. The
> platform should describe this
> +                                    runtime service as unsupported at
> runtime via an EFI_RT_PROPERTIES_TABLE
> +                                    configuration table.
> 
>  **/
>  EFI_STATUS
> @@ -2576,11 +2590,19 @@ VariableServiceGetNextVariableName (
>                                            data, this value contains the
> required size.
>    @param Data                             Data pointer.
> 
> -  @return EFI_INVALID_PARAMETER           Invalid parameter.
> -  @return EFI_SUCCESS                     Set successfully.
> -  @return EFI_OUT_OF_RESOURCES            Resource not enough to set
> variable.
> -  @return EFI_NOT_FOUND                   Not found.
> -  @return EFI_WRITE_PROTECTED             Variable is read-only.
> +  @retval EFI_SUCCESS                     The function completed
> successfully.
> +  @retval EFI_NOT_FOUND                   The variable was not found.
> +  @retval EFI_BUFFER_TOO_SMALL            The DataSize is too small for the
> result.
> +  @retval EFI_INVALID_PARAMETER           VariableName is NULL.
> +  @retval EFI_INVALID_PARAMETER           VendorGuid is NULL.
> +  @retval EFI_INVALID_PARAMETER           DataSize is NULL.
> +  @retval EFI_INVALID_PARAMETER           The DataSize is not too small and
> Data is NULL.
> +  @retval EFI_DEVICE_ERROR                The variable could not be
> retrieved due to a hardware error.
> +  @retval EFI_SECURITY_VIOLATION          The variable could not be
> retrieved due to an authentication failure.
> +  @retval EFI_UNSUPPORTED                 After ExitBootServices() has been
> called, this return code may be returned
> +                                          if no variable storage is
> supported. The platform should describe this
> +                                          runtime service as unsupported at
> runtime via an EFI_RT_PROPERTIES_TABLE
> +                                          configuration table.
> 
>  **/
>  EFI_STATUS
> diff --git a/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.h
> b/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.h
> index a668abb82b15..033c0625afb8 100644
> --- a/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.h
> +++ b/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.h
> @@ -446,10 +446,19 @@ GetFvbInfoByAddress (
>    @param Data                       The buffer to return the contents of the
> variable. May be NULL
>                                      with a zero DataSize in order to
> determine the size buffer needed.
> 
> -  @return EFI_INVALID_PARAMETER     Invalid parameter.
> -  @return EFI_SUCCESS               Find the specified variable.
> -  @return EFI_NOT_FOUND             Not found.
> -  @return EFI_BUFFER_TO_SMALL       DataSize is too small for the result.
> +  @retval EFI_SUCCESS            The function completed successfully.
> +  @retval EFI_NOT_FOUND          The variable was not found.
> +  @retval EFI_BUFFER_TOO_SMALL   The DataSize is too small for the result.
> +  @retval EFI_INVALID_PARAMETER  VariableName is NULL.
> +  @retval EFI_INVALID_PARAMETER  VendorGuid is NULL.
> +  @retval EFI_INVALID_PARAMETER  DataSize is NULL.
> +  @retval EFI_INVALID_PARAMETER  The DataSize is not too small and Data is
> NULL.
> +  @retval EFI_DEVICE_ERROR       The variable could not be retrieved due to
> a hardware error.
> +  @retval EFI_SECURITY_VIOLATION The variable could not be retrieved due to
> an authentication failure.
> +  @retval EFI_UNSUPPORTED        After ExitBootServices() has been called,
> this return code may be returned
> +                                 if no variable storage is supported. The
> platform should describe this
> +                                 runtime service as unsupported at runtime
> via an EFI_RT_PROPERTIES_TABLE
> +                                 configuration table.
> 
>  **/
>  EFI_STATUS
> @@ -485,6 +494,11 @@ VariableServiceGetVariable (
>                                      GUID of an existing variable.
>    @retval EFI_INVALID_PARAMETER     Null-terminator is not found in the
> first VariableNameSize bytes of
>                                      the input VariableName buffer.
> +  @retval EFI_DEVICE_ERROR          The variable could not be retrieved due
> to a hardware error.
> +  @retval EFI_UNSUPPORTED           After ExitBootServices() has been
> called, this return code may be returned
> +                                    if no variable storage is supported. The
> platform should describe this
> +                                    runtime service as unsupported at
> runtime via an EFI_RT_PROPERTIES_TABLE
> +                                    configuration table.
> 
>  **/
>  EFI_STATUS
> @@ -513,11 +527,19 @@ VariableServiceGetNextVariableName (
>                                            data, this value contains the
> required size.
>    @param Data                             Data pointer.
> 
> -  @return EFI_INVALID_PARAMETER           Invalid parameter.
> -  @return EFI_SUCCESS                     Set successfully.
> -  @return EFI_OUT_OF_RESOURCES            Resource not enough to set
> variable.
> -  @return EFI_NOT_FOUND                   Not found.
> -  @return EFI_WRITE_PROTECTED             Variable is read-only.
> +  @retval EFI_SUCCESS                     The function completed
> successfully.
> +  @retval EFI_NOT_FOUND                   The variable was not found.
> +  @retval EFI_BUFFER_TOO_SMALL            The DataSize is too small for the
> result.
> +  @retval EFI_INVALID_PARAMETER           VariableName is NULL.
> +  @retval EFI_INVALID_PARAMETER           VendorGuid is NULL.
> +  @retval EFI_INVALID_PARAMETER           DataSize is NULL.
> +  @retval EFI_INVALID_PARAMETER           The DataSize is not too small and
> Data is NULL.
> +  @retval EFI_DEVICE_ERROR                The variable could not be
> retrieved due to a hardware error.
> +  @retval EFI_SECURITY_VIOLATION          The variable could not be
> retrieved due to an authentication failure.
> +  @retval EFI_UNSUPPORTED                 After ExitBootServices() has been
> called, this return code may be returned
> +                                          if no variable storage is
> supported. The platform should describe this
> +                                          runtime service as unsupported at
> runtime via an EFI_RT_PROPERTIES_TABLE
> +                                          configuration table.
> 
>  **/
>  EFI_STATUS
> diff --git
> a/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmmRuntimeDxe.c
> b/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmmRuntimeDxe.c
> index 4aaeb5ba8806..6930875e9fe0 100644
> --- a/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmmRuntimeDxe.c
> +++ b/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmmRuntimeDxe.c
> @@ -831,10 +831,19 @@ Done:
>                                       data, this value contains the required
> size.
>    @param[out]     Data               Data pointer.
> 
> -  @retval EFI_INVALID_PARAMETER      Invalid parameter.
> -  @retval EFI_SUCCESS                Find the specified variable.
> -  @retval EFI_NOT_FOUND              Not found.
> -  @retval EFI_BUFFER_TO_SMALL        DataSize is too small for the result.
> +  @retval EFI_SUCCESS                The function completed successfully.
> +  @retval EFI_NOT_FOUND              The variable was not found.
> +  @retval EFI_BUFFER_TOO_SMALL       The DataSize is too small for the
> result.
> +  @retval EFI_INVALID_PARAMETER      VariableName is NULL.
> +  @retval EFI_INVALID_PARAMETER      VendorGuid is NULL.
> +  @retval EFI_INVALID_PARAMETER      DataSize is NULL.
> +  @retval EFI_INVALID_PARAMETER      The DataSize is not too small and Data
> is NULL.
> +  @retval EFI_DEVICE_ERROR           The variable could not be retrieved due
> to a hardware error.
> +  @retval EFI_SECURITY_VIOLATION     The variable could not be retrieved due
> to an authentication failure.
> +  @retval EFI_UNSUPPORTED            After ExitBootServices() has been
> called, this return code may be returned
> +                                     if no variable storage is supported.
> The platform should describe this
> +                                     runtime service as unsupported at
> runtime via an EFI_RT_PROPERTIES_TABLE
> +                                     configuration table.
> 
>  **/
>  EFI_STATUS
> @@ -876,10 +885,22 @@ RuntimeServiceGetVariable (
>    @param[in, out] VariableName       Pointer to variable name.
>    @param[in, out] VendorGuid         Variable Vendor Guid.
> 
> -  @retval EFI_INVALID_PARAMETER      Invalid parameter.
> -  @retval EFI_SUCCESS                Find the specified variable.
> -  @retval EFI_NOT_FOUND              Not found.
> -  @retval EFI_BUFFER_TO_SMALL        DataSize is too small for the result.
> +  @retval EFI_SUCCESS                The function completed successfully.
> +  @retval EFI_NOT_FOUND              The next variable was not found.
> +  @retval EFI_BUFFER_TOO_SMALL       The VariableNameSize is too small for
> the result.
> +                                     VariableNameSize has been updated with
> the size needed to complete the request.
> +  @retval EFI_INVALID_PARAMETER      VariableNameSize is NULL.
> +  @retval EFI_INVALID_PARAMETER      VariableName is NULL.
> +  @retval EFI_INVALID_PARAMETER      VendorGuid is NULL.
> +  @retval EFI_INVALID_PARAMETER      The input values of VariableName and
> VendorGuid are not a name and
> +                                     GUID of an existing variable.
> +  @retval EFI_INVALID_PARAMETER      Null-terminator is not found in the
> first VariableNameSize bytes of
> +                                     the input VariableName buffer.
> +  @retval EFI_DEVICE_ERROR           The variable could not be retrieved due
> to a hardware error.
> +  @retval EFI_UNSUPPORTED            After ExitBootServices() has been
> called, this return code may be returned
> +                                     if no variable storage is supported.
> The platform should describe this
> +                                     runtime service as unsupported at
> runtime via an EFI_RT_PROPERTIES_TABLE
> +                                     configuration table.
> 
>  **/
>  EFI_STATUS
> @@ -951,10 +972,22 @@ GetNextVariableNameInRuntimeCache (
>    @param[in, out] VariableName       Pointer to variable name.
>    @param[in, out] VendorGuid         Variable Vendor Guid.
> 
> -  @retval EFI_INVALID_PARAMETER      Invalid parameter.
> -  @retval EFI_SUCCESS                Find the specified variable.
> -  @retval EFI_NOT_FOUND              Not found.
> -  @retval EFI_BUFFER_TO_SMALL        DataSize is too small for the result.
> +  @retval EFI_SUCCESS                The function completed successfully.
> +  @retval EFI_NOT_FOUND              The next variable was not found.
> +  @retval EFI_BUFFER_TOO_SMALL       The VariableNameSize is too small for
> the result.
> +                                     VariableNameSize has been updated with
> the size needed to complete the request.
> +  @retval EFI_INVALID_PARAMETER      VariableNameSize is NULL.
> +  @retval EFI_INVALID_PARAMETER      VariableName is NULL.
> +  @retval EFI_INVALID_PARAMETER      VendorGuid is NULL.
> +  @retval EFI_INVALID_PARAMETER      The input values of VariableName and
> VendorGuid are not a name and
> +                                     GUID of an existing variable.
> +  @retval EFI_INVALID_PARAMETER      Null-terminator is not found in the
> first VariableNameSize bytes of
> +                                     the input VariableName buffer.
> +  @retval EFI_DEVICE_ERROR           The variable could not be retrieved due
> to a hardware error.
> +  @retval EFI_UNSUPPORTED            After ExitBootServices() has been
> called, this return code may be returned
> +                                     if no variable storage is supported.
> The platform should describe this
> +                                     runtime service as unsupported at
> runtime via an EFI_RT_PROPERTIES_TABLE
> +                                     configuration table.
> 
>  **/
>  EFI_STATUS
> @@ -1052,10 +1085,22 @@ Done:
>    @param[in, out] VariableName       Pointer to variable name.
>    @param[in, out] VendorGuid         Variable Vendor Guid.
> 
> -  @retval EFI_INVALID_PARAMETER      Invalid parameter.
> -  @retval EFI_SUCCESS                Find the specified variable.
> -  @retval EFI_NOT_FOUND              Not found.
> -  @retval EFI_BUFFER_TO_SMALL        DataSize is too small for the result.
> +  @retval EFI_SUCCESS                The function completed successfully.
> +  @retval EFI_NOT_FOUND              The next variable was not found.
> +  @retval EFI_BUFFER_TOO_SMALL       The VariableNameSize is too small for
> the result.
> +                                     VariableNameSize has been updated with
> the size needed to complete the request.
> +  @retval EFI_INVALID_PARAMETER      VariableNameSize is NULL.
> +  @retval EFI_INVALID_PARAMETER      VariableName is NULL.
> +  @retval EFI_INVALID_PARAMETER      VendorGuid is NULL.
> +  @retval EFI_INVALID_PARAMETER      The input values of VariableName and
> VendorGuid are not a name and
> +                                     GUID of an existing variable.
> +  @retval EFI_INVALID_PARAMETER      Null-terminator is not found in the
> first VariableNameSize bytes of
> +                                     the input VariableName buffer.
> +  @retval EFI_DEVICE_ERROR           The variable could not be retrieved due
> to a hardware error.
> +  @retval EFI_UNSUPPORTED            After ExitBootServices() has been
> called, this return code may be returned
> +                                     if no variable storage is supported.
> The platform should describe this
> +                                     runtime service as unsupported at
> runtime via an EFI_RT_PROPERTIES_TABLE
> +                                     configuration table.
> 
>  **/
>  EFI_STATUS
> @@ -1112,11 +1157,23 @@ RuntimeServiceGetNextVariableName (
>                                            data, this value contains the
> required size.
>    @param[in] Data                         Data pointer.
> 
> -  @retval EFI_INVALID_PARAMETER           Invalid parameter.
> -  @retval EFI_SUCCESS                     Set successfully.
> -  @retval EFI_OUT_OF_RESOURCES            Resource not enough to set
> variable.
> -  @retval EFI_NOT_FOUND                   Not found.
> -  @retval EFI_WRITE_PROTECTED             Variable is read-only.
> +  @retval EFI_SUCCESS                     The firmware has successfully
> stored the variable and its data as
> +                                          defined by the Attributes.
> +  @retval EFI_INVALID_PARAMETER           An invalid combination of
> attribute bits, name, and GUID was supplied, or the
> +                                          DataSize exceeds the maximum
> allowed.
> +  @retval EFI_INVALID_PARAMETER           VariableName is an empty string.
> +  @retval EFI_OUT_OF_RESOURCES            Not enough storage is available to
> hold the variable and its data.
> +  @retval EFI_DEVICE_ERROR                The variable could not be
> retrieved due to a hardware error.
> +  @retval EFI_WRITE_PROTECTED             The variable in question is read-
> only.
> +  @retval EFI_WRITE_PROTECTED             The variable in question cannot be
> deleted.
> +  @retval EFI_SECURITY_VIOLATION          The variable could not be written
> due to
> +
> EFI_VARIABLE_TIME_BASED_AUTHENTICATED_WRITE_ACESS being set,
> +                                          but the AuthInfo does NOT pass the
> validation check carried out by the firmware.
> +
> +  @retval EFI_NOT_FOUND                   The variable trying to be updated
> or deleted was not found.
> +  @retval EFI_UNSUPPORTED                 This call is not supported by this
> platform at the time the call is made.
> +                                          The platform should describe this
> runtime service as unsupported at runtime
> +                                          via an EFI_RT_PROPERTIES_TABLE
> configuration table.
> 
>  **/
>  EFI_STATUS
> --
> 2.26.2.windows.1
> 
> 
> 
> 
> 



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#115005): https://edk2.groups.io/g/devel/message/115005
Mute This Topic: https://groups.io/mt/104111192/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-



^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2024-02-02  2:40 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-01-29  2:29 [edk2-devel] [PATCH V2 0/5] Add EFI_UNSUPPORTED return for some Runtime Service functions Ren, Suqiang
2024-01-29  2:29 ` [edk2-devel] [PATCH V2 1/5] MdePkg: " Ren, Suqiang
2024-01-29  3:48   ` Michael D Kinney
2024-01-29  2:29 ` [edk2-devel] [PATCH V2 2/5] MdeModulePkg: Update some Runtime Service functions header Ren, Suqiang
2024-01-29  2:29 ` [edk2-devel] [PATCH V2 3/5] EmbeddedPkg: " Ren, Suqiang
2024-01-29  2:46   ` Chang, Abner via groups.io
2024-01-29  2:29 ` [edk2-devel] [PATCH V2 4/5] ArmPlatformPkg: " Ren, Suqiang
2024-01-29  2:29 ` [edk2-devel] [PATCH V2 5/5] OvmfPkg: " Ren, Suqiang
2024-01-29  2:39   ` Yao, Jiewen
2024-01-30  1:36 ` 回复: [edk2-devel] [PATCH V2 0/5] Add EFI_UNSUPPORTED return for some Runtime Service functions gaoliming via groups.io
     [not found] ` <17AEB08976789B0D.21687@groups.io>
     [not found]   ` <CO1PR11MB49166BBE9770EA9FB2113FD9967D2@CO1PR11MB4916.namprd11.prod.outlook.com>
2024-01-31 19:13     ` FW: [edk2-devel] [PATCH V2 4/5] ArmPlatformPkg: Update some Runtime Service functions header Leif Lindholm
2024-01-31 20:04       ` Michael D Kinney
2024-02-01 18:35         ` Leif Lindholm
     [not found] ` <17AEB088A9F5F269.10155@groups.io>
2024-02-02  1:23   ` [edk2-devel] [PATCH V2 2/5] MdeModulePkg: " Ren, Suqiang
2024-02-02  2:40     ` Michael D Kinney

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox