mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 08:13:54 -06:00
PCI qdev support
Signed-off-by: Paul Brook <paul@codesourcery.com>
This commit is contained in:
parent
4d6ae6741e
commit
6b1b92d35b
2 changed files with 56 additions and 7 deletions
8
hw/pci.h
8
hw/pci.h
|
@ -3,6 +3,8 @@
|
|||
|
||||
#include "qemu-common.h"
|
||||
|
||||
#include "qdev.h"
|
||||
|
||||
/* PCI includes legacy ISA access. */
|
||||
#include "isa.h"
|
||||
|
||||
|
@ -138,6 +140,7 @@ typedef struct PCIIORegion {
|
|||
#define PCI_COMMAND_RESERVED_MASK_HI (PCI_COMMAND_RESERVED >> 8)
|
||||
|
||||
struct PCIDevice {
|
||||
DeviceState qdev;
|
||||
/* PCI config space */
|
||||
uint8_t config[256];
|
||||
|
||||
|
@ -217,6 +220,11 @@ pci_config_set_class(uint8_t *pci_config, uint16_t val)
|
|||
cpu_to_le16wu((uint16_t *)&pci_config[PCI_CLASS_DEVICE], val);
|
||||
}
|
||||
|
||||
typedef void (*pci_qdev_initfn)(PCIDevice *dev);
|
||||
void pci_qdev_register(const char *name, int size, pci_qdev_initfn init);
|
||||
|
||||
PCIDevice *pci_create_simple(PCIBus *bus, int devfn, const char *name);
|
||||
|
||||
/* lsi53c895a.c */
|
||||
#define LSI_MAX_DEVS 7
|
||||
void lsi_scsi_attach(void *opaque, BlockDriverState *bd, int id);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue