diff options
author | Eduardo Habkost <ehabkost@redhat.com> | 2020-11-11 13:38:12 -0500 |
---|---|---|
committer | Eduardo Habkost <ehabkost@redhat.com> | 2020-12-14 14:25:44 -0500 |
commit | 4433bb3d83955123c1e6bcdf8f11d6b74399ba86 (patch) | |
tree | 2a6a1b6dd14f13ee0fb23f79fbf035e59d24069e /hw/arm/vexpress.c | |
parent | 37f04b71a9cd62ca0f2d24a70fe843619ad45cd0 (diff) | |
download | qemu-4433bb3d83955123c1e6bcdf8f11d6b74399ba86.zip qemu-4433bb3d83955123c1e6bcdf8f11d6b74399ba86.tar.gz qemu-4433bb3d83955123c1e6bcdf8f11d6b74399ba86.tar.bz2 |
vexpress: Register "secure" as class property
Class properties make QOM introspection simpler and easier, as
they don't require an object to be instantiated.
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Message-Id: <20201111183823.283752-2-ehabkost@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Diffstat (limited to 'hw/arm/vexpress.c')
-rw-r--r-- | hw/arm/vexpress.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/hw/arm/vexpress.c b/hw/arm/vexpress.c index ac09837..d3a58cf 100644 --- a/hw/arm/vexpress.c +++ b/hw/arm/vexpress.c @@ -756,11 +756,6 @@ static void vexpress_instance_init(Object *obj) /* EL3 is enabled by default on vexpress */ vms->secure = true; - object_property_add_bool(obj, "secure", vexpress_get_secure, - vexpress_set_secure); - object_property_set_description(obj, "secure", - "Set on/off to enable/disable the ARM " - "Security Extensions (TrustZone)"); } static void vexpress_a15_instance_init(Object *obj) @@ -797,6 +792,12 @@ static void vexpress_class_init(ObjectClass *oc, void *data) mc->max_cpus = 4; mc->ignore_memory_transaction_failures = true; mc->default_ram_id = "vexpress.highmem"; + + object_class_property_add_bool(oc, "secure", vexpress_get_secure, + vexpress_set_secure); + object_class_property_set_description(oc, "secure", + "Set on/off to enable/disable the ARM " + "Security Extensions (TrustZone)"); } static void vexpress_a9_class_init(ObjectClass *oc, void *data) |