[edk2-devel] [PATCH] Check return status on calls to GetTime()

Heinrich Schuchardt xypron.glpk at gmx.de
Thu Aug 6 14:08:11 UTC 2020


On 06.08.20 15:31, Samer El-Haj-Mahmoud wrote:
> One issue here is that UEFI 2.8 spec language around allowing runtime services (like GetTime() ) to return EFI_UNSUPPORTED is a bit vague:
>
> ""
> 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.
> ""
>
> The "at the time the call is made" language may be interpreted as the service is allowed to return EFI_UNSUPPORTED anytime (before or after ExitBootServices() ). But the next sentence (about declaring the unsupported at runtime) make it sounds like this is restricted to only being at runtime. While the use case makes sense, we may need some clarification in the UEFI spec language to make this clear. Otherwise, callers (like SCT) may assume the function is always supported.

Some systems do not have a real time clock. So these system have to
return EFI_UNSUPPORTED before as well as after ExitBootServices().

Due to possible conflicts with the access by the operating system many
systems with RTC will opt not to implement GetTime() at runtime but may
implement GetTime() before ExitBootServices(). This is what we do in U-Boot.

But of cause it is allowable to provide the service at all times if
feasible.

An implementation supplying GetTime() only after ExitBootServices()
would not make much sense to me but is not explicitly forbidden by the spec.

A clearer wording for the spec might be:

"If the service is available at runtime or not, has to be marked in the
EFI_RT_PROPROPERTIES_TABLE."

Best regards

Heinrich

-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#63784): https://edk2.groups.io/g/devel/message/63784
Mute This Topic: https://groups.io/mt/75912028/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-





More information about the edk2-devel-archive mailing list