Bug 2056

Summary: pnpbios locks kernel during boot
Product: Drivers Reporter: Martin Mokrejs (mmokrejs)
Component: PNPAssignee: Adam Belay (ambx1)
Status: RESOLVED CODE_FIX    
Severity: high CC: herbert, yure
Priority: P2    
Hardware: i386   
OS: Linux   
Kernel Version: 2.6.3-rc1 Subsystem:
Regression: --- Bisected commit-id:
Attachments: Panic message from Debian Bug #226996
DMI info for Debian Bug #226996
asus-pnpbios-blacklist
boot messages from vanilla 2.6.5 on ASUS P4C800E-Deluxe
.config from vanilla 2.6.5 on ASUS P4C800E-Deluxe
2.6.7-rc2 bootup messages
dmidecode
acpidmp
dmesg from 2.6.7-bk20 (compare with original bugreport -- same host)
dmesg-2.6.9-rc4

Description Martin Mokrejs 2004-02-08 07:02:32 UTC
Distribution: Gentoo
Hardware Environment: ASUS P4C800E-Deluxe
Software Environment:
Problem Description:
In 2.6.3-rc1 kernel. 2.6.1 and all I tried before from 2.6 series, I have to use
pnpbios=off on kernel commandline to be able to bootup the system. Here is a
resolved stacktrace from 2.6.3-rc1. The kernel locks before mounting anything or
mounting any partition, immediately after the pnpbios code is used (compiled
statically into kernel).

ksymoops 2.4.9 on i686 2.6.3-rc1.  Options used
     -V (default)
     -k /proc/ksyms (default)
     -l /proc/modules (default)
     -o /lib/modules/2.6.3-rc1/ (default)
     -m /boot/System.map-2.6.3-rc1 (specified)

Error (regular_file): read_ksyms stat /proc/ksyms failed
No modules in ksyms, skipping objects
No ksyms, skipping lsmod
CPU:    0
EIP:    0098:[<00002aa0>]    Not tainted
Using defaults from ksymoops -t elf32-i386 -a i386
EFLAGS: 00010087
eax: 000022e3   ebx: 0000005c   ecx: 00010000   edx: 00000001
esi: f7fa238e   edi: 00000015   ebp: f7fa0000   esp: f7fa9eda
ds: 00b0   es: 00b0   ss: 0068
Stack: 000002e3 22e32912 00000000 807d0015 0006c883 00010001 9f2c801c 0015c88a 
       9f2c0000 c8839f08 00060001 61190606 01060106 007b5f74 0000007b 00a08000 
       5f3000b0 00a85ef6 00000082 000b0000 00010090 00a80000 00b00000 00a00001 
Call Trace:
Code:  Bad EIP value.


>>EIP; 00002aa0 Before first symbol   <=====

>>esi; f7fa238e <__crc_blk_attempt_remerge+6bd792/95fb16>
>>ebp; f7fa0000 <__crc_blk_attempt_remerge+6bb404/95fb16>
>>esp; f7fa9eda <__crc_blk_attempt_remerge+6c52de/95fb16>


1 error issued.  Results may not be reliable.


Steps to reproduce:

Full bootup messages caught on remote console

Linux version 2.6.3-rc1 (root@aquarius) (gcc version 3.3.2 20031218 (Gentoo
Linux 3.3.2-r5, propolice-3.3-7)) #5 Sun Feb 8 14:51:57 CET 24
BIOS-provided physical RAM map:                                                
                                                          
 BIOS-e820: 0000000000000000 - 000000000009fc00 (usable)                       
                                                          
 BIOS-e820: 000000000009fc00 - 00000000000a0000 (reserved)                     
                                                          
 BIOS-e820: 00000000000e8000 - 0000000000100000 (reserved)                     
                                                          
 BIOS-e820: 0000000000100000 - 000000003ff30000 (usable)                       
                                                          
 BIOS-e820: 000000003ff30000 - 000000003ff40000 (ACPI data)                    
                                                          
 BIOS-e820: 000000003ff40000 - 000000003fff0000 (ACPI NVS)                     
                                                          
 BIOS-e820: 000000003fff0000 - 0000000040000000 (reserved)                     
                                                          
 BIOS-e820: 00000000ffb80000 - 0000000100000000 (reserved)                     
                                                          
127MB HIGHMEM available.                                                       
                                                          
896MB LOWMEM available.                                                        
                                                          
found SMP MP-table at 000ff780                                                 
                                                          
