Re: IBM LC921
ben wilber <[email protected]> Wed, 28 Feb 2024 15:16:11 -0500
| Newsgroups | gmane.os.freebsd.devel.ppc |
|---|---|
| Message-ID | <thodzhddsyuajokock3yw5svzkk7amhdkfjgo2e4mswumlehvg@6wvam7hyekfn> |
On Mon, Feb 19, 2024 at 11:10:32AM -0500, Justin Hibbits wrote:
> I think this is a known issue with older firmwares (found on Talos II
> firmware back in 2020 or so), and unfortunately the only workaround I
> recall from that was to use kexec-lite.
Hmm, okay. Maybe it was different when kexec-lite was fixed, but it
seems like the kernel only has one PT_LOAD segment now. I don't know
enough to know whether this is a bad idea, but this change lets the
kernel start from the vintage PNOR:
diff --git a/sys/conf/ldscript.powerpc64le b/sys/conf/ldscript.powerpc64le
index 3fd80d3130fb..bfd5b64cb9c0 100644
--- a/sys/conf/ldscript.powerpc64le
+++ b/sys/conf/ldscript.powerpc64le
@@ -14,7 +14,7 @@ SECTIONS
{
/* Low-address wrapper for bootloaders (kexec/kboot) that can't parse ELF */
- . = kernbase - 0x100;
+ . = 0;
.kboot : { *(.text.kboot) } :kernel
/* Read-only sections, merged into text segment: */
> Is this from a kernel on an ISO, or a self-built kernel? We can run
> addr2line on the kernel.debug from the ISO (if it's on the ISO, I don't
> recall now if the debug symbols are included on the ISO). What version
> of FreeBSD are you testing?
Yes, this was with a snapshot ISO. Thank you for the hint. I finally
figured out that addr2line likes the small numbers and found the crash
in PIC_UNMASK(). Adding this check stopped the panic:
diff --git a/sys/powerpc/powerpc/intr_machdep.c b/sys/powerpc/powerpc/intr_machdep.c
index 9d361c73a240..210c9cc0c9b4 100644
--- a/sys/powerpc/powerpc/intr_machdep.c
+++ b/sys/powerpc/powerpc/intr_machdep.c
@@ -333,6 +333,9 @@ powerpc_intr_post_ithread(void *arg)
{
struct powerpc_intr *i = arg;
+ if (i == NULL || i->pic == NULL)
+ return;
+
PIC_UNMASK(i->pic, i->intline, i->priv);
}
Maybe not necessary if USB cooperates. I guess the PNOR kernel has this patch:
https://github.com/open-power/op-build/blob/master/openpower/linux/0001-xhci-Reset-controller-on-xhci-shutdown.patch
Booting from PNOR directly, everything works... in BE mode. In LE, ixl
doesn't probe, aacraid gets stuck and USB times out trying to attach
something forever. But, progress.