- Joined
- Oct 23, 2016
- Messages
- 327
- Motherboard
- HP EliteBook 1030 G1 (Clover)
- CPU
- m7-6Y75
- Graphics
- HD515, 3200x1800
To be an engineer. Read post #1. To be honest, I debug this card sine 2016, one thing I were teached: find the root of the problem, and solve it.Hey @livacore, I have tried to reverse engineering both Yosemite and Mojave version of IO80211Family in order to get DW1820A working.
After observing the logs and many tries, what I have found out it's that a fatal error is trigged at some point after some time with Mojave version and this is triggering another fatal error. When a fatal error is been processed, it causes the device to be reinitialize. The issue is that the device is been already on a reinitialization because of the first fatal error and the second one triggers another full reinitialization but because the device is already busy to be reinitialize, the device freezes and it completely outrun the CPU because it try to fully reinitialize the device until it's done. So I have found out exactly where happens this fatal error triggering. On wlcStart function, on Yosemite, we have at some point :
Code:mov rdi, [r12+0EC0h] xor r14d, r14d xor esi, esi ; unsigned __int64 call __ZN11IOPCIDevice20extendedConfigRead16Ey ; mov bx, ax mov rdi, [r12+0EC0h] ; this mov esi, 2 ; unsigned __int64 call __ZN11IOPCIDevice20extendedConfigRead16Ey ; mov r9, [r12+280h] lea rcx, [rbp+var_84] mov [rsp+0E0h+var_C0], rcx mov qword ptr [rsp+0E0h+var_E0], r15 ; char mov [rsp+0E0h+var_C8], 0 mov [rsp+0E0h+var_D0], 0 mov dword ptr [rsp+0E0h+var_D8], 1 movzx esi, bx movzx edx, ax xor ecx, ecx xor r8d, r8d mov rdi, r12 call _wlc_attach mov [r12+270h], rax test rax, rax jz loc_FF42
And on Mojave :
Code:mov rdi, [r12+9B0h] xor r14d, r14d xor esi, esi mov edx, 2 call _osl_pci_read_config mov r13d, eax mov rdi, [r12+9B0h] mov esi, 2 mov edx, 2 call _osl_pci_read_config mov ebx, eax mov rdi, [r12+9B0h] xor ecx, ecx cmp dword ptr [r12+2268h], 0 setnz cl lea rdx, _wl_fatal_error mov rsi, r12 call _osl_set_wl mov r9, [r12+9B0h] sub rsp, 8 lea rax, [rbp+var_88] movzx esi, r13w movzx edx, bx mov ecx, 0 mov r8d, 0 mov rdi, r12 push rax push r14 push r14 push 1 push r15 call _wlc_attach add rsp, 30h mov [r12+9A0h], rax test rax, rax jz loc_16E48
As you see, when the function wlcStart is been running, it's triggering _wl_fatal_error and _osl_set_wl. A random event at some point when the laptop is running triggers again a wlcStart which causes the trigger of the fatal error and _osl_set_wl and I'm pretty sure this is the culprit. I have tried to avoid this calls but I get kernel panic with kernel traps.
From your states, it may need ferther hacking...