highbank.c (ef475b5dd12684591e6264e517eaa5b3e90f7ffa) highbank.c (ba1ba5cca3962a9cc400c713c736b4fb8db1f38e)
1/*
2 * Calxeda Highbank SoC emulation
3 *
4 * Copyright (c) 2010-2012 Calxeda
5 *
6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms and conditions of the GNU General Public License,
8 * version 2 or later, as published by the Free Software Foundation.

--- 208 unchanged lines hidden (view full) ---

217 * device tree (linux/arch/arm/boot/dts/highbank.dts), which is
218 * normally 0xff900000 or -m 4089. When running this board on a
219 * 32-bit host, set the reg value of memory to 0xf7ff00000 in the
220 * device tree and pass -m 2047 to QEMU.
221 */
222static void calxeda_init(MachineState *machine, enum cxmachines machine_id)
223{
224 ram_addr_t ram_size = machine->ram_size;
1/*
2 * Calxeda Highbank SoC emulation
3 *
4 * Copyright (c) 2010-2012 Calxeda
5 *
6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms and conditions of the GNU General Public License,
8 * version 2 or later, as published by the Free Software Foundation.

--- 208 unchanged lines hidden (view full) ---

217 * device tree (linux/arch/arm/boot/dts/highbank.dts), which is
218 * normally 0xff900000 or -m 4089. When running this board on a
219 * 32-bit host, set the reg value of memory to 0xf7ff00000 in the
220 * device tree and pass -m 2047 to QEMU.
221 */
222static void calxeda_init(MachineState *machine, enum cxmachines machine_id)
223{
224 ram_addr_t ram_size = machine->ram_size;
225 const char *cpu_model = machine->cpu_model;
226 const char *kernel_filename = machine->kernel_filename;
227 const char *kernel_cmdline = machine->kernel_cmdline;
228 const char *initrd_filename = machine->initrd_filename;
229 DeviceState *dev = NULL;
230 SysBusDevice *busdev;
231 qemu_irq pic[128];
232 int n;
233 qemu_irq cpu_irq[4];
234 qemu_irq cpu_fiq[4];
235 MemoryRegion *sysram;
236 MemoryRegion *dram;
237 MemoryRegion *sysmem;
238 char *sysboot_filename;
239
240 switch (machine_id) {
241 case CALXEDA_HIGHBANK:
225 const char *kernel_filename = machine->kernel_filename;
226 const char *kernel_cmdline = machine->kernel_cmdline;
227 const char *initrd_filename = machine->initrd_filename;
228 DeviceState *dev = NULL;
229 SysBusDevice *busdev;
230 qemu_irq pic[128];
231 int n;
232 qemu_irq cpu_irq[4];
233 qemu_irq cpu_fiq[4];
234 MemoryRegion *sysram;
235 MemoryRegion *dram;
236 MemoryRegion *sysmem;
237 char *sysboot_filename;
238
239 switch (machine_id) {
240 case CALXEDA_HIGHBANK:
242 cpu_model = "cortex-a9";
241 machine->cpu_type = ARM_CPU_TYPE_NAME("cortex-a9");
243 break;
244 case CALXEDA_MIDWAY:
242 break;
243 case CALXEDA_MIDWAY:
245 cpu_model = "cortex-a15";
244 machine->cpu_type = ARM_CPU_TYPE_NAME("cortex-a15");
246 break;
245 break;
246 default:
247 assert(0);
247 }
248
249 for (n = 0; n < smp_cpus; n++) {
248 }
249
250 for (n = 0; n < smp_cpus; n++) {
250 ObjectClass *oc = cpu_class_by_name(TYPE_ARM_CPU, cpu_model);
251 Object *cpuobj;
252 ARMCPU *cpu;
253
251 Object *cpuobj;
252 ARMCPU *cpu;
253
254 cpuobj = object_new(object_class_get_name(oc));
254 cpuobj = object_new(machine->cpu_type);
255 cpu = ARM_CPU(cpuobj);
256
257 object_property_set_int(cpuobj, QEMU_PSCI_CONDUIT_SMC,
258 "psci-conduit", &error_abort);
259
260 if (n) {
261 /* Secondary CPUs start in PSCI powered-down state */
262 object_property_set_bool(cpuobj, true,

--- 187 unchanged lines hidden ---
255 cpu = ARM_CPU(cpuobj);
256
257 object_property_set_int(cpuobj, QEMU_PSCI_CONDUIT_SMC,
258 "psci-conduit", &error_abort);
259
260 if (n) {
261 /* Secondary CPUs start in PSCI powered-down state */
262 object_property_set_bool(cpuobj, true,

--- 187 unchanged lines hidden ---