git: f7a6dccf4266 - main - amd64: Call clock_init() after finishidentcpu()
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sat, 05 Mar 2022 00:49:03 UTC
The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=f7a6dccf426676bdd8c6be25491e57dca830de25 commit f7a6dccf426676bdd8c6be25491e57dca830de25 Author: Mark Johnston <markj@FreeBSD.org> AuthorDate: 2022-03-05 00:32:39 +0000 Commit: Mark Johnston <markj@FreeBSD.org> CommitDate: 2022-03-05 00:32:39 +0000 amd64: Call clock_init() after finishidentcpu() As in commit c3d830cf7c71, we should finalize CPU identification before probing the TSC frequency. Fixes: 84369dd52369 ("x86: Probe the TSC frequency earlier") Reported by: khng --- sys/amd64/amd64/machdep.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/sys/amd64/amd64/machdep.c b/sys/amd64/amd64/machdep.c index 6eda6c9c8352..22a3eecbbb3d 100644 --- a/sys/amd64/amd64/machdep.c +++ b/sys/amd64/amd64/machdep.c @@ -1457,12 +1457,6 @@ hammer_time(u_int64_t modulep, u_int64_t physfree) r_idt.rd_base = (long) idt; lidt(&r_idt); - /* - * Initialize the clock before the console so that console - * initialization can use DELAY(). - */ - clock_init(); - /* * Use vt(4) by default for UEFI boot (during the sc(4)/vt(4) * transition). @@ -1490,6 +1484,13 @@ hammer_time(u_int64_t modulep, u_int64_t physfree) &x86_rngds_mitg_enable); finishidentcpu(); /* Final stage of CPU initialization */ + + /* + * Initialize the clock before the console so that console + * initialization can use DELAY(). + */ + clock_init(); + initializecpu(); /* Initialize CPU registers */ amd64_bsp_ist_init(pc);