Commit 76776c2c authored by Arve Hjønnevåg's avatar Arve Hjønnevåg
Browse files

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: default avatarArve Hjønnevåg <arve@android.com>
parent 471e8fa7
Showing with 13 additions and 2 deletions
+13 -2
......@@ -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;
......
......@@ -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)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment