aboutsummaryrefslogtreecommitdiff
path: root/services/spd/trusty/generic-arm64-smcall.c
diff options
context:
space:
mode:
authorArve Hjønnevåg <arve@android.com>2019-11-15 14:25:43 -0800
committerArve Hjønnevåg <arve@android.com>2020-02-12 19:07:18 +0000
commit76776c2c67c2f12ac97b118bef5e0477cbb00b13 (patch)
tree74c692f6ff92fb0d3bc1731809e28b6c1ab59de4 /services/spd/trusty/generic-arm64-smcall.c
parent471e8fa7d17ce2140cbcec7f4f61d2f1749b447f (diff)
downloadtrusted-firmware-a-76776c2c67c2f12ac97b118bef5e0477cbb00b13.tar.gz
trusty: generic-arm64-smcall: Support gicr address
Add SMC_GET_GIC_BASE_GICR option to SMC_FC_GET_REG_BASE and SMC_FC64_GET_REG_BASE calls for returning the base address of the gic redistributor added in gic version 3. Bug: 122357256 Change-Id: Ia7c287040656515bab262588163e0c5fc8f13a21 Signed-off-by: Arve Hjønnevåg <arve@android.com>
Diffstat (limited to 'services/spd/trusty/generic-arm64-smcall.c')
-rw-r--r--services/spd/trusty/generic-arm64-smcall.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/services/spd/trusty/generic-arm64-smcall.c b/services/spd/trusty/generic-arm64-smcall.c
index 3ffc13dcf..5c3a62849 100644
--- a/services/spd/trusty/generic-arm64-smcall.c
+++ b/services/spd/trusty/generic-arm64-smcall.c
@@ -16,11 +16,18 @@
#ifdef GICD_BASE
#define PLAT_ARM_GICD_BASE GICD_BASE
#define PLAT_ARM_GICC_BASE GICC_BASE
+#ifdef GICR_BASE
+#define PLAT_ARM_GICR_BASE GICR_BASE
+#endif
#else
#error PLAT_ARM_GICD_BASE or GICD_BASE must be defined
#endif
#endif
+#ifndef PLAT_ARM_GICR_BASE
+#define PLAT_ARM_GICR_BASE SMC_UNK
+#endif
+
int trusty_disable_serial_debug;
struct dputc_state {
@@ -57,12 +64,15 @@ static void trusty_dputc(char ch, int secure)
static uint64_t trusty_get_reg_base(uint32_t reg)
{
switch (reg) {
- case 0:
+ case SMC_GET_GIC_BASE_GICD:
return PLAT_ARM_GICD_BASE;
- case 1:
+ case SMC_GET_GIC_BASE_GICC:
return PLAT_ARM_GICC_BASE;
+ case SMC_GET_GIC_BASE_GICR:
+ return PLAT_ARM_GICR_BASE;
+
default:
NOTICE("%s(0x%x) unknown reg\n", __func__, reg);
return SMC_UNK;