mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-10 19:14:58 -06:00
arm: Move M-profile RAS register block into its own device
Currently we implement the RAS register block within the NVIC device. It isn't really very tightly coupled with the NVIC proper, so instead move it out into a sysbus device of its own and have the top level ARMv7M container create it and map it into memory at the right address. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Alexandre Iooss <erdnaxe@crans.org> Reviewed-by: Alistair Francis <alistair.francis@wdc.com> Reviewed-by: Luc Michel <luc@lmichel.fr> Reviewed-by: Damien Hedde <damien.hedde@greensocs.com> Message-id: 20210812093356.1946-2-peter.maydell@linaro.org
This commit is contained in:
parent
499243e189
commit
2f9db77ea8
8 changed files with 148 additions and 57 deletions
|
@ -231,6 +231,18 @@ static void armv7m_realize(DeviceState *dev, Error **errp)
|
|||
memory_region_add_subregion(&s->container, 0xe0000000,
|
||||
sysbus_mmio_get_region(sbd, 0));
|
||||
|
||||
/* If the CPU has RAS support, create the RAS register block */
|
||||
if (cpu_isar_feature(aa32_ras, s->cpu)) {
|
||||
object_initialize_child(OBJECT(dev), "armv7m-ras",
|
||||
&s->ras, TYPE_ARMV7M_RAS);
|
||||
sbd = SYS_BUS_DEVICE(&s->ras);
|
||||
if (!sysbus_realize(sbd, errp)) {
|
||||
return;
|
||||
}
|
||||
memory_region_add_subregion_overlap(&s->container, 0xe0005000,
|
||||
sysbus_mmio_get_region(sbd, 0), 1);
|
||||
}
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(s->bitband); i++) {
|
||||
if (s->enable_bitband) {
|
||||
Object *obj = OBJECT(&s->bitband[i]);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue