Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 12 Jun 2021 14:01:08 GMT
From:      Andrew Turner <andrew@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: abb9d448b32d - stable/13 - Update the EFI timer to be called once a second
Message-ID:  <202106121401.15CE18Eq022280@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/13 has been updated by andrew:

URL: https://cgit.FreeBSD.org/src/commit/?id=abb9d448b32dce5f80de68992315f0c71b6c8b81

commit abb9d448b32dce5f80de68992315f0c71b6c8b81
Author:     Andrew Turner <andrew@FreeBSD.org>
AuthorDate: 2021-05-12 08:59:04 +0000
Commit:     Andrew Turner <andrew@FreeBSD.org>
CommitDate: 2021-06-12 01:21:55 +0000

    Update the EFI timer to be called once a second
    
    There is no need to call it evert 10ms when we need 1s granularity.
    Update to update the time every second.
    
    Reviewed by:    imp, manu, tsoome
    Sponsored by:   Innovate UK
    Differential Revision: https://reviews.freebsd.org/D30227
    
    (cherry picked from commit 93f7be080f3ad0bd71190d87aa2043d714270206)
---
 stand/efi/libefi/time_event.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/stand/efi/libefi/time_event.c b/stand/efi/libefi/time_event.c
index f96f1d845f6a..f171bf997078 100644
--- a/stand/efi/libefi/time_event.c
+++ b/stand/efi/libefi/time_event.c
@@ -40,7 +40,7 @@ static void
 time_update(EFI_EVENT event, void *context)
 {
 
-	curtime += 10;
+	curtime++;
 }
 
 void
@@ -50,8 +50,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
@@ -68,7 +68,7 @@ time(time_t *tloc)
 {
 	time_t t;
 
-	t = curtime / 1000;
+	t = curtime;
 	if (tloc != NULL)
 		*tloc = t;
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202106121401.15CE18Eq022280>