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:06:39 +0100 (CET)
User-agent: Alpine 2.21.9999 (BSF 287 2018-06-16)

Hello,

On Fri, 15 Mar 2019, Philippe Mathieu-Daudé wrote:
Hi Zoltan,

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
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

Thanks a lot for finding this. Indeed this makes sense that we may need to do further init of hardware normally done by firmware if we load kernel with -kernel option but I haven't thought about that. This explains the error we get.

$ 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.

Maybe in  mips_fulong2e.c:main_cpu_reset() where it has a comment:
/* TODO: 2E reset stuff */ within the if (loaderparams.kernel_filename) so we only do it when kernel is loaded via -kernel? Can someone come up with a patch?

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"));

I was trying to find info on where the hardware has the ati-vga chip but could not find any logs showing this on-line. Now I've noticed there are some defines at the beginning of mips_fulong2e.c I haven't found before:

/* PCI SLOT in fulong 2e */
#define FULONG2E_VIA_SLOT        5
#define FULONG2E_ATI_SLOT        6
#define FULONG2E_RTL8139_SLOT    7

so that's probably correct and we could use this define.

Thank you,
BALATON Zoltan


reply via email to

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