Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 34 additions & 4 deletions source/chapter2-uefi.rst
Original file line number Diff line number Diff line change
Expand Up @@ -519,16 +519,16 @@ are required to be implemented during boot services and runtime services.
- Before `ExitBootServices()`
- After `ExitBootServices()`
* - `GetTime`
- Required if RTC present.
- Required if RTC present. [#TimeNote]_
- Optional
* - `SetTime`
- Required if RTC present.
- Required if RTC present. [#TimeNote]_
- Optional
* - `GetWakeupTime`
- Required if wakeup supported.
- Required if wakeup supported. [#TimeNote]_
- Optional
* - `SetWakeupTime`
- Required if wakeup supported.
- Required if wakeup supported. [#TimeNote]_
- Optional
* - `SetVirtualAddressMap`
- N/A
Expand Down Expand Up @@ -561,6 +561,9 @@ are required to be implemented during boot services and runtime services.
- Optional
- Optional

.. [#TimeNote] See section :ref:`section-rtc` for relaxed requirements on time
services.

Runtime Device Mappings
-----------------------

Expand All @@ -579,6 +582,8 @@ shall not be accessed by the OS.
Only devices that explicitly support concurrent access by both firmware and an
OS may be mapped at runtime by both firmware and the OS.

.. _section-rtc:

Real-time Clock (RTC)
^^^^^^^^^^^^^^^^^^^^^

Expand All @@ -594,6 +599,31 @@ 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.

.. versionchanged:: 3.0.0

Some further aspects of the Services defined in :UEFI:`8.3` are made optional.
[#RelaxNote]_

.. [#RelaxNote] Those relaxations allow to support Time Services with a timer
instead of a real-time clock.

Firmware may behave as if some fields of all the `EFI_TIME` structures had fixed
values, as listed in the following table:

.. list-table:: Optional `EFI_TIME` structure fields fixed values
:widths: 50 50
:header-rows: 1

* - `EFI_TIME` structure field
- Optional fixed value
* - `TimeZone`
- `EFI_UNSPECIFIED_TIMEZONE`
* - `Daylight`
- 0

Firmware is also not required to persist the current local time and date or the
system wakeup alarm clock time information across reset.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The problem in U-Boot is not persistence. There is no support in the hardware driver framework at all for wakeup times though the hardware support might exist.

So the current suggestion won't help to make U-Boot compliant.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @xypron,

Thanks for the review.

For wakeup we are somewhat covered already as those services are only conditionally required:

EFI_RUNTIME_SERVICES function Before ExitBootServices() After ExitBootServices()
.. .. ..
GetWakeupTime Required if wakeup supported. Optional
SetWakeupTime Required if wakeup supported. Optional

Persistence of e.g. time or daylight settings is still a small issue here, I think, as it is indeed tested by the SCT and it will not work on platforms using RTC emulation.


UEFI Reset and Shutdown
-----------------------

Expand Down
Loading