feat(interrupts): physical interrupt enabled
SPs are assigned with the interrupts related to
peripherals in their specific FF-A manifest.
The SPMC was enabling the physical interrupt,
when loading the respective partition.
This is changed in this patch to only be done
later at the call "HF_INTERRUPT_ENABLE".
This signals the SPMC that the SP is ready
to handle the given interrupt.
This prevents an IRQ from being pending before the
SP was even able to prepare itself to handle it.
Signed-off-by: J-Alves <joao.alves@arm.com>
Change-Id: I8a1704b46e41464c24a191ef8b9d41b1183e1aff
diff --git a/src/load.c b/src/load.c
index 25eabe7..83615f3 100644
--- a/src/load.c
+++ b/src/load.c
@@ -182,7 +182,10 @@
vm_locked.vm->uuids[i] = current_uuid;
}
- /* Populate the interrupt descriptor for current VM. */
+ /*
+ * Populate the interrupt descriptor for current VM.
+ * They can be enabled in runtime using HF_INTERRUPT_ENABLE.
+ */
for (uint16_t i = 0; i < PARTITION_MAX_DEVICE_REGIONS; i++) {
dev_region = manifest_vm->partition.dev_regions[i];
@@ -197,15 +200,11 @@
vm_locked.vm->interrupt_desc[k] = int_desc;
assert(int_desc.enabled);
- /*
- * Configure the physical interrupts allocated for this
- * VM in its partition manifest.
- */
- plat_interrupts_configure_interrupt(int_desc);
k++;
CHECK(k <= VM_MANIFEST_MAX_INTERRUPTS);
}
}
+
dlog_verbose("VM has %d physical interrupts defined in manifest.\n", k);
if (manifest_vm->is_ffa_partition) {