hm, page 000ff000 reserved twice.                                              
                                                          
hm, page 00100000 reserved twice.                                              
                                                          
hm, page 000f1000 reserved twice.                                              
                                                          
hm, page 000f2000 reserved twice.                                              
                                                          
On node 0 totalpages: 261936                                                   
                                                          
  DMA zone: 4096 pages, LIFO batch:1                                           
                                                          
  Normal zone: 225280 pages, LIFO batch:16                                     
                                                          
  HighMem zone: 32560 pages, LIFO batch:7                                      
                                                          
DMI 2.3 present.                                                               
                                                          
ACPI: RSDP (v002 ACPIAM                                    ) @ 0x000f9e30      
                                                          
ACPI: XSDT (v001 A M I  OEMXSDT  0x11000321 MSFT 0x00000097) @ 0x3ff30100      
                                                          
ACPI: FADT (v003 A M I  OEMFACP  0x11000321 MSFT 0x00000097) @ 0x3ff30290      
                                                          
ACPI: MADT (v001 A M I  OEMAPIC  0x11000321 MSFT 0x00000097) @ 0x3ff30390      
                                                          
ACPI: OEMB (v001 A M I  OEMBIOS  0x11000321 MSFT 0x00000097) @ 0x3ff40040      
                                                          
ACPI: DSDT (v001  P4CED P4CED096 0x00000096 INTL 0x02002026) @ 0x00000000      
                                                          
ACPI: Local APIC address 0xfee00000                                            
                                                          
ACPI: LAPIC (acpi_id[0x01] lapic_id[0x00] enabled)                             
                                                          
Processor #0 15:2 APIC version 20                                              
                                                          
ACPI: LAPIC (acpi_id[0x02] lapic_id[0x01] enabled)                             
                                                          
Processor #1 15:2 APIC version 20                                              
                                                          
NR_CPUS limit of 1 reached.  Cannot boot CPU(apicid 0x1).                      
                                                          
ACPI: IOAPIC (id[0x02] address[0xfec00000] global_irq_base[0x0])               
                                                          
IOAPIC[0]: Assigned apic_id 2                                                  
                                    
IOAPIC[0]: apic_id 2, version 32, address 0xfec00000, IRQ 0-23                 
                                                          
ACPI: INT_SRC_OVR (bus 0 bus_irq 0 global_irq 2 dfl dfl)                       
                                                          
ACPI: INT_SRC_OVR (bus 0 bus_irq 9 global_irq 9 high level)                    
                                                          
ACPI BALANCE SET                                                               
                                                          
Enabling APIC mode:  Flat.  Using 1 I/O APICs                                  
                                                          
Using ACPI (MADT) for SMP configuration information                            
                                                          
Built 1 zonelists                                                              
                                                          
Kernel command line: root=/dev/sda2 agp_try_unsupported=1 console=ttyS0,57600n8
console=tty0                                              
Initializing CPU#0                                                             
                                                          
PID hash table entries: 4096 (order 12: 32768 bytes)                           
                                                          
Detected 3375.418 MHz processor.                                               
                                                          
Using tsc for high-res timesource                                              
                                                          
Console: colour VGA+ 80x25                                                     
                                                          
Memory: 1030632k/1047744k available (3091k kernel code, 16208k reserved, 1244k
data, 188k init, 130240k highmem)                          
Checking if this processor honours the WP bit even in supervisor mode... Ok.   
                                                          
Calibrating delay loop... 6668.28 BogoMIPS                                     
                                                          
Dentry cache hash table entries: 131072 (order: 7, 524288 bytes)               
                                                          
Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)                 
                                                          
Mount-cache hash table entries: 512 (order: 0, 4096 bytes)                     
                                                          
CPU: Trace cache: 12K uops, L1 D cache: 8K                                     
                                                          
CPU: L2 cache: 512K                                                            
                                                          
Intel machine check architecture supported.                                    
                                                          
Intel machine check reporting enabled on CPU#0.                                
                                                          
CPU#0: Intel P4/Xeon Extended MCE MSRs (12) available                          
                                                          
CPU#0: Thermal monitoring enabled                                              
                                                          
CPU: Intel(R) Pentium(R) 4 CPU 3.00GHz stepping 09                             
                                                          
Enabling fast FPU save and restore... done.                                    
                                                          
Enabling unmasked SIMD FPU exception support... done.                          
                                                          
Checking 'hlt' instruction... OK.                                              
                                                          
