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>
This commit is contained in:
Arve Hjønnevåg 2019-11-15 14:25:43 -08:00
parent 471e8fa7d1
commit 76776c2c67
2 changed files with 13 additions and 2 deletions

View File

@ -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;

View File

@ -23,5 +23,6 @@
*/
#define SMC_GET_GIC_BASE_GICD 0
#define SMC_GET_GIC_BASE_GICC 1
#define SMC_GET_GIC_BASE_GICR 2
#define SMC_FC_GET_REG_BASE SMC_FASTCALL_NR(SMC_ENTITY_PLATFORM_MONITOR, 0x1)
#define SMC_FC64_GET_REG_BASE SMC_FASTCALL64_NR(SMC_ENTITY_PLATFORM_MONITOR, 0x1)