From: guenther Date: Sun, 18 Feb 2024 05:42:50 +0000 (+0000) Subject: Don't call cpu_ucode_apply() and cpu_tsx_disable() from cpu_attach()'s X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=60cbec2cacb68beb91c1ef6537a1bac757f77966;p=openbsd Don't call cpu_ucode_apply() and cpu_tsx_disable() from cpu_attach()'s CPU_ROLE_SP case: for cpu0 they are called earlier, from cpu_startup(). (APs call them from cpu_hatch()) ok deraadt@ --- diff --git a/sys/arch/amd64/amd64/cpu.c b/sys/arch/amd64/amd64/cpu.c index 37da9dc7113..9e05abf3f16 100644 --- a/sys/arch/amd64/amd64/cpu.c +++ b/sys/arch/amd64/amd64/cpu.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cpu.c,v 1.180 2024/02/12 02:57:14 jsg Exp $ */ +/* $OpenBSD: cpu.c,v 1.181 2024/02/18 05:42:50 guenther Exp $ */ /* $NetBSD: cpu.c,v 1.1 2003/04/26 18:39:26 fvdl Exp $ */ /*- @@ -653,10 +653,6 @@ cpu_attach(struct device *parent, struct device *self, void *aux) atomic_setbits_int(&ci->ci_flags, CPUF_PRESENT | CPUF_SP | CPUF_PRIMARY); cpu_intr_init(ci); -#ifndef SMALL_KERNEL - cpu_ucode_apply(ci); -#endif - cpu_tsx_disable(ci); identifycpu(ci); cpu_fix_msrs(ci); #ifdef MTRR