Bug 15181 - Radeon: *ERROR* Unable to locate a BIOS ROM
Radeon: *ERROR* Unable to locate a BIOS ROM
Status: RESOLVED INVALID
Product: Drivers
Classification: Unclassified
Component: Video(DRI - non Intel)
All Linux
: P1 normal
Assigned To: drivers_video-dri
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2010-01-31 03:02 UTC by Matteo Croce
Modified: 2010-11-01 02:00 UTC (History)
2 users (show)

See Also:
Kernel Version: 2.6.36-rc7
Tree: Mainline
Regression: No


Attachments
dmesg output (37.72 KB, text/plain)
2010-01-31 03:02 UTC, Matteo Croce
Details
Linux 2.6.34-rc5 syslog (45.79 KB, text/plain)
2010-04-27 01:09 UTC, Matteo Croce
Details
drivers/gpu/drm/radeon/radeon_bios.c (13.91 KB, text/x-csrc)
2010-04-27 20:32 UTC, Matteo Croce
Details
Linux 2.6.34-rc6 syslog (41.61 KB, text/plain)
2010-04-30 13:26 UTC, Matteo Croce
Details
possible fix (1.52 KB, patch)
2010-08-23 07:07 UTC, Alex Deucher
Details | Diff
my ugly fix (425.45 KB, patch)
2010-10-18 01:45 UTC, Matteo Croce
Details | Diff
Syslog with the ugly fix (39.28 KB, text/plain)
2010-10-18 02:01 UTC, Matteo Croce
Details

Description Matteo Croce 2010-01-31 03:02:59 UTC
Created attachment 24812 [details]
dmesg output

I get this when booting:

[drm] Initialized drm 1.1.0 20060810
[drm] radeon defaulting to kernel modesetting.
[drm] radeon kernel modesetting enabled.
radeon 0000:02:00.0: PCI INT A -> GSI 16 (level, low) -> IRQ 16
radeon 0000:02:00.0: setting latency timer to 64
[drm] radeon: Initializing kernel modesetting.
[drm] register mmio base: 0xCFEF0000
[drm] register mmio size: 65536
radeon 0000:02:00.0: Invalid ROM contents
radeon 0000:02:00.0: Invalid ROM contents
[drm:radeon_get_bios] *ERROR* Unable to locate a BIOS ROM
radeon 0000:02:00.0: Fatal error during GPU init
[drm] radeon: finishing device.
radeon 0000:02:00.0: PCI INT A disabled
radeon: probe of 0000:02:00.0 failed with error -22

