summaryrefslogtreecommitdiffstats
path: root/sys/amd64
diff options
context:
space:
mode:
authortegge <tegge@FreeBSD.org>2000-08-07 02:28:37 +0000
committertegge <tegge@FreeBSD.org>2000-08-07 02:28:37 +0000
commite372881b3ce12f98dc8cd41f53e05538b8d117c4 (patch)
tree1c600834c161f3faf8d6b06c25c7ced06b7dd5e3 /sys/amd64
parentfb32fc5d86d0c974cd3ed9f1bd5187f412ee4683 (diff)
downloadFreeBSD-src-e372881b3ce12f98dc8cd41f53e05538b8d117c4.zip
FreeBSD-src-e372881b3ce12f98dc8cd41f53e05538b8d117c4.tar.gz
Add workaround for livelock problem when starting APs.
With more than 1 AP present, an AP could fail to properly release the mp lock before waiting for smp_started to become nonzero. With early startup of APs, the BSP could fail to properly release the mp lock before waiting for smp_started to become nonzero.
Diffstat (limited to 'sys/amd64')
-rw-r--r--sys/amd64/amd64/mpboot.S4
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/amd64/amd64/mpboot.S b/sys/amd64/amd64/mpboot.S
index ac24c66..d3602d2 100644
--- a/sys/amd64/amd64/mpboot.S
+++ b/sys/amd64/amd64/mpboot.S
@@ -121,6 +121,8 @@ mp_begin: /* now running relocated at KERNBASE */
call _ap_init
call _rel_mplock
+ lock /* Avoid livelock (PIII Errata 39) */
+ addl $0,-4(%esp)
2:
cmpl $0, CNAME(smp_started) /* Wait for last AP to be ready */
jz 2b
@@ -133,6 +135,8 @@ NON_GPROF_ENTRY(wait_ap)
pushl %ebp
movl %esp, %ebp
call _rel_mplock
+ lock /* Avoid livelock (PIII Errata 39) */
+ addl $0,0(%esp)
movl %eax, 8(%ebp)
1:
cmpl $0, CNAME(smp_started)
OpenPOWER on IntegriCloud