2019-03-15 15:51:20 +01:00
|
|
|
#ifndef HW_PCI_HOST_SABRE_H
|
|
|
|
#define HW_PCI_HOST_SABRE_H
|
2009-11-11 13:59:56 +01:00
|
|
|
|
2018-01-08 19:16:34 +01:00
|
|
|
#include "hw/sparc/sun4u_iommu.h"
|
2018-01-08 19:16:34 +01:00
|
|
|
|
2017-12-21 08:32:57 +01:00
|
|
|
#define MAX_IVEC 0x40
|
|
|
|
|
2017-12-21 08:32:57 +01:00
|
|
|
/* OBIO IVEC IRQs */
|
2017-12-21 08:32:57 +01:00
|
|
|
#define OBIO_HDD_IRQ 0x20
|
|
|
|
#define OBIO_NIC_IRQ 0x21
|
2017-12-21 08:32:57 +01:00
|
|
|
#define OBIO_LPT_IRQ 0x22
|
|
|
|
#define OBIO_FDD_IRQ 0x27
|
|
|
|
#define OBIO_KBD_IRQ 0x29
|
|
|
|
#define OBIO_MSE_IRQ 0x2a
|
|
|
|
#define OBIO_SER_IRQ 0x2b
|
|
|
|
|
2018-01-21 09:59:45 +01:00
|
|
|
typedef struct SabrePCIState {
|
|
|
|
PCIDevice parent_obj;
|
|
|
|
} SabrePCIState;
|
|
|
|
|
|
|
|
#define TYPE_SABRE_PCI_DEVICE "sabre-pci"
|
|
|
|
#define SABRE_PCI_DEVICE(obj) \
|
|
|
|
OBJECT_CHECK(SabrePCIState, (obj), TYPE_SABRE_PCI_DEVICE)
|
2017-12-21 08:32:57 +01:00
|
|
|
|
2018-01-21 09:59:45 +01:00
|
|
|
typedef struct SabreState {
|
2017-12-21 08:32:57 +01:00
|
|
|
PCIHostState parent_obj;
|
|
|
|
|
2017-12-21 08:32:57 +01:00
|
|
|
hwaddr special_base;
|
|
|
|
hwaddr mem_base;
|
2018-01-21 09:59:45 +01:00
|
|
|
MemoryRegion sabre_config;
|
2017-12-21 08:32:57 +01:00
|
|
|
MemoryRegion pci_config;
|
|
|
|
MemoryRegion pci_mmio;
|
|
|
|
MemoryRegion pci_ioport;
|
|
|
|
uint64_t pci_irq_in;
|
2018-01-08 19:16:34 +01:00
|
|
|
IOMMUState *iommu;
|
2017-12-21 08:32:57 +01:00
|
|
|
PCIBridge *bridgeA;
|
|
|
|
PCIBridge *bridgeB;
|
2017-12-21 08:32:57 +01:00
|
|
|
uint32_t pci_control[16];
|
|
|
|
uint32_t pci_irq_map[8];
|
|
|
|
uint32_t pci_err_irq_map[4];
|
|
|
|
uint32_t obio_irq_map[32];
|
2017-12-21 08:32:57 +01:00
|
|
|
qemu_irq ivec_irqs[MAX_IVEC];
|
2017-12-21 08:32:57 +01:00
|
|
|
unsigned int irq_request;
|
|
|
|
uint32_t reset_control;
|
|
|
|
unsigned int nr_resets;
|
2018-01-21 09:59:45 +01:00
|
|
|
} SabreState;
|
2017-12-21 08:32:57 +01:00
|
|
|
|
2018-01-21 09:59:45 +01:00
|
|
|
#define TYPE_SABRE "sabre"
|
|
|
|
#define SABRE_DEVICE(obj) \
|
|
|
|
OBJECT_CHECK(SabreState, (obj), TYPE_SABRE)
|
2018-01-21 09:59:45 +01:00
|
|
|
|
2009-11-11 13:59:56 +01:00
|
|
|
#endif
|