mirror of
https://xff.cz/git/u-boot/
synced 2025-09-02 17:22:22 +02:00
efi_loader: return values of GetTime()
According to the UEFI spec 2.8 the GetTime() runtime service should return EFI_UNSUPPORTED if the real time clock is not available. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
This commit is contained in:
@@ -169,7 +169,6 @@ static efi_status_t EFIAPI efi_get_time_boottime(
|
|||||||
{
|
{
|
||||||
#ifdef CONFIG_DM_RTC
|
#ifdef CONFIG_DM_RTC
|
||||||
efi_status_t ret = EFI_SUCCESS;
|
efi_status_t ret = EFI_SUCCESS;
|
||||||
int r;
|
|
||||||
struct rtc_time tm;
|
struct rtc_time tm;
|
||||||
struct udevice *dev;
|
struct udevice *dev;
|
||||||
|
|
||||||
@@ -179,11 +178,12 @@ static efi_status_t EFIAPI efi_get_time_boottime(
|
|||||||
ret = EFI_INVALID_PARAMETER;
|
ret = EFI_INVALID_PARAMETER;
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
if (uclass_get_device(UCLASS_RTC, 0, &dev) ||
|
||||||
r = uclass_get_device(UCLASS_RTC, 0, &dev);
|
dm_rtc_get(dev, &tm)) {
|
||||||
if (!r)
|
ret = EFI_UNSUPPORTED;
|
||||||
r = dm_rtc_get(dev, &tm);
|
goto out;
|
||||||
if (r) {
|
}
|
||||||
|
if (dm_rtc_get(dev, &tm)) {
|
||||||
ret = EFI_DEVICE_ERROR;
|
ret = EFI_DEVICE_ERROR;
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
@@ -210,7 +210,7 @@ out:
|
|||||||
return EFI_EXIT(ret);
|
return EFI_EXIT(ret);
|
||||||
#else
|
#else
|
||||||
EFI_ENTRY("%p %p", time, capabilities);
|
EFI_ENTRY("%p %p", time, capabilities);
|
||||||
return EFI_EXIT(EFI_DEVICE_ERROR);
|
return EFI_EXIT(EFI_UNSUPPORTED);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user