47 |
CPUX86State *env; |
CPUX86State *env; |
48 |
static int inited; |
static int inited; |
49 |
|
|
50 |
cpu_exec_init(); |
env = qemu_mallocz(sizeof(CPUX86State)); |
|
|
|
|
env = malloc(sizeof(CPUX86State)); |
|
51 |
if (!env) |
if (!env) |
52 |
return NULL; |
return NULL; |
53 |
memset(env, 0, sizeof(CPUX86State)); |
cpu_exec_init(env); |
54 |
|
|
55 |
/* init various static tables */ |
/* init various static tables */ |
56 |
if (!inited) { |
if (!inited) { |
57 |
inited = 1; |
inited = 1; |
134 |
env->cpuid_features |= CPUID_MTRR | CPUID_CLFLUSH | CPUID_MCA; |
env->cpuid_features |= CPUID_MTRR | CPUID_CLFLUSH | CPUID_MCA; |
135 |
#endif |
#endif |
136 |
} |
} |
|
cpu_single_env = env; |
|
137 |
cpu_reset(env); |
cpu_reset(env); |
138 |
#ifdef USE_KQEMU |
#ifdef USE_KQEMU |
139 |
kqemu_init(env); |
kqemu_init(env); |