14
17
SerialState *serial_init(int base, qemu_irq irq, int baudbase,
15
18
CharDriverState *chr);
16
SerialState *serial_mm_init (target_phys_addr_t base, int it_shift,
17
qemu_irq irq, int baudbase,
18
CharDriverState *chr, int ioregister,
19
SerialState *serial_mm_init(MemoryRegion *address_space,
20
target_phys_addr_t base, int it_shift,
21
qemu_irq irq, int baudbase,
22
CharDriverState *chr, enum device_endian);
20
23
static inline bool serial_isa_init(int index, CharDriverState *chr)
60
typedef struct PicState2 PicState2;
61
extern PicState2 *isa_pic;
62
void pic_set_irq(int irq, int level);
63
void pic_set_irq_new(void *opaque, int irq, int level);
63
typedef struct PicState PicState;
64
extern PicState *isa_pic;
64
65
qemu_irq *i8259_init(qemu_irq parent_irq);
65
66
qemu_irq *kvm_i8259_init(qemu_irq parent_irq);
66
int pic_read_irq(PicState2 *s);
67
void pic_update_irq(PicState2 *s);
68
uint32_t pic_intack_read(PicState2 *s);
67
int pic_read_irq(PicState *s);
68
int pic_get_output(PicState *s);
69
69
void pic_info(Monitor *mon);
70
70
void irq_info(Monitor *mon);
73
#define IOAPIC_NUM_PINS 0x18
75
typedef struct isa_irq_state {
77
qemu_irq ioapic[IOAPIC_NUM_PINS];
80
void isa_irq_handler(void *opaque, int n, int level);
72
/* Global System Interrupts */
74
#define GSI_NUM_PINS IOAPIC_NUM_PINS
76
typedef struct GSIState {
77
qemu_irq i8259_irq[ISA_NUM_IRQS];
78
qemu_irq ioapic_irq[IOAPIC_NUM_PINS];
81
void gsi_handler(void *opaque, int n, int level);
118
119
void i8042_init(qemu_irq kbd_irq, qemu_irq mouse_irq, uint32_t io_base);
119
120
void i8042_mm_init(qemu_irq kbd_irq, qemu_irq mouse_irq,
120
target_phys_addr_t base, ram_addr_t size,
121
MemoryRegion *region, ram_addr_t size,
121
122
target_phys_addr_t mask);
122
123
void i8042_isa_mouse_fake_event(void *opaque);
123
124
void i8042_setup_a20_line(ISADevice *dev, qemu_irq *a20_out);
130
131
void pc_acpi_smi_interrupt(void *opaque, int irq, int level);
132
133
void pc_cpus_init(const char *cpu_model);
133
void pc_memory_init(const char *kernel_filename,
134
void pc_memory_init(MemoryRegion *system_memory,
135
const char *kernel_filename,
134
136
const char *kernel_cmdline,
135
137
const char *initrd_filename,
136
138
ram_addr_t below_4g_mem_size,
137
ram_addr_t above_4g_mem_size);
139
ram_addr_t above_4g_mem_size,
140
MemoryRegion *rom_memory,
141
MemoryRegion **ram_memory);
138
142
qemu_irq *pc_allocate_cpu_irq(void);
139
143
void pc_vga_init(PCIBus *pci_bus);
140
void pc_basic_device_init(qemu_irq *isa_irq,
144
void pc_basic_device_init(qemu_irq *gsi,
141
145
ISADevice **rtc_state,
143
148
void pc_init_ne2k_isa(NICInfo *nd);
144
149
void pc_cmos_init(ram_addr_t ram_size, ram_addr_t above_4g_mem_size,
145
150
const char *boot_device,
146
BusState *ide0, BusState *ide1,
151
ISADevice *floppy, BusState *ide0, BusState *ide1,
148
153
void pc_pci_device_init(PCIBus *pci_bus);
179
184
struct PCII440FXState;
180
185
typedef struct PCII440FXState PCII440FXState;
182
PCIBus *i440fx_init(PCII440FXState **pi440fx_state, int *piix_devfn, qemu_irq *pic, ram_addr_t ram_size);
183
void i440fx_init_memory_mappings(PCII440FXState *d);
187
PCIBus *i440fx_init(PCII440FXState **pi440fx_state, int *piix_devfn,
189
MemoryRegion *address_space_mem,
190
MemoryRegion *address_space_io,
192
target_phys_addr_t pci_hole_start,
193
target_phys_addr_t pci_hole_size,
194
target_phys_addr_t pci_hole64_start,
195
target_phys_addr_t pci_hole64_size,
196
MemoryRegion *pci_memory,
197
MemoryRegion *ram_memory);
186
200
extern PCIDevice *piix4_dev;
214
228
int pci_vga_init(PCIBus *bus);
215
229
int isa_vga_mm_init(target_phys_addr_t vram_base,
216
target_phys_addr_t ctrl_base, int it_shift);
230
target_phys_addr_t ctrl_base, int it_shift,
231
MemoryRegion *address_space);
218
233
/* cirrus_vga.c */
219
234
void pci_cirrus_vga_init(PCIBus *bus);
220
void isa_cirrus_vga_init(void);
235
void isa_cirrus_vga_init(MemoryRegion *address_space);
223
238
static inline bool isa_ne2000_init(int base, int irq, NICInfo *nd)