1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25#ifndef UNINORTH_H
26#define UNINORTH_H
27
28#include "hw/hw.h"
29
30#include "hw/ppc/openpic.h"
31
32
33#define UNINORTH_VERSION_10A 0x7
34
35#define TYPE_UNI_NORTH_PCI_HOST_BRIDGE "uni-north-pci-pcihost"
36#define TYPE_UNI_NORTH_AGP_HOST_BRIDGE "uni-north-agp-pcihost"
37#define TYPE_UNI_NORTH_INTERNAL_PCI_HOST_BRIDGE "uni-north-internal-pci-pcihost"
38#define TYPE_U3_AGP_HOST_BRIDGE "u3-agp-pcihost"
39
40#define UNI_NORTH_PCI_HOST_BRIDGE(obj) \
41 OBJECT_CHECK(UNINHostState, (obj), TYPE_UNI_NORTH_PCI_HOST_BRIDGE)
42#define UNI_NORTH_AGP_HOST_BRIDGE(obj) \
43 OBJECT_CHECK(UNINHostState, (obj), TYPE_UNI_NORTH_AGP_HOST_BRIDGE)
44#define UNI_NORTH_INTERNAL_PCI_HOST_BRIDGE(obj) \
45 OBJECT_CHECK(UNINHostState, (obj), TYPE_UNI_NORTH_INTERNAL_PCI_HOST_BRIDGE)
46#define U3_AGP_HOST_BRIDGE(obj) \
47 OBJECT_CHECK(UNINHostState, (obj), TYPE_U3_AGP_HOST_BRIDGE)
48
49typedef struct UNINHostState {
50 PCIHostState parent_obj;
51
52 uint32_t ofw_addr;
53 OpenPICState *pic;
54 qemu_irq irqs[4];
55 MemoryRegion pci_mmio;
56 MemoryRegion pci_hole;
57 MemoryRegion pci_io;
58} UNINHostState;
59
60typedef struct UNINState {
61 SysBusDevice parent_obj;
62
63 MemoryRegion mem;
64} UNINState;
65
66#define TYPE_UNI_NORTH "uni-north"
67#define UNI_NORTH(obj) \
68 OBJECT_CHECK(UNINState, (obj), TYPE_UNI_NORTH)
69
70#endif
71