diff options
author | Isaku Yamahata <yamahata@valinux.co.jp> | 2010-05-14 16:29:09 +0900 |
---|---|---|
committer | Blue Swirl <blauwirbel@gmail.com> | 2010-05-15 15:42:48 +0000 |
commit | 8e78eb28c6bc532f103857ca485ea4976b3514da (patch) | |
tree | 450017383b8c698dbdc109df868e4ab9e11d8c5e /hw/pc.c | |
parent | 6f09e686f807611aa03a91e37e9fb5cfc5283703 (diff) |
pc: make pc_init1() not refer ferr_irq directly.
By introducing a registering function, make pc_init1() not refer to
ferr_irq directly in order to make ferr_irq piix independent.
Later pc_init1() will be split out into another file keeping ferr_irq
static.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Acked-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Diffstat (limited to 'hw/pc.c')
-rw-r--r-- | hw/pc.c | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -102,6 +102,12 @@ static void ioport80_write(void *opaque, uint32_t addr, uint32_t data) /* MSDOS compatibility mode FPU exception support */ static qemu_irq ferr_irq; + +void pc_register_ferr_irq(qemu_irq irq) +{ + ferr_irq = irq; +} + /* XXX: add IGNNE support */ void cpu_set_ferr(CPUX86State *s) { @@ -950,7 +956,7 @@ static void pc_init1(ram_addr_t ram_size, } isa_bus_irqs(isa_irq); - ferr_irq = isa_reserve_irq(13); + pc_register_ferr_irq(isa_reserve_irq(13)); /* init basic PC hardware */ register_ioport_write(0x80, 1, 1, ioport80_write, NULL); |