qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH 12/18] pc.c: make pc_init1() not refer ferr_irq dire


From: Isaku Yamahata
Subject: [Qemu-devel] [PATCH 12/18] pc.c: make pc_init1() not refer ferr_irq directly.
Date: Thu, 18 Jun 2009 19:57:11 +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 16e95ec..eeb56cc 100644
--- a/hw/pc.c
+++ b/hw/pc.c
@@ -84,6 +84,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)
 {
@@ -1005,7 +1011,7 @@ static void pc_init1(ram_addr_t ram_size,
 
     cpu_irq = pc_allocte_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 a18e558..f5f84ad 100644
--- a/hw/pc.h
+++ b/hw/pc.h
@@ -106,6 +106,8 @@ static inline 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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]