aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2018-02-20 17:47:14 +0000
committerPeter Maydell <peter.maydell@linaro.org>2018-02-20 17:47:14 +0000
commitb06981506c09e551c6f9b1ee57dce53f80aae44c (patch)
tree5bc055105a725db39422b46dd33b388e8c2200dc
parentbbc6cbd8f502fbfff0ed1bd5b7bcc9d8543387ce (diff)
armv7m: Forward init-svtor property to CPU object
Create an "init-svtor" property on the armv7m container object which we can forward to the CPU object. Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
-rw-r--r--hw/arm/armv7m.c6
-rw-r--r--include/hw/arm/armv7m.h2
2 files changed, 8 insertions, 0 deletions
diff --git a/hw/arm/armv7m.c b/hw/arm/armv7m.c
index 189066812c..149aa07cd5 100644
--- a/hw/arm/armv7m.c
+++ b/hw/arm/armv7m.c
@@ -168,6 +168,11 @@ static void armv7m_realize(DeviceState *dev, Error **errp)
error_propagate(errp, err);
return;
}
+ object_property_set_uint(OBJECT(s->cpu), s->init_svtor, "init-svtor", &err);
+ if (err != NULL) {
+ error_propagate(errp, err);
+ return;
+ }
object_property_set_bool(OBJECT(s->cpu), true, "realized", &err);
if (err != NULL) {
error_propagate(errp, err);
@@ -224,6 +229,7 @@ static Property armv7m_properties[] = {
DEFINE_PROP_LINK("memory", ARMv7MState, board_memory, TYPE_MEMORY_REGION,
MemoryRegion *),
DEFINE_PROP_LINK("idau", ARMv7MState, idau, TYPE_IDAU_INTERFACE, Object *),
+ DEFINE_PROP_UINT32("init-svtor", ARMv7MState, init_svtor, 0),
DEFINE_PROP_END_OF_LIST(),
};
diff --git a/include/hw/arm/armv7m.h b/include/hw/arm/armv7m.h
index 5c3f406ccc..78308d1484 100644
--- a/include/hw/arm/armv7m.h
+++ b/include/hw/arm/armv7m.h
@@ -42,6 +42,7 @@ typedef struct {
* that CPU accesses see. (The NVIC, bitbanding and other CPU-internal
* devices will be automatically layered on top of this view.)
* + Property "idau": IDAU interface (forwarded to CPU object)
+ * + Property "init-svtor": secure VTOR reset value (forwarded to CPU object)
*/
typedef struct ARMv7MState {
/*< private >*/
@@ -61,6 +62,7 @@ typedef struct ARMv7MState {
/* MemoryRegion the board provides to us (with its devices, RAM, etc) */
MemoryRegion *board_memory;
Object *idau;
+ uint32_t init_svtor;
} ARMv7MState;
#endif