mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-18 15:30:21 +00:00
Implement eficlock_set() to set hardware clock.
This commit is contained in:
parent
658c434d90
commit
5207c02e45
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=86294
@ -65,7 +65,19 @@ eficlock_get(kobj_t dev, time_t base, struct clocktime *ct)
|
||||
static void
|
||||
eficlock_set(kobj_t dev, struct clocktime *ct)
|
||||
{
|
||||
printf("eficlock: TODR not set\n");
|
||||
EFI_TIME time;
|
||||
EFI_STATUS status;
|
||||
|
||||
ia64_efi_runtime->GetTime(&time, 0);
|
||||
time.Second = ct->sec;
|
||||
time.Minute = ct->min;
|
||||
time.Hour = ct->hour;
|
||||
time.Day = ct->day;
|
||||
time.Month = ct->mon;
|
||||
time.Year = ct->year + 1900;
|
||||
status = ia64_efi_runtime->SetTime(&time);
|
||||
if (status != EFI_SUCCESS)
|
||||
printf("eficlock_set: could not set TODR\n");
|
||||
}
|
||||
|
||||
static int
|
||||
|
Loading…
Reference in New Issue
Block a user