mirror of
https://github.com/ARM-software/arm-trusted-firmware.git
synced 2025-04-19 02:54:24 +00:00

Previously, Juno used to depend on the SSC_GPRETN register to inform about the reset syndrome. This method was removed when SCP migrated to the SDS framework. But even the SDS framework doesn't report the reset syndrome correctly and hence Juno failed to enter Firmware update mode if BL2 authentication failed. In addition to that, the error code populated in V2M_SYS_NVFLAGS register does not seem to be retained any more on Juno across resets. This could be down to the motherboard firmware not doing the necessary to preserve the value. Hence this patch modifies the Juno platform to use the same mechanism to trigger firmware update as FVP which is to corrupt the FIP TOC on authentication failure. The implementation in `fvp_err.c` is made common for ARM platforms and is moved to the new `arm_err.c` file in plat/arm/common folder. The BL1 and BL2 mmap table entries for Juno are modified to allow write to the Flash memory address. Change-Id: Ica7d49a3e8a46a90efd4cf340f19fda3b549e945 Signed-off-by: Soby Mathew <soby.mathew@arm.com>
84 lines
1.5 KiB
C
84 lines
1.5 KiB
C
/*
|
|
* Copyright (c) 2015-2017, ARM Limited and Contributors. All rights reserved.
|
|
*
|
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
*/
|
|
#include <arm_def.h>
|
|
#include <plat_arm.h>
|
|
|
|
/*
|
|
* Table of memory regions for different BL stages to map using the MMU.
|
|
* This doesn't include Trusted SRAM as arm_setup_page_tables() already
|
|
* takes care of mapping it.
|
|
*/
|
|
#ifdef IMAGE_BL1
|
|
const mmap_region_t plat_arm_mmap[] = {
|
|
ARM_MAP_SHARED_RAM,
|
|
V2M_MAP_FLASH0_RW,
|
|
V2M_MAP_IOFPGA,
|
|
CSS_MAP_DEVICE,
|
|
SOC_CSS_MAP_DEVICE,
|
|
#if TRUSTED_BOARD_BOOT
|
|
/* Map DRAM to authenticate NS_BL2U image. */
|
|
ARM_MAP_NS_DRAM1,
|
|
#endif
|
|
{0}
|
|
};
|
|
#endif
|
|
#ifdef IMAGE_BL2
|
|
const mmap_region_t plat_arm_mmap[] = {
|
|
ARM_MAP_SHARED_RAM,
|
|
V2M_MAP_FLASH0_RW,
|
|
#ifdef PLAT_ARM_MEM_PROT_ADDR
|
|
ARM_V2M_MAP_MEM_PROTECT,
|
|
#endif
|
|
V2M_MAP_IOFPGA,
|
|
CSS_MAP_DEVICE,
|
|
SOC_CSS_MAP_DEVICE,
|
|
ARM_MAP_NS_DRAM1,
|
|
#ifdef AARCH64
|
|
ARM_MAP_DRAM2,
|
|
#endif
|
|
#ifdef SPD_tspd
|
|
ARM_MAP_TSP_SEC_MEM,
|
|
#endif
|
|
#ifdef SPD_opteed
|
|
ARM_MAP_OPTEE_CORE_MEM,
|
|
ARM_OPTEE_PAGEABLE_LOAD_MEM,
|
|
#endif
|
|
{0}
|
|
};
|
|
#endif
|
|
#ifdef IMAGE_BL2U
|
|
const mmap_region_t plat_arm_mmap[] = {
|
|
ARM_MAP_SHARED_RAM,
|
|
CSS_MAP_DEVICE,
|
|
SOC_CSS_MAP_DEVICE,
|
|
{0}
|
|
};
|
|
#endif
|
|
#ifdef IMAGE_BL31
|
|
const mmap_region_t plat_arm_mmap[] = {
|
|
ARM_MAP_SHARED_RAM,
|
|
V2M_MAP_IOFPGA,
|
|
CSS_MAP_DEVICE,
|
|
#ifdef PLAT_ARM_MEM_PROT_ADDR
|
|
ARM_V2M_MAP_MEM_PROTECT,
|
|
#endif
|
|
SOC_CSS_MAP_DEVICE,
|
|
{0}
|
|
};
|
|
#endif
|
|
#ifdef IMAGE_BL32
|
|
const mmap_region_t plat_arm_mmap[] = {
|
|
#ifdef AARCH32
|
|
ARM_MAP_SHARED_RAM,
|
|
#endif
|
|
V2M_MAP_IOFPGA,
|
|
CSS_MAP_DEVICE,
|
|
SOC_CSS_MAP_DEVICE,
|
|
{0}
|
|
};
|
|
#endif
|
|
|
|
ARM_CASSERT_MMAP
|