[Bug 225450] 11.1-* panics on AMD Opteron 2k due to EARLY_AP_STARTUP
bugzilla-noreply at freebsd.org
bugzilla-noreply at freebsd.org
Tue Feb 13 00:42:25 UTC 2018
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=225450
--- Comment #18 from Pablo Ruiz <pablo.ruiz at gmail.com> ---
I've tried the following patch:
diff --git a/sys/x86/x86/delay.c b/sys/x86/x86/delay.c
index 8cbe6012a96..00dfff48c19 100644
--- a/sys/x86/x86/delay.c
+++ b/sys/x86/x86/delay.c
@@ -70,7 +70,7 @@ delay_tc(int n)
func = get_tsc;
mask = ~0u;
} else {
- if (tc->tc_quality <= 0)
+ if (tc->tc_quality <= 0 || n == 1)
return (0);
func = tc->tc_get_timecount;
mask = tc->tc_counter_mask;
diff --git a/sys/x86/x86/mp_x86.c b/sys/x86/x86/mp_x86.c
index 04975dd8a2e..c2a90e9a7d4 100644
--- a/sys/x86/x86/mp_x86.c
+++ b/sys/x86/x86/mp_x86.c
@@ -952,7 +952,7 @@ init_secondary_tail(void)
#endif
mtx_unlock_spin(&ap_boot_mtx);
-while(1);
+//while(1);
/* Wait until all the AP's are up. */
while (atomic_load_acq_int(&smp_started) == 0)
.....
But I got to 'db' prompt to:
cpu0 BSP:
ID: 0x00000000 VER: 0x80050010 LDR: 0x00000000 DFR: 0xffffffff
lint0: 0x00010700 lint1: 0x00000400 TPR: 0x00000000 SVR: 0x000001ff
timer: 0x000100ef therm: 0x00010000 err: 0x000000f0 pmc: 0x00010400
AMD ext features: 0x00010003
AMD elvt0: 0x00010000
SMP: AP CPU #1 Launched!
cpu1 AP:
FFa
tFa
FFa
FFa
Fa
kFernel trap 12 with interrupts disabled
Fatal trap 12: page fault while in kernel mode
cpuid = 2; apic id = 02
fault virtual address = 0x441
fault code = supervisor read data, page not present
instruction pointer = 0x20:0xffffffff80ffb704
stack pointer = 0x28:0xfffffe001b97ba90
frame pointer = 0x28:0xfffffe001b97baa0
code segment = base 0x0, limit 0xfffff, type 0x1b
= DPL 0, pres 1, long 1, def32 0, gran 1
processor eflags = resume, IOPL = 0
current process = 11 (idle: cpu2)
[ thread pid 11 tid 100005 ]
Stopped at spinlock_exit+0x14: movq 0x440(%rbx),%rax
db> show thread
Thread 100005 at 0xfffff8000332c000:
proc (pid 11): 0xfffff80003328000
name: idle: cpu2
stack: 0xfffffe001b9a6000-0xfffffe001b9a9fff
flags: 0x40024 pflags: 0x200000
state: CAN RUN
priority: 255
container lock: sched lock 0 (0xffffffff827ee880)
db> bt
Tracing pid 11 tid 100005 td 0xfffff8000332c000
spinlock_exit() at spinlock_exit+0x14/frame 0xfffffe001b97baa0
_mtx_lock_spin_cookie() at _mtx_lock_spin_cookie+0xa5/frame 0xfffffe001b97bb10
i8254_delay() at i8254_delay+0x143/frame 0xfffffe001b97bb50
_mtx_lock_spin_cookie() at _mtx_lock_spin_cookie+0xa5/frame 0xfffffe001b97bbc0
i8254_delay() at i8254_delay+0x143/frame 0xfffffe001b97bc00
_mtx_lock_spin_cookie() at _mtx_lock_spin_cookie+0xa5/frame 0xfffffe001b97bc70
i8254_delay() at i8254_delay+0x143/frame 0xfffffe001b97bcb0
_mtx_lock_spin_cookie() at _mtx_lock_spin_cookie+0xa5/frame 0xfffffe001b97bd20
i8254_delay() at i8254_delay+0x143/frame 0xfffffe001b97bd60
_mtx_lock_spin_cookie() at _mtx_lock_spin_cookie+0xa5/frame 0xfffffe001b97bdd0
i8254_delay() at i8254_delay+0x143/frame 0xfffffe001b97be10
_mtx_lock_spin_cookie() at _mtx_lock_spin_cookie+0xa5/frame 0xfffffe001b97be80
i8254_delay() at i8254_delay+0x143/frame 0xfffffe001b97bec0
_mtx_lock_spin_cookie() at _mtx_lock_spin_cookie+0xa5/frame 0xfffffe001b97bf30
i8254_delay() at i8254_delay+0x143/frame 0xfffffe001b97bf70
_mtx_lock_spin_cookie() at _mtx_lock_spin_cookie+0xa5/frame 0xfffffe001b97bfe0
i8254_delay() at i8254_delay+0x143/frame 0xfffffe001b97c020
_mtx_lock_spin_cookie() at _mtx_lock_spin_cookie+0xa5/frame 0xfffffe001b97c090
....
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the freebsd-bugs
mailing list