On 2/12/21 7:59 PM, 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]>
---
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
Persisting daylight saving time and "timezone" are currently not
supported in U-Boot.
EDK-II assumes RTC is UTC and adds the timezone offset and an extra hour
if daylight saving is enabled.
This assumption is strange as Windows uses local time for the RTC
(without hacking the registry). And EDK II was written to support Windows.
The UEFI spec requires that the time zone and the daylight saving flag
should be adjusted when entering or leaving daylight saving time. But
without knowing which country you are in there is no clue on which date
and hour this change might occur. There is not even a UEFI service to
switch the time zone between Europe/Brussels (which has daylight saving
times in summer only) and Morocco (which has permanent daylight saving
time).
To me it is not clear what the UEFI requirement on daylight saving time
and time zones really are.
The SCT test case specification is equally vague: 5.2.2.2.36 "The return
Time should be set before." No hint concerning the expected value.
Here some work is needed to get to a verifiable specification.
But that is beyond the scope of your patch series.
Reviewed-by: Heinrich Schuchardt <[email protected]>
- 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