diff options
author | Mike Larkin <mlarkin@cvs.openbsd.org> | 2019-10-08 16:58:10 +0000 |
---|---|---|
committer | Mike Larkin <mlarkin@cvs.openbsd.org> | 2019-10-08 16:58:10 +0000 |
commit | 9430369638d8419601fb4c926643e27d39928a9b (patch) | |
tree | 6181678456c0f5051968b2d700b6d4a5f5f8fe71 | |
parent | 6bdc57e064b89e653d332bcd142bb263a9a275ba (diff) |
amd64: ensure %fs is loaded after final lgdt
Mark Patruck reported this issue on a new EPYC 7402P CPU and tracked down
a DragonflyBSD diff that fixed the issue. I solicited some feedback/advice
from Matt Dillon of Dragonfly and discussions between him, guenther@ and
myself led to this fix which appears to resolve the problem.
ok guenther@
-rw-r--r-- | sys/arch/amd64/amd64/mptramp.S | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/arch/amd64/amd64/mptramp.S b/sys/arch/amd64/amd64/mptramp.S index e1441c3284c..c6b18b65a23 100644 --- a/sys/arch/amd64/amd64/mptramp.S +++ b/sys/arch/amd64/amd64/mptramp.S @@ -1,4 +1,4 @@ -/* $OpenBSD: mptramp.S,v 1.19 2019/01/24 00:00:00 deraadt Exp $ */ +/* $OpenBSD: mptramp.S,v 1.20 2019/10/08 16:58:09 mlarkin Exp $ */ /* $NetBSD: mptramp.S,v 1.1 2003/04/26 18:39:30 fvdl Exp $ */ /*- @@ -171,6 +171,9 @@ _TRMP_LABEL(.Lmp_startup) movl $.Lmptramp_gdt64_desc,%eax lgdt (%eax) + xorw %ax, %ax + movw %ax, %fs + movl $.Lmptramp_jmp64,%eax movl %cr0,%ecx # get control word |