versatilepb.c (ef475b5dd12684591e6264e517eaa5b3e90f7ffa) | versatilepb.c (ba1ba5cca3962a9cc400c713c736b4fb8db1f38e) |
---|---|
1/* 2 * ARM Versatile Platform/Application Baseboard System emulation. 3 * 4 * Copyright (c) 2005-2007 CodeSourcery. 5 * Written by Paul Brook 6 * 7 * This code is licensed under the GPL. 8 */ --- 167 unchanged lines hidden (view full) --- 176/* The AB and PB boards both use the same core, just with different 177 peripherals and expansion busses. For now we emulate a subset of the 178 PB peripherals and just change the board ID. */ 179 180static struct arm_boot_info versatile_binfo; 181 182static void versatile_init(MachineState *machine, int board_id) 183{ | 1/* 2 * ARM Versatile Platform/Application Baseboard System emulation. 3 * 4 * Copyright (c) 2005-2007 CodeSourcery. 5 * Written by Paul Brook 6 * 7 * This code is licensed under the GPL. 8 */ --- 167 unchanged lines hidden (view full) --- 176/* The AB and PB boards both use the same core, just with different 177 peripherals and expansion busses. For now we emulate a subset of the 178 PB peripherals and just change the board ID. */ 179 180static struct arm_boot_info versatile_binfo; 181 182static void versatile_init(MachineState *machine, int board_id) 183{ |
184 ObjectClass *cpu_oc; | |
185 Object *cpuobj; 186 ARMCPU *cpu; 187 MemoryRegion *sysmem = get_system_memory(); 188 MemoryRegion *ram = g_new(MemoryRegion, 1); 189 qemu_irq pic[32]; 190 qemu_irq sic[32]; 191 DeviceState *dev, *sysctl; 192 SysBusDevice *busdev; --- 9 unchanged lines hidden (view full) --- 202 /* Device starting at address 0x10000000, 203 * and memory cannot overlap with devices. 204 * Refuse to run rather than behaving very confusingly. 205 */ 206 error_report("versatilepb: memory size must not exceed 256MB"); 207 exit(1); 208 } 209 | 184 Object *cpuobj; 185 ARMCPU *cpu; 186 MemoryRegion *sysmem = get_system_memory(); 187 MemoryRegion *ram = g_new(MemoryRegion, 1); 188 qemu_irq pic[32]; 189 qemu_irq sic[32]; 190 DeviceState *dev, *sysctl; 191 SysBusDevice *busdev; --- 9 unchanged lines hidden (view full) --- 201 /* Device starting at address 0x10000000, 202 * and memory cannot overlap with devices. 203 * Refuse to run rather than behaving very confusingly. 204 */ 205 error_report("versatilepb: memory size must not exceed 256MB"); 206 exit(1); 207 } 208 |
210 if (!machine->cpu_model) { 211 machine->cpu_model = "arm926"; 212 } | 209 cpuobj = object_new(machine->cpu_type); |
213 | 210 |
214 cpu_oc = cpu_class_by_name(TYPE_ARM_CPU, machine->cpu_model); 215 if (!cpu_oc) { 216 fprintf(stderr, "Unable to find CPU definition\n"); 217 exit(1); 218 } 219 220 cpuobj = object_new(object_class_get_name(cpu_oc)); 221 | |
222 /* By default ARM1176 CPUs have EL3 enabled. This board does not 223 * currently support EL3 so the CPU EL3 property is disabled before 224 * realization. 225 */ 226 if (object_property_find(cpuobj, "has_el3", NULL)) { 227 object_property_set_bool(cpuobj, false, "has_el3", &error_fatal); 228 } 229 --- 169 unchanged lines hidden (view full) --- 399static void versatilepb_class_init(ObjectClass *oc, void *data) 400{ 401 MachineClass *mc = MACHINE_CLASS(oc); 402 403 mc->desc = "ARM Versatile/PB (ARM926EJ-S)"; 404 mc->init = vpb_init; 405 mc->block_default_type = IF_SCSI; 406 mc->ignore_memory_transaction_failures = true; | 211 /* By default ARM1176 CPUs have EL3 enabled. This board does not 212 * currently support EL3 so the CPU EL3 property is disabled before 213 * realization. 214 */ 215 if (object_property_find(cpuobj, "has_el3", NULL)) { 216 object_property_set_bool(cpuobj, false, "has_el3", &error_fatal); 217 } 218 --- 169 unchanged lines hidden (view full) --- 388static void versatilepb_class_init(ObjectClass *oc, void *data) 389{ 390 MachineClass *mc = MACHINE_CLASS(oc); 391 392 mc->desc = "ARM Versatile/PB (ARM926EJ-S)"; 393 mc->init = vpb_init; 394 mc->block_default_type = IF_SCSI; 395 mc->ignore_memory_transaction_failures = true; |
396 mc->default_cpu_type = ARM_CPU_TYPE_NAME("arm926"); |
|
407} 408 409static const TypeInfo versatilepb_type = { 410 .name = MACHINE_TYPE_NAME("versatilepb"), 411 .parent = TYPE_MACHINE, 412 .class_init = versatilepb_class_init, 413}; 414 415static void versatileab_class_init(ObjectClass *oc, void *data) 416{ 417 MachineClass *mc = MACHINE_CLASS(oc); 418 419 mc->desc = "ARM Versatile/AB (ARM926EJ-S)"; 420 mc->init = vab_init; 421 mc->block_default_type = IF_SCSI; 422 mc->ignore_memory_transaction_failures = true; | 397} 398 399static const TypeInfo versatilepb_type = { 400 .name = MACHINE_TYPE_NAME("versatilepb"), 401 .parent = TYPE_MACHINE, 402 .class_init = versatilepb_class_init, 403}; 404 405static void versatileab_class_init(ObjectClass *oc, void *data) 406{ 407 MachineClass *mc = MACHINE_CLASS(oc); 408 409 mc->desc = "ARM Versatile/AB (ARM926EJ-S)"; 410 mc->init = vab_init; 411 mc->block_default_type = IF_SCSI; 412 mc->ignore_memory_transaction_failures = true; |
413 mc->default_cpu_type = ARM_CPU_TYPE_NAME("arm926"); |
|
423} 424 425static const TypeInfo versatileab_type = { 426 .name = MACHINE_TYPE_NAME("versatileab"), 427 .parent = TYPE_MACHINE, 428 .class_init = versatileab_class_init, 429}; 430 --- 29 unchanged lines hidden --- | 414} 415 416static const TypeInfo versatileab_type = { 417 .name = MACHINE_TYPE_NAME("versatileab"), 418 .parent = TYPE_MACHINE, 419 .class_init = versatileab_class_init, 420}; 421 --- 29 unchanged lines hidden --- |