mirror of
https://github.com/ARM-software/arm-trusted-firmware.git
synced 2025-08-14 16:37:05 +02:00
Normally the CP MSS CPU was started at the end of FW load to IRAM at BL2. However, (especailly in secure boot mode), some bus attributes should be changed from defaults before the MSS CPU tries to access shared resources. This patch starts to use CP MSS SRAM for FW load in both secure and non-secure boot modes. The FW loader inserts a magic number into MSS SRAM as an indicator of successfully loaded FS during the BL2 stage and skips releasing the MSS CPU from the reset state. Then, at BL31 stage, the MSS CPU is released from reset following the call to cp110_init function that handles all the required bus attributes configurations. Change-Id: Idcf81cc350a086835abed365154051dd79f1ce2e Signed-off-by: Konstantin Porotchkin <kostap@marvell.com> Reviewed-on: https://sj1git1.cavium.com/c/IP/SW/boot/atf/+/46890 Tested-by: sa_ip-sw-jenkins <sa_ip-sw-jenkins@marvell.com>
34 lines
866 B
C
34 lines
866 B
C
/*
|
|
* Copyright (C) 2021 Marvell International Ltd.
|
|
*
|
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
* https://spdx.org/licenses
|
|
*/
|
|
|
|
#ifndef MSS_DEFS_H
|
|
#define MSS_DEFS_H
|
|
|
|
#define MSS_DMA_SRCBR(base) (base + 0xC0)
|
|
#define MSS_DMA_DSTBR(base) (base + 0xC4)
|
|
#define MSS_DMA_CTRLR(base) (base + 0xC8)
|
|
#define MSS_M3_RSTCR(base) (base + 0xFC)
|
|
|
|
#define MSS_DMA_CTRLR_SIZE_OFFSET (0)
|
|
#define MSS_DMA_CTRLR_REQ_OFFSET (15)
|
|
#define MSS_DMA_CTRLR_REQ_SET (1)
|
|
#define MSS_DMA_CTRLR_ACK_OFFSET (12)
|
|
#define MSS_DMA_CTRLR_ACK_MASK (0x1)
|
|
#define MSS_DMA_CTRLR_ACK_READY (1)
|
|
#define MSS_M3_RSTCR_RST_OFFSET (0)
|
|
#define MSS_M3_RSTCR_RST_OFF (1)
|
|
|
|
#define MSS_FW_READY_MAGIC 0x46575144 /* FWRD */
|
|
|
|
#define MSS_AP_REGS_OFFSET 0x00580000
|
|
#define MSS_CP_SRAM_OFFSET 0x00220000
|
|
#define MSS_CP_REGS_OFFSET 0x00280000
|
|
|
|
void mss_start_cp_cm3(int cp);
|
|
|
|
#endif /* MSS_DEFS_H */
|