[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 11/17] pc.c: make pc_init1() not refer ferr_irq dire
From: |
Isaku Yamahata |
Subject: |
[Qemu-devel] [PATCH 11/17] pc.c: make pc_init1() not refer ferr_irq directly. |
Date: |
Thu, 9 Jul 2009 17:13:14 +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 8fccecf..d113e87 100644
--- a/hw/pc.c
+++ b/hw/pc.c
@@ -87,6 +87,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)
{
@@ -1259,7 +1265,7 @@ static void pc_init1(ram_addr_t ram_size,
cpu_irq = pc_allocate_cpu_irq();
i8259 = i8259_init(cpu_irq[0]);
- ferr_irq = i8259[13];
+ pc_register_ferr_irq(i8259[13]);
if (pci_enabled) {
pci_bus = i440fx_init(&i440fx_state, i8259);
diff --git a/hw/pc.h b/hw/pc.h
index 565c1f2..2e91443 100644
--- a/hw/pc.h
+++ b/hw/pc.h
@@ -101,6 +101,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.0.2
- [Qemu-devel] [PATCH 04/17] acpi: add acpi constants from linux header files and use them., (continued)
- [Qemu-devel] [PATCH 04/17] acpi: add acpi constants from linux header files and use them., Isaku Yamahata, 2009/07/09
- [Qemu-devel] [PATCH 01/17] acpi.c: split out pc smbus routines from acpi.c into pc_smbus.c, Isaku Yamahata, 2009/07/09
- [Qemu-devel] [PATCH 10/17] pc.c: introduce a function to allocate cpu irq., Isaku Yamahata, 2009/07/09
- [Qemu-devel] [PATCH 12/17] pc.c: split out cpu initialization from pc_init1() into pc_cpus_init()., Isaku Yamahata, 2009/07/09
- [Qemu-devel] [PATCH 15/17] pc.c: split out basic device init from pc_init1() into pc_basic_device_init(), Isaku Yamahata, 2009/07/09
- [Qemu-devel] [PATCH 14/17] pc.c: split out vga initialization from pc_init1() into pc_vga_init()., Isaku Yamahata, 2009/07/09
- [Qemu-devel] [PATCH 08/17] pc.c: remove a global variable, floppy_controller., Isaku Yamahata, 2009/07/09
- [Qemu-devel] [PATCH 17/17] pc.c: split out piix specific part from pc.c into pc_piix.c, Isaku Yamahata, 2009/07/09
- [Qemu-devel] [PATCH 05/17] acpi.c: split acpi.c into the common part and the piix4 part., Isaku Yamahata, 2009/07/09
- [Qemu-devel] [PATCH 09/17] pc.c: remove a global variable, RTCState *rtc_state., Isaku Yamahata, 2009/07/09
- [Qemu-devel] [PATCH 11/17] pc.c: make pc_init1() not refer ferr_irq directly.,
Isaku Yamahata <=
- [Qemu-devel] [PATCH 13/17] pc.c: split out memory allocation from pc_init1() into pc_memory_init(), Isaku Yamahata, 2009/07/09
- [Qemu-devel] [PATCH 06/17] pc.c: Make smm enable/disable function i440fx independent., Isaku Yamahata, 2009/07/09
- [Qemu-devel] [PATCH 07/17] pc.c: remove unnecessary global variables, pit and ioapic., Isaku Yamahata, 2009/07/09
- [Qemu-devel] [PATCH 16/17] pc.c: split out pci device init from pc_init1() into pc_pci_device_init(), Isaku Yamahata, 2009/07/09