104
103
.smp_loader_start = SMP_BOOT_ADDR,
107
static void secondary_cpu_reset(void *opaque)
109
CPUState *env = opaque;
112
/* Set entry point for secondary CPUs. This assumes we're using
113
the init code from arm_boot.c. Real hardware resets all CPUs
115
env->regs[15] = SMP_BOOT_ADDR;
118
106
/* The following two lists must be consistent. */
119
107
enum realview_board_type {
177
166
irqp = arm_pic_init_cpu(env);
178
167
cpu_irq[n] = irqp[ARM_PIC_CPU_IRQ];
180
qemu_register_reset(secondary_cpu_reset, env);
183
169
if (arm_feature(env, ARM_FEATURE_V7)) {
220
206
sys_id = is_pb ? 0x01780500 : 0xc1400400;
221
arm_sysctl_init(0x10000000, sys_id, proc_id);
207
sysctl = qdev_create(NULL, "realview_sysctl");
208
qdev_prop_set_uint32(sysctl, "sys_id", sys_id);
209
qdev_init_nofail(sysctl);
210
qdev_prop_set_uint32(sysctl, "proc_id", proc_id);
211
sysbus_mmio_map(sysbus_from_qdev(sysctl), 0, 0x10000000);
224
214
dev = qdev_create(NULL, is_pb ? "a9mpcore_priv": "realview_mpcore");
257
247
sysbus_create_simple("sp804", 0x10011000, pic[4]);
258
248
sysbus_create_simple("sp804", 0x10012000, pic[5]);
250
sysbus_create_simple("pl061", 0x10013000, pic[6]);
251
sysbus_create_simple("pl061", 0x10014000, pic[7]);
252
gpio2 = sysbus_create_simple("pl061", 0x10015000, pic[8]);
260
254
sysbus_create_simple("pl110_versatile", 0x10020000, pic[23]);
262
sysbus_create_varargs("pl181", 0x10005000, pic[17], pic[18], NULL);
256
dev = sysbus_create_varargs("pl181", 0x10005000, pic[17], pic[18], NULL);
257
/* Wire up MMC card detect and read-only signals. These have
258
* to go to both the PL061 GPIO and the sysctl register.
259
* Note that the PL181 orders these lines (readonly,inserted)
260
* and the PL061 has them the other way about. Also the card
261
* detect line is inverted.
263
mmc_irq[0] = qemu_irq_split(
264
qdev_get_gpio_in(sysctl, ARM_SYSCTL_GPIO_MMC_WPROT),
265
qdev_get_gpio_in(gpio2, 1));
266
mmc_irq[1] = qemu_irq_split(
267
qdev_get_gpio_in(sysctl, ARM_SYSCTL_GPIO_MMC_CARDIN),
268
qemu_irq_invert(qdev_get_gpio_in(gpio2, 0)));
269
qdev_connect_gpio_out(dev, 0, mmc_irq[0]);
270
qdev_connect_gpio_out(dev, 1, mmc_irq[1]);
264
272
sysbus_create_simple("pl031", 0x10017000, pic[10]);
279
287
for(n = 0; n < nb_nics; n++) {
280
288
nd = &nd_table[n];
282
if ((!nd->model && !done_nic)
283
|| strcmp(nd->model, is_pb ? "lan9118" : "smc91c111") == 0) {
290
if (!done_nic && (!nd->model ||
291
strcmp(nd->model, is_pb ? "lan9118" : "smc91c111") == 0)) {
285
293
lan9118_init(nd, 0x4e000000, pic[28]);