• Manish V Badarkhe's avatar
    plat/arm: fvp: Protect GICR frames for fused/unused cores · f98630fb
    Manish V Badarkhe authored
    
    
    Currently, BLs are mapping the GIC memory region as read-write
    for all cores on boot-up.
    
    This opens up the security hole where the active core can write
    the GICR frame of fused/inactive core. To avoid this issue, disable
    the GICR frame of all inactive cores as below:
    
    1. After primary CPU boots up, map GICR region of all cores as
       read-only.
    2. After primary CPU boots up, map its GICR region as read-write
       and initialize its redistributor interface.
    3. After secondary CPU boots up, map its GICR region as read-write
       and initialize its redistributor interface.
    4. All unused/fused core's redistributor regions remain read-only and
       write attempt to such protected regions results in an exception.
    
    As mentioned above, this patch offers only the GICR memory-mapped
    region protection considering there is no facility at the GIC IP
    level to avoid writing the redistributor area.
    
    These changes are currently done in BL31 of Arm FVP and guarded under
    the flag 'FVP_GICR_REGION_PROTECTION'.
    
    As of now, this patch is tested manually as below:
    1. Disable the FVP cores (core 1, 2, 3) with core 0 as an active core.
    2. Verify data abort triggered by manually updating the ‘GICR_CTLR’
       register of core 1’s(fused) redistributor from core 0(active).
    
    Change-Id: I86c99c7b41bae137b2011cf2ac17fad0a26e776d
    Signed-off-by: default avatarManish V Badarkhe <Manish.Badarkhe@arm.com>
    f98630fb
platform.mk 11.2 KB