41 |
static fdctrl_t *floppy_controller; |
static fdctrl_t *floppy_controller; |
42 |
static RTCState *rtc_state; |
static RTCState *rtc_state; |
43 |
static PITState *pit; |
static PITState *pit; |
44 |
|
static IOAPICState *ioapic; |
45 |
|
|
46 |
static void ioport80_write(void *opaque, uint32_t addr, uint32_t data) |
static void ioport80_write(void *opaque, uint32_t addr, uint32_t data) |
47 |
{ |
{ |
71 |
{ |
{ |
72 |
int intno; |
int intno; |
73 |
|
|
|
#ifdef TARGET_X86_64 |
|
74 |
intno = apic_get_interrupt(env); |
intno = apic_get_interrupt(env); |
75 |
if (intno >= 0) { |
if (intno >= 0) { |
76 |
/* set irq request if a PIC irq is still pending */ |
/* set irq request if a PIC irq is still pending */ |
78 |
pic_update_irq(isa_pic); |
pic_update_irq(isa_pic); |
79 |
return intno; |
return intno; |
80 |
} |
} |
|
#endif |
|
81 |
/* read the irq from the PIC */ |
/* read the irq from the PIC */ |
82 |
intno = pic_read_irq(isa_pic); |
intno = pic_read_irq(isa_pic); |
83 |
return intno; |
return intno; |
416 |
unsigned long bios_offset, vga_bios_offset; |
unsigned long bios_offset, vga_bios_offset; |
417 |
int bios_size, isa_bios_size; |
int bios_size, isa_bios_size; |
418 |
PCIBus *pci_bus; |
PCIBus *pci_bus; |
419 |
|
|
420 |
linux_boot = (kernel_filename != NULL); |
linux_boot = (kernel_filename != NULL); |
421 |
|
|
422 |
/* allocate RAM */ |
/* allocate RAM */ |
556 |
register_ioport_read(0x92, 1, 1, ioport92_read, NULL); |
register_ioport_read(0x92, 1, 1, ioport92_read, NULL); |
557 |
register_ioport_write(0x92, 1, 1, ioport92_write, NULL); |
register_ioport_write(0x92, 1, 1, ioport92_write, NULL); |
558 |
|
|
559 |
if (pci_enabled) |
if (pci_enabled) { |
560 |
apic_init(cpu_single_env); |
apic_init(cpu_single_env); |
561 |
|
ioapic = ioapic_init(); |
562 |
|
} |
563 |
isa_pic = pic_init(pic_irq_request, cpu_single_env); |
isa_pic = pic_init(pic_irq_request, cpu_single_env); |
564 |
pit = pit_init(0x40, 0); |
pit = pit_init(0x40, 0); |
565 |
|
if (pci_enabled) { |
566 |
|
pic_set_alt_irq_func(isa_pic, ioapic_set_irq, ioapic); |
567 |
|
} |
568 |
|
|
569 |
for(i = 0; i < MAX_SERIAL_PORTS; i++) { |
for(i = 0; i < MAX_SERIAL_PORTS; i++) { |
570 |
if (serial_hds[i]) { |
if (serial_hds[i]) { |