mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 07:43:54 -06:00
hw/misc/iotkit-secctl: Support 4 internal MPCs
The SSE-200 has 4 banks of SRAM, each with its own internal Memory Protection Controller. The interrupt status for these extra MPCs appears in the same security controller SECMPCINTSTATUS register as the MPC for the IoTKit's single SRAM bank. Enhance the iotkit-secctl device to allow 4 MPCs. (If the particular IoTKit/SSE variant in use does not have all 4 MPCs then the unused inputs will simply result in the SECMPCINTSTATUS bits being zero as required.) The hardcoded constant "1"s in armsse.c indicate the actual number of SRAM MPCs the IoTKit has, and will be replaced in the following commit. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-id: 20190121185118.18550-9-peter.maydell@linaro.org
This commit is contained in:
parent
6eee5d241a
commit
0a78d7ebf8
3 changed files with 9 additions and 8 deletions
|
@ -600,7 +600,7 @@ static void iotkit_secctl_mpc_status(void *opaque, int n, int level)
|
|||
{
|
||||
IoTKitSecCtl *s = IOTKIT_SECCTL(opaque);
|
||||
|
||||
s->mpcintstatus = deposit32(s->mpcintstatus, 0, 1, !!level);
|
||||
s->mpcintstatus = deposit32(s->mpcintstatus, n, 1, !!level);
|
||||
}
|
||||
|
||||
static void iotkit_secctl_mpcexp_status(void *opaque, int n, int level)
|
||||
|
@ -686,7 +686,8 @@ static void iotkit_secctl_init(Object *obj)
|
|||
qdev_init_gpio_out_named(dev, &s->sec_resp_cfg, "sec_resp_cfg", 1);
|
||||
qdev_init_gpio_out_named(dev, &s->nsc_cfg_irq, "nsc_cfg", 1);
|
||||
|
||||
qdev_init_gpio_in_named(dev, iotkit_secctl_mpc_status, "mpc_status", 1);
|
||||
qdev_init_gpio_in_named(dev, iotkit_secctl_mpc_status, "mpc_status",
|
||||
IOTS_NUM_MPC);
|
||||
qdev_init_gpio_in_named(dev, iotkit_secctl_mpcexp_status,
|
||||
"mpcexp_status", IOTS_NUM_EXP_MPC);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue