feat: route secure interrupts to any physical PE
This patch makes changes necessary to allow a physical interrupt to be
routed to a particular PE (by mpidr). Until now, all interrupts were
routed to the boot core by default. To maintain compatiblity with
existing behavior and manifests, the patch adds a new manifest field
'interrupts-target' through which the interrupt id and corresponding
MPIDR are supplied. This is then used to configure the gic
appropriately, to route interrupts to the desired PE.
Change-Id: I3ed8f51e7679bb65c0aca030b21395598553e6ec
Signed-off-by: Raghu Krishnamurthy <raghu.ncstate@gmail.com>
diff --git a/src/load.c b/src/load.c
index af3519a..0e277e6 100644
--- a/src/load.c
+++ b/src/load.c
@@ -143,6 +143,12 @@
(((attr >> INT_DESC_CONFIG_SHIFT) & 0x1) << 1) |
((attr >> INT_DESC_SEC_STATE_SHIFT) & 0x1));
+ if (interrupt.mpidr_valid) {
+ interrupt_desc_set_mpidr(int_desc, interrupt.mpidr);
+ } else {
+ interrupt_desc_set_mpidr_invalid(int_desc);
+ }
+
interrupt_desc_set_valid(int_desc, true);
}
@@ -170,7 +176,7 @@
PARTITION_MAX_INTERRUPTS_PER_DEVICE);
for (uint8_t j = 0; j < dev_region.interrupt_count; j++) {
- struct interrupt_descriptor int_desc;
+ struct interrupt_descriptor int_desc = {0};
interrupt = dev_region.interrupts[j];
infer_interrupt(interrupt, &int_desc);