qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] Data bus error with redeonfb on mips_fulong2e


From: BALATON Zoltan
Subject: Re: [Qemu-devel] Data bus error with redeonfb on mips_fulong2e
Date: Fri, 15 Mar 2019 13:10:44 +0100 (CET)
User-agent: Alpine 2.21.9999 (BSF 287 2018-06-16)

On Fri, 15 Mar 2019, Philippe Mathieu-Daudé wrote:
On 3/14/19 11:08 PM, BALATON Zoltan wrote:
On Thu, 14 Mar 2019, Aleksandar Markovic wrote:
From: BALATON Zoltan <address@hidden>
Subject: Data bus error with redeonfb on mips_fulong2e

Hello,

Trying to debug the Linux kernel oops with radeonfb I've added some more
debug logs and got this:

radeonfb_pci_register BEGIN
pci_host_data: pci_data_read: ati-vga: addr=04 val=00000000 len=4
PCI: Enabling device 0000:00:06.0 (0000 -> 0003)
pci_host_data: pci_data_read: ati-vga: addr=04 val=00000000 len=4
pci_host_data: pci_data_write: ati-vga: addr=04 val=00000003 len=4
pci_update_mappings: adding bar 0 to pci.mem @ 0x14000000
pci_update_mappings: adding bar 1 to io @ 0x4000
pci_update_mappings: adding bar 2 to pci.mem @ 0x15050000
pci_host_data: pci_data_read: ati-vga: addr=3c val=00000000 len=4
radeonfb_pci_register fb_base_phys=14000000
radeonfb_pci_register mmio_base_phys=15050000
radeonfb_pci_register request mem regions
radeonfb_pci_register map regions

But wait, Shouldn't this map regions meant to map the PCI BARs at the correct address? Why is that not happening?

Regards,
BALATON Zoltan

radeonfb_pci_register mmio_base=9000000015050000
Data bus error, epc == ffffffff80418e4c, ra == ffffffff80418e4c
(full oops dump in previous message but I couldn't find anything
useful in
there so omitted here)

(qemu) info mtree
memory-region: system
 0000000000000000-ffffffffffffffff (prio 0, i/o): system
   0000000000000000-000000000fffffff (prio 0, ram): fulong2e.ram
   0000000010000000-000000001bffffff (prio 0, i/o): pci.mem
     00000000100a0000-00000000100bffff (prio 1, i/o): vga-lowmem
     0000000024000000-0000000024ffffff (prio 1, ram): vga.vram
     0000000025050000-0000000025053fff (prio 1, i/o): ati.mmregs
   000000001fc00000-000000001fc7ffff (prio 0, rom): fulong2e.bios

The CPU bus is right, there is nothing mapped at 0x0.1505.0000 (IO is
36bit wide on mips64).

I look at the kernel and it doesn't configure the PCI but expect the
display to be there already, so I checked the BIOS you cited in another
thread and ran the same command con the "PMON>" prompt was reached:

(qemu) info mtree
memory-region: system
 0000000000000000-ffffffffffffffff (prio 0, i/o): system
   0000000000000000-000000000fffffff (prio 0, ram): fulong2e.ram
   0000000010000000-000000001bffffff (prio 0, i/o): pci.mem
     00000000100a0000-00000000100affff (prio 2, i/o): alias vga.chain4
@vga.vram 0000000000000000-000000000000ffff
     00000000100a0000-00000000100bffff (prio 1, i/o): vga-lowmem
     0000000014000000-0000000014ffffff (prio 1, ram): vga.vram
     0000000015000000-000000001503ffff (prio 1, rom): rtl8139.rom
     0000000015040000-000000001504ffff (prio 1, rom): ati-vga.rom
     0000000015050000-0000000015053fff (prio 1, i/o): ati.mmregs

             ^ remapped

     0000000015054000-00000000150540ff (prio 1, i/o): alias rtl8139-mem
@rtl8139 0000000000000000-00000000000000ff
   000000001fc00000-000000001fc7ffff (prio 0, rom): fulong2e.bios
   000000001fd00000-000000001fd0ffff (prio 0, i/o): alias isa_mmio @io
0000000000000000-000000000000ffff
   000000001fe00000-000000001fe000ff (prio 0, i/o): north-bridge-pci-config
   000000001fe00100-000000001fe0016f (prio 0, i/o): north-bridge-register
   000000001fe80000-000000001fefffff (prio 0, i/o): south-bridge-pci-config
   000000001ff00000-000000001fffffff (prio 0, i/o): alias isa_mmio @io
