mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-09 18:44:58 -06:00
armv7m: Make NVIC expose a memory region rather than mapping itself
Make the NVIC device expose a memory region for its users to map, rather than mapping itself into the system memory space on realize, and get the one user (the ARMv7M object) to do this. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Message-id: 1487604965-23220-7-git-send-email-peter.maydell@linaro.org
This commit is contained in:
parent
618119c2d3
commit
98957a94ef
2 changed files with 8 additions and 6 deletions
|
@ -19,7 +19,6 @@
|
|||
#include "hw/arm/arm.h"
|
||||
#include "hw/arm/armv7m_nvic.h"
|
||||
#include "target/arm/cpu.h"
|
||||
#include "exec/address-spaces.h"
|
||||
#include "qemu/log.h"
|
||||
#include "trace.h"
|
||||
|
||||
|
@ -1043,10 +1042,8 @@ static void armv7m_nvic_realize(DeviceState *dev, Error **errp)
|
|||
"nvic_sysregs", 0x1000);
|
||||
memory_region_add_subregion(&s->container, 0, &s->sysregmem);
|
||||
|
||||
/* Map the whole thing into system memory at the location required
|
||||
* by the v7M architecture.
|
||||
*/
|
||||
memory_region_add_subregion(get_system_memory(), 0xe000e000, &s->container);
|
||||
sysbus_init_mmio(SYS_BUS_DEVICE(dev), &s->container);
|
||||
|
||||
s->systick.timer = timer_new_ns(QEMU_CLOCK_VIRTUAL, systick_timer_tick, s);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue