Revision 22548760 target-sparc/helper.c
b/target-sparc/helper.c | ||
---|---|---|
28 | 28 |
#include "cpu.h" |
29 | 29 |
#include "exec-all.h" |
30 | 30 |
#include "qemu-common.h" |
31 |
#include "helper.h" |
|
31 | 32 |
|
32 | 33 |
//#define DEBUG_MMU |
33 | 34 |
//#define DEBUG_FEATURES |
... | ... | |
35 | 36 |
typedef struct sparc_def_t sparc_def_t; |
36 | 37 |
|
37 | 38 |
struct sparc_def_t { |
38 |
const unsigned char *name;
|
|
39 |
const char *name; |
|
39 | 40 |
target_ulong iu_version; |
40 | 41 |
uint32_t fpu_version; |
41 | 42 |
uint32_t mmu_version; |
... | ... | |
47 | 48 |
uint32_t features; |
48 | 49 |
}; |
49 | 50 |
|
50 |
static int cpu_sparc_find_by_name(sparc_def_t *cpu_def, const unsigned char *cpu_model);
|
|
51 |
static int cpu_sparc_find_by_name(sparc_def_t *cpu_def, const char *cpu_model); |
|
51 | 52 |
|
52 | 53 |
/* Sparc MMU emulation */ |
53 | 54 |
|
... | ... | |
67 | 68 |
|
68 | 69 |
#if defined(CONFIG_USER_ONLY) |
69 | 70 |
|
70 |
int cpu_sparc_handle_mmu_fault(CPUState *env, target_ulong address, int rw, |
|
71 |
int cpu_sparc_handle_mmu_fault(CPUState *env1, target_ulong address, int rw,
|
|
71 | 72 |
int mmu_idx, int is_softmmu) |
72 | 73 |
{ |
73 | 74 |
if (rw & 2) |
74 |
env->exception_index = TT_TFAULT; |
|
75 |
env1->exception_index = TT_TFAULT;
|
|
75 | 76 |
else |
76 |
env->exception_index = TT_DFAULT; |
|
77 |
env1->exception_index = TT_DFAULT;
|
|
77 | 78 |
return 1; |
78 | 79 |
} |
79 | 80 |
|
... | ... | |
387 | 388 |
* UltraSparc IIi I/DMMUs |
388 | 389 |
*/ |
389 | 390 |
static int get_physical_address_data(CPUState *env, target_phys_addr_t *physical, int *prot, |
390 |
int *access_index, target_ulong address, int rw, |
|
391 |
int is_user) |
|
391 |
target_ulong address, int rw, int is_user) |
|
392 | 392 |
{ |
393 | 393 |
target_ulong mask; |
394 | 394 |
unsigned int i; |
... | ... | |
447 | 447 |
} |
448 | 448 |
|
449 | 449 |
static int get_physical_address_code(CPUState *env, target_phys_addr_t *physical, int *prot, |
450 |
int *access_index, target_ulong address, int rw, |
|
451 |
int is_user) |
|
450 |
target_ulong address, int is_user) |
|
452 | 451 |
{ |
453 | 452 |
target_ulong mask; |
454 | 453 |
unsigned int i; |
... | ... | |
509 | 508 |
int is_user = mmu_idx == MMU_USER_IDX; |
510 | 509 |
|
511 | 510 |
if (rw == 2) |
512 |
return get_physical_address_code(env, physical, prot, access_index, address, rw, is_user); |
|
511 |
return get_physical_address_code(env, physical, prot, address, |
|
512 |
is_user); |
|
513 | 513 |
else |
514 |
return get_physical_address_data(env, physical, prot, access_index, address, rw, is_user); |
|
514 |
return get_physical_address_data(env, physical, prot, address, rw, |
|
515 |
is_user); |
|
515 | 516 |
} |
516 | 517 |
|
517 | 518 |
/* Perform address translation */ |
... | ... | |
1134 | 1135 |
fprintf(stderr, "CPU feature %s not found\n", flagname); |
1135 | 1136 |
} |
1136 | 1137 |
|
1137 |
static int cpu_sparc_find_by_name(sparc_def_t *cpu_def, const unsigned char *cpu_model)
|
|
1138 |
static int cpu_sparc_find_by_name(sparc_def_t *cpu_def, const char *cpu_model) |
|
1138 | 1139 |
{ |
1139 | 1140 |
unsigned int i; |
1140 | 1141 |
const sparc_def_t *def = NULL; |
Also available in: Unified diff