my system:
$ lspci -nn
00:00.0 Host bridge [0600]: Intel Corporation Core Processor DMI [8086:d132] (rev 11)
00:03.0 PCI bridge [0604]: Intel Corporation Core Processor PCI Express Root Port 1 [8086:d138] (rev 11)
00:08.0 System peripheral [0880]: Intel Corporation Core Processor System Management Registers [8086:d155] (rev 11)
00:08.1 System peripheral [0880]: Intel Corporation Core Processor Semaphore and Scratchpad Registers [8086:d156] (rev 11)
00:08.2 System peripheral [0880]: Intel Corporation Core Processor System Control and Status Registers [8086:d157] (rev 11)
00:08.3 System peripheral [0880]: Intel Corporation Core Processor Miscellaneous Registers [8086:d158] (rev 11)
00:10.0 System peripheral [0880]: Intel Corporation Core Processor QPI Link [8086:d150] (rev 11)
00:10.1 System peripheral [0880]: Intel Corporation Core Processor QPI Routing and Protocol Registers [8086:d151] (rev 11)
00:1a.0 USB Controller [0c03]: Intel Corporation 5 Series/3400 Series Chipset USB2 Enhanced Host Controller [8086:3b3c] (rev 05)
00:1b.0 Audio device [0403]: Intel Corporation 5 Series/3400 Series Chipset High Definition Audio [8086:3b56] (rev 05)
00:1c.0 PCI bridge [0604]: Intel Corporation 5 Series/3400 Series Chipset PCI Express Root Port 1 [8086:3b42] (rev 05)
00:1c.1 PCI bridge [0604]: Intel Corporation 5 Series/3400 Series Chipset PCI Express Root Port 2 [8086:3b44] (rev 05)
00:1c.3 PCI bridge [0604]: Intel Corporation 5 Series/3400 Series Chipset PCI Express Root Port 4 [8086:3b48] (rev 05)
00:1c.4 PCI bridge [0604]: Intel Corporation 5 Series/3400 Series Chipset PCI Express Root Port 5 [8086:3b4a] (rev 05)
00:1c.5 PCI bridge [0604]: Intel Corporation 5 Series/3400 Series Chipset PCI Express Root Port 6 [8086:3b4c] (rev 05)
00:1d.0 USB Controller [0c03]: Intel Corporation 5 Series/3400 Series Chipset USB2 Enhanced Host Controller [8086:3b34] (rev 05)
00:1e.0 PCI bridge [0604]: Intel Corporation 82801 Mobile PCI Bridge [8086:2448] (rev a5)
00:1f.0 ISA bridge [0601]: Intel Corporation Mobile 5 Series Chipset LPC Interface Controller [8086:3b03] (rev 05)
00:1f.2 SATA controller [0106]: Intel Corporation 5 Series/3400 Series Chipset 6 port SATA AHCI Controller [8086:3b2f] (rev 05)
00:1f.3 SMBus [0c05]: Intel Corporation 5 Series/3400 Series Chipset SMBus Controller [8086:3b30] (rev 05)
02:00.0 VGA compatible controller [0300]: ATI Technologies Inc M92 [Mobility Radeon HD 4500 Series] [1002:9553]
02:00.1 Audio device [0403]: ATI Technologies Inc R700 Audio Device [Radeon HD 4000 Series] [1002:aa38]
05:00.0 Network controller [0280]: Intel Corporation PRO/Wireless 5300 AGN [Shiloh] Network Connection [8086:4235]
09:00.0 SD Host controller [0805]: Ricoh Co Ltd Device [1180:e822] (rev 01)
09:00.1 System peripheral [0880]: Ricoh Co Ltd Device [1180:e230] (rev 01)
09:00.2 System peripheral [0880]: Ricoh Co Ltd Device [1180:e852] (rev 01)
09:00.3 FireWire (IEEE 1394) [0c00]: Ricoh Co Ltd Device [1180:e832] (rev 01)
0b:00.0 Ethernet controller [0200]: Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller [10ec:8168] (rev 03)
ff:00.0 Host bridge [0600]: Intel Corporation Core Processor QuickPath Architecture Generic Non-Core Registers [8086:2c52] (rev 04)
ff:00.1 Host bridge [0600]: Intel Corporation Core Processor QuickPath Architecture System Address Decoder [8086:2c81] (rev 04)
ff:02.0 Host bridge [0600]: Intel Corporation Core Processor QPI Link 0 [8086:2c90] (rev 04)
ff:02.1 Host bridge [0600]: Intel Corporation Core Processor QPI Physical 0 [8086:2c91] (rev 04)
ff:03.0 Host bridge [0600]: Intel Corporation Core Processor Integrated Memory Controller [8086:2c98] (rev 04)
ff:03.1 Host bridge [0600]: Intel Corporation Core Processor Integrated Memory Controller Target Address Decoder [8086:2c99] (rev 04)
ff:03.4 Host bridge [0600]: Intel Corporation Core Processor Integrated Memory Controller Test Registers [8086:2c9c] (rev 04)
ff:04.0 Host bridge [0600]: Intel Corporation Core Processor Integrated Memory Controller Channel 0 Control Registers [8086:2ca0] (rev 04)
ff:04.1 Host bridge [0600]: Intel Corporation Core Processor Integrated Memory Controller Channel 0 Address Registers [8086:2ca1] (rev 04)
ff:04.2 Host bridge [0600]: Intel Corporation Core Processor Integrated Memory Controller Channel 0 Rank Registers [8086:2ca2] (rev 04)
ff:04.3 Host bridge [0600]: Intel Corporation Core Processor Integrated Memory Controller Channel 0 Thermal Control Registers [8086:2ca3] (rev 04)
ff:05.0 Host bridge [0600]: Intel Corporation Core Processor Integrated Memory Controller Channel 1 Control Registers [8086:2ca8] (rev 04)
ff:05.1 Host bridge [0600]: Intel Corporation Core Processor Integrated Memory Controller Channel 1 Address Registers [8086:2ca9] (rev 04)
ff:05.2 Host bridge [0600]: Intel Corporation Core Processor Integrated Memory Controller Channel 1 Rank Registers [8086:2caa] (rev 04)
ff:05.3 Host bridge [0600]: Intel Corporation Core Processor Integrated Memory Controller Channel 1 Thermal Control Registers [8086:2cab] (rev 04)
Comment 1 Alex Deucher 2010-03-09 23:08:17 UTC
Is this a switchable graphics laptop (i.e., discrete and integrated graphics) by any chance?  If so, you'll likely need the switcheroo stuff in 2.6.34.
Comment 2 Matteo Croce 2010-03-20 12:27:19 UTC
No it's a discrete laptop card:

