public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [edk2-devel] [PATCH V3 0/5] Add EFI_UNSUPPORTED return for some Runtime Service functions
@ 2024-02-02  8:20 Ren, Suqiang
  2024-02-02  8:20 ` [edk2-devel] [PATCH V3 1/5] MdePkg: " Ren, Suqiang
                   ` (5 more replies)
  0 siblings, 6 replies; 13+ messages in thread
From: Ren, Suqiang @ 2024-02-02  8:20 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

V3:
Update the commit message to align with the change for each package.

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: Align RuntimeDxe function headers with UEFI return
    values
  EmbeddedPkg: Align RealTimeClock function headers with return values
  ArmPlatformPkg: Align PL031 library function headers with return
    values
  OvmfPkg: Align XenRealTimeClockLib function headers with return values

 .../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 (#115027): https://edk2.groups.io/g/devel/message/115027
Mute This Topic: https://groups.io/mt/104115876/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-



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

* [edk2-devel] [PATCH V3 1/5] MdePkg: Add EFI_UNSUPPORTED return for some Runtime Service functions
  2024-02-02  8:20 [edk2-devel] [PATCH V3 0/5] Add EFI_UNSUPPORTED return for some Runtime Service functions Ren, Suqiang
@ 2024-02-02  8:20 ` Ren, Suqiang
  2024-02-02  8:20 ` [edk2-devel] [PATCH V3 2/5] MdeModulePkg: Align RuntimeDxe function headers with UEFI return values Ren, Suqiang
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 13+ messages in thread
From: Ren, Suqiang @ 2024-02-02  8:20 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 (#115028): https://edk2.groups.io/g/devel/message/115028
Mute This Topic: https://groups.io/mt/104115877/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] 13+ messages in thread

* [edk2-devel] [PATCH V3 2/5] MdeModulePkg: Align RuntimeDxe function headers with UEFI return values
  2024-02-02  8:20 [edk2-devel] [PATCH V3 0/5] Add EFI_UNSUPPORTED return for some Runtime Service functions Ren, Suqiang
  2024-02-02  8:20 ` [edk2-devel] [PATCH V3 1/5] MdePkg: " Ren, Suqiang
@ 2024-02-02  8:20 ` Ren, Suqiang
  2024-02-02  8:20 ` [edk2-devel] [PATCH V3 3/5] EmbeddedPkg: Align RealTimeClock function headers with " Ren, Suqiang
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 13+ messages in thread
From: Ren, Suqiang @ 2024-02-02  8:20 UTC (permalink / raw)
  To: devel; +Cc: Liming Gao, Michael D Kinney

RuntimeDxe 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 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 (#115029): https://edk2.groups.io/g/devel/message/115029
Mute This Topic: https://groups.io/mt/104115878/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] 13+ messages in thread

* [edk2-devel] [PATCH V3 3/5] EmbeddedPkg: Align RealTimeClock function headers with return values
  2024-02-02  8:20 [edk2-devel] [PATCH V3 0/5] Add EFI_UNSUPPORTED return for some Runtime Service functions Ren, Suqiang
  2024-02-02  8:20 ` [edk2-devel] [PATCH V3 1/5] MdePkg: " Ren, Suqiang
  2024-02-02  8:20 ` [edk2-devel] [PATCH V3 2/5] MdeModulePkg: Align RuntimeDxe function headers with UEFI return values Ren, Suqiang
@ 2024-02-02  8:20 ` Ren, Suqiang
  2024-02-02  8:20 ` [edk2-devel] [PATCH V3 4/5] ArmPlatformPkg: Align PL031 library " Ren, Suqiang
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 13+ messages in thread
From: Ren, Suqiang @ 2024-02-02  8:20 UTC (permalink / raw)
  To: devel; +Cc: Leif Lindholm, Ard Biesheuvel, Abner Chang

RealTimeClock 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 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 (#115030): https://edk2.groups.io/g/devel/message/115030
Mute This Topic: https://groups.io/mt/104115879/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] 13+ messages in thread

* [edk2-devel] [PATCH V3 4/5] ArmPlatformPkg: Align PL031 library function headers with return values
  2024-02-02  8:20 [edk2-devel] [PATCH V3 0/5] Add EFI_UNSUPPORTED return for some Runtime Service functions Ren, Suqiang
                   ` (2 preceding siblings ...)
  2024-02-02  8:20 ` [edk2-devel] [PATCH V3 3/5] EmbeddedPkg: Align RealTimeClock function headers with " Ren, Suqiang
@ 2024-02-02  8:20 ` Ren, Suqiang
  2024-02-02 14:20   ` Leif Lindholm
  2024-02-02  8:20 ` [edk2-devel] [PATCH V3 5/5] OvmfPkg: Align XenRealTimeClockLib " Ren, Suqiang
       [not found] ` <17AFFE066335877D.1968@groups.io>
  5 siblings, 1 reply; 13+ messages in thread
From: Ren, Suqiang @ 2024-02-02  8:20 UTC (permalink / raw)
  To: devel; +Cc: Leif Lindholm, Ard Biesheuvel

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 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 (#115031): https://edk2.groups.io/g/devel/message/115031
Mute This Topic: https://groups.io/mt/104115880/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] 13+ messages in thread

* [edk2-devel] [PATCH V3 5/5] OvmfPkg: Align XenRealTimeClockLib function headers with return values
  2024-02-02  8:20 [edk2-devel] [PATCH V3 0/5] Add EFI_UNSUPPORTED return for some Runtime Service functions Ren, Suqiang
                   ` (3 preceding siblings ...)
  2024-02-02  8:20 ` [edk2-devel] [PATCH V3 4/5] ArmPlatformPkg: Align PL031 library " Ren, Suqiang
@ 2024-02-02  8:20 ` Ren, Suqiang
  2024-02-02 12:59   ` Laszlo Ersek
                     ` (2 more replies)
       [not found] ` <17AFFE066335877D.1968@groups.io>
  5 siblings, 3 replies; 13+ messages in thread
From: Ren, Suqiang @ 2024-02-02  8:20 UTC (permalink / raw)
  To: devel; +Cc: Ard Biesheuvel, Jiewen Yao, Laszlo Ersek

XenRealTimeClockLib 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 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 (#115032): https://edk2.groups.io/g/devel/message/115032
Mute This Topic: https://groups.io/mt/104115882/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] 13+ messages in thread

* Re: [edk2-devel] [PATCH V3 5/5] OvmfPkg: Align XenRealTimeClockLib function headers with return values
  2024-02-02  8:20 ` [edk2-devel] [PATCH V3 5/5] OvmfPkg: Align XenRealTimeClockLib " Ren, Suqiang
@ 2024-02-02 12:59   ` Laszlo Ersek
  2024-02-05  7:39   ` Laszlo Ersek
  2024-02-05 11:27   ` Anthony PERARD via groups.io
  2 siblings, 0 replies; 13+ messages in thread
From: Laszlo Ersek @ 2024-02-02 12:59 UTC (permalink / raw)
  To: Suqiang Ren, devel; +Cc: Ard Biesheuvel, Jiewen Yao, Anthony Perard

CC Anthony

On 2/2/24 09:20, Suqiang Ren wrote:
> XenRealTimeClockLib 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 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



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



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

* Re: [edk2-devel] [PATCH V3 4/5] ArmPlatformPkg: Align PL031 library function headers with return values
  2024-02-02  8:20 ` [edk2-devel] [PATCH V3 4/5] ArmPlatformPkg: Align PL031 library " Ren, Suqiang
@ 2024-02-02 14:20   ` Leif Lindholm
  2024-02-09 21:31     ` Michael D Kinney
  0 siblings, 1 reply; 13+ messages in thread
From: Leif Lindholm @ 2024-02-02 14:20 UTC (permalink / raw)
  To: Suqiang Ren, devel; +Cc: Ard Biesheuvel

On 2024-02-02 08:20, Suqiang Ren wrote:
> 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 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>

Reviewed-by: Leif Lindholm <quic_llindhol@quicinc.com>

/
     Leif

> ---
>   .../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 (#115049): https://edk2.groups.io/g/devel/message/115049
Mute This Topic: https://groups.io/mt/104115880/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-



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

* Re: [edk2-devel] [PATCH V3 5/5] OvmfPkg: Align XenRealTimeClockLib function headers with return values
  2024-02-02  8:20 ` [edk2-devel] [PATCH V3 5/5] OvmfPkg: Align XenRealTimeClockLib " Ren, Suqiang
  2024-02-02 12:59   ` Laszlo Ersek
@ 2024-02-05  7:39   ` Laszlo Ersek
  2024-02-05 11:27   ` Anthony PERARD via groups.io
  2 siblings, 0 replies; 13+ messages in thread
From: Laszlo Ersek @ 2024-02-05  7:39 UTC (permalink / raw)
  To: devel, suqiangx.ren; +Cc: Ard Biesheuvel, Jiewen Yao

On 2/2/24 09:20, Ren, Suqiang wrote:
> XenRealTimeClockLib 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 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

Acked-by: Laszlo Ersek <lersek@redhat.com>



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



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

* Re: [edk2-devel] [PATCH V3 3/5] EmbeddedPkg: Align RealTimeClock function headers with return values
       [not found]     ` <LV8PR12MB94527CFDBE60512769D67F32EA472@LV8PR12MB9452.namprd12.prod.outlook.com>
@ 2024-02-05  8:45       ` Ren, Suqiang
  0 siblings, 0 replies; 13+ messages in thread
From: Ren, Suqiang @ 2024-02-05  8:45 UTC (permalink / raw)
  To: Chang, Abner, Leif Lindholm, Ard Biesheuvel, devel@edk2.groups.io
  Cc: Tan, Ming, Shang, Qingyu, Li, Yi1

Sorry for missed to add EDK2 group. Add this review-by in EDK2 group.


Thanks
Ren, Suqiang

-----Original Message-----
From: Chang, Abner <Abner.Chang@amd.com> 
Sent: Monday, February 5, 2024 2:54 PM
To: Ren, SuqiangX <suqiangx.ren@intel.com>; Leif Lindholm <quic_llindhol@quicinc.com>; Ard Biesheuvel <ardb+tianocore@kernel.org>
Cc: Tan, Ming <ming.tan@intel.com>; Shang, Qingyu <qingyu.shang@intel.com>; Li, Yi1 <yi1.li@intel.com>
Subject: RE: [edk2-devel] [PATCH V3 3/5] EmbeddedPkg: Align RealTimeClock function headers with return values

[AMD Official Use Only - General]

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

> -----Original Message-----
> From: Ren, SuqiangX <suqiangx.ren@intel.com>
> Sent: Monday, February 5, 2024 10:44 AM
> To: Leif Lindholm <quic_llindhol@quicinc.com>; Ard Biesheuvel 
> <ardb+tianocore@kernel.org>; Chang, Abner <Abner.Chang@amd.com>
> Cc: Tan, Ming <ming.tan@intel.com>; Shang, Qingyu 
> <qingyu.shang@intel.com>; Li, Yi1 <yi1.li@intel.com>
> Subject: RE: [edk2-devel] [PATCH V3 3/5] EmbeddedPkg: Align 
> RealTimeClock function headers with return values
>
> Caution: This message originated from an External Source. Use proper 
> caution when opening attachments, clicking links, or responding.
>
>
> Hi All,
>
>         Could you please help to review this patch on edk2?
>         https://edk2.groups.io/g/devel/message/115030
>
>         Compared with V2, this V3 patch only updated the commit message.
>
> Thanks
> Ren, Suqiang
>
> -----Original Message-----
> From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Ren, 
> Suqiang
> Sent: Friday, February 2, 2024 4:21 PM
> To: devel@edk2.groups.io
> Cc: Leif Lindholm <quic_llindhol@quicinc.com>; Ard Biesheuvel 
> <ardb+tianocore@kernel.org>; Abner Chang <abner.chang@amd.com>
> Subject: [edk2-devel] [PATCH V3 3/5] EmbeddedPkg: Align RealTimeClock 
> function headers with return values
>
> RealTimeClock 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 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 (#115109): https://edk2.groups.io/g/devel/message/115109
Mute This Topic: https://groups.io/mt/104172486/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-



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

* Re: [edk2-devel] [PATCH V3 5/5] OvmfPkg: Align XenRealTimeClockLib function headers with return values
  2024-02-02  8:20 ` [edk2-devel] [PATCH V3 5/5] OvmfPkg: Align XenRealTimeClockLib " Ren, Suqiang
  2024-02-02 12:59   ` Laszlo Ersek
  2024-02-05  7:39   ` Laszlo Ersek
@ 2024-02-05 11:27   ` Anthony PERARD via groups.io
  2 siblings, 0 replies; 13+ messages in thread
From: Anthony PERARD via groups.io @ 2024-02-05 11:27 UTC (permalink / raw)
  To: devel, suqiangx.ren; +Cc: Ard Biesheuvel, Jiewen Yao, Laszlo Ersek

On Fri, Feb 02, 2024 at 04:20:53PM +0800, Ren, Suqiang wrote:
> XenRealTimeClockLib 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 Spec 2.10.
> 
> REF: UEFI spec 2.10 section 8 Services — Runtime Services
> 
> Signed-off-by: Suqiang Ren <suqiangx.ren@intel.com>

Acked-by: Anthony PERARD <anthony.perard@citrix.com>

Thanks,

-- 
Anthony PERARD


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



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

* Re: [edk2-devel] [PATCH V3 4/5] ArmPlatformPkg: Align PL031 library function headers with return values
  2024-02-02 14:20   ` Leif Lindholm
@ 2024-02-09 21:31     ` Michael D Kinney
  2024-02-09 22:16       ` Michael D Kinney
  0 siblings, 1 reply; 13+ messages in thread
From: Michael D Kinney @ 2024-02-09 21:31 UTC (permalink / raw)
  To: devel@edk2.groups.io, quic_llindhol@quicinc.com, Ren, SuqiangX
  Cc: Ard Biesheuvel, Kinney, Michael D

With this review, all patches from this series have Rb from Maintainers.

The reviews started and completed before the Soft Freeze.

The series is approved for edk2-stable202402

PR opened: https://github.com/tianocore/edk2/pull/5364

Mike


> -----Original Message-----
> From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Leif
> Lindholm
> Sent: Friday, February 2, 2024 6:21 AM
> To: Ren, SuqiangX <suqiangx.ren@intel.com>; devel@edk2.groups.io
> Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
> Subject: Re: [edk2-devel] [PATCH V3 4/5] ArmPlatformPkg: Align PL031
> library function headers with return values
> 
> On 2024-02-02 08:20, Suqiang Ren wrote:
> > 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 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>
> 
> Reviewed-by: Leif Lindholm <quic_llindhol@quicinc.com>
> 
> /
>      Leif
> 
> > ---
> >   .../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 (#115331): https://edk2.groups.io/g/devel/message/115331
Mute This Topic: https://groups.io/mt/104115880/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-



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

* Re: [edk2-devel] [PATCH V3 4/5] ArmPlatformPkg: Align PL031 library function headers with return values
  2024-02-09 21:31     ` Michael D Kinney
@ 2024-02-09 22:16       ` Michael D Kinney
  0 siblings, 0 replies; 13+ messages in thread
From: Michael D Kinney @ 2024-02-09 22:16 UTC (permalink / raw)
  To: devel@edk2.groups.io, quic_llindhol@quicinc.com, Ren, SuqiangX
  Cc: Ard Biesheuvel, Kinney, Michael D

Merged: https://github.com/tianocore/edk2/pull/5364


> -----Original Message-----
> From: Kinney, Michael D <michael.d.kinney@intel.com>
> Sent: Friday, February 9, 2024 1:31 PM
> To: devel@edk2.groups.io; quic_llindhol@quicinc.com; Ren, SuqiangX
> <suqiangx.ren@intel.com>
> Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>; Kinney, Michael D
> <michael.d.kinney@intel.com>
> Subject: RE: [edk2-devel] [PATCH V3 4/5] ArmPlatformPkg: Align PL031
> library function headers with return values
> 
> With this review, all patches from this series have Rb from
> Maintainers.
> 
> The reviews started and completed before the Soft Freeze.
> 
> The series is approved for edk2-stable202402
> 
> PR opened: https://github.com/tianocore/edk2/pull/5364
> 
> Mike
> 
> 
> > -----Original Message-----
> > From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Leif
> > Lindholm
> > Sent: Friday, February 2, 2024 6:21 AM
> > To: Ren, SuqiangX <suqiangx.ren@intel.com>; devel@edk2.groups.io
> > Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
> > Subject: Re: [edk2-devel] [PATCH V3 4/5] ArmPlatformPkg: Align PL031
> > library function headers with return values
> >
> > On 2024-02-02 08:20, Suqiang Ren wrote:
> > > 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 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>
> >
> > Reviewed-by: Leif Lindholm <quic_llindhol@quicinc.com>
> >
> > /
> >      Leif
> >
> > > ---
> > >   .../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 (#115333): https://edk2.groups.io/g/devel/message/115333
Mute This Topic: https://groups.io/mt/104115880/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-



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

end of thread, other threads:[~2024-02-09 22:16 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-02  8:20 [edk2-devel] [PATCH V3 0/5] Add EFI_UNSUPPORTED return for some Runtime Service functions Ren, Suqiang
2024-02-02  8:20 ` [edk2-devel] [PATCH V3 1/5] MdePkg: " Ren, Suqiang
2024-02-02  8:20 ` [edk2-devel] [PATCH V3 2/5] MdeModulePkg: Align RuntimeDxe function headers with UEFI return values Ren, Suqiang
2024-02-02  8:20 ` [edk2-devel] [PATCH V3 3/5] EmbeddedPkg: Align RealTimeClock function headers with " Ren, Suqiang
2024-02-02  8:20 ` [edk2-devel] [PATCH V3 4/5] ArmPlatformPkg: Align PL031 library " Ren, Suqiang
2024-02-02 14:20   ` Leif Lindholm
2024-02-09 21:31     ` Michael D Kinney
2024-02-09 22:16       ` Michael D Kinney
2024-02-02  8:20 ` [edk2-devel] [PATCH V3 5/5] OvmfPkg: Align XenRealTimeClockLib " Ren, Suqiang
2024-02-02 12:59   ` Laszlo Ersek
2024-02-05  7:39   ` Laszlo Ersek
2024-02-05 11:27   ` Anthony PERARD via groups.io
     [not found] ` <17AFFE066335877D.1968@groups.io>
     [not found]   ` <SJ0PR11MB492583B5DC0FFD3BF945498196472@SJ0PR11MB4925.namprd11.prod.outlook.com>
     [not found]     ` <LV8PR12MB94527CFDBE60512769D67F32EA472@LV8PR12MB9452.namprd12.prod.outlook.com>
2024-02-05  8:45       ` [edk2-devel] [PATCH V3 3/5] EmbeddedPkg: Align RealTimeClock " Ren, Suqiang

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