diff options
author | Andreas Färber <afaerber@suse.de> | 2012-04-03 00:00:17 +0200 |
---|---|---|
committer | Andreas Färber <afaerber@suse.de> | 2012-04-10 17:10:27 +0200 |
commit | de024815e3b523addf58f1f79846b7fe74643678 (patch) | |
tree | 20ecd213f8ba6e789def7396c4a31e433714b802 /target-i386/helper.c | |
parent | 5fd2087a1b7b3075828de741d76188441ee35bc8 (diff) | |
download | qemu-de024815e3b523addf58f1f79846b7fe74643678.zip qemu-de024815e3b523addf58f1f79846b7fe74643678.tar.gz qemu-de024815e3b523addf58f1f79846b7fe74643678.tar.bz2 |
target-i386: QOM'ify CPU init
Move code from cpu_x86_init() to new QOM x86_cpu_initfn().
Also move mce_init() to cpu.c since it's used nowhere else.
Signed-off-by: Andreas Färber <afaerber@suse.de>
Diffstat (limited to 'target-i386/helper.c')
-rw-r--r-- | target-i386/helper.c | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/target-i386/helper.c b/target-i386/helper.c index fb87975..d8ceee1 100644 --- a/target-i386/helper.c +++ b/target-i386/helper.c @@ -1197,21 +1197,6 @@ void cpu_report_tpr_access(CPUX86State *env, TPRAccess access) } #endif /* !CONFIG_USER_ONLY */ -static void mce_init(CPUX86State *cenv) -{ - unsigned int bank; - - if (((cenv->cpuid_version >> 8) & 0xf) >= 6 - && (cenv->cpuid_features & (CPUID_MCE | CPUID_MCA)) == - (CPUID_MCE | CPUID_MCA)) { - cenv->mcg_cap = MCE_CAP_DEF | MCE_BANKS_DEF; - cenv->mcg_ctl = ~(uint64_t)0; - for (bank = 0; bank < MCE_BANKS_DEF; bank++) { - cenv->mce_banks[bank * 4] = ~(uint64_t)0; - } - } -} - int cpu_x86_get_descr_debug(CPUX86State *env, unsigned int selector, target_ulong *base, unsigned int *limit, unsigned int *flags) @@ -1249,7 +1234,6 @@ CPUX86State *cpu_x86_init(const char *cpu_model) cpu = X86_CPU(object_new(TYPE_X86_CPU)); env = &cpu->env; - cpu_exec_init(env); env->cpu_model_str = cpu_model; /* init various static tables used in TCG mode */ @@ -1265,8 +1249,6 @@ CPUX86State *cpu_x86_init(const char *cpu_model) object_delete(OBJECT(cpu)); return NULL; } - env->cpuid_apic_id = env->cpu_index; - mce_init(env); qemu_init_vcpu(env); |