[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH V8 11/18] pc: make pc_init1() not refer ferr_irq dir
From: |
Isaku Yamahata |
Subject: |
[Qemu-devel] [PATCH V8 11/18] pc: make pc_init1() not refer ferr_irq directly. |
Date: |
Fri, 4 Dec 2009 14:50:58 +0900 |
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 <address@hidden>
---
hw/pc.c | 8 +++++++-
hw/pc.h | 2 ++
2 files changed, 9 insertions(+), 1 deletions(-)
diff --git a/hw/pc.c b/hw/pc.c
index da3c1ac..5584e3b 100644
--- a/hw/pc.c
+++ b/hw/pc.c
@@ -86,6 +86,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)
{
@@ -1127,7 +1133,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);
diff --git a/hw/pc.h b/hw/pc.h
index c937243..5a2eb5c 100644
--- a/hw/pc.h
+++ b/hw/pc.h
@@ -92,6 +92,8 @@ void cmos_set_s3_resume(void);
/* pc.c */
extern int fd_bootchk;
+void pc_register_ferr_irq(qemu_irq irq);
+
void ioport_set_a20(int enable);
int ioport_get_a20(void);
--
1.6.5.4
- [Qemu-devel] [PATCH V8 00/18] split out piix specific part from pc emulator, Isaku Yamahata, 2009/12/04
- [Qemu-devel] [PATCH V8 01/18] acpi: split out pc smbus routines from acpi.c into pc_smbus.c, Isaku Yamahata, 2009/12/04
- [Qemu-devel] [PATCH V8 11/18] pc: make pc_init1() not refer ferr_irq directly.,
Isaku Yamahata <=
- [Qemu-devel] [PATCH V8 02/18] acpi: split out apm register emulation from acpi.c, Isaku Yamahata, 2009/12/04
- [Qemu-devel] [PATCH V8 05/18] acpi_piix4: remove unused variable in get_pmsts()., Isaku Yamahata, 2009/12/04
- [Qemu-devel] [PATCH V8 06/18] pc, i440fx: Make smm enable/disable function i440fx independent., Isaku Yamahata, 2009/12/04
- [Qemu-devel] [PATCH V8 18/18] pc_piix: initialize ioapic before use., Isaku Yamahata, 2009/12/04
- [Qemu-devel] [PATCH V8 03/18] acpi: add acpi constants from linux header files and use them., Isaku Yamahata, 2009/12/04
- [Qemu-devel] [PATCH V8 07/18] pc: make an unnecessary global variable, pit, local., Isaku Yamahata, 2009/12/04
- [Qemu-devel] [PATCH V8 14/18] pc: split out vga initialization from pc_init1() into pc_vga_init()., Isaku Yamahata, 2009/12/04
- [Qemu-devel] [PATCH V8 08/18] pc: remove a global variable, floppy_controller., Isaku Yamahata, 2009/12/04