[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] Data bus error with redeonfb on mips_fulong2e
From: |
Aleksandar Markovic |
Subject: |
Re: [Qemu-devel] Data bus error with redeonfb on mips_fulong2e |
Date: |
Thu, 14 Mar 2019 21:38:17 +0000 |
Hello, Paul, Zoltan
> 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)
>
Paul, Zoltan is experimenting with ATI Radeon support in QEMU. However,
he hits this problem while booting with Linux kernel. May I ask you for
your comments/insight on thi matter? The board that is being emulated
is Fulong 2E (with Loongson 2E CPU).
Zoltan, can you provide here step-by-step repro procedure so that Paul
doesn't need to search other email threads?
Thanks to both for considering my requests.
Aleksandar
> I think the problem is around here (I have to guess because Linux prints
> (ptrval) instead of offsets in oops message as a security measure that I
> don't know how to turn off and the mips64 objdump that comes with my
> distro can't interleave source with disassembly so even if I have the
> offset can't find the source line by it so I had to go by debug printfs):
>
> linux-4.15.10/drivers/video/fbdev/aty/radeon_base.c:
> 2311 /* Set base addrs */
> 2312 rinfo->fb_base_phys = pci_resource_start (pdev, 0);
> 2313 rinfo->mmio_base_phys = pci_resource_start (pdev, 2);
> 2314 pr_debug("radeonfb_pci_register fb_base_phys=%lx\n", >
> rinfo->fb_base_phys);
> 2315 pr_debug("radeonfb_pci_register mmio_base_phys=%lx\n", >
> rinfo->mmio_base_phys);
> 2316
> 2317 /* request the mem regions */
> 2318 pr_debug("radeonfb_pci_register request mem regions\n");
> 2319 ret = pci_request_region(pdev, 0, "radeonfb framebuffer");
> 2320 if (ret < 0) {
> 2321 printk( KERN_ERR "radeonfb (%s): cannot request >
> region 0.\n",
> 2322 pci_name(rinfo->pdev));
> 2323 goto err_release_fb;
> 2324 }
> 2325
> 2326 ret = pci_request_region(pdev, 2, "radeonfb mmio");
> 2327 if (ret < 0) {
> 2328 printk( KERN_ERR "radeonfb (%s): cannot request >
> region 2.\n",
> 2329 pci_name(rinfo->pdev));
> 2330 goto err_release_pci0;
> 2331 }
> 2332
> 2333 /* map the regions */
> 2334 pr_debug("radeonfb_pci_register map regions\n");
> 2335 rinfo->mmio_base = ioremap(rinfo->mmio_base_phys, >
> RADEON_REGSIZE);
> 2336 if (!rinfo->mmio_base) {
> 2337 printk(KERN_ERR "radeonfb (%s): cannot map MMIO\n",
> 2338 pci_name(rinfo->pdev));
> 2339 ret = -EIO;
> 2340 goto err_release_pci2;
> 2341 }
> 2342 pr_debug("radeonfb_pci_register mmio_base=%px\n", >
> rinfo->mmio_base);
> 2343
> 2344 rinfo->fb_local_base = INREG(MC_FB_LOCATION) << 16;
> 2345 pr_debug("radeonfb_pci_register fb_local_base=%lx\n", >
> rinfo->fb_local_base);
>
> So it fails in INREG on line 2344 which is in radeonfb.h:380
>
> #define INREG(addr) readl((rinfo->mmio_base)+addr)
>
> This reg read never reaches QEMU so either something's wrong with the
> mmio_base or readl can't handle it correctly. This seems to be something
> Linux MIPS specific that I have no idea about. Does this make sense to
> anyone?
>
> Regards,
> BALATON Zoltan
>
I appreciate your help!
Aleksandar