[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 11/26] pc: make pc_init1() not refer ferr_irq direct
From: |
Isaku Yamahata |
Subject: |
[Qemu-devel] [PATCH 11/26] pc: make pc_init1() not refer ferr_irq directly. |
Date: |
Fri, 14 May 2010 16:29:09 +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>
Acked-by: Gerd Hoffmann <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 fa11477..18c025b 100644
--- a/hw/pc.c
+++ b/hw/pc.c
@@ -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);
diff --git a/hw/pc.h b/hw/pc.h
index 77239a0..abf02de 100644
--- a/hw/pc.h
+++ b/hw/pc.h
@@ -77,6 +77,8 @@ void rtc_set_date(RTCState *s, const struct tm *tm);
/* 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.6.1
- [Qemu-devel] [PATCH 00/26] split out piix specific part from pc emulator and some clean ups, Isaku Yamahata, 2010/05/14
- [Qemu-devel] [PATCH 11/26] pc: make pc_init1() not refer ferr_irq directly.,
Isaku Yamahata <=
- [Qemu-devel] [PATCH 15/26] pc: split out basic device init from pc_init1() into pc_basic_device_init(), Isaku Yamahata, 2010/05/14
- [Qemu-devel] [PATCH 09/26] pc: remove global variable rtc_state by using qemu_irq., Isaku Yamahata, 2010/05/14
- [Qemu-devel] [PATCH 04/26] acpi: split acpi.c into the common part and the piix4 part., Isaku Yamahata, 2010/05/14
- [Qemu-devel] [PATCH 01/26] acpi: split out piix4 smbus routines from acpi.c into pm_smbus.c, Isaku Yamahata, 2010/05/14
- [Qemu-devel] [PATCH 10/26] pc: introduce a function to allocate cpu irq., Isaku Yamahata, 2010/05/14
- [Qemu-devel] [PATCH 07/26] pc: make an unnecessary global variable, pit, local., Isaku Yamahata, 2010/05/14
- [Qemu-devel] [PATCH 02/26] acpi: split out apm register emulation from acpi.c, Isaku Yamahata, 2010/05/14
- [Qemu-devel] [PATCH 05/26] pc: initialize ioapic before use., Isaku Yamahata, 2010/05/14
- [Qemu-devel] [PATCH 06/26] pc, i440fx: Make smm enable/disable function i440fx independent., Isaku Yamahata, 2010/05/14
- [Qemu-devel] [PATCH 13/26] pc: split out memory allocation from pc_init1() into pc_memory_init(), Isaku Yamahata, 2010/05/14