[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 28/74] pc: Use cpu_x86_init() to obtain X86CPU
From: |
Andreas Färber |
Subject: |
[Qemu-devel] [PATCH 28/74] pc: Use cpu_x86_init() to obtain X86CPU |
Date: |
Tue, 5 Jun 2012 03:22:00 +0200 |
Needed for pc_cpu_reset().
Also change return type to X86CPU.
Signed-off-by: Andreas Färber <address@hidden>
Reviewed-by: Igor Mammedov <address@hidden>
---
hw/pc.c | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/hw/pc.c b/hw/pc.c
index c790bcb..1133921 100644
--- a/hw/pc.c
+++ b/hw/pc.c
@@ -932,21 +932,23 @@ static void pc_cpu_reset(void *opaque)
env->halted = !cpu_is_bsp(env);
}
-static CPUX86State *pc_new_cpu(const char *cpu_model)
+static X86CPU *pc_new_cpu(const char *cpu_model)
{
+ X86CPU *cpu;
CPUX86State *env;
- env = cpu_init(cpu_model);
- if (!env) {
+ cpu = cpu_x86_init(cpu_model);
+ if (cpu == NULL) {
fprintf(stderr, "Unable to find x86 CPU definition\n");
exit(1);
}
+ env = &cpu->env;
if ((env->cpuid_features & CPUID_APIC) || smp_cpus > 1) {
env->apic_state = apic_init(env, env->cpuid_apic_id);
}
qemu_register_reset(pc_cpu_reset, env);
pc_cpu_reset(env);
- return env;
+ return cpu;
}
void pc_cpus_init(const char *cpu_model)
--
1.7.7
- [Qemu-devel] [PATCH 23/74] petalogix_ml605: Use cpu_mb_init() to obtain MicroBlazeCPU, (continued)
- [Qemu-devel] [PATCH 23/74] petalogix_ml605: Use cpu_mb_init() to obtain MicroBlazeCPU, Andreas Färber, 2012/06/04
- [Qemu-devel] [PATCH 17/74] target-cris: Reindent cpu_cris_init(), Andreas Färber, 2012/06/04
- [Qemu-devel] [PATCH 21/74] cris-boot: Pass CRISCPU to main_cpu_reset()., Andreas Färber, 2012/06/04
- [Qemu-devel] [PATCH 20/74] cris-boot: Pass CRISCPU to cris_load_image(), Andreas Färber, 2012/06/04
- [Qemu-devel] [PATCH 18/74] target-cris: Let cpu_cris_init() return CRISCPU, Andreas Färber, 2012/06/04
- [Qemu-devel] [PATCH 22/74] target-microblaze: Let cpu_mb_init() return MicroBlazeCPU, Andreas Färber, 2012/06/04
- [Qemu-devel] [PATCH 25/74] microblaze_boot: Pass MicroBlazeCPU to microblaze_load_kernel(), Andreas Färber, 2012/06/04
- [Qemu-devel] [PATCH 24/74] petalogix_s3adsp1800_mmu: Use cpu_mb_init() to obtain MicroBlazeCPU, Andreas Färber, 2012/06/04
- [Qemu-devel] [PATCH 26/74] target-i386: Pass X86CPU to do_cpu_{init, sipi}(), Andreas Färber, 2012/06/04
- [Qemu-devel] [PATCH 30/74] target-sh4: Let cpu_sh4_init() return SuperHCPU, Andreas Färber, 2012/06/04
- [Qemu-devel] [PATCH 28/74] pc: Use cpu_x86_init() to obtain X86CPU,
Andreas Färber <=
- [Qemu-devel] [PATCH 27/74] target-i386: Let cpu_x86_init() return X86CPU, Andreas Färber, 2012/06/04
- [Qemu-devel] [PATCH 31/74] r2d: Use cpu_sh4_init() to obtain SuperHCPU, Andreas Färber, 2012/06/04
- [Qemu-devel] [PATCH 41/74] mips_malta: Pass MIPSCPU to main_cpu_reset(), Andreas Färber, 2012/06/04
- [Qemu-devel] [PATCH 32/74] r2d: Store SuperHCPU in ResetData, Andreas Färber, 2012/06/04
- [Qemu-devel] [PATCH 29/74] pc: Pass X86CPU to pc_cpu_reset(), Andreas Färber, 2012/06/04
- [Qemu-devel] [PATCH 33/74] target-mips: Use cpu_reset() in cpu_mips_init(), Andreas Färber, 2012/06/04
- [Qemu-devel] [PATCH 43/74] mips_mipssim: Store MIPSCPU in ResetData, Andreas Färber, 2012/06/04
- [Qemu-devel] [PATCH 42/74] mips_mipssim: Use cpu_mips_init() to obtain MIPSCPU, Andreas Färber, 2012/06/04
- [Qemu-devel] [PATCH 44/74] mips_r4k: Use cpu_mips_init() to obtain MIPSCPU, Andreas Färber, 2012/06/04
- [Qemu-devel] [PATCH 40/74] mips_malta: Use cpu_mips_init() to obtain MIPSCPU, Andreas Färber, 2012/06/04