02:00.0 VGA compatible controller: ATI Technologies Inc M92 [Mobility Radeon HD 4500 Series]
        Subsystem: Dell Device 02bd
        Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR+ FastB2B- DisINTx-
        Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR+ <PERR- INTx-
        Latency: 0, Cache Line Size: 64 bytes
        Interrupt: pin A routed to IRQ 16
        Region 0: Memory at d0000000 (32-bit, prefetchable) [size=256M]
        Region 1: I/O ports at 2000 [size=256]
        Region 2: Memory at cfef0000 (32-bit, non-prefetchable) [size=64K]
        [virtual] Expansion ROM at cfe00000 [disabled] [size=128K]
        Capabilities: [50] Power Management version 3
                Flags: PMEClk- DSI- D1+ D2+ AuxCurrent=0mA PME(D0-,D1-,D2-,D3hot-,D3cold-)
                Status: D0 PME-Enable- DSel=0 DScale=0 PME-
        Capabilities: [58] Express (v2) Legacy Endpoint, MSI 00
                DevCap: MaxPayload 128 bytes, PhantFunc 0, Latency L0s <4us, L1 unlimited
                        ExtTag+ AttnBtn- AttnInd- PwrInd- RBE+ FLReset-
                DevCtl: Report errors: Correctable- Non-Fatal- Fatal- Unsupported-
                        RlxdOrd+ ExtTag- PhantFunc- AuxPwr- NoSnoop+
                        MaxPayload 128 bytes, MaxReadReq 128 bytes
                DevSta: CorrErr- UncorrErr+ FatalErr- UnsuppReq+ AuxPwr- TransPend-
                LnkCap: Port #0, Speed 2.5GT/s, Width x16, ASPM L0s L1, Latency L0 <64ns, L1 <1us
                        ClockPM+ Suprise- LLActRep- BwNot-
                LnkCtl: ASPM L0s L1 Enabled; RCB 64 bytes Disabled- Retrain- CommClk+
                        ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
                LnkSta: Speed 2.5GT/s, Width x4, TrErr- Train- SlotClk+ DLActive- BWMgmt- ABWMgmt-
        Capabilities: [a0] Message Signalled Interrupts: Mask- 64bit+ Queue=0/0 Enable-
                Address: 0000000000000000  Data: 0000
        Capabilities: [100] Vendor Specific Information <?>
