[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 03/23] armv7m: Pass through start-powered-off CPU pr
From: |
Peter Maydell |
Subject: |
[Qemu-devel] [PATCH 03/23] armv7m: Pass through start-powered-off CPU property |
Date: |
Mon, 21 Jan 2019 18:50:58 +0000 |
Expose "start-powered-off" as a property of the ARMv7M container,
which we just pass through to the CPU object in the same way that we
do for "init-svtor" and "idau". (We want this for the SSE-200, which
powers up only the first CPU at reset and leaves the second powered
down.)
As with the other CPU properties here, we can't just use alias
properties, because the CPU QOM object is not created until armv7m
realize time.
Signed-off-by: Peter Maydell <address@hidden>
---
include/hw/arm/armv7m.h | 1 +
hw/arm/armv7m.c | 10 ++++++++++
2 files changed, 11 insertions(+)
diff --git a/include/hw/arm/armv7m.h b/include/hw/arm/armv7m.h
index 2ba24953b63..e96a98f8093 100644
--- a/include/hw/arm/armv7m.h
+++ b/include/hw/arm/armv7m.h
@@ -65,6 +65,7 @@ typedef struct ARMv7MState {
Object *idau;
uint32_t init_svtor;
bool enable_bitband;
+ bool start_powered_off;
} ARMv7MState;
#endif
diff --git a/hw/arm/armv7m.c b/hw/arm/armv7m.c
index 0f2c8e066cf..adae11e76ed 100644
--- a/hw/arm/armv7m.c
+++ b/hw/arm/armv7m.c
@@ -182,6 +182,14 @@ static void armv7m_realize(DeviceState *dev, Error **errp)
return;
}
}
+ if (object_property_find(OBJECT(s->cpu), "start-powered-off", NULL)) {
+ object_property_set_bool(OBJECT(s->cpu), s->start_powered_off,
+ "start-powered-off", &err);
+ if (err != NULL) {
+ error_propagate(errp, err);
+ return;
+ }
+ }
/*
* Tell the CPU where the NVIC is; it will fail realize if it doesn't
@@ -250,6 +258,8 @@ static Property armv7m_properties[] = {
DEFINE_PROP_LINK("idau", ARMv7MState, idau, TYPE_IDAU_INTERFACE, Object *),
DEFINE_PROP_UINT32("init-svtor", ARMv7MState, init_svtor, 0),
DEFINE_PROP_BOOL("enable-bitband", ARMv7MState, enable_bitband, false),
+ DEFINE_PROP_BOOL("start-powered-off", ARMv7MState, start_powered_off,
+ false),
DEFINE_PROP_END_OF_LIST(),
};
--
2.20.1
- [Qemu-devel] [PATCH 00/23] arm: Implement MPS2 AN521 FPGA image, Peter Maydell, 2019/01/21
- [Qemu-devel] [PATCH 02/23] armv7m: Make cpu object a child of the armv7m container, Peter Maydell, 2019/01/21
- [Qemu-devel] [PATCH 01/23] armv7m: Don't assume the NVIC's CPU is CPU 0, Peter Maydell, 2019/01/21
- [Qemu-devel] [PATCH 03/23] armv7m: Pass through start-powered-off CPU property,
Peter Maydell <=
- [Qemu-devel] [PATCH 04/23] hw/arm/iotkit: Rename IoTKit to ARMSSE, Peter Maydell, 2019/01/21
- [Qemu-devel] [PATCH 06/23] hw/arm/iotkit: Rename 'iotkit' local variables and functions, Peter Maydell, 2019/01/21
- [Qemu-devel] [PATCH 23/23] hw/arm/mps2-tz: Add mps2-an521 model, Peter Maydell, 2019/01/21
- [Qemu-devel] [PATCH 22/23] hw/arm/mps2-tz: Add IRQ infrastructure to support SSE-200, Peter Maydell, 2019/01/21