hw/arm/armv7m: Forward "vfp" and "dsp" properties to CPU
Create "vfp" and "dsp" properties on the armv7m container object which will be forwarded to its CPU object, so that SoCs can configure whether the CPU has these features. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Message-id: 20190517174046.11146-4-peter.maydell@linaro.org
This commit is contained in:
parent
ea90db0af6
commit
e0cf7b8163
|
@ -190,6 +190,22 @@ static void armv7m_realize(DeviceState *dev, Error **errp)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (object_property_find(OBJECT(s->cpu), "vfp", NULL)) {
|
||||||
|
object_property_set_bool(OBJECT(s->cpu), s->vfp,
|
||||||
|
"vfp", &err);
|
||||||
|
if (err != NULL) {
|
||||||
|
error_propagate(errp, err);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (object_property_find(OBJECT(s->cpu), "dsp", NULL)) {
|
||||||
|
object_property_set_bool(OBJECT(s->cpu), s->dsp,
|
||||||
|
"dsp", &err);
|
||||||
|
if (err != NULL) {
|
||||||
|
error_propagate(errp, err);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Tell the CPU where the NVIC is; it will fail realize if it doesn't
|
* Tell the CPU where the NVIC is; it will fail realize if it doesn't
|
||||||
|
@ -260,6 +276,8 @@ static Property armv7m_properties[] = {
|
||||||
DEFINE_PROP_BOOL("enable-bitband", ARMv7MState, enable_bitband, false),
|
DEFINE_PROP_BOOL("enable-bitband", ARMv7MState, enable_bitband, false),
|
||||||
DEFINE_PROP_BOOL("start-powered-off", ARMv7MState, start_powered_off,
|
DEFINE_PROP_BOOL("start-powered-off", ARMv7MState, start_powered_off,
|
||||||
false),
|
false),
|
||||||
|
DEFINE_PROP_BOOL("vfp", ARMv7MState, vfp, true),
|
||||||
|
DEFINE_PROP_BOOL("dsp", ARMv7MState, dsp, true),
|
||||||
DEFINE_PROP_END_OF_LIST(),
|
DEFINE_PROP_END_OF_LIST(),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -43,6 +43,8 @@ typedef struct {
|
||||||
* devices will be automatically layered on top of this view.)
|
* devices will be automatically layered on top of this view.)
|
||||||
* + Property "idau": IDAU interface (forwarded to CPU object)
|
* + Property "idau": IDAU interface (forwarded to CPU object)
|
||||||
* + Property "init-svtor": secure VTOR reset value (forwarded to CPU object)
|
* + Property "init-svtor": secure VTOR reset value (forwarded to CPU object)
|
||||||
|
* + Property "vfp": enable VFP (forwarded to CPU object)
|
||||||
|
* + Property "dsp": enable DSP (forwarded to CPU object)
|
||||||
* + Property "enable-bitband": expose bitbanded IO
|
* + Property "enable-bitband": expose bitbanded IO
|
||||||
*/
|
*/
|
||||||
typedef struct ARMv7MState {
|
typedef struct ARMv7MState {
|
||||||
|
@ -66,6 +68,8 @@ typedef struct ARMv7MState {
|
||||||
uint32_t init_svtor;
|
uint32_t init_svtor;
|
||||||
bool enable_bitband;
|
bool enable_bitband;
|
||||||
bool start_powered_off;
|
bool start_powered_off;
|
||||||
|
bool vfp;
|
||||||
|
bool dsp;
|
||||||
} ARMv7MState;
|
} ARMv7MState;
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in a new issue