Comment 3 Matteo Croce 2010-04-14 21:33:39 UTC
Any new?
I see mani radeon/kms commits but noone fixes.
Comment 4 Jérôme Glisse 2010-04-26 09:28:08 UTC
Does Xorg works without kms ?
Comment 5 Matteo Croce 2010-04-26 10:27:55 UTC
Yes.
I'm trying to track down how userspace gets the ROM contents via libpciaccess to fix in in the kernel driver, but I don't know how AtomBIOS is involved in this process
Comment 6 Jérôme Glisse 2010-04-26 12:47:10 UTC
Please test with 2.6.34-rc* change have been made there and it might work with it.
Comment 7 Matteo Croce 2010-04-26 14:06:15 UTC
Tested with 2.6.34-rc5, it doesn't work.
read(image) returns 0 instead 0x55 in pci rom read code
Comment 8 Jérôme Glisse 2010-04-26 20:28:40 UTC
Please attach dmesg of 2.6.34-rc5 with KMS and failing rom
Comment 9 Matteo Croce 2010-04-27 00:49:32 UTC
Exactly the same of the 2.6.33 which i've already posted
Comment 10 Matteo Croce 2010-04-27 01:09:02 UTC
Created attachment 26157 [details]
Linux 2.6.34-rc5 syslog

Note that I've added a WARN()in drivers/pci/rom.c to debug the issue
Comment 11 Jérôme Glisse 2010-04-27 08:47:15 UTC
Please attach drivers/gpu/drm/radeon/radeon_bios.c it seems different from the one upstream and it's useless to add warn to rom.c.
Comment 12 Matteo Croce 2010-04-27 20:32:37 UTC
Created attachment 26165 [details]
drivers/gpu/drm/radeon/radeon_bios.c

drivers/gpu/drm/radeon/radeon_bios.c
Comment 13 Matteo Croce 2010-04-30 13:26:01 UTC
Created attachment 26187 [details]
Linux 2.6.34-rc6 syslog
Comment 14 Jérôme Glisse 2010-05-01 18:09:24 UTC
Please add a printk at the begining of r700_read_disabled_bios to make sure this function is use.
Comment 15 Matteo Croce 2010-05-23 14:08:21 UTC
I have added:

printk("[DBG]: %s\n", __func__);

and got:

[drm] radeon kernel modesetting enabled.
radeon 0000:02:00.0: setting latency timer to 64
[drm] initializing kernel modesetting (RV710 0x1002:0x9553).
[drm] register mmio base: 0xCFEF0000
[drm] register mmio size: 65536
radeon 0000:02:00.0: Invalid ROM contents
[DBG]: r700_read_disabled_bios
radeon 0000:02:00.0: Invalid ROM contents
[drm:radeon_get_bios] *ERROR* Unable to locate a BIOS ROM
radeon 0000:02:00.0: Fatal error during GPU init
[drm] radeon: finishing device.
radeon: probe of 0000:02:00.0 failed with error -22
Comment 16 Matteo Croce 2010-06-01 17:05:31 UTC
Slighty different output with 2.6.35-rc1

[drm] Initialized drm 1.1.0 20060810
[drm] radeon kernel modesetting enabled.
radeon 0000:02:00.0: setting latency timer to 64
[drm] initializing kernel modesetting (RV710 0x1002:0x9553).
[drm] register mmio base: 0xCFEF0000
[drm] register mmio size: 65536
radeon 0000:02:00.0: Invalid ROM contents
radeon 0000:02:00.0: Invalid ROM contents
[drm:radeon_get_bios] *ERROR* Unable to locate a BIOS ROM
radeon 0000:02:00.0: Fatal error during GPU init
[drm] radeon: finishing device.
[TTM] Memory type 2 has not been initialized.
radeon: probe of 0000:02:00.0 failed with error -22
Comment 17 Matteo Croce 2010-07-09 00:13:20 UTC
Kernel 2.6.35-rc4

