Revision c227f099 target-i386/helper.c
b/target-i386/helper.c | ||
---|---|---|
91 | 91 |
} |
92 | 92 |
} |
93 | 93 |
|
94 |
typedef struct x86_def { |
|
94 |
typedef struct x86_def_t {
|
|
95 | 95 |
const char *name; |
96 | 96 |
uint32_t level; |
97 | 97 |
uint32_t vendor1, vendor2, vendor3; |
... | ... | |
102 | 102 |
uint32_t xlevel; |
103 | 103 |
char model_id[48]; |
104 | 104 |
int vendor_override; |
105 |
} a_x86_def;
|
|
105 |
} x86_def_t;
|
|
106 | 106 |
|
107 | 107 |
#define I486_FEATURES (CPUID_FP87 | CPUID_VME | CPUID_PSE) |
108 | 108 |
#define PENTIUM_FEATURES (I486_FEATURES | CPUID_DE | CPUID_TSC | \ |
... | ... | |
115 | 115 |
CPUID_MSR | CPUID_MCE | CPUID_CX8 | CPUID_PGE | CPUID_CMOV | \ |
116 | 116 |
CPUID_PAT | CPUID_FXSR | CPUID_MMX | CPUID_SSE | CPUID_SSE2 | \ |
117 | 117 |
CPUID_PAE | CPUID_SEP | CPUID_APIC) |
118 |
static a_x86_def x86_defs[] = {
|
|
118 |
static x86_def_t x86_defs[] = {
|
|
119 | 119 |
#ifdef TARGET_X86_64 |
120 | 120 |
{ |
121 | 121 |
.name = "qemu64", |
... | ... | |
336 | 336 |
return 0; |
337 | 337 |
} |
338 | 338 |
|
339 |
static int cpu_x86_fill_host(a_x86_def *x86_cpu_def)
|
|
339 |
static int cpu_x86_fill_host(x86_def_t *x86_cpu_def)
|
|
340 | 340 |
{ |
341 | 341 |
uint32_t eax = 0, ebx = 0, ecx = 0, edx = 0; |
342 | 342 |
|
... | ... | |
366 | 366 |
return 0; |
367 | 367 |
} |
368 | 368 |
|
369 |
static int cpu_x86_find_by_name(a_x86_def *x86_cpu_def, const char *cpu_model)
|
|
369 |
static int cpu_x86_find_by_name(x86_def_t *x86_cpu_def, const char *cpu_model)
|
|
370 | 370 |
{ |
371 | 371 |
unsigned int i; |
372 |
a_x86_def *def;
|
|
372 |
x86_def_t *def;
|
|
373 | 373 |
|
374 | 374 |
char *s = strdup(cpu_model); |
375 | 375 |
char *featurestr, *name = strtok(s, ","); |
... | ... | |
501 | 501 |
|
502 | 502 |
static int cpu_x86_register (CPUX86State *env, const char *cpu_model) |
503 | 503 |
{ |
504 |
a_x86_def def1, *def = &def1;
|
|
504 |
x86_def_t def1, *def = &def1;
|
|
505 | 505 |
|
506 | 506 |
if (cpu_x86_find_by_name(def, cpu_model) < 0) |
507 | 507 |
return -1; |
... | ... | |
1030 | 1030 |
return 1; |
1031 | 1031 |
} |
1032 | 1032 |
|
1033 |
a_target_phys_addr cpu_get_phys_page_debug(CPUState *env, target_ulong addr)
|
|
1033 |
target_phys_addr_t cpu_get_phys_page_debug(CPUState *env, target_ulong addr)
|
|
1034 | 1034 |
{ |
1035 | 1035 |
return addr; |
1036 | 1036 |
} |
... | ... | |
1057 | 1057 |
uint64_t ptep, pte; |
1058 | 1058 |
target_ulong pde_addr, pte_addr; |
1059 | 1059 |
int error_code, is_dirty, prot, page_size, ret, is_write, is_user; |
1060 |
a_target_phys_addr paddr;
|
|
1060 |
target_phys_addr_t paddr;
|
|
1061 | 1061 |
uint32_t page_offset; |
1062 | 1062 |
target_ulong vaddr, virt_addr; |
1063 | 1063 |
|
... | ... | |
1341 | 1341 |
return 1; |
1342 | 1342 |
} |
1343 | 1343 |
|
1344 |
a_target_phys_addr cpu_get_phys_page_debug(CPUState *env, target_ulong addr)
|
|
1344 |
target_phys_addr_t cpu_get_phys_page_debug(CPUState *env, target_ulong addr)
|
|
1345 | 1345 |
{ |
1346 | 1346 |
target_ulong pde_addr, pte_addr; |
1347 | 1347 |
uint64_t pte; |
1348 |
a_target_phys_addr paddr;
|
|
1348 |
target_phys_addr_t paddr;
|
|
1349 | 1349 |
uint32_t page_offset; |
1350 | 1350 |
int page_size; |
1351 | 1351 |
|
Also available in: Unified diff