0000000000000000-00000000000fffff
   00000000bfe00200-00000000bfe002ff (prio 0, i/o): ldma
   00000000bfe00300-00000000bfe003ff (prio 0, i/o): cop

I then traced it to check PMON do the PCI initialization Linux expects:

$ qemu-system-mips64el -M fulong2e -bios pmon_2e.bin \
 -serial stdio -d trace:pci\*
...
PPCIH
...
PCI bus 0 slot 5/6: reg 0x24 = 0x0
address@hidden:pci_cfg_read VT82C686B_MC97 05:6 @0x30 -> 0x0
address@hidden:pci_cfg_read VT82C686B_MC97 05:6 @0x30 -> 0x0
address@hidden:pci_cfg_write VT82C686B_MC97 05:6 @0x30 <-
0xfffffffe
address@hidden:pci_cfg_read VT82C686B_MC97 05:6 @0x30 -> 0x0
address@hidden:pci_cfg_read VT82C686B_MC97 05:6 @0x30 -> 0x0
address@hidden:pci_cfg_write VT82C686B_MC97 05:6 @0x30 <- 0x0
address@hidden:pci_cfg_read ati-vga 06:0 @0x0 -> 0x51591002
address@hidden:pci_cfg_read ati-vga 06:0 @0xc -> 0x0
address@hidden:pci_cfg_read ati-vga 06:0 @0x8 -> 0x3000000
address@hidden:pci_cfg_read ati-vga 06:0 @0x0 -> 0x51591002
address@hidden:pci_cfg_read ati-vga 06:0 @0x4 -> 0x0
address@hidden:pci_cfg_read ati-vga 06:0 @0x4 -> 0x0
address@hidden:pci_cfg_write ati-vga 06:0 @0x4 <- 0x0
address@hidden:pci_cfg_read ati-vga 06:0 @0x3c -> 0x0
address@hidden:pci_cfg_read ati-vga 06:0 @0x3c -> 0x0
address@hidden:pci_cfg_read ati-vga 06:0 @0x3c -> 0x0
address@hidden:pci_cfg_read ati-vga 06:0 @0x3c -> 0x0
address@hidden:pci_cfg_write ati-vga 06:0 @0x3c <- 0x0
address@hidden:pci_cfg_read ati-vga 06:0 @0x10 -> 0x8
address@hidden:pci_cfg_read ati-vga 06:0 @0x10 -> 0x8
address@hidden:pci_cfg_write ati-vga 06:0 @0x10 <- 0xfffffffe
address@hidden:pci_cfg_read ati-vga 06:0 @0x10 -> 0xff000008
address@hidden:pci_cfg_read ati-vga 06:0 @0x10 -> 0xff000008
address@hidden:pci_cfg_write ati-vga 06:0 @0x10 <- 0x8
address@hidden:pci_cfg_read ati-vga 06:0 @0x14 -> 0x1
address@hidden:pci_cfg_read ati-vga 06:0 @0x14 -> 0x1
address@hidden:pci_cfg_write ati-vga 06:0 @0x14 <- 0xfffffffe
address@hidden:pci_cfg_read ati-vga 06:0 @0x14 -> 0xffffff01
address@hidden:pci_cfg_read ati-vga 06:0 @0x14 -> 0xffffff01
address@hidden:pci_cfg_write ati-vga 06:0 @0x14 <- 0x1
address@hidden:pci_cfg_read ati-vga 06:0 @0x18 -> 0x0
address@hidden:pci_cfg_read ati-vga 06:0 @0x18 -> 0x0
address@hidden:pci_cfg_write ati-vga 06:0 @0x18 <- 0xfffffffe
address@hidden:pci_cfg_read ati-vga 06:0 @0x18 -> 0xffffc000
address@hidden:pci_cfg_read ati-vga 06:0 @0x18 -> 0xffffc000
address@hidden:pci_cfg_write ati-vga 06:0 @0x18 <- 0x0
address@hidden:pci_cfg_read ati-vga 06:0 @0x1c -> 0x0
address@hidden:pci_cfg_read ati-vga 06:0 @0x1c -> 0x0
address@hidden:pci_cfg_write ati-vga 06:0 @0x1c <- 0xfffffffe
address@hidden:pci_cfg_read ati-vga 06:0 @0x1c -> 0x0
address@hidden:pci_cfg_read ati-vga 06:0 @0x1c -> 0x0
address@hidden:pci_cfg_write ati-vga 06:0 @0x1c <- 0x0
address@hidden:pci_cfg_read ati-vga 06:0 @0x20 -> 0x0
address@hidden:pci_cfg_read ati-vga 06:0 @0x20 -> 0x0
address@hidden:pci_cfg_write ati-vga 06:0 @0x20 <- 0xfffffffe
address@hidden:pci_cfg_read ati-vga 06:0 @0x20 -> 0x0
address@hidden:pci_cfg_read ati-vga 06:0 @0x20 -> 0x0
address@hidden:pci_cfg_write ati-vga 06:0 @0x20 <- 0x0
address@hidden:pci_cfg_read ati-vga 06:0 @0x24 -> 0x0
address@hidden:pci_cfg_read ati-vga 06:0 @0x24 -> 0x0
address@hidden:pci_cfg_write ati-vga 06:0 @0x24 <- 0xfffffffe
address@hidden:pci_cfg_read ati-vga 06:0 @0x24 -> 0x0
address@hidden:pci_cfg_read ati-vga 06:0 @0x24 -> 0x0
address@hidden:pci_cfg_write ati-vga 06:0 @0x24 <- 0x0
address@hidden:pci_cfg_read ati-vga 06:0 @0x30 -> 0x0
address@hidden:pci_cfg_read ati-vga 06:0 @0x30 -> 0x0
address@hidden:pci_cfg_write ati-vga 06:0 @0x30 <- 0xfffffffe
address@hidden:pci_cfg_read ati-vga 06:0 @0x30 -> 0xffff0000
address@hidden:pci_cfg_read ati-vga 06:0 @0x30 -> 0xffff0000
address@hidden:pci_cfg_write ati-vga 06:0 @0x30 <- 0x0
address@hidden:pci_cfg_read rtl8139 07:0 @0x0 -> 0x813910ec
address@hidden:pci_cfg_read rtl8139 07:0 @0xc -> 0x0
address@hidden:pci_cfg_read rtl8139 07:0 @0x8 -> 0x2000020
address@hidden:pci_cfg_read rtl8139 07:0 @0x0 -> 0x813910ec
address@hidden:pci_cfg_read rtl8139 07:0 @0x4 -> 0x0
address@hidden:pci_cfg_read rtl8139 07:0 @0x4 -> 0x0
address@hidden:pci_cfg_write rtl8139 07:0 @0x4 <- 0x0
address@hidden:pci_cfg_read rtl8139 07:0 @0x3c -> 0x100
address@hidden:pci_cfg_read rtl8139 07:0 @0x3c -> 0x100
address@hidden:pci_cfg_read rtl8139 07:0 @0x3c -> 0x100
address@hidden:pci_cfg_read rtl8139 07:0 @0x3c -> 0x100
address@hidden:pci_cfg_write rtl8139 07:0 @0x3c <- 0x100
address@hidden:pci_cfg_read rtl8139 07:0 @0x10 -> 0x1
address@hidden:pci_cfg_read rtl8139 07:0 @0x10 -> 0x1
address@hidden:pci_cfg_write rtl8139 07:0 @0x10 <- 0xfffffffe
address@hidden:pci_cfg_read rtl8139 07:0 @0x10 -> 0xffffff01
address@hidden:pci_cfg_read rtl8139 07:0 @0x10 -> 0xffffff01
address@hidden:pci_cfg_write rtl8139 07:0 @0x10 <- 0x1
address@hidden:pci_cfg_read rtl8139 07:0 @0x14 -> 0x0
address@hidden:pci_cfg_read rtl8139 07:0 @0x14 -> 0x0
address@hidden:pci_cfg_write rtl8139 07:0 @0x14 <- 0xfffffffe
address@hidden:pci_cfg_read rtl8139 07:0 @0x14 -> 0xffffff00
address@hidden:pci_cfg_read rtl8139 07:0 @0x14 -> 0xffffff00
address@hidden:pci_cfg_write rtl8139 07:0 @0x14 <- 0x0
address@hidden:pci_cfg_read rtl8139 07:0 @0x18 -> 0x0
address@hidden:pci_cfg_read rtl8139 07:0 @0x18 -> 0x0
address@hidden:pci_cfg_write rtl8139 07:0 @0x18 <- 0xfffffffe
address@hidden:pci_cfg_read rtl8139 07:0 @0x18 -> 0x0
address@hidden:pci_cfg_read rtl8139 07:0 @0x18 -> 0x0
address@hidden:pci_cfg_write rtl8139 07:0 @0x18 <- 0x0
address@hidden:pci_cfg_read rtl8139 07:0 @0x1c -> 0x0
address@hidden:pci_cfg_read rtl8139 07:0 @0x1c -> 0x0
address@hidden:pci_cfg_write rtl8139 07:0 @0x1c <- 0xfffffffe
address@hidden:pci_cfg_read rtl8139 07:0 @0x1c -> 0x0
address@hidden:pci_cfg_read rtl8139 07:0 @0x1c -> 0x0
address@hidden:pci_cfg_write rtl8139 07:0 @0x1c <- 0x0
address@hidden:pci_cfg_read rtl8139 07:0 @0x20 -> 0x0
address@hidden:pci_cfg_read rtl8139 07:0 @0x20 -> 0x0
address@hidden:pci_cfg_write rtl8139 07:0 @0x20 <- 0xfffffffe
address@hidden:pci_cfg_read rtl8139 07:0 @0x20 -> 0x0
address@hidden:pci_cfg_read rtl8139 07:0 @0x20 -> 0x0
address@hidden:pci_cfg_write rtl8139 07:0 @0x20 <- 0x0
address@hidden:pci_cfg_read rtl8139 07:0 @0x24 -> 0x0
address@hidden:pci_cfg_read rtl8139 07:0 @0x24 -> 0x0
address@hidden:pci_cfg_write rtl8139 07:0 @0x24 <- 0xfffffffe
address@hidden:pci_cfg_read rtl8139 07:0 @0x24 -> 0x0
address@hidden:pci_cfg_read rtl8139 07:0 @0x24 -> 0x0
address@hidden:pci_cfg_write rtl8139 07:0 @0x24 <- 0x0
address@hidden:pci_cfg_read rtl8139 07:0 @0x30 -> 0x0
address@hidden:pci_cfg_read rtl8139 07:0 @0x30 -> 0x0
address@hidden:pci_cfg_write rtl8139 07:0 @0x30 <- 0xfffffffe
address@hidden:pci_cfg_read rtl8139 07:0 @0x30 -> 0xfffc0000
address@hidden:pci_cfg_read rtl8139 07:0 @0x30 -> 0xfffc0000
address@hidden:pci_cfg_write rtl8139 07:0 @0x30 <- 0x0
PCIS
PCIR
PCIW
address@hidden:pci_cfg_read ati-vga 06:0 @0x10 -> 0x8
address@hidden:pci_cfg_read ati-vga 06:0 @0x10 -> 0x8
address@hidden:pci_cfg_write ati-vga 06:0 @0x10 <- 0x4000008
address@hidden:pci_cfg_read ati-vga 06:0 @0x18 -> 0x0
address@hidden:pci_cfg_read ati-vga 06:0 @0x18 -> 0x0
address@hidden:pci_cfg_write ati-vga 06:0 @0x18 <- 0x5050000
address@hidden:pci_cfg_read rtl8139 07:0 @0x14 -> 0x0
address@hidden:pci_cfg_read rtl8139 07:0 @0x14 -> 0x0
address@hidden:pci_cfg_write rtl8139 07:0 @0x14 <- 0x5054000
address@hidden:pci_cfg_read rtl8139 07:0 @0x30 -> 0x0
address@hidden:pci_cfg_write rtl8139 07:0 @0x30 <- 0x5000001
address@hidden:pci_cfg_read ati-vga 06:0 @0x30 -> 0x0
address@hidden:pci_cfg_write ati-vga 06:0 @0x30 <- 0x5040001
address@hidden:pci_cfg_read rtl8139 07:0 @0x10 -> 0x1
address@hidden:pci_cfg_write rtl8139 07:0 @0x10 <- 0xa001
address@hidden:pci_cfg_read ati-vga 06:0 @0x14 -> 0x1
address@hidden:pci_cfg_write ati-vga 06:0 @0x14 <- 0xa101
address@hidden:pci_cfg_read vt82c686b-usb-uhci 05:3 @0x20 -> 0x1
address@hidden:pci_cfg_write vt82c686b-usb-uhci 05:3 @0x20 <-
0xa201
address@hidden:pci_cfg_read vt82c686b-usb-uhci 05:2 @0x20 -> 0x1
address@hidden:pci_cfg_write vt82c686b-usb-uhci 05:2 @0x20 <-
0xa221
address@hidden:pci_cfg_read via-ide 05:1 @0x20 -> 0xcc1
address@hidden:pci_cfg_write via-ide 05:1 @0x20 <- 0xa241
address@hidden:pci_cfg_read via-ide 05:1 @0x18 -> 0x171
address@hidden:pci_cfg_write via-ide 05:1 @0x18 <- 0xa251
address@hidden:pci_cfg_read via-ide 05:1 @0x10 -> 0x1f1
address@hidden:pci_cfg_write via-ide 05:1 @0x10 <- 0xa259
address@hidden:pci_cfg_read via-ide 05:1 @0x1c -> 0x375
address@hidden:pci_cfg_write via-ide 05:1 @0x1c <- 0xa261
address@hidden:pci_cfg_read via-ide 05:1 @0x14 -> 0x3f5
address@hidden:pci_cfg_write via-ide 05:1 @0x14 <- 0xa265
NETI
RTCL
PCID
address@hidden:pci_cfg_read VT82C686B 05:0 @0x4 -> 0x2000008
address@hidden:pci_cfg_read VT82C686B 05:0 @0x8 -> 0x6010040
...
address@hidden:pci_cfg_read ati-vga 06:0 @0x4 -> 0x0
address@hidden:pci_cfg_read ati-vga 06:0 @0x8 -> 0x3000000
address@hidden:pci_cfg_read ati-vga 06:0 @0x4 -> 0x0
address@hidden:pci_cfg_write ati-vga 06:0 @0x4 <- 0x147
address@hidden:pci_update_mappings_add d=0x56212fd6a220 00:06.0
0,0x4000000+0x1000000
address@hidden:pci_update_mappings_add d=0x56212fd6a220 00:06.0
1,0xa100+0x100
address@hidden:pci_update_mappings_add d=0x56212fd6a220 00:06.0
2,0x5050000+0x4000
address@hidden:pci_update_mappings_add d=0x56212fd6a220 00:06.0
6,0x5040000+0x10000
address@hidden:pci_cfg_read ati-vga 06:0 @0xc -> 0x0
address@hidden:pci_cfg_read ati-vga 06:0 @0xc -> 0x0
address@hidden:pci_cfg_write ati-vga 06:0 @0xc <- 0x4008
address@hidden:pci_cfg_read rtl8139 07:0 @0x4 -> 0x0
address@hidden:pci_cfg_read rtl8139 07:0 @0x8 -> 0x2000020
address@hidden:pci_cfg_read rtl8139 07:0 @0x4 -> 0x0
address@hidden:pci_cfg_write rtl8139 07:0 @0x4 <- 0x147
address@hidden:pci_update_mappings_add d=0x56212ff86a10 00:07.0
0,0xa000+0x100
address@hidden:pci_update_mappings_add d=0x56212ff86a10 00:07.0
1,0x5054000+0x100
address@hidden:pci_update_mappings_add d=0x56212ff86a10 00:07.0
6,0x5000000+0x40000
address@hidden:pci_cfg_read rtl8139 07:0 @0xc -> 0x0
address@hidden:pci_cfg_read rtl8139 07:0 @0xc -> 0x0
address@hidden:pci_cfg_write rtl8139 07:0 @0xc <- 0x4008
VGAI
Default MODE_ID 2
starting radeon init...
address@hidden:pci_cfg_read ati-vga 06:0 @0x14 -> 0xa101
address@hidden:pci_cfg_read ati-vga 06:0 @0x18 -> 0x5050000
iobase=bfd0a100,mmbase=b5050000
mc_status=5
mc_status=5
mc_status=5
mc_status=5
ppll_div_3 = 301f4
Wrote: 0x00000043 0x000301f4 0x00000000 (0x00000000)
Wrote: rd=67, fd=500, pd=3
VCLK_ECP_CNTL = 000000C3
radeon init done
FRBI
address@hidden:pci_cfg_read ati-vga 06:0 @0x10 -> 0x4000008
address@hidden:pci_cfg_read ati-vga 06:0 @0x18 -> 0x5050000
cfb_console init,fb=b4000000
Video: Drawing the logo ...
...

$ fgrep 'pci_cfg_write ati-vga' trace.log
...
address@hidden:pci_cfg_write ati-vga 06:0 @0x10 <- 0x4000008
address@hidden:pci_cfg_write ati-vga 06:0 @0x18 <- 0x5050000
address@hidden:pci_cfg_write ati-vga 06:0 @0x30 <- 0x5040001
address@hidden:pci_cfg_write ati-vga 06:0 @0x14 <- 0xa101
address@hidden:pci_cfg_write ati-vga 06:0 @0x4 <- 0x147

PCI_BASE_ADDRESS_0 = 0x4000008
PCI_BASE_ADDRESS_2 = 0x5050000
PCI_ROM_ADDRESS    = 0x5040001
PCI_BASE_ADDRESS_1 = 0xa101
PCI_COMMAND        = IO|MEMORY|MASTER|PARITY|SERR

I dunno where we have to plug that.

BTW you should:

    /* GPU */
-    dev = DEVICE(pci_create(pci_bus, -1, "ati-vga"));
+    dev = DEVICE(pci_create(pci_bus, PCI_DEVFN(6, 0), "ati-vga"));

Regards,

Phil.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]