hw/cpu/{a15mpcore, a9mpcore}: Handle missing has_el3 CPU props gracefully

Handle missing CPU support for EL3 gracefully.

Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
Message-id: 1442135278-25281-2-git-send-email-edgar.iglesias@gmail.com
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
Edgar E. Iglesias 2015-09-14 14:39:49 +01:00 committed by Peter Maydell
parent 6abc7158cb
commit 6533a1fcc2
2 changed files with 2 additions and 2 deletions

View File

@ -64,7 +64,7 @@ static void a15mp_priv_realize(DeviceState *dev, Error **errp)
* either all the CPUs have TZ, or none do. * either all the CPUs have TZ, or none do.
*/ */
cpuobj = OBJECT(qemu_get_cpu(0)); cpuobj = OBJECT(qemu_get_cpu(0));
has_el3 = object_property_find(cpuobj, "has_el3", &error_abort) && has_el3 = object_property_find(cpuobj, "has_el3", NULL) &&
object_property_get_bool(cpuobj, "has_el3", &error_abort); object_property_get_bool(cpuobj, "has_el3", &error_abort);
qdev_prop_set_bit(gicdev, "has-security-extensions", has_el3); qdev_prop_set_bit(gicdev, "has-security-extensions", has_el3);
} }

View File

@ -69,7 +69,7 @@ static void a9mp_priv_realize(DeviceState *dev, Error **errp)
* either all the CPUs have TZ, or none do. * either all the CPUs have TZ, or none do.
*/ */
cpuobj = OBJECT(qemu_get_cpu(0)); cpuobj = OBJECT(qemu_get_cpu(0));
has_el3 = object_property_find(cpuobj, "has_el3", &error_abort) && has_el3 = object_property_find(cpuobj, "has_el3", NULL) &&
object_property_get_bool(cpuobj, "has_el3", &error_abort); object_property_get_bool(cpuobj, "has_el3", &error_abort);
qdev_prop_set_bit(gicdev, "has-security-extensions", has_el3); qdev_prop_set_bit(gicdev, "has-security-extensions", has_el3);