]> xenbits.xensource.com Git - qemu-xen.git/commitdiff
xlnx-zynqmp: Add a secure prop to en/disable ARM Security Extensions
authorEdgar E. Iglesias <edgar.iglesias@xilinx.com>
Mon, 6 Jun 2016 15:59:29 +0000 (16:59 +0100)
committerPeter Maydell <peter.maydell@linaro.org>
Mon, 6 Jun 2016 15:59:29 +0000 (16:59 +0100)
Add a secure prop to en/disable ARM Security Extensions.
This is particularly useful for KVM runs.

Default to disabled to match the behavior of KVM.

This changes the default setup from having the ARM Security
Extensions to not longer having them.

Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
Reviewed-by: Alistair Francis <alistair.francis@xilinx.com>
Message-id: 1464173555-12800-2-git-send-email-edgar.iglesias@gmail.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
hw/arm/xlnx-zynqmp.c
include/hw/arm/xlnx-zynqmp.h

index 4d504da6432d91b1a3daa5ac51f3c85ffe61691a..965a2503015c2f269e1328fd268c1c62f7ced584 100644 (file)
@@ -238,6 +238,8 @@ static void xlnx_zynqmp_realize(DeviceState *dev, Error **errp)
         }
         g_free(name);
 
+        object_property_set_bool(OBJECT(&s->apu_cpu[i]),
+                                 s->secure, "has_el3", NULL);
         object_property_set_int(OBJECT(&s->apu_cpu[i]), GIC_BASE_ADDR,
                                 "reset-cbar", &error_abort);
         object_property_set_bool(OBJECT(&s->apu_cpu[i]), true, "realized",
@@ -370,6 +372,7 @@ static void xlnx_zynqmp_realize(DeviceState *dev, Error **errp)
 
 static Property xlnx_zynqmp_props[] = {
     DEFINE_PROP_STRING("boot-cpu", XlnxZynqMPState, boot_cpu),
+    DEFINE_PROP_BOOL("secure", XlnxZynqMPState, secure, false),
     DEFINE_PROP_END_OF_LIST()
 };
 
index 2332596b403073517d3418ca2dba49791dd04bc2..38d4c8cf42e90db38402f2d87bdb87837621a658 100644 (file)
@@ -84,6 +84,9 @@ typedef struct XlnxZynqMPState {
 
     char *boot_cpu;
     ARMCPU *boot_cpu_ptr;
+
+    /* Has the ARM Security extensions?  */
+    bool secure;
 }  XlnxZynqMPState;
 
 #define XLNX_ZYNQMP_H