Re: Unable to handle kernel NULL pointer... on cat /proc/pci

Gabriel Paubert (paubert@iram.es)
Wed, 24 Sep 1997 10:15:33 +0200 (METDST)


On Tue, 23 Sep 1997, Magnus Sjoegren wrote:

>
> [Sent this mail once, didn't recieve it from the list myself. Resending]
>
>
> Have a 486 here which have a peculiar behaviour. It has a noname
> motherboard built with an acer chipset (ALI M1429G, ALI M1435, ALI M1431).
> Linux kernel 2.0.30 usually doesn't recognize the chipset on boot but it
> has happend (unstable hardware?).
>
> Warning : Unknown PCI device (efff:ffff). Please read include/linux/pci.h
> [alot of these on boot, usually nothing to worry about]

Your chipset is likely broken, a not present PCI device, should return
ffff:ffff, some broken ones return 0000:0000 but yours is truly abnormal.
Then the system thinks you have about 30 multifunction devices, each
with 8 functions, true ?

Has the same problem been experienced by other people with the same
chipset ?

>
> The first time viewing /proc/pci with cat after a reboot produces the
> result below.
>
> atlas:~$ cat /proc/pci
> Unable to handle kernel NULL pointer dereference at virtual address
> c0000000
[snipped]
> Using `System.map' to map addresses to symbols.
>
> >>EIP: 1b6317 <sprint_dev_config+203/4f8>
> Trace: 1b6665 <get_pci_list+59/94>
> Trace: 166362 <get_root_array+b2/144>
> Trace: 166546 <array_read+ca/234>
> Trace: 121652 <sys_read+8a/b0>
> Trace: 10a5d2 <system_call+52/80>
>
> Code: 1b6317 <sprint_dev_config+203/4f8> repnz scasb %es:(%edi),%al
> Code: 1b6319 <sprint_dev_config+205/4f8> notl %ecx
> Code: 1b631b <sprint_dev_config+207/4f8> decl %ecx
> Code: 1b631c <sprint_dev_config+208/4f8> addl %ebx,%ecx
> Code: 1b631e <sprint_dev_config+20a/4f8> movl %ecx,0x14(%esp,1)
> Code: 1b6322 <sprint_dev_config+20e/4f8> movl 0x50(%esp,1),%eax
>
> Code: 1b6326 <sprint_dev_config+212/4f8> cmpl %eax,%ecx
> Code: 1b6328 <sprint_dev_config+214/4f8> ja 909000d7 <_EIP+909000d7>
> Code: 1b632e <sprint_dev_config+21a/4f8> nop
>

Could you try the following simple patch:
=============================================================================
--- pci.c.orig Wed Sep 24 07:38:03 1997
+++ pci.c Wed Sep 24 07:39:45 1997
@@ -636,11 +636,11 @@
vendor, device);
}

- str = 0; /* to keep gcc shut... */
switch (status & PCI_STATUS_DEVSEL_MASK) {
case PCI_STATUS_DEVSEL_FAST: str = "Fast devsel. "; break;
case PCI_STATUS_DEVSEL_MEDIUM: str = "Medium devsel. "; break;
case PCI_STATUS_DEVSEL_SLOW: str = "Slow devsel. "; break;
+ default: str = "Unspecified devsel. ";
}
if (len + strlen(str) > size) {
return -1;
==============================================================================

Note: given the way devsels are ordered, this one should be
"UltraSlow(TM) devsel" :-)
But the name has already been taken by PCI to ISA bridges, they call it
more elegantly "subtractive decoding", AKA "last chance decoding" or
"Since nobody volunteers to answer to this bus request, I'll give it a try".

Gabriel.