From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by spool.mail.gandi.net (Postfix) with ESMTPS id E051694128B for ; Fri, 2 Feb 2024 08:21:28 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=SSeS6BJPqoqfZXiNZy8uBGj8PHUy1VHaPRdwAG35Fv8=; c=relaxed/simple; d=groups.io; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References:MIME-Version:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Type:Content-Transfer-Encoding; s=20140610; t=1706862087; v=1; b=qX5BWmECNdYySkMkkJo8PI2ymeVAzLIpQJNiZW1quGkV/G2xjPgj3En6ynFtiJVm1EZBuNDN luh6pUt+9bLqswTsi3yHhtenwKyhV5iBcg7HR8dtSWAZB0o58PsPhMta105ayompWKMcbUrADIA 66Jl28MAtbYMlemxCUEiWqHc= X-Received: by 127.0.0.2 with SMTP id 5yAqYY7687511xMhNn3WZRaA; Fri, 02 Feb 2024 00:21:27 -0800 X-Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.88]) by mx.groups.io with SMTP id smtpd.web10.18586.1706862080178982670 for ; Fri, 02 Feb 2024 00:21:27 -0800 X-IronPort-AV: E=McAfee;i="6600,9927,10971"; a="435249707" X-IronPort-AV: E=Sophos;i="6.05,237,1701158400"; d="scan'208";a="435249707" X-Received: from orviesa009.jf.intel.com ([10.64.159.149]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Feb 2024 00:21:26 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.05,237,1701158400"; d="scan'208";a="22637" X-Received: from srenx-mobl1.ccr.corp.intel.com ([10.239.216.131]) by orviesa009.jf.intel.com with ESMTP; 02 Feb 2024 00:21:25 -0800 From: "Ren, Suqiang" To: devel@edk2.groups.io Cc: Leif Lindholm , Ard Biesheuvel , Abner Chang Subject: [edk2-devel] [PATCH V3 3/5] EmbeddedPkg: Align RealTimeClock function headers with return values Date: Fri, 2 Feb 2024 16:20:51 +0800 Message-Id: <224574deb7dedeac620384b7050e4da4e1034e74.1706861638.git.suqiangx.ren@intel.com> In-Reply-To: References: MIME-Version: 1.0 Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,suqiangx.ren@intel.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: NeWjls2hozUPqvQTzgeQfO1Zx7686176AA= Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b=qX5BWmEC; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=intel.com (policy=none); spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io 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 Cc: Leif Lindholm Cc: Ard Biesheuvel Cc: Abner Chang --- .../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] -=-=-=-=-=-=-=-=-=-=-=-