From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mout.gmx.net (mout.gmx.net [212.227.17.20]) by mx.groups.io with SMTP id smtpd.web10.7261.1596722902302272084 for ; Thu, 06 Aug 2020 07:08:22 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmx.net header.s=badeba3b8450 header.b=E3Lkx3q1; spf=pass (domain: gmx.de, ip: 212.227.17.20, mailfrom: xypron.glpk@gmx.de) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1596722899; bh=OVDPX23qd5h1BXfbGeutPNH8nDwkqihzatEa+EHlgeg=; h=X-UI-Sender-Class:Subject:To:Cc:References:From:Date:In-Reply-To; b=E3Lkx3q16o95Ca8M+scqEwVa+kg3+2uyBmKp1FjyWPfVlZ3CSxmDFmQCOtV1Hw9gC sOFBHon7wSWldm/uFIAYUGUy2tdB4vpGD+67+l9Zndn+VZx9s5qqr8Dn3afX9HEIzq xhVv4Emn3rrf/pbCWutBeHZtawW/pJI5/pawKriY= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from [192.168.123.70] ([178.202.41.107]) by mail.gmx.com (mrgmx105 [212.227.17.168]) with ESMTPSA (Nemesis) id 1M5wLT-1k6iZE2NNz-007Uz4; Thu, 06 Aug 2020 16:08:19 +0200 Subject: Re: [PATCH] Check return status on calls to GetTime() To: Samer El-Haj-Mahmoud , Grant Likely , "devel@edk2.groups.io" Cc: nd , G Edhaya Chandran References: <20200731171949.15748-1-grant.likely@arm.com> From: "Heinrich Schuchardt" Autocrypt: addr=xypron.glpk@gmx.de; prefer-encrypt=mutual; keydata= mQINBE2g3goBEACaikqtClH8OarLlauqv9d9CPndgghjEmi3vvPZJi4jvgrhmIUKwl7q79wG IATxJ1UOXIGgriwoBwoHdooOK33QNy4hkjiNFNrtcaNT7uig+BG0g40AxSwVZ/OLmSFyEioO BmRqz1Zdo+AQ5RzHpu49ULlppgdSUYMYote8VPsRcE4Z8My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SA498iO0ApxPsy4Q7vvQsF7DuJsC PdZzP/LZRySUMif3qAmIvom8fkq/BnyHhfyZ4XOl1HMr8pMIf6/eCBdgIvxfdOz79BeBBJzr qFlNpxVP8xrHiEjZxU965sNtDSD/1/9w82Wn3VkVisNP2MpUhowyHqdeOv2uoG6sUftmkXZ8 RMo+PY/iEIFjNXw1ufHDLRaHihWLkXW3+bS7agEkXo0T3u1qlFTI6xn8maR9Z0eUAjxtO6qV lGF58XeVhfunbQH8Kn+UlWgqcMJwBYgM69c65Dp2RCV7Tql+vMsuk4MT65+Lwm88Adnn6ppQ S2YmNgDtlNem1Sx3JgCvjq1NowW7q3B+28Onyy2fF0Xq6Kyjx7msPj3XtDZQnhknBwA7mqSZ DDw0aNy1mlCv6KmJBRENfOIZBFUqXCtODPvO5TcduJV/5XuxbTR/33Zj7ez2uZkOEuTs/pPN oKMATC28qfg0qM59YjDrrkdXi/+iDe7qCX93XxdIxpA5YM/ZiqgwziJX8ZOKV7UDV+Ph5KwF lTPJMPdQZYXDOt5DjG5l5j0cQWqE05QtYR/V6g8un6V2PqOs9WzaT/RB12YFcaeWlusa8Iqs Eg== Message-ID: <6c13499d-c5dd-8c6f-211c-2b336aa6aff9@gmx.de> Date: Thu, 6 Aug 2020 16:08:11 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.11.0 MIME-Version: 1.0 In-Reply-To: X-Provags-ID: V03:K1:GuIS0gzL271fIiHtfTVZl1D9TbO8fEACjEj2lR1WTXZZ7RV6hep 3BvIdNviC6F0IcJpulvo2+oHaVc5y4dFZcN4NNHVxagTKOTEeIb2ZXdrSBrdLX1LvPbo/hj 9rXu/Yw2RP5aiCPFQlNkChsph5BUcsMGrJe9a0AbLzKEBtLnVW+rd9i02WEfXTqU1Ac4sQR nfh52AqyY7247gc6Dc6Sw== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:S3MNHUeXKoM=:RqJ2YHpkE2eh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TsmYpDSoXQuW3ft+GAizvlx40Qdd753LhFbE+xoxTw mRbT8SrUyZv9MHZGZ1/HRXbRXwSWc6j5idrXlmifRtDT8cy7r0dXH9ajRhw4p/OEJoTbr0Ini JRQHNYGtYuMuK0+pm1UrrHtHeq6OorAuDSASLxI23LPO4hg7urHSA8bf7JxIq0Mz/PGOMOwj9 XfRYKwH4MnOeb28sdutJhMVnYcmKmOQ7InT3GMg== Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable On 06.08.20 15:31, Samer El-Haj-Mahmoud wrote: > One issue here is that UEFI 2.8 spec language around allowing runtime se= rvices (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 runt= ime via an EFI_RT_PROPERTIES_TABLE configuration table. > "" > > The "at the time the call is made" language may be interpreted as the se= rvice is allowed to return EFI_UNSUPPORTED anytime (before or after ExitBo= otServices() ). 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 assum= e 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-Boo= t. 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 spe= c. 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