a15mpcore.c (760df0d121a836dcbf3726b80b820115aef21b30) | a15mpcore.c (db873cc5d1a4aaa67eea87768d504b2f89d88738) |
---|---|
1/* 2 * Cortex-A15MPCore internal peripheral emulation. 3 * 4 * Copyright (c) 2012 Linaro Limited. 5 * Written by Peter Maydell. 6 * 7 * This program is free software; you can redistribute it and/or modify 8 * it under the terms of the GNU General Public License as published by --- 28 unchanged lines hidden (view full) --- 37static void a15mp_priv_initfn(Object *obj) 38{ 39 SysBusDevice *sbd = SYS_BUS_DEVICE(obj); 40 A15MPPrivState *s = A15MPCORE_PRIV(obj); 41 42 memory_region_init(&s->container, obj, "a15mp-priv-container", 0x8000); 43 sysbus_init_mmio(sbd, &s->container); 44 | 1/* 2 * Cortex-A15MPCore internal peripheral emulation. 3 * 4 * Copyright (c) 2012 Linaro Limited. 5 * Written by Peter Maydell. 6 * 7 * This program is free software; you can redistribute it and/or modify 8 * it under the terms of the GNU General Public License as published by --- 28 unchanged lines hidden (view full) --- 37static void a15mp_priv_initfn(Object *obj) 38{ 39 SysBusDevice *sbd = SYS_BUS_DEVICE(obj); 40 A15MPPrivState *s = A15MPCORE_PRIV(obj); 41 42 memory_region_init(&s->container, obj, "a15mp-priv-container", 0x8000); 43 sysbus_init_mmio(sbd, &s->container); 44 |
45 sysbus_init_child_obj(obj, "gic", &s->gic, sizeof(s->gic), 46 gic_class_name()); | 45 object_initialize_child(obj, "gic", &s->gic, gic_class_name()); |
47 qdev_prop_set_uint32(DEVICE(&s->gic), "revision", 2); 48} 49 50static void a15mp_priv_realize(DeviceState *dev, Error **errp) 51{ 52 SysBusDevice *sbd = SYS_BUS_DEVICE(dev); 53 A15MPPrivState *s = A15MPCORE_PRIV(dev); 54 DeviceState *gicdev; --- 17 unchanged lines hidden (view full) --- 72 object_property_get_bool(cpuobj, "has_el3", &error_abort); 73 qdev_prop_set_bit(gicdev, "has-security-extensions", has_el3); 74 /* Similarly for virtualization support */ 75 has_el2 = object_property_find(cpuobj, "has_el2", NULL) && 76 object_property_get_bool(cpuobj, "has_el2", &error_abort); 77 qdev_prop_set_bit(gicdev, "has-virtualization-extensions", has_el2); 78 } 79 | 46 qdev_prop_set_uint32(DEVICE(&s->gic), "revision", 2); 47} 48 49static void a15mp_priv_realize(DeviceState *dev, Error **errp) 50{ 51 SysBusDevice *sbd = SYS_BUS_DEVICE(dev); 52 A15MPPrivState *s = A15MPCORE_PRIV(dev); 53 DeviceState *gicdev; --- 17 unchanged lines hidden (view full) --- 71 object_property_get_bool(cpuobj, "has_el3", &error_abort); 72 qdev_prop_set_bit(gicdev, "has-security-extensions", has_el3); 73 /* Similarly for virtualization support */ 74 has_el2 = object_property_find(cpuobj, "has_el2", NULL) && 75 object_property_get_bool(cpuobj, "has_el2", &error_abort); 76 qdev_prop_set_bit(gicdev, "has-virtualization-extensions", has_el2); 77 } 78 |
80 object_property_set_bool(OBJECT(&s->gic), true, "realized", &err); | 79 sysbus_realize(SYS_BUS_DEVICE(&s->gic), &err); |
81 if (err != NULL) { 82 error_propagate(errp, err); 83 return; 84 } 85 busdev = SYS_BUS_DEVICE(&s->gic); 86 87 /* Pass through outbound IRQ lines from the GIC */ 88 sysbus_pass_irq(sbd, busdev); --- 96 unchanged lines hidden --- | 80 if (err != NULL) { 81 error_propagate(errp, err); 82 return; 83 } 84 busdev = SYS_BUS_DEVICE(&s->gic); 85 86 /* Pass through outbound IRQ lines from the GIC */ 87 sysbus_pass_irq(sbd, busdev); --- 96 unchanged lines hidden --- |