Revision 637503d1 hw/pci.c

b/hw/pci.c
1380 1380
    return NULL;
1381 1381
}
1382 1382

  
1383
/**
1384
 * do_pci_info(): PCI buses and devices information
1385
 *
1386
 * The returned QObject is a QList of all buses. Each bus is
1387
 * represented by a QDict, which has a key with a QList of all
1388
 * PCI devices attached to it. Each device is represented by
1389
 * a QDict.
1390
 *
1391
 * The bus QDict contains the following:
1392
 *
1393
 * - "bus": bus number
1394
 * - "devices": a QList of QDicts, each QDict represents a PCI
1395
 *   device
1396
 *
1397
 * The PCI device QDict contains the following:
1398
 *
1399
 * - "bus": identical to the parent's bus number
1400
 * - "slot": slot number
1401
 * - "function": function number
1402
 * - "class_info": a QDict containing:
1403
 *      - "desc": device class description (optional)
1404
 *      - "class": device class number
1405
 * - "id": a QDict containing:
1406
 *      - "device": device ID
1407
 *      - "vendor": vendor ID
1408
 * - "irq": device's IRQ if assigned (optional)
1409
 * - "qdev_id": qdev id string
1410
 * - "pci_bridge": It's a QDict, only present if this device is a
1411
 *   PCI bridge, contains:
1412
 *      - "bus": bus number
1413
 *      - "secondary": secondary bus number
1414
 *      - "subordinate": subordinate bus number
1415
 *      - "io_range": a QDict with memory range information
1416
 *      - "memory_range": a QDict with memory range information
1417
 *      - "prefetchable_range": a QDict with memory range information
1418
 *      - "devices": a QList of PCI devices if there's any attached (optional)
1419
 * - "regions": a QList of QDicts, each QDict represents a
1420
 *   memory region of this device
1421
 *
1422
 * The memory range QDict contains the following:
1423
 *
1424
 * - "base": base memory address
1425
 * - "limit": limit value
1426
 *
1427
 * The region QDict can be an I/O region or a memory region,
1428
 * an I/O region QDict contains the following:
1429
 *
1430
 * - "type": "io"
1431
 * - "bar": BAR number
1432
 * - "address": memory address
1433
 * - "size": memory size
1434
 *
1435
 * A memory region QDict contains the following:
1436
 *
1437
 * - "type": "memory"
1438
 * - "bar": BAR number
1439
 * - "address": memory address
1440
 * - "size": memory size
1441
 * - "mem_type_64": true or false
1442
 * - "prefetch": true or false
1443
 */
1444 1383
void do_pci_info(Monitor *mon, QObject **ret_data)
1445 1384
{
1446 1385
    QList *bus_list;

Also available in: Unified diff