SPM: Fix type of LOAD_INFO_IRQ
Ideally, this would also be const, but that is actually a major change
affecting a lot of the existing interrupt code.
Signed-off-by: Chris Brand <chris.brand@cypress.com>
Change-Id: Ic0b86aa53ec4e992abc53724b3df24b6893f4d8e
diff --git a/secure_fw/spm/cmsis_psa/static_loader.c b/secure_fw/spm/cmsis_psa/static_loader.c
index a9bafad..1c6368c 100644
--- a/secure_fw/spm/cmsis_psa/static_loader.c
+++ b/secure_fw/spm/cmsis_psa/static_loader.c
@@ -183,7 +183,7 @@
}
p_ldinf = p_partition->p_ldinf;
- p_irq_info = (struct irq_load_info_t *)LOAD_INFO_IRQ(p_ldinf);
+ p_irq_info = LOAD_INFO_IRQ(p_ldinf);
for (i = 0; i < p_ldinf->nirqs; i++) {
p_partition->signals_allowed |= p_irq_info->signal;
diff --git a/secure_fw/spm/ffm/interrupt.c b/secure_fw/spm/ffm/interrupt.c
index 802657b..463676a 100644
--- a/secure_fw/spm/ffm/interrupt.c
+++ b/secure_fw/spm/ffm/interrupt.c
@@ -1,5 +1,8 @@
/*
* Copyright (c) 2021-2022, Arm Limited. All rights reserved.
+ * Copyright (c) 2022 Cypress Semiconductor Corporation (an Infineon
+ * company) or an affiliate of Cypress Semiconductor Corporation. All rights
+ * reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*
@@ -120,7 +123,7 @@
return NULL;
}
- irq_info = (struct irq_load_info_t *)LOAD_INFO_IRQ(p_ldinf);
+ irq_info = LOAD_INFO_IRQ(p_ldinf);
for (i = 0; i < p_ldinf->nirqs; i++) {
if (irq_info[i].signal == signal) {
return &irq_info[i];
diff --git a/secure_fw/spm/include/load/spm_load_api.h b/secure_fw/spm/include/load/spm_load_api.h
index db71989..3b77d38 100644
--- a/secure_fw/spm/include/load/spm_load_api.h
+++ b/secure_fw/spm/include/load/spm_load_api.h
@@ -43,8 +43,8 @@
((const struct asset_desc_t *)((uintptr_t)LOAD_INFO_SERVICE(pldinf) + \
(pldinf)->nservices * sizeof(struct service_load_info_t)))
#define LOAD_INFO_IRQ(pldinf) \
- ((uintptr_t)LOAD_INFO_ASSET(pldinf) + \
- (pldinf)->nassets * sizeof(struct asset_desc_t))
+ ((struct irq_load_info_t *)((uintptr_t)LOAD_INFO_ASSET(pldinf) + \
+ (pldinf)->nassets * sizeof(struct asset_desc_t)))
/* Runtime partition struct list head node type */
struct partition_head_t {