On 15/02/2021 16:38, Heinrich Schuchardt wrote:
On 12.02.21 19:59, Grant Likely wrote:
If the platform has an RTC, then EFI_GET_TIME and EFI_SET_TIME are required
before ExitBootServices(). Clarify this in the spec.

Also specify that EFI_{GET,SET}_WAKEUP_TIME are required before
ExitBootService() if the RTC can wakeup the platform.

Signed-off-by: Grant Likely <[email protected]>

This patch cannot be applied to upstream:

Applying: Refine RTC requirements
error: patch failed: source/chapter2-uefi.rst:319
error: source/chapter2-uefi.rst: patch does not apply

Sorry, there was a trivial formatting patch that I haven't pushed out yet. I'll push it out shortly.

g.


Please, rebase.

Best regards

Heinrich

---
  source/chapter2-uefi.rst | 15 +++++++++------
  1 file changed, 9 insertions(+), 6 deletions(-)

diff --git a/source/chapter2-uefi.rst b/source/chapter2-uefi.rst
index f47a98d..3d48c99 100644
--- a/source/chapter2-uefi.rst
+++ b/source/chapter2-uefi.rst
@@ -319,16 +319,16 @@ are required to be implemented during boot services and 
runtime services.
       - Before ExitBootServices()
       - After ExitBootServices()
     * - `EFI_GET_TIME`
-     - Optional
+     - Required if RTC present
       - Optional
     * - `EFI_SET_TIME`
-     - Optional
+     - Required if RTC present
       - Optional
     * - `EFI_GET_WAKEUP_TIME`
-     - Optional
+     - Required if wakeup supported
       - Optional
     * - `EFI_SET_WAKEUP_TIME`
-     - Optional
+     - Required if wakeup supported
       - Optional
     * - `EFI_SET_VIRTUAL_ADDRESS_MAP`
       - N/A
@@ -387,8 +387,11 @@ it may not be possible to access the RTC from runtime 
services.
  e.g., The RTC may be on a shared I2C bus which runtime services cannot access
  because it will conflict with the OS.

-If firmware does not support access to the RTC, then GetTime() and
-SetTime() shall return EFI_UNSUPPORTED,
+If an RTC is present, then GetTime() and SetTime() must be supported
+before ExitBootServices() is called.
+
+However, if firmware does not support access to the RTC after
+ExitBootServices(), then GetTime() and SetTime() shall return EFI_UNSUPPORTED
  and the OS must use a device driver to control the RTC.

  UEFI Reset and Shutdown


_______________________________________________
boot-architecture mailing list
[email protected]
https://lists.linaro.org/mailman/listinfo/boot-architecture

Reply via email to