integratorcp.c (ef475b5dd12684591e6264e517eaa5b3e90f7ffa) | integratorcp.c (ba1ba5cca3962a9cc400c713c736b4fb8db1f38e) |
---|---|
1/* 2 * ARM Integrator CP System emulation. 3 * 4 * Copyright (c) 2005-2007 CodeSourcery. 5 * Written by Paul Brook 6 * 7 * This code is licensed under the GPL 8 */ --- 558 unchanged lines hidden (view full) --- 567static struct arm_boot_info integrator_binfo = { 568 .loader_start = 0x0, 569 .board_id = 0x113, 570}; 571 572static void integratorcp_init(MachineState *machine) 573{ 574 ram_addr_t ram_size = machine->ram_size; | 1/* 2 * ARM Integrator CP System emulation. 3 * 4 * Copyright (c) 2005-2007 CodeSourcery. 5 * Written by Paul Brook 6 * 7 * This code is licensed under the GPL 8 */ --- 558 unchanged lines hidden (view full) --- 567static struct arm_boot_info integrator_binfo = { 568 .loader_start = 0x0, 569 .board_id = 0x113, 570}; 571 572static void integratorcp_init(MachineState *machine) 573{ 574 ram_addr_t ram_size = machine->ram_size; |
575 const char *cpu_model = machine->cpu_model; | |
576 const char *kernel_filename = machine->kernel_filename; 577 const char *kernel_cmdline = machine->kernel_cmdline; 578 const char *initrd_filename = machine->initrd_filename; | 575 const char *kernel_filename = machine->kernel_filename; 576 const char *kernel_cmdline = machine->kernel_cmdline; 577 const char *initrd_filename = machine->initrd_filename; |
579 char **cpustr; 580 ObjectClass *cpu_oc; 581 CPUClass *cc; | |
582 Object *cpuobj; 583 ARMCPU *cpu; | 578 Object *cpuobj; 579 ARMCPU *cpu; |
584 const char *typename; | |
585 MemoryRegion *address_space_mem = get_system_memory(); 586 MemoryRegion *ram = g_new(MemoryRegion, 1); 587 MemoryRegion *ram_alias = g_new(MemoryRegion, 1); 588 qemu_irq pic[32]; 589 DeviceState *dev, *sic, *icp; 590 int i; | 580 MemoryRegion *address_space_mem = get_system_memory(); 581 MemoryRegion *ram = g_new(MemoryRegion, 1); 582 MemoryRegion *ram_alias = g_new(MemoryRegion, 1); 583 qemu_irq pic[32]; 584 DeviceState *dev, *sic, *icp; 585 int i; |
591 Error *err = NULL; | |
592 | 586 |
593 if (!cpu_model) { 594 cpu_model = "arm926"; 595 } | 587 cpuobj = object_new(machine->cpu_type); |
596 | 588 |
597 cpustr = g_strsplit(cpu_model, ",", 2); 598 599 cpu_oc = cpu_class_by_name(TYPE_ARM_CPU, cpustr[0]); 600 if (!cpu_oc) { 601 fprintf(stderr, "Unable to find CPU definition\n"); 602 exit(1); 603 } 604 typename = object_class_get_name(cpu_oc); 605 606 cc = CPU_CLASS(cpu_oc); 607 cc->parse_features(typename, cpustr[1], &err); 608 g_strfreev(cpustr); 609 if (err) { 610 error_report_err(err); 611 exit(1); 612 } 613 614 cpuobj = object_new(typename); 615 | |
616 /* By default ARM1176 CPUs have EL3 enabled. This board does not 617 * currently support EL3 so the CPU EL3 property is disabled before 618 * realization. 619 */ 620 if (object_property_find(cpuobj, "has_el3", NULL)) { 621 object_property_set_bool(cpuobj, false, "has_el3", &error_fatal); 622 } 623 --- 53 unchanged lines hidden (view full) --- 677 arm_load_kernel(cpu, &integrator_binfo); 678} 679 680static void integratorcp_machine_init(MachineClass *mc) 681{ 682 mc->desc = "ARM Integrator/CP (ARM926EJ-S)"; 683 mc->init = integratorcp_init; 684 mc->ignore_memory_transaction_failures = true; | 589 /* By default ARM1176 CPUs have EL3 enabled. This board does not 590 * currently support EL3 so the CPU EL3 property is disabled before 591 * realization. 592 */ 593 if (object_property_find(cpuobj, "has_el3", NULL)) { 594 object_property_set_bool(cpuobj, false, "has_el3", &error_fatal); 595 } 596 --- 53 unchanged lines hidden (view full) --- 650 arm_load_kernel(cpu, &integrator_binfo); 651} 652 653static void integratorcp_machine_init(MachineClass *mc) 654{ 655 mc->desc = "ARM Integrator/CP (ARM926EJ-S)"; 656 mc->init = integratorcp_init; 657 mc->ignore_memory_transaction_failures = true; |
658 mc->default_cpu_type = ARM_CPU_TYPE_NAME("arm926"); |
|
685} 686 687DEFINE_MACHINE("integratorcp", integratorcp_machine_init) 688 689static Property core_properties[] = { 690 DEFINE_PROP_UINT32("memsz", IntegratorCMState, memsz, 0), 691 DEFINE_PROP_END_OF_LIST(), 692}; --- 56 unchanged lines hidden --- | 659} 660 661DEFINE_MACHINE("integratorcp", integratorcp_machine_init) 662 663static Property core_properties[] = { 664 DEFINE_PROP_UINT32("memsz", IntegratorCMState, memsz, 0), 665 DEFINE_PROP_END_OF_LIST(), 666}; --- 56 unchanged lines hidden --- |