Re: amd64 boot crash for lack of being set up to use of rtw89; linuxkpi calls on the stack, 0xdeadc0dedeadc13e and such involved, devfs_ioctl with dsw=0xdeadc0dedeadc0de

From: Mark Millard <marklmi_at_yahoo.com>
Date: Sat, 25 Jul 2026 21:32:30 UTC
On 7/25/26 14:09, Bjoern A. Zeeb wrote:
> On Sat, 25 Jul 2026, Mark Millard wrote:
> 
>> On 7/25/26 13:46, Bjoern A. Zeeb wrote:
>>> On Sat, 25 Jul 2026, Mark Millard wrote:
>>>
>>>>>> There's D57430 and D57431 still open that no one has reviewed so far.
>>>>>> You could try to apply them.
>>>>>
>>>>> I expect I'll take a look at doing such later.
>>>>
>>>> D57431 did not apply cleanly to the source code that pkgbase
>>>> supplied in
>>>> /usr/src/sys/ (started from not having the prior one line patch you had
>>>> me test):
>>>>
>>>> # git apply D57430.diff
>>>> # git apply D57431.diff
>>>> error: patch failed: sys/compat/linuxkpi/common/src/linux_pci.c:342
>>>> error: sys/compat/linuxkpi/common/src/linux_pci.c: patch does not apply
>>>
>>> Maybe just start with D57430 for now.
>>
>> Okay I'll do that.

Based on just the D57430.diff patch relative to the /usr/src/sys/ for
the pkgbase distribution the system is based on as stands, it booted
just fine despite:

# fwget -n
Needed firmware packages: 'wifi-firmware-rtw89-kmod-rtw8852b
gpu-firmware-amd-kmod-dcn-3-1-5 gpu-firmware-amd-kmod-gc-10-3-6
gpu-firmware-amd-kmod-psp-13-0-5 gpu-firmware-amd-kmod-sdma-5-2-6
gpu-firmware-amd-kmod-vcn-3-1-2'

(So no: wifi-firmware-rtw89-kmod-rtw8852b installed.)


Note: I do not see a way to publicly well trace/publish such pkgbase
/usr/src/sys/ or /usr/src/ based testing. I end up with:

# uname -apKU
FreeBSD 7950X3D-ZFS 16.0-CURRENT FreeBSD 16.0-CURRENT #1: Sat Jul 25
14:04:54 PDT 2026
root@7950X3D-ZFS:/usr/obj/BUILDs/main-amd64-usr_src-dbg-clang/usr/src/amd64.amd64/sys/GENERIC
amd64 amd64 1600019 1600019

that shows no git hash, no branch relative numbering, no upstream source
tree related timestamp, or other such.

>>
>>>
>>> I'll go and rebase D57431, which addresses yet another problem there.
>>>
>>>
>>> One other thing you could do for testing, which does not require
>>> recompiling anything is adding:
>>>
>>> devmatch_blacklist="if_rtw89"
>>>
>>> to rc.conf and see if things then at least boot.
>>
>> I got the system to boot via using an older kernel for long enough to
>> install the pkg that fwget -n had listed. Rebooting with the upstream
>> pkgbase kernel that had previously failed then worked.
>>
>> That may not be equivalent to your blacklist test but may be useful
>> information.
> 
> It is even better as what you say is "if the driver loads correctly then
> there is no problem;  if firmware is missing and driver fails to load
> we panic".

Yep.

> 
> Time to get these reviews sorted and in...
> 

Sounds good. For D57430 my activity may not be an approval but it is at
least evidence of improvement.


-- 
===
Mark Millard
marklmi at yahoo.com