POSIX conformance testing by UNIFIX                                            
                                                          
enabled ExtINT on CPU#0                                                        
                                                          
ESR value before enabling vector: 00000000                                     
                                                          
ESR value after enabling vector: 00000000                                      
                                                          
ENABLING IO-APIC IRQs                                                          
                                                          
..TIMER: vector=0x31 pin1=2 pin2=-1                                            
                                                          
Using local APIC timer interrupts.                                             
                                                          
calibrating APIC timer ...                                                     
                                                          
..... CPU clock speed is 3374.0334 MHz.                                        
                                                          
..... host bus clock speed is 224.0955 MHz.                                    
                                                          
NET: Registered protocol family 16                                             
                                                          
PCI: PCI BIOS revision 2.10 entry at 0xf0031, last bus=3                       
                                                          
PCI: Using configuration type 1                                                
                                                          
mtrr: v2.0 (20020519)                                                
ACPI: Subsystem revision 20040116                                              
                                                          
 tbxface-0117 [03] acpi_load_tables      : ACPI Tables successfully acquired   
                                                          
Parsing all Control
Methods:..............................................................................................................
Table [DSDT](id F004) - 511 Objects with 48 Devices 150 Methods 14 Regions     
                                                          
ACPI Namespace successfully loaded at root c05acc3c                            
                                                          
evxfevnt-0093 [04] acpi_enable           : Transition to ACPI mode successful  
                                                          
evgpeblk-0747 [06] ev_create_gpe_block   : GPE 00 to 31 [_GPE] 4 regs at
0000000000000828 on int 9                                        
Completing Region/Field/Buffer/Package
initialization:....................................................................................
Initialized 14/14 Regions 42/42 Fields 41/41 Buffers 16/16 Packages (519 nodes)
                                                          
Executing all Device _STA and_INI
methods:...................................................                    
                        
51 Devices found containing: 51 _STA, 1 _INI methods                           
                                                          
ACPI: Interpreter enabled                                                      
                                                          
ACPI: Using IOAPIC for interrupt routing                                       
                                                          
ACPI: PCI Root Bridge [PCI0] (00:00)                                           
                                                          
PCI: Probing PCI hardware (bus 00)                                             
                                                          
PCI: Ignoring BAR0-3 of IDE controller 0000:00:1f.1                            
                                                          
Transparent bridge - 0000:00:1e.0                                              
                                                          
ACPI: PCI Interrupt Link [LNKA] (IRQs 3 4 5 6 7 *10 11 12 14 15)               
                                                          
ACPI: PCI Interrupt Link [LNKB] (IRQs 3 4 *5 6 7 10 11 12 14 15)               
                                                          
ACPI: PCI Interrupt Link [LNKC] (IRQs 3 4 *5 6 7 10 11 12 14 15)               
                                                          
ACPI: PCI Interrupt Link [LNKD] (IRQs 3 4 5 6 7 *10 11 12 14 15)               
                                                          
ACPI: PCI Interrupt Link [LNKE] (IRQs 3 4 *5 6 7 10 11 12 14 15)               
                                                          
ACPI: PCI Interrupt Link [LNKF] (IRQs 3 4 *5 6 7 10 11 12 14 15)               
                                                          
ACPI: PCI Interrupt Link [LNKG] (IRQs 3 4 *5 6 7 10 11 12 14 15)               
                                                          
ACPI: PCI Interrupt Link [LNKH] (IRQs 3 4 5 6 7 10 *11 12 14 15)               
                                                          
Linux Plug and Play Support v0.97 (c) Adam Belay                               
                                                          
PnPBIOS: Scanning system for PnP BIOS support...                               
                                                          
PnPBIOS: Found PnP BIOS installation structure at 0xc00f5270                   
                                                          
PnPBIOS: PnP BIOS version 1.0, entry 0xf0000:0x5e5a, dseg 0xf0000              
                                                          
