Clement Deschamps
Builds for 1 pipeline passed in 6 minutes 24 seconds

qbox: fix cortex-m3 init

... ... @@ -52,21 +52,30 @@
#include "cpu.h"
#include "qemu/error-report.h"
#include "qapi/error.h"
#include "hw/arm/armv7m.h"
static void cortex_m3_init(MachineState *machine)
static void cortex_m3_init(MachineState *ms)
{
DeviceState *nvic;
qemu_irq pic[64];
size_t i;
nvic = armv7m_init(get_system_memory(), 32 * 1024, 64,
machine->kernel_filename, NULL);
ms->cpu_type = ARM_CPU_TYPE_NAME("cortex-m3");
nvic = qdev_create(NULL, TYPE_ARMV7M);
qdev_prop_set_uint32(nvic, "num-irq", 64);
qdev_prop_set_string(nvic, "cpu-type", ms->cpu_type);
object_property_set_link(OBJECT(nvic), OBJECT(get_system_memory()),
"memory", &error_abort);
qdev_init_nofail(nvic);
for (i = 0; i < 64; i++) {
pic[i] = qdev_get_gpio_in(nvic, i);
}
qbox_export_irq(qbox_get_handle(), pic, 64);
armv7m_load_kernel(ARM_CPU(first_cpu), ms->kernel_filename, 32 * 1024);
}
static void cortex_m3_class_init(ObjectClass *oc, void *data)
... ...