[drm] radeon kernel modesetting enabled.
radeon 0000:02:00.0: setting latency timer to 64
[drm] initializing kernel modesetting (RV710 0x1002:0x9553).
[drm] register mmio base: 0xCFEF0000
[drm] register mmio size: 65536
modprobe:10053 freeing invalid memtype d0000000-d0040000
radeon 0000:02:00.0: Invalid ROM contents
modprobe:10053 freeing invalid memtype cfe00000-cfe20000
radeon 0000:02:00.0: Invalid ROM contents
[drm:radeon_get_bios] *ERROR* Unable to locate a BIOS ROM
radeon 0000:02:00.0: Fatal error during GPU init
[drm] radeon: finishing device.
[TTM] Memory type 2 has not been initialized.
radeon: probe of 0000:02:00.0 failed with error -22
Comment 18 Matteo Croce 2010-08-21 14:50:59 UTC
Still broken.
Noone can fix this?
Comment 19 Alex Deucher 2010-08-23 07:07:54 UTC
Created attachment 27721 [details]
possible fix

Does this patch help?
Comment 20 Matteo Croce 2010-08-24 23:55:21 UTC
Yes it fixes. Thanks
Comment 21 Matteo Croce 2010-08-25 00:21:14 UTC
Sorry I was booting with user mode setting. With KMS the error is still.
I've added some more printk to the bios get code:

[drm] radeon kernel modesetting enabled.
radeon 0000:02:00.0: setting latency timer to 64
[drm] initializing kernel modesetting (RV710 0x1002:0x9553).
[drm] register mmio base: 0xCFEF0000
[drm] register mmio size: 65536
bios[01] = e8,e8
radeon 0000:02:00.0: Invalid ROM contents
bios[01] = ff,ff
radeon 0000:02:00.0: Invalid ROM contents
bios[01] = ff,ff
[drm:radeon_get_bios] *ERROR* Unable to locate a BIOS ROM
radeon 0000:02:00.0: Fatal error during GPU init
[drm] radeon: finishing device.
[TTM] Memory type 2 has not been initialized.
radeon: probe of 0000:02:00.0 failed with error -22

my new patch is this: http://pastebin.ca/1924727
Comment 22 Alex Deucher 2010-08-26 05:00:59 UTC
does your kernel have the vesa framebuffer compiled into your kernel?  What does your kernel command line look like?

The vesa framebuffer seems to cause issues. See this thread:
http://www.phoronix.com/forums/showthread.php?t=25562
Comment 23 Matteo Croce 2010-08-26 19:06:27 UTC
[~]$ cat /proc/cmdline 
BOOT_IMAGE=/boot/vmlinuz-2.6.36-rc2 root=/dev/sda1 ro quiet
[~]$ zgrep VESA /proc/config.gz
# CONFIG_FB_BOOT_VESA_SUPPORT is not set
# CONFIG_FB_VESA is not set
[~]$
Comment 24 Matteo Croce 2010-08-30 00:58:04 UTC
Nothing new in 2.6.36-rc3...
Comment 25 Matteo Croce 2010-09-13 10:45:11 UTC
Still broken in 2.6.36-rc4
Comment 26 Matteo Croce 2010-10-05 09:34:04 UTC
Still broken in 2.6.36-rc6
Comment 27 Matteo Croce 2010-10-12 00:14:21 UTC
Nothing new in 2.6.36-rc7

is there a fix pending for inclusion in 2.6.37-rc1?
Comment 28 Matteo Croce 2010-10-18 01:45:46 UTC
Created attachment 33882 [details]
my ugly fix
Comment 29 Matteo Croce 2010-10-18 02:01:49 UTC
Created attachment 33892 [details]
Syslog with the ugly fix
Comment 30 Matteo Croce 2010-11-01 02:00:13 UTC
It founds that such card requires CONFIG_PCI_QUIRKS=y

Note You need to log in before you can comment on or make changes to this bug.