Revision 60ad0733 hw/leon3.c
b/hw/leon3.c | ||
---|---|---|
101 | 101 |
const char *initrd_filename, |
102 | 102 |
const char *cpu_model) |
103 | 103 |
{ |
104 |
SPARCCPU *cpu; |
|
104 | 105 |
CPUSPARCState *env; |
105 | 106 |
MemoryRegion *address_space_mem = get_system_memory(); |
106 | 107 |
MemoryRegion *ram = g_new(MemoryRegion, 1); |
... | ... | |
117 | 118 |
cpu_model = "LEON3"; |
118 | 119 |
} |
119 | 120 |
|
120 |
env = cpu_init(cpu_model);
|
|
121 |
if (!env) {
|
|
121 |
cpu = cpu_sparc_init(cpu_model);
|
|
122 |
if (cpu == NULL) {
|
|
122 | 123 |
fprintf(stderr, "qemu: Unable to find Sparc CPU definition\n"); |
123 | 124 |
exit(1); |
124 | 125 |
} |
126 |
env = &cpu->env; |
|
125 | 127 |
|
126 | 128 |
cpu_sparc_set_id(env, 0); |
127 | 129 |
|
Also available in: Unified diff