]> rtime.felk.cvut.cz Git - lisovros/qemu_apohw.git/commitdiff
extract/unify the constant 0xfee00000 as APIC_DEFAULT_ADDRESS
authorLaszlo Ersek <lersek@redhat.com>
Wed, 20 Mar 2013 23:23:20 +0000 (00:23 +0100)
committerAnthony Liguori <aliguori@us.ibm.com>
Fri, 5 Apr 2013 00:23:09 +0000 (19:23 -0500)
A common dependency of the constant's current users:
- hw/apic_common.c
- hw/i386/kvmvapic.c
- target-i386/cpu.c
is "target-i386/cpu.h".

Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>
Message-id: 1363821803-3380-9-git-send-email-lersek@redhat.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
hw/apic_common.c
hw/i386/kvmvapic.c
target-i386/cpu.c
target-i386/cpu.h

index d0c261602c63ac5c7fce68f29dfd753e90d1a8ff..37985097caabfcb5e6f15adb40c960f895d97557 100644 (file)
@@ -218,7 +218,7 @@ static void apic_reset_common(DeviceState *d)
     bool bsp;
 
     bsp = cpu_is_bsp(s->cpu);
-    s->apicbase = 0xfee00000 |
+    s->apicbase = APIC_DEFAULT_ADDRESS |
         (bsp ? MSR_IA32_APICBASE_BSP : 0) | MSR_IA32_APICBASE_ENABLE;
 
     s->vapic_paddr = 0;
index c151c95c3e23b368c24b7c34841c1579716114b4..cc95e5c3f054a1d665bbc1eec9df4b1dc6f41df6 100644 (file)
@@ -13,8 +13,6 @@
 #include "sysemu/kvm.h"
 #include "hw/apic_internal.h"
 
-#define APIC_DEFAULT_ADDRESS    0xfee00000
-
 #define VAPIC_IO_PORT           0x7e
 
 #define VAPIC_CPU_SHIFT         7
index bf717d5e157ceb6a9ec0759ba08ddbc47e60aaf5..69c3570a15a749a64f9d87ce5990b0f8b5f6cc28 100644 (file)
@@ -2049,8 +2049,6 @@ static void mce_init(X86CPU *cpu)
     }
 }
 
-#define MSI_ADDR_BASE 0xfee00000
-
 #ifndef CONFIG_USER_ONLY
 static void x86_cpu_apic_init(X86CPU *cpu, Error **errp)
 {
@@ -2090,7 +2088,7 @@ static void x86_cpu_apic_init(X86CPU *cpu, Error **errp)
            on the global memory bus. */
         /* XXX: what if the base changes? */
         sysbus_mmio_map_overlap(SYS_BUS_DEVICE(env->apic_state), 0,
-                                MSI_ADDR_BASE, 0x1000);
+                                APIC_DEFAULT_ADDRESS, 0x1000);
         apic_mapped = 1;
     }
 }
index 5284ebc1eda5938fe5f0dff4f947d7723927ec9a..069a2e2cf9e806339157f73c66c29b0b8610cc20 100644 (file)
@@ -1267,4 +1267,6 @@ const char *get_register_name_32(unsigned int reg);
 uint32_t x86_cpu_apic_id_from_index(unsigned int cpu_index);
 void enable_compat_apic_id_mode(void);
 
+#define APIC_DEFAULT_ADDRESS 0xfee00000
+
 #endif /* CPU_I386_H */