25 |
* SUCH DAMAGE. |
* SUCH DAMAGE. |
26 |
* |
* |
27 |
* |
* |
28 |
* $Id: cpu_ia64.c,v 1.3 2005/11/13 00:14:07 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 |
|
|
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 |
|
|