general protection fault: 0000 [#1]                                            
                                                          
CPU:    0                                                                      
                                                          
EIP:    0098:[<00002aa0>]    Not tainted                                       
                                                          
EFLAGS: 00010087                                                               
                                                          
EIP is at 0x2aa0                                                               
                                                          
eax: 000022e3   ebx: 0000005c   ecx: 00010000   edx: 00000001                  
                                                          
esi: f7fa238e   edi: 00000015   ebp: f7fa0000   esp: f7fa9eda                  
                                                          
ds: 00b0   es: 00b0   ss: 0068                                                 
                                                          
Process swapper (pid: 1, threadinfo=f7fa8000 task=f7fcd9e0)                    
                                                          
Stack: 000002e3 22e32912 00000000 807d0015 0006c883 00010001 9f2c801c 0015c88a 
                                                          
       9f2c0000 c8839f08 00060001 61190606 01060106 007b5f74 0000007b 00a08000 
                                                          
       5f3000b0 00a85ef6 00000082 000b0000 00010090 00a80000 00b00000 00a00001 
                                                          

Call Trace:                               
Code:  Bad EIP value.                                                          
                                                          
 <0>Kernel panic: Attempted to kill init!
Comment 1 Adam Belay 2004-02-09 17:02:54 UTC
*** Bug 2046 has been marked as a duplicate of this bug. ***
Comment 2 Yuriy Movchan 2004-02-11 09:43:49 UTC
PNP don't work on Abit BH7 too.
On boot kernel locks with Oops:
...
Oops: 0002 [#1]
...
EIP is at pnpbios_calls_init + 0x86/0x134
...
Call Trace:
  pnpbios_init + 0x4f/0xb4
  do_initcalls + 0x24/0x9a
  init_workqueues + 0x12/0x27
  init + 0x5c/0x178
  init + 0x0/0x178
  kernel_thread_helper + 0x5/0xb
Comment 3 Herbert Xu 2004-02-29 20:27:32 UTC
Jeroen van Disseldorp has reported a similar issue in http://bugs.debian.org/226996

I've attached his oops and his dmi information.
Comment 4 Herbert Xu 2004-02-29 20:28:45 UTC
Created attachment 2255 [details]
Panic message from Debian Bug #226996
Comment 5 Herbert Xu 2004-02-29 20:29:29 UTC
Created attachment 2256 [details]
DMI info for Debian Bug #226996
Comment 6 pfudd 2004-03-03 17:23:14 UTC
Hi.. this occurs in 2.6.4-rc1 as well.

It's a brand new machine, with no isa devices, ASUS motherboard, Pentium 4, 1gig
of ram, and 120 gig hard drive.  Fedora core2-test1 installed.  Just compiled a
kernel from scratch, no redhat patches.

Note, I don't need PNP; I just compiled it in for the heck of it.  I'll be
taking it out momentarily.  I'm just reporting it because I thought you'd like
to know it's still present, and to give you another data point.
Comment 7 Herbert Xu 2004-03-08 00:50:44 UTC
Here is another report of the same issue with yet another Asus board:

http://bugs.debian.org/232535
Comment 8 Adam Belay 2004-04-02 19:07:40 UTC
Created attachment 2486 [details]
asus-pnpbios-blacklist

This patch will blacklist the ASUS P4P800
Comment 9 Adam Belay 2004-04-02 19:08:39 UTC
Please let me know if the attached patch catches it.
Comment 10 Martin Mokrejs 2004-04-04 13:40:02 UTC
Hi,
  I cannot reproduce the original bug on the very same system (ASUS
P4C800E-Deluxe). Please see attached .config and the boot messages.
Comment 11 Martin Mokrejs 2004-04-04 13:41:05 UTC
Created attachment 2494 [details]
boot messages from vanilla 2.6.5 on ASUS P4C800E-Deluxe
Comment 12 Martin Mokrejs 2004-04-04 13:41:46 UTC
Created attachment 2495 [details]
.config from vanilla 2.6.5 on ASUS P4C800E-Deluxe
Comment 13 Adam Belay 2004-04-12 23:47:14 UTC
> PnPBIOS: Scanning system for PnP BIOS support...
> PnPBIOS: Found PnP BIOS installation structure at 0xc00f5270
> PnPBIOS: PnP BIOS version 1.0, entry 0xf0000:0x5e5a, dseg 0xf0000
> PNPBIOS fault.. attempting recovery.
> PnPBIOS: Warning! Your PnP BIOS caused a fatal error. Attempting to continue
> PnPBIOS: You may need to reboot with the "nobiospnp" option to operate stably
> PnPBIOS: Check with your vendor for an updated BIOS
> PnPBIOS: get_dev_node: unexpected status 0x28
> PnPBIOS: 6 nodes reported by PnP BIOS; 6 recorded by driver

A change recently went in to fix pnpbios error recovery.  It appears to be
working.  Now we need to clean up more gracefully.
Comment 14 Martin Mokrejs 2004-04-19 00:51:10 UTC
Hi,
  I'm not sure if bug should have already been closed as fixed or whatever, this
is what I get on 2.6.6-rc1.

Linux Plug and Play Support v0.97 (c) Adam Belay
pnp: the driver 'system' has been registered
PnPBIOS: Scanning system for PnP BIOS support...
PnPBIOS: Found PnP BIOS installation structure at 0xc00f5270
PnPBIOS: PnP BIOS version 1.0, entry 0xf0000:0x5e5a, dseg 0xf0000
pnp: match found with the PnP device '00:00' and the driver 'system'
PNPBIOS fault.. attempting recovery.
PnPBIOS: Warning! Your PnP BIOS caused a fatal error. Attempting to continue
PnPBIOS: You may need to reboot with the "nobiospnp" option to operate stably
PnPBIOS: Check with your vendor for an updated BIOS
PnPBIOS: get_dev_node: unexpected status 0x28
PnPBIOS: 6 nodes reported by PnP BIOS; 6 recorded by driver


I see in linux-2.6.6-rc1/arch/i386/kernel/dmi_scan.c the following (am just
curious, how P4P800 could help on my P4E800E-Deluxe, which should differ from
P4E800E and more from P4P800):

    780 
    781         { exploding_pnp_bios, "Higraded P14H", {        /* PnPBIOS GPF
on boot */
    782                         MATCH(DMI_BIOS_VENDOR, "American Megatrends Inc."),
    783                         MATCH(DMI_BIOS_VERSION, "07.00T"),
    784                         MATCH(DMI_SYS_VENDOR, "Higraded"),
    785                         MATCH(DMI_PRODUCT_NAME, "P14H")
    786                         } },
    787         { exploding_pnp_bios, "ASUS P4P800", {  /* PnPBIOS GPF on boot */
    788                         MATCH(DMI_BOARD_VENDOR, "ASUSTeK Computer Inc."),
    789                         MATCH(DMI_BOARD_NAME, "P4P800"),
    790                         } },
    791 
Comment 15 Adam Belay 2004-04-19 19:24:47 UTC
Could you please provide your DMI info and I'll add that board also.

Thanks,
Adam
Comment 16 Martin Mokrejs 2004-05-30 14:39:25 UTC
Created attachment 3025 [details]
2.6.7-rc2 bootup messages
Comment 17 Martin Mokrejs 2004-05-30 14:41:23 UTC
Created attachment 3026 [details]
dmidecode
Comment 18 Martin Mokrejs 2004-05-30 14:43:44 UTC
Created attachment 3027 [details]
acpidmp
Comment 19 Martin Mokrejs 2004-07-09 02:02:17 UTC
Created attachment 3322 [details]
dmesg from 2.6.7-bk20 (compare with original bugreport -- same host)
Comment 20 Martin Mokrejs 2004-08-26 13:11:09 UTC
Still getting the text below on 2.6.8.1. :(

Linux Plug and Play Support v0.97 (c) Adam Belay
PnPBIOS: Scanning system for PnP BIOS support...
PnPBIOS: Found PnP BIOS installation structure at 0xc00f5230
PnPBIOS: PnP BIOS version 1.0, entry 0xf0000:0x5e1a, dseg 0xf0000
PNPBIOS fault.. attempting recovery.
PnPBIOS: Warning! Your PnP BIOS caused a fatal error. Attempting to continue
PnPBIOS: You may need to reboot with the "nobiospnp" option to operate stably
PnPBIOS: Check with your vendor for an updated BIOS
PnPBIOS: get_dev_node: unexpected status 0x28
PnPBIOS: 12 nodes reported by PnP BIOS; 12 recorded by driver
Comment 21 Martin Mokrejs 2004-08-27 14:03:30 UTC
Robert Moore from intel said to me in an email thread spawned from
http://bugme.osdl.org/show_bug.cgi?id=2802, where is latest dmesg output from
2.6.8.1+acpi-patch kernel:

It sounds as though the PNP bios issue is related to the problem below.

>> -----Original Message-----
>> From: Martin MOKREJ
Comment 22 Martin Mokrejs 2004-10-11 02:39:06 UTC
Created attachment 3802 [details]
dmesg-2.6.9-rc4

dmesg-2.6.9-rc4
Comment 23 Martin Mokrejs 2005-09-01 09:48:46 UTC
Not a problem anymore with recent kernels, for example 2.6.13.