blob: b9f6989391d8786e2ff89e0bf68420b55deb8eaf [file] [log] [blame]
laurenw-arm7c7b1982020-10-21 13:34:40 -05001/*
2 * Copyright (c) 2021, ARM Limited and Contributors. All rights reserved.
3 *
4 * SPDX-License-Identifier: BSD-3-Clause
5 */
6
7#ifndef FVP_R_DEF_H
8#define FVP_R_DEF_H
9
10#include <lib/utils_def.h>
11
12#ifndef FVP_R_CLUSTER_COUNT
13#error "FVP_R_CLUSTER_COUNT is not set in makefile"
14#endif
15
16#ifndef FVP_R_MAX_CPUS_PER_CLUSTER
17#error "FVP_R_MAX_CPUS_PER_CLUSTER is not set in makefile"
18#endif
19
20#ifndef FVP_R_MAX_PE_PER_CPU
21#error "FVP_R_MAX_PE_PER_CPU is not set in makefile"
22#endif
23
24#define FVP_R_PRIMARY_CPU 0x0
25
26/* Defines for the Interconnect build selection */
27#define FVP_R_CCI 1
28#define FVP_R_CCN 2
29
30/******************************************************************************
31 * Definition of platform soc id
32 *****************************************************************************/
33#define FVP_R_SOC_ID 0
34
35/*******************************************************************************
36 * FVP_R memory map related constants
37 ******************************************************************************/
38
Gary Morrison3d7f6542021-01-27 13:08:47 -060039#define FLASH1_BASE UL(0x8c000000)
laurenw-arm7c7b1982020-10-21 13:34:40 -050040#define FLASH1_SIZE UL(0x04000000)
41
Gary Morrison3d7f6542021-01-27 13:08:47 -060042#define PSRAM_BASE UL(0x94000000)
laurenw-arm7c7b1982020-10-21 13:34:40 -050043#define PSRAM_SIZE UL(0x04000000)
44
Gary Morrison3d7f6542021-01-27 13:08:47 -060045#define VRAM_BASE UL(0x98000000)
laurenw-arm7c7b1982020-10-21 13:34:40 -050046#define VRAM_SIZE UL(0x02000000)
47
48/* Aggregate of all devices in the first GB */
Gary Morrison3d7f6542021-01-27 13:08:47 -060049#define DEVICE0_BASE UL(0xa0000000)
laurenw-arm7c7b1982020-10-21 13:34:40 -050050#define DEVICE0_SIZE UL(0x0c200000)
51
52/*
53 * In case of FVP_R models with CCN, the CCN register space overlaps into
54 * the NSRAM area.
55 */
Gary Morrison3d7f6542021-01-27 13:08:47 -060056#define DEVICE1_BASE UL(0xae000000)
laurenw-arm7c7b1982020-10-21 13:34:40 -050057#define DEVICE1_SIZE UL(0x1A00000)
Gary Morrison3d7f6542021-01-27 13:08:47 -060058
59#define NSRAM_BASE UL(0xae000000)
laurenw-arm7c7b1982020-10-21 13:34:40 -050060#define NSRAM_SIZE UL(0x10000)
61/* Devices in the second GB */
Gary Morrison3d7f6542021-01-27 13:08:47 -060062#define DEVICE2_BASE UL(0xffe00000)
laurenw-arm7c7b1982020-10-21 13:34:40 -050063#define DEVICE2_SIZE UL(0x00200000)
64
Gary Morrison3d7f6542021-01-27 13:08:47 -060065#define PCIE_EXP_BASE UL(0xc0000000)
66#define TZRNG_BASE UL(0x7fe60000)
67
laurenw-arm7c7b1982020-10-21 13:34:40 -050068/* Non-volatile counters */
Gary Morrison3d7f6542021-01-27 13:08:47 -060069#define TRUSTED_NVCTR_BASE UL(0xffe70000)
laurenw-arm7c7b1982020-10-21 13:34:40 -050070#define TFW_NVCTR_BASE (TRUSTED_NVCTR_BASE + UL(0x0000))
71#define TFW_NVCTR_SIZE UL(4)
72#define NTFW_CTR_BASE (TRUSTED_NVCTR_BASE + UL(0x0004))
73#define NTFW_CTR_SIZE UL(4)
74
75/* Keys */
Gary Morrison3d7f6542021-01-27 13:08:47 -060076#define SOC_KEYS_BASE UL(0xffe80000)
laurenw-arm7c7b1982020-10-21 13:34:40 -050077#define TZ_PUB_KEY_HASH_BASE (SOC_KEYS_BASE + UL(0x0000))
78#define TZ_PUB_KEY_HASH_SIZE UL(32)
79#define HU_KEY_BASE (SOC_KEYS_BASE + UL(0x0020))
80#define HU_KEY_SIZE UL(16)
81#define END_KEY_BASE (SOC_KEYS_BASE + UL(0x0044))
82#define END_KEY_SIZE UL(32)
83
84/* Constants to distinguish FVP_R type */
85#define HBI_BASE_FVP_R U(0x020)
86#define REV_BASE_FVP_R_V0 U(0x0)
87#define REV_BASE_FVP_R_REVC U(0x2)
88
89#define HBI_FOUNDATION_FVP_R U(0x010)
90#define REV_FOUNDATION_FVP_R_V2_0 U(0x0)
91#define REV_FOUNDATION_FVP_R_V2_1 U(0x1)
92#define REV_FOUNDATION_FVP_R_v9_1 U(0x2)
93#define REV_FOUNDATION_FVP_R_v9_6 U(0x3)
94
95#define BLD_GIC_VE_MMAP U(0x0)
96#define BLD_GIC_A53A57_MMAP U(0x1)
97
98#define ARCH_MODEL U(0x1)
99
100/* FVP_R Power controller base address*/
101#define PWRC_BASE UL(0x1c100000)
102
103/* FVP_R SP804 timer frequency is 35 MHz*/
104#define SP804_TIMER_CLKMULT 1
105#define SP804_TIMER_CLKDIV 35
106
107/* SP810 controller. FVP_R specific flags */
108#define FVP_R_SP810_CTRL_TIM0_OV BIT_32(16)
109#define FVP_R_SP810_CTRL_TIM1_OV BIT_32(18)
110#define FVP_R_SP810_CTRL_TIM2_OV BIT_32(20)
111#define FVP_R_SP810_CTRL_TIM3_OV BIT_32(22)
112
113#endif /* FVP_R_DEF_H */