summaryrefslogtreecommitdiff
path: root/usr/src/boot
diff options
context:
space:
mode:
authorAndrew Turner <andrew@FreeBSD.org>2021-05-12 08:59:04 +0000
committerToomas Soome <tsoome@me.com>2021-05-13 21:53:10 +0300
commit4fe48c6ec9f06cbcce19c4cf97f662b64efde582 (patch)
tree68daf8857191e6a249fdd7bf6f71102bc72c65a4 /usr/src/boot
parent9e3493cb8a0cfe96c9aef9b7da42c6c9b5c24b43 (diff)
downloadillumos-gate-4fe48c6ec9f06cbcce19c4cf97f662b64efde582.tar.gz
13798 loader: Update the EFI timer to be called once a second
Reviewed by: Toomas Soome <tsoome@me.com> Reviewed by: Andy Fiddaman <andy@omnios.org> Reviewed by: Andrew Stormont <andyjstormont@gmail.com> Reviewed by: Yuri Pankov <yuripv@yuripv.dev> Approved by: Dan McDonald <danmcd@joyent.com>
Diffstat (limited to 'usr/src/boot')
-rw-r--r--usr/src/boot/Makefile.version2
-rw-r--r--usr/src/boot/sys/boot/efi/libefi/time_event.c12
2 files changed, 7 insertions, 7 deletions
diff --git a/usr/src/boot/Makefile.version b/usr/src/boot/Makefile.version
index 88ac6f56a0..30c6982235 100644
--- a/usr/src/boot/Makefile.version
+++ b/usr/src/boot/Makefile.version
@@ -34,4 +34,4 @@ LOADER_VERSION = 1.1
# Use date like formatting here, YYYY.MM.DD.XX, without leading zeroes.
# The version is processed from left to right, the version number can only
# be increased.
-BOOT_VERSION = $(LOADER_VERSION)-2021.04.03.1
+BOOT_VERSION = $(LOADER_VERSION)-2021.05.12.1
diff --git a/usr/src/boot/sys/boot/efi/libefi/time_event.c b/usr/src/boot/sys/boot/efi/libefi/time_event.c
index d76af38bf9..afb30c1d9e 100644
--- a/usr/src/boot/sys/boot/efi/libefi/time_event.c
+++ b/usr/src/boot/sys/boot/efi/libefi/time_event.c
@@ -1,4 +1,4 @@
-/*-
+/*
* Copyright (c) 2016 Andrew Turner
* All rights reserved.
*
@@ -39,7 +39,7 @@ static void
time_update(EFI_EVENT event, void *context)
{
- curtime += 10;
+ curtime++;
}
void
@@ -49,8 +49,8 @@ efi_time_init(void)
/* Create a timer event */
BS->CreateEvent(EVT_TIMER | EVT_NOTIFY_SIGNAL, TPL_CALLBACK,
time_update, 0, &time_event);
- /* Use a 10ms timer */
- BS->SetTimer(time_event, TimerPeriodic, 100000);
+ /* Use a 1s timer */
+ BS->SetTimer(time_event, TimerPeriodic, 10000000);
}
void
@@ -67,7 +67,7 @@ time(time_t *tloc)
{
time_t t;
- t = curtime / 1000;
+ t = curtime;
if (tloc != NULL)
*tloc = t;
@@ -77,5 +77,5 @@ time(time_t *tloc)
time_t
getsecs(void)
{
- return time(0);
+ return (time(0));
}