Port-prep archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Follow up: 40p boot failure with QEMU



On 27/08/18 16:33, Martin Husemann wrote:

> On Mon, Aug 27, 2018 at 04:13:03PM +0100, Mark Cave-Ayland wrote:
>> NetBSD 8.0 (INSTALL) #0: Tue Jul 17 14:59:51 UTC 2018
>>         mkrepro%mkrepro.NetBSD.org@localhost:/usr/src/sys/arch/prep/compile/INSTALL
>> Model: IBM PPS Model 6015
>> total memory = 128 MB
>> avail memory = 119 MB
>> trap: kernel read DSI trap @ 0x481106d2 by 0x2bb6e8 (DSISR 0x40000000,
>> err=14), lr 0x101e94
>> panic: trap
> 
> Hi Mark!
> 
> That should be:
> 
> 00101e50 pci_intr_fixup_ibm_6015
>   ->  002bb6cc T prop_dictionary_set
> 
> 
> see: https://nxr.netbsd.org/xref/src/sys/arch/prep/prep/ibm_machdep.c#43
> 
> Not sure which of the two prop_dictionary_set it is (nor why it is dying).

Hi Martin,

From Artyom's original report at
http://mail-index.netbsd.org/port-prep/2017/04/09/msg000110.html:

^^^ the SIMPLEQ called from the pci_intr_fixup_ibm_6015 causes a null
pointer dereference.

My guess from looking is that pbi is NULL here:
https://github.com/NetBSD/src/blob/trunk/sys/arch/prep/prep/ibm_machdep.c#L52
and Artyom's suggested patch below:

diff --git a/sys/arch/prep/prep/machdep.c b/sys/arch/prep/prep/machdep.c
index c59dca3..12cfc57 100644
--- a/sys/arch/prep/prep/machdep.c
+++ b/sys/arch/prep/prep/machdep.c
@@ -277,10 +277,6 @@ cpu_startup(void)
         */
        bus_space_mallocok();
-       /*
-        * Gather the pci interrupt routings.
-         */
-       setup_pciroutinginfo();
 }
 /*
diff --git a/sys/arch/prep/prep/mainbus.c b/sys/arch/prep/prep/mainbus.c
index a189ef8..c591f73 100644
--- a/sys/arch/prep/prep/mainbus.c
+++ b/sys/arch/prep/prep/mainbus.c
@@ -137,6 +137,7 @@ mainbus_attach(struct device *parent, struct
device *self, void *aux)
        SIMPLEQ_INIT(&prep_pct->pc_pbi);
        SIMPLEQ_INSERT_TAIL(&prep_pct->pc_pbi, pbi, next);
+        setup_pciroutinginfo();
        /* find the primary host bridge */
        setup_pciintr_map(pbi, 0, 0, 0);

presumably is enough to reorder the initialisation process so that this
now works?


ATB,

Mark.


Home | Main Index | Thread Index | Old Index