summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkettenis <kettenis@openbsd.org>2019-09-07 19:05:44 +0000
committerkettenis <kettenis@openbsd.org>2019-09-07 19:05:44 +0000
commit9316455a9609b1b4cad03cfe30893c64c7d0b104 (patch)
treebdb5b11d935af97addb45a0dc612f225a3d7766f
parentDo not try to send router advertisements on interfaces that have no link. (diff)
downloadwireguard-openbsd-9316455a9609b1b4cad03cfe30893c64c7d0b104.tar.xz
wireguard-openbsd-9316455a9609b1b4cad03cfe30893c64c7d0b104.zip
We can't call cpu_ucode_apply() before we call cpu_ucode_setup().
Fallout spotted by naddy@ ok deraadt@
-rw-r--r--sys/arch/amd64/amd64/machdep.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/sys/arch/amd64/amd64/machdep.c b/sys/arch/amd64/amd64/machdep.c
index e14bfe64e76..375d669ac9a 100644
--- a/sys/arch/amd64/amd64/machdep.c
+++ b/sys/arch/amd64/amd64/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.258 2019/08/27 22:39:51 deraadt Exp $ */
+/* $OpenBSD: machdep.c,v 1.259 2019/09/07 19:05:44 kettenis Exp $ */
/* $NetBSD: machdep.c,v 1.3 2003/05/07 22:58:18 fvdl Exp $ */
/*-
@@ -314,7 +314,9 @@ cpu_startup(void)
#ifndef SMALL_KERNEL
cpu_ucode_setup();
+ cpu_ucode_apply(&cpu_info_primary);
#endif
+
/* enter the IDT and trampoline code in the u-k maps */
enter_shared_special_pages();
@@ -1720,9 +1722,6 @@ init_x86_64(paddr_t first_avail)
intr_default_setup();
-#ifndef SMALL_KERNEL
- cpu_ucode_apply(&cpu_info_primary);
-#endif
fpuinit(&cpu_info_primary);
softintr_init();