From 4fe48c6ec9f06cbcce19c4cf97f662b64efde582 Mon Sep 17 00:00:00 2001 From: Andrew Turner Date: Wed, 12 May 2021 08:59:04 +0000 Subject: 13798 loader: Update the EFI timer to be called once a second Reviewed by: Toomas Soome Reviewed by: Andy Fiddaman Reviewed by: Andrew Stormont Reviewed by: Yuri Pankov Approved by: Dan McDonald --- usr/src/boot/Makefile.version | 2 +- usr/src/boot/sys/boot/efi/libefi/time_event.c | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) (limited to 'usr/src') 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)); } -- cgit v1.2.3