Discussion:
14-stable on AMD7950X: Good and bad news
(too old to reply)
Chris Torek
2024-03-25 02:11:01 UTC
Permalink
I built and booted up the latest 14-stable tree on my
AMD7950X machine:

Good news: the mysterious AHCI adapter problem is gone, presumably
because of the new PCI range allocation code. So now both sets of SATA
ports work (at least, the drive I've left plugged in to the previously-failing
port now shows up).

Bad news: building drm-61-kmod, then loading amdgpu.ko,
causes a crash.

The immediate problem is that vm_phys_fictitious_unreg_range()
does this:

rw_wlock(&vm_phys_fictitious_reg_lock);
seg = RB_FIND(fict_tree, &vm_phys_fictitious_tree, &tmp);
if (seg->start != start || seg->end != end) {

At line 1115, `seg` is NULL, so we die with a kernel segfault. It's probably
a good idea to add a NULL test here since RB_FIND can return NULL.
(Presumably just stick `sig == NULL ||` in front of the start/end tests.)

It's not clear why the unregister is failing though, as the drm code
seems correct at first glance.

It *is* clear why it's unregistering, though, as the console printed:

drmn0: could not load firmware image 'amdgpu/psp_13_0_5_toc.bin'

and the expected subsequent cleanup messages (and now I've run
out of Stuff I Just Know Off-Hand at this point so I'll have to dig
into this more).

Chris


--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
Bakul Shah
2024-03-25 08:01:50 UTC
Permalink
Post by Chris Torek
Bad news: building drm-61-kmod, then loading amdgpu.ko,
causes a crash.
Isn’t drm-61 for -current? drm-515 seems to work with 14-stable for me
but none of my machines are all that recent.

--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
Tomoaki AOKI
2024-03-25 17:59:21 UTC
Permalink
On Mon, 25 Mar 2024 09:56:53 -0700
On Mon, 25 Mar 2024 01:01:50 -0700
Post by Chris Torek
Bad news: building drm-61-kmod, then loading amdgpu.ko,
causes a crash.
Isn$B!G(Bt drm-61 for -current? drm-515 seems to work with 14-stable for me
but none of my machines are all that recent.
graphics/drm-62-kmod supports recent stable/14 with OSVERSION >=
1400508 (means, __FreeBSD_version >= 1400508
in /usr/src/sys/sys/param.h. [1]
Just in case someone gets confused, I'm pretty sure that the reference to
graphics/drm-62-kmod is a typo.
--
Kevin Oberman, Part time kid herder and retired Network Engineer
PGP Fingerprint: D03FB98AFA78E3B78C1694B318AB39EF1B055683
Ah, thanks! My bad.
You're right. graphics/drm-61-kmod is correct.
--
Tomoaki AOKI <***@dec.sakura.ne.jp>


--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
Emmanuel Vadot
2024-03-25 08:57:14 UTC
Permalink
On Sun, 24 Mar 2024 19:11:01 -0700
Post by Chris Torek
I built and booted up the latest 14-stable tree on my
Good news: the mysterious AHCI adapter problem is gone, presumably
because of the new PCI range allocation code. So now both sets of SATA
ports work (at least, the drive I've left plugged in to the previously-failing
port now shows up).
Bad news: building drm-61-kmod, then loading amdgpu.ko,
causes a crash.
The immediate problem is that vm_phys_fictitious_unreg_range()
rw_wlock(&vm_phys_fictitious_reg_lock);
seg = RB_FIND(fict_tree, &vm_phys_fictitious_tree, &tmp);
if (seg->start != start || seg->end != end) {
At line 1115, `seg` is NULL, so we die with a kernel segfault. It's probably
a good idea to add a NULL test here since RB_FIND can return NULL.
(Presumably just stick `sig == NULL ||` in front of the start/end tests.)
It's not clear why the unregister is failing though, as the drm code
seems correct at first glance.
drmn0: could not load firmware image 'amdgpu/psp_13_0_5_toc.bin'
amdgpu is known to be bad at unloading and also unregistering when
firmware isn't present, please test again after installing the firmware
(using fwget(8) should work, if you still missed firmware after that
please install all amdgpu firmware packages and report which one are
needed for you pciid so we can fix fwget(8)).
Post by Chris Torek
and the expected subsequent cleanup messages (and now I've run
out of Stuff I Just Know Off-Hand at this point so I'll have to dig
into this more).
Chris
Cheers,
--
Emmanuel Vadot <***@bidouilliste.com> <***@freebsd.org>


--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
Jonathan Vasquez
2024-03-25 10:40:52 UTC
Permalink
I may need to re-test this on my 7950X then, I reported this issue a while ago regarding the integrated Raphael graphics not being supported:

https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=268394
On Mon, 25 Mar 2024 01:01:50 -0700
Post by Chris Torek
Bad news: building drm-61-kmod, then loading amdgpu.ko,
causes a crash.
Isn’t drm-61 for -current? drm-515 seems to work with 14-stable for me
but none of my machines are all that recent.
graphics/drm-62-kmod supports recent stable/14 with OSVERSION >=
1400508 (means, __FreeBSD_version >= 1400508
in /usr/src/sys/sys/param.h. [1]
What I suspect is that required firmware is not installed, thus fail to
initialize GPU. Maybe graphics/gpu-firmware-amd-kmod here?
If you're not sure, you can use metaport graphics/gpu-firmware-kmod.
[1]
https://cgit.freebsd.org/ports/commit/graphics/drm-61-kmod?id=e04b01217828bf06d36a02ad8e69dbb54c30b607
--
Loading...