25 |
* SUCH DAMAGE. |
* SUCH DAMAGE. |
26 |
* |
* |
27 |
* |
* |
28 |
* $Id: cpu_ia64.c,v 1.1 2005/08/29 14:36:41 debug Exp $ |
* $Id: cpu_ia64.c,v 1.4 2006/02/09 22:40:27 debug Exp $ |
29 |
* |
* |
30 |
* IA64 CPU emulation. |
* IA64 CPU emulation. |
31 |
* |
* |
55 |
int ia64_cpu_new(struct cpu *cpu, struct memory *mem, |
int ia64_cpu_new(struct cpu *cpu, struct memory *mem, |
56 |
struct machine *machine, int cpu_id, char *cpu_type_name) |
struct machine *machine, int cpu_id, char *cpu_type_name) |
57 |
{ |
{ |
|
int i; |
|
|
|
|
58 |
if (strcasecmp(cpu_type_name, "IA64") != 0) |
if (strcasecmp(cpu_type_name, "IA64") != 0) |
59 |
return 0; |
return 0; |
60 |
|
|
61 |
cpu->memory_rw = ia64_memory_rw; |
cpu->memory_rw = ia64_memory_rw; |
62 |
cpu->update_translation_table = ia64_update_translation_table; |
cpu->update_translation_table = ia64_update_translation_table; |
63 |
cpu->invalidate_translation_caches_paddr = |
cpu->invalidate_translation_caches = |
64 |
ia64_invalidate_translation_caches_paddr; |
ia64_invalidate_translation_caches; |
65 |
cpu->invalidate_code_translation = ia64_invalidate_code_translation; |
cpu->invalidate_code_translation = ia64_invalidate_code_translation; |
66 |
cpu->is_32bit = 0; |
cpu->is_32bit = 0; |
67 |
|
|
70 |
debug("%s", cpu->name); |
debug("%s", cpu->name); |
71 |
} |
} |
72 |
|
|
|
/* Create the default virtual->physical->host translation: */ |
|
|
cpu->cd.ia64.vph_default_page = malloc(sizeof(struct ia64_vph_page)); |
|
|
if (cpu->cd.ia64.vph_default_page == NULL) { |
|
|
fprintf(stderr, "out of memory in ia64_cpu_new()\n"); |
|
|
exit(1); |
|
|
} |
|
|
memset(cpu->cd.ia64.vph_default_page, 0, sizeof(struct ia64_vph_page)); |
|
|
for (i=0; i<IA64_LEVEL0; i++) |
|
|
cpu->cd.ia64.vph_table0[i] = cpu->cd.ia64.vph_table0_kernel[i] |
|
|
= cpu->cd.ia64.vph_default_page; |
|
|
|
|
73 |
return 1; |
return 1; |
74 |
} |
} |
75 |
|
|
146 |
} |
} |
147 |
|
|
148 |
|
|
|
/* |
|
|
* ia64_cpu_show_full_statistics(): |
|
|
* |
|
|
* Show detailed statistics on opcode usage on each cpu. |
|
|
*/ |
|
|
void ia64_cpu_show_full_statistics(struct machine *m) |
|
|
{ |
|
|
fatal("ia64_cpu_show_full_statistics(): TODO\n"); |
|
|
} |
|
|
|
|
|
|
|
|
/* |
|
|
* ia64_cpu_tlbdump(): |
|
|
* |
|
|
* Called from the debugger to dump the TLB in a readable format. |
|
|
* x is the cpu number to dump, or -1 to dump all CPUs. |
|
|
* |
|
|
* If rawflag is nonzero, then the TLB contents isn't formated nicely, |
|
|
* just dumped. |
|
|
*/ |
|
|
void ia64_cpu_tlbdump(struct machine *m, int x, int rawflag) |
|
|
{ |
|
|
fatal("ia64_cpu_tlbdump(): TODO\n"); |
|
|
} |
|
|
|
|
|
|
|
149 |
/* |
/* |
150 |
* ia64_cpu_interrupt(): |
* ia64_cpu_interrupt(): |
151 |
*/ |
*/ |