qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] PCI virtual address


From: asim khan
Subject: [Qemu-devel] PCI virtual address
Date: Thu, 24 Feb 2011 16:22:59 +0530

Hi,
 Iam trying to emulate USB for realview board in QEMU.
trying to access it thru the PCI bus.for realview board Idont see PCI support in QEMU although it is there for versatile boad.so I googled and found realview PCIX support.I applied the patch. but then in arch/arm/mach-realview/pcix.c inside function  "realview_pb_pcix_unit_init(void)"
 
u32 data = "" + PCI_UNITCNT);
the data value it is printing is zero.
 
#define PCIX_UNIT_BASE                  0xF8000000 which seems to be virtual adress
 
realview spec PCI memory map:
 
AXI2PCI                                   0x90040000
PCI IO window                          0x90050000
PCI Memory Window                 0xA0000000-0XBFFFFFFF
 
and in qemu realview.c
 
 if (is_pb) {
        dev = sysbus_create_varargs("realview_pci", 0x90040000,/*0x60000000*/
                                    pic[48], pic[49], pic[50], pic[51], NULL);
        pci_bus = (PCIBus *)qdev_get_child_bus(dev, "pci");
        if (usb_enabled) {
            fprintf(stderr, "USB ENABLED\n");
            usb_ohci_init_pci(pci_bus, -1);
        }
but it seems the virtual adress are not proper for above physical address as Iam getting error
 

Error: PCI-X unit not in PCI-X mode.

pci_bus 0000:00: scanning bus

pci_bus 0000:00: fixups for bus

the macro for vrtual address Iam using is

#define IO_ADDRESS(x)           (((x) & 0x03ffffff) + 0xfb000000)
//#define IO_ADDRESS(x)         ((void __iomem *)(unsigned long)IO_ADDRESS(x))
#else
#define IO_ADDRESS(x)           (x)
#endif
#define __io_address(n)         __io(IO_ADDRESS(n))
#endif

 

Plz help me in that whats going wrong..its bit urgen plz reply as soon as possible

--thanx in advance

ak

 

 
 

reply via email to

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