blob: 643cf1336447dea932d5ee9629de558b8f15b016 [file] [log] [blame]
Usama Arifbec5afd2020-04-17 16:13:39 +01001/*
Tamas Banc5d525d2023-05-08 13:46:26 +02002 * Copyright (c) 2020-2024, Arm Limited. All rights reserved.
Usama Arifbec5afd2020-04-17 16:13:39 +01003 *
4 * SPDX-License-Identifier: BSD-3-Clause
5 */
6
7#ifndef PLATFORM_DEF_H
8#define PLATFORM_DEF_H
9
10#include <lib/utils_def.h>
11#include <lib/xlat_tables/xlat_tables_defs.h>
12#include <plat/arm/board/common/board_css_def.h>
13#include <plat/arm/board/common/v2m_def.h>
14#include <plat/arm/common/arm_def.h>
15#include <plat/arm/common/arm_spm_def.h>
16#include <plat/arm/css/common/css_def.h>
17#include <plat/arm/soc/common/soc_css_def.h>
18#include <plat/common/common_def.h>
19
Usama Arifbec5afd2020-04-17 16:13:39 +010020#define PLAT_ARM_TRUSTED_SRAM_SIZE 0x00080000 /* 512 KB */
21
22/*
Arunachalam Ganapathy81da5582020-09-22 12:47:33 +010023 * The top 16MB of ARM_DRAM1 is configured as secure access only using the TZC,
24 * its base is ARM_AP_TZC_DRAM1_BASE.
25 *
Arunachalam Ganapathyac9e1202022-04-11 17:38:17 +010026 * Reserve 96 MB below ARM_AP_TZC_DRAM1_BASE for:
Arunachalam Ganapathy81da5582020-09-22 12:47:33 +010027 * - BL32_BASE when SPD_spmd is enabled
Arunachalam Ganapathyac9e1202022-04-11 17:38:17 +010028 * - Region to load secure partitions
29 *
30 *
31 * 0xF900_0000 ------------------ TC_TZC_DRAM1_BASE
32 * | |
33 * | SPMC |
34 * | SP |
35 * | (96MB) |
36 * 0xFF00_0000 ------------------ ARM_AP_TZC_DRAM1_BASE
37 * | AP |
38 * | EL3 Monitor |
39 * | SCP |
40 * | (16MB) |
41 * 0xFFFF_FFFF ------------------
42 *
43 *
Arunachalam Ganapathy81da5582020-09-22 12:47:33 +010044 */
Usama Ariff1513622021-04-09 17:07:41 +010045#define TC_TZC_DRAM1_BASE (ARM_AP_TZC_DRAM1_BASE - \
46 TC_TZC_DRAM1_SIZE)
Arunachalam Ganapathyac9e1202022-04-11 17:38:17 +010047#define TC_TZC_DRAM1_SIZE 96 * SZ_1M /* 96 MB */
Usama Ariff1513622021-04-09 17:07:41 +010048#define TC_TZC_DRAM1_END (TC_TZC_DRAM1_BASE + \
49 TC_TZC_DRAM1_SIZE - 1)
Arunachalam Ganapathy81da5582020-09-22 12:47:33 +010050
Usama Ariff1513622021-04-09 17:07:41 +010051#define TC_NS_DRAM1_BASE ARM_DRAM1_BASE
52#define TC_NS_DRAM1_SIZE (ARM_DRAM1_SIZE - \
Arunachalam Ganapathy81da5582020-09-22 12:47:33 +010053 ARM_TZC_DRAM1_SIZE - \
Usama Ariff1513622021-04-09 17:07:41 +010054 TC_TZC_DRAM1_SIZE)
55#define TC_NS_DRAM1_END (TC_NS_DRAM1_BASE + \
56 TC_NS_DRAM1_SIZE - 1)
Arunachalam Ganapathy81da5582020-09-22 12:47:33 +010057
58/*
Usama Ariff1513622021-04-09 17:07:41 +010059 * Mappings for TC DRAM1 (non-secure) and TC TZC DRAM1 (secure)
Arunachalam Ganapathy81da5582020-09-22 12:47:33 +010060 */
Usama Ariff1513622021-04-09 17:07:41 +010061#define TC_MAP_NS_DRAM1 MAP_REGION_FLAT( \
62 TC_NS_DRAM1_BASE, \
63 TC_NS_DRAM1_SIZE, \
Arunachalam Ganapathy81da5582020-09-22 12:47:33 +010064 MT_MEMORY | MT_RW | MT_NS)
65
66
Usama Ariff1513622021-04-09 17:07:41 +010067#define TC_MAP_TZC_DRAM1 MAP_REGION_FLAT( \
68 TC_TZC_DRAM1_BASE, \
69 TC_TZC_DRAM1_SIZE, \
Arunachalam Ganapathy81da5582020-09-22 12:47:33 +010070 MT_MEMORY | MT_RW | MT_SECURE)
Usama Arifa49bd492021-08-17 17:57:10 +010071
72#define PLAT_HW_CONFIG_DTB_BASE ULL(0x83000000)
73#define PLAT_HW_CONFIG_DTB_SIZE ULL(0x8000)
74
75#define PLAT_DTB_DRAM_NS MAP_REGION_FLAT( \
76 PLAT_HW_CONFIG_DTB_BASE, \
77 PLAT_HW_CONFIG_DTB_SIZE, \
78 MT_MEMORY | MT_RO | MT_NS)
Arunachalam Ganapathyade4a202020-09-22 12:50:45 +010079/*
Usama Ariff1513622021-04-09 17:07:41 +010080 * Max size of SPMC is 2MB for tc. With SPMD enabled this value corresponds to
Arunachalam Ganapathyade4a202020-09-22 12:50:45 +010081 * max size of BL32 image.
82 */
83#if defined(SPD_spmd)
Arunachalam Ganapathyac9e1202022-04-11 17:38:17 +010084#define TC_EL2SPMC_LOAD_ADDR (TC_TZC_DRAM1_BASE + 0x04000000)
85
86#define PLAT_ARM_SPMC_BASE TC_EL2SPMC_LOAD_ADDR
Arunachalam Ganapathyade4a202020-09-22 12:50:45 +010087#define PLAT_ARM_SPMC_SIZE UL(0x200000) /* 2 MB */
88#endif
Arunachalam Ganapathy81da5582020-09-22 12:47:33 +010089
90/*
Usama Arifbec5afd2020-04-17 16:13:39 +010091 * PLAT_ARM_MMAP_ENTRIES depends on the number of entries in the
92 * plat_arm_mmap array defined for each BL stage.
93 */
94#if defined(IMAGE_BL31)
95# if SPM_MM
96# define PLAT_ARM_MMAP_ENTRIES 9
97# define MAX_XLAT_TABLES 7
98# define PLAT_SP_IMAGE_MMAP_REGIONS 7
99# define PLAT_SP_IMAGE_MAX_XLAT_TABLES 10
100# else
101# define PLAT_ARM_MMAP_ENTRIES 8
102# define MAX_XLAT_TABLES 8
103# endif
104#elif defined(IMAGE_BL32)
105# define PLAT_ARM_MMAP_ENTRIES 8
106# define MAX_XLAT_TABLES 5
107#elif !USE_ROMLIB
108# define PLAT_ARM_MMAP_ENTRIES 11
109# define MAX_XLAT_TABLES 7
110#else
111# define PLAT_ARM_MMAP_ENTRIES 12
112# define MAX_XLAT_TABLES 6
113#endif
114
115/*
116 * PLAT_ARM_MAX_BL1_RW_SIZE is calculated using the current BL1 RW debug size
117 * plus a little space for growth.
118 */
Mate Toth-Pal14ba4af2022-10-21 14:24:49 +0200119#define PLAT_ARM_MAX_BL1_RW_SIZE 0x12000
Usama Arifbec5afd2020-04-17 16:13:39 +0100120
121/*
122 * PLAT_ARM_MAX_ROMLIB_RW_SIZE is define to use a full page
123 */
124
125#if USE_ROMLIB
126#define PLAT_ARM_MAX_ROMLIB_RW_SIZE 0x1000
127#define PLAT_ARM_MAX_ROMLIB_RO_SIZE 0xe000
128#else
129#define PLAT_ARM_MAX_ROMLIB_RW_SIZE 0
130#define PLAT_ARM_MAX_ROMLIB_RO_SIZE 0
131#endif
132
133/*
134 * PLAT_ARM_MAX_BL2_SIZE is calculated using the current BL2 debug size plus a
David Vinczeaab55dd2022-05-04 10:11:16 +0200135 * little space for growth. Current size is considering that TRUSTED_BOARD_BOOT
136 * and MEASURED_BOOT is enabled.
Usama Arifbec5afd2020-04-17 16:13:39 +0100137 */
Manish V Badarkhe315fe3c2023-12-21 09:28:27 +0000138# define PLAT_ARM_MAX_BL2_SIZE 0x29000
David Vinczeaab55dd2022-05-04 10:11:16 +0200139
Usama Arifbec5afd2020-04-17 16:13:39 +0100140
141/*
142 * Since BL31 NOBITS overlays BL2 and BL1-RW, PLAT_ARM_MAX_BL31_SIZE is
143 * calculated using the current BL31 PROGBITS debug size plus the sizes of
David Vinczeaab55dd2022-05-04 10:11:16 +0200144 * BL2 and BL1-RW. Current size is considering that TRUSTED_BOARD_BOOT and
145 * MEASURED_BOOT is enabled.
Usama Arifbec5afd2020-04-17 16:13:39 +0100146 */
Mate Toth-Pal14ba4af2022-10-21 14:24:49 +0200147#define PLAT_ARM_MAX_BL31_SIZE 0x60000
Usama Arifbec5afd2020-04-17 16:13:39 +0100148
149/*
150 * Size of cacheable stacks
151 */
152#if defined(IMAGE_BL1)
153# if TRUSTED_BOARD_BOOT
154# define PLATFORM_STACK_SIZE 0x1000
155# else
156# define PLATFORM_STACK_SIZE 0x440
157# endif
158#elif defined(IMAGE_BL2)
159# if TRUSTED_BOARD_BOOT
160# define PLATFORM_STACK_SIZE 0x1000
161# else
162# define PLATFORM_STACK_SIZE 0x400
163# endif
164#elif defined(IMAGE_BL2U)
165# define PLATFORM_STACK_SIZE 0x400
166#elif defined(IMAGE_BL31)
167# if SPM_MM
168# define PLATFORM_STACK_SIZE 0x500
169# else
Mate Toth-Pal14ba4af2022-10-21 14:24:49 +0200170# define PLATFORM_STACK_SIZE 0xa00
Usama Arifbec5afd2020-04-17 16:13:39 +0100171# endif
172#elif defined(IMAGE_BL32)
173# define PLATFORM_STACK_SIZE 0x440
174#endif
175
David Vincze0a5a38b2022-04-11 17:08:20 +0200176/*
177 * In the current implementation the RoT Service request that requires the
178 * biggest message buffer is the RSS_DELEGATED_ATTEST_GET_PLATFORM_TOKEN. The
179 * maximum required buffer size is calculated based on the platform-specific
180 * needs of this request.
181 */
182#define PLAT_RSS_COMMS_PAYLOAD_MAX_SIZE 0x500
Usama Arifbec5afd2020-04-17 16:13:39 +0100183
Usama Ariff1513622021-04-09 17:07:41 +0100184#define TC_DEVICE_BASE 0x21000000
185#define TC_DEVICE_SIZE 0x5f000000
Usama Arifbec5afd2020-04-17 16:13:39 +0100186
Boyan Karatotev95562762023-11-15 11:54:33 +0000187#if defined(TARGET_FLAVOUR_FPGA)
188#undef V2M_FLASH0_BASE
189#undef V2M_FLASH0_SIZE
190#define V2M_FLASH0_BASE UL(0x0C000000)
191#define V2M_FLASH0_SIZE UL(0x02000000)
192#endif
193
Usama Ariff1513622021-04-09 17:07:41 +0100194// TC_MAP_DEVICE covers different peripherals
Usama Arifbec5afd2020-04-17 16:13:39 +0100195// available to the platform
Usama Ariff1513622021-04-09 17:07:41 +0100196#define TC_MAP_DEVICE MAP_REGION_FLAT( \
197 TC_DEVICE_BASE, \
198 TC_DEVICE_SIZE, \
Usama Arifbec5afd2020-04-17 16:13:39 +0100199 MT_DEVICE | MT_RW | MT_SECURE)
200
201
Usama Ariff1513622021-04-09 17:07:41 +0100202#define TC_FLASH0_RO MAP_REGION_FLAT(V2M_FLASH0_BASE,\
Usama Arifbec5afd2020-04-17 16:13:39 +0100203 V2M_FLASH0_SIZE, \
204 MT_DEVICE | MT_RO | MT_SECURE)
205
206#define PLAT_ARM_NSTIMER_FRAME_ID 0
207
Olivier Deprez7e5597c2022-07-20 17:37:23 +0200208#define PLAT_ARM_TRUSTED_ROM_BASE 0x0
Olivier Deprez7e5597c2022-07-20 17:37:23 +0200209
210/* PLAT_ARM_TRUSTED_ROM_SIZE 512KB minus ROM base. */
211#define PLAT_ARM_TRUSTED_ROM_SIZE (0x00080000 - PLAT_ARM_TRUSTED_ROM_BASE)
Usama Arifbec5afd2020-04-17 16:13:39 +0100212
213#define PLAT_ARM_NSRAM_BASE 0x06000000
Boyan Karatotev95562762023-11-15 11:54:33 +0000214#if TARGET_FLAVOUR_FVP
Usama Arifbec5afd2020-04-17 16:13:39 +0100215#define PLAT_ARM_NSRAM_SIZE 0x00080000 /* 512KB */
Boyan Karatotev95562762023-11-15 11:54:33 +0000216#else /* TARGET_FLAVOUR_FPGA */
217#define PLAT_ARM_NSRAM_SIZE 0x00008000 /* 64KB */
218#endif /* TARGET_FLAVOUR_FPGA */
Usama Arifbec5afd2020-04-17 16:13:39 +0100219
Boyan Karatotev6ed3bf62023-07-07 13:33:19 +0000220#if TARGET_PLATFORM <= 2
Usama Arifbec5afd2020-04-17 16:13:39 +0100221#define PLAT_ARM_DRAM2_BASE ULL(0x8080000000)
Boyan Karatotev6ed3bf62023-07-07 13:33:19 +0000222#elif TARGET_PLATFORM == 3
223#define PLAT_ARM_DRAM2_BASE ULL(0x880000000)
224#endif /* TARGET_PLATFORM == 3 */
Usama Arifbec5afd2020-04-17 16:13:39 +0100225#define PLAT_ARM_DRAM2_SIZE ULL(0x180000000)
Usama Arifb4965842021-09-27 18:18:01 +0100226#define PLAT_ARM_DRAM2_END (PLAT_ARM_DRAM2_BASE + PLAT_ARM_DRAM2_SIZE - 1ULL)
Usama Arifbec5afd2020-04-17 16:13:39 +0100227
Madhukar Pappireddye108df22023-03-22 15:40:40 -0500228#define PLAT_ARM_G1S_IRQ_PROPS(grp) CSS_G1S_INT_PROPS(grp)
229#define PLAT_ARM_G0_IRQ_PROPS(grp) ARM_G0_IRQ_PROPS(grp), \
230 INTR_PROP_DESC(SBSA_SECURE_WDOG_INTID, \
231 GIC_HIGHEST_SEC_PRIORITY, grp, \
232 GIC_INTR_CFG_LEVEL)
Usama Arifbec5afd2020-04-17 16:13:39 +0100233
234#define PLAT_ARM_SP_IMAGE_STACK_BASE (PLAT_SP_IMAGE_NS_BUF_BASE + \
235 PLAT_SP_IMAGE_NS_BUF_SIZE)
236
Arunachalam Ganapathyfd29d582022-04-11 14:36:54 +0100237#define PLAT_ARM_SP_MAX_SIZE U(0x2000000)
238
Usama Arifbec5afd2020-04-17 16:13:39 +0100239/*******************************************************************************
240 * Memprotect definitions
241 ******************************************************************************/
242/* PSCI memory protect definitions:
243 * This variable is stored in a non-secure flash because some ARM reference
244 * platforms do not have secure NVRAM. Real systems that provided MEM_PROTECT
245 * support must use a secure NVRAM to store the PSCI MEM_PROTECT definitions.
246 */
247#define PLAT_ARM_MEM_PROT_ADDR (V2M_FLASH0_BASE + \
248 V2M_FLASH0_SIZE - V2M_FLASH_BLOCK_SIZE)
249
Madhukar Pappireddye108df22023-03-22 15:40:40 -0500250/* Secure Watchdog Constants */
251#define SBSA_SECURE_WDOG_CONTROL_BASE UL(0x2A480000)
252#define SBSA_SECURE_WDOG_REFRESH_BASE UL(0x2A490000)
Usama Arifbec5afd2020-04-17 16:13:39 +0100253#define SBSA_SECURE_WDOG_TIMEOUT UL(100)
Madhukar Pappireddye108df22023-03-22 15:40:40 -0500254#define SBSA_SECURE_WDOG_INTID 86
Usama Arifbec5afd2020-04-17 16:13:39 +0100255
256#define PLAT_ARM_SCMI_CHANNEL_COUNT 1
257
Tamas Banc5d525d2023-05-08 13:46:26 +0200258/* Index of SDS region used in the communication with SCP */
259#define SDS_SCP_AP_REGION_ID U(0)
260/* Index of SDS region used in the communication with RSS */
261#define SDS_RSS_AP_REGION_ID U(1)
262/*
263 * Memory region for RSS's shared data storage (SDS)
264 * It is placed right after the SCMI payload area.
265 */
266#define PLAT_ARM_RSS_AP_SDS_MEM_BASE (CSS_SCMI_PAYLOAD_BASE + \
267 CSS_SCMI_PAYLOAD_SIZE_MAX)
268
Usama Arifbec5afd2020-04-17 16:13:39 +0100269#define PLAT_ARM_CLUSTER_COUNT U(1)
Boyan Karatotev192ad5d2023-12-12 15:59:01 +0000270#if TARGET_FLAVOUR_FPGA && TARGET_PLATFORM == 2
271#define PLAT_MAX_CPUS_PER_CLUSTER U(14)
272#else /* TARGET_FLAVOUR_FPGA && TARGET_PLATFORM == 2 */
Avinash Mehtaf68a0842020-10-28 16:43:28 +0000273#define PLAT_MAX_CPUS_PER_CLUSTER U(8)
Boyan Karatotev192ad5d2023-12-12 15:59:01 +0000274#endif /* TARGET_FLAVOUR_FPGA && TARGET_PLATFORM == 2 */
Usama Arifbec5afd2020-04-17 16:13:39 +0100275#define PLAT_MAX_PE_PER_CPU U(1)
276
Boyan Karatotev192ad5d2023-12-12 15:59:01 +0000277#define PLATFORM_CORE_COUNT (PLAT_MAX_CPUS_PER_CLUSTER * PLAT_ARM_CLUSTER_COUNT)
278
David Vinczeddab5452022-04-13 14:00:21 +0200279/* Message Handling Unit (MHU) base addresses */
Boyan Karatotev6ed3bf62023-07-07 13:33:19 +0000280#if TARGET_PLATFORM <= 2
281 #define PLAT_CSS_MHU_BASE UL(0x45400000)
282#elif TARGET_PLATFORM == 3
283 #define PLAT_CSS_MHU_BASE UL(0x46000000)
284#endif /* TARGET_PLATFORM == 3 */
Usama Arifbec5afd2020-04-17 16:13:39 +0100285#define PLAT_MHUV2_BASE PLAT_CSS_MHU_BASE
286
David Vinczeddab5452022-04-13 14:00:21 +0200287/* TC2: AP<->RSS MHUs */
288#define PLAT_RSS_AP_SND_MHU_BASE UL(0x2A840000)
289#define PLAT_RSS_AP_RCV_MHU_BASE UL(0x2A850000)
290
Usama Arifbec5afd2020-04-17 16:13:39 +0100291#define CSS_SYSTEM_PWR_DMN_LVL ARM_PWR_LVL2
292#define PLAT_MAX_PWR_LVL ARM_PWR_LVL1
293
294/*
295 * Physical and virtual address space limits for MMU in AARCH64
296 */
297#define PLAT_PHY_ADDR_SPACE_SIZE (1ULL << 36)
298#define PLAT_VIRT_ADDR_SPACE_SIZE (1ULL << 36)
299
300/* GIC related constants */
301#define PLAT_ARM_GICD_BASE UL(0x30000000)
302#define PLAT_ARM_GICC_BASE UL(0x2C000000)
Usama Ariffdfd2502021-03-30 16:39:19 +0100303#define PLAT_ARM_GICR_BASE UL(0x30080000)
Usama Arifbec5afd2020-04-17 16:13:39 +0100304
305/*
306 * PLAT_CSS_MAX_SCP_BL2_SIZE is calculated using the current
307 * SCP_BL2 size plus a little space for growth.
308 */
Usama Arif82d931e2020-09-07 18:11:22 +0100309#define PLAT_CSS_MAX_SCP_BL2_SIZE 0x20000
Usama Arifbec5afd2020-04-17 16:13:39 +0100310
311/*
312 * PLAT_CSS_MAX_SCP_BL2U_SIZE is calculated using the current
313 * SCP_BL2U size plus a little space for growth.
314 */
Usama Arif82d931e2020-09-07 18:11:22 +0100315#define PLAT_CSS_MAX_SCP_BL2U_SIZE 0x20000
Usama Arifbec5afd2020-04-17 16:13:39 +0100316
Usama Arife445ff82020-08-18 12:30:37 +0100317/* TZC Related Constants */
318#define PLAT_ARM_TZC_BASE UL(0x25000000)
319#define PLAT_ARM_TZC_FILTERS TZC_400_REGION_ATTR_FILTER_BIT(0)
320
321#define TZC400_OFFSET UL(0x1000000)
322#define TZC400_COUNT 4
323
324#define TZC400_BASE(n) (PLAT_ARM_TZC_BASE + \
325 (n * TZC400_OFFSET))
326
327#define TZC_NSAID_DEFAULT U(0)
328
329#define PLAT_ARM_TZC_NS_DEV_ACCESS \
330 (TZC_REGION_ACCESS_RDWR(TZC_NSAID_DEFAULT))
331
Usama Arif9bbebe72020-08-26 14:04:31 +0100332/*
Arunachalam Ganapathyac9e1202022-04-11 17:38:17 +0100333 * The first region below, TC_TZC_DRAM1_BASE (0xf9000000) to
334 * ARM_SCP_TZC_DRAM1_END (0xffffffff) will mark the last 112 MB of DRAM as
Usama Arifb4965842021-09-27 18:18:01 +0100335 * secure. The second and third regions gives non secure access to rest of DRAM.
Usama Arif9bbebe72020-08-26 14:04:31 +0100336 */
Usama Arifb4965842021-09-27 18:18:01 +0100337#define TC_TZC_REGIONS_DEF \
338 {TC_TZC_DRAM1_BASE, ARM_SCP_TZC_DRAM1_END, \
339 TZC_REGION_S_RDWR, PLAT_ARM_TZC_NS_DEV_ACCESS}, \
340 {TC_NS_DRAM1_BASE, TC_NS_DRAM1_END, ARM_TZC_NS_DRAM_S_ACCESS, \
341 PLAT_ARM_TZC_NS_DEV_ACCESS}, \
342 {PLAT_ARM_DRAM2_BASE, PLAT_ARM_DRAM2_END, \
343 ARM_TZC_NS_DRAM_S_ACCESS, PLAT_ARM_TZC_NS_DEV_ACCESS}
Usama Arif9bbebe72020-08-26 14:04:31 +0100344
Arunachalam Ganapathyade4a202020-09-22 12:50:45 +0100345/* virtual address used by dynamic mem_protect for chunk_base */
346#define PLAT_ARM_MEM_PROTEC_VA_FRAME UL(0xc0000000)
347
Tintu Thomasb3ed4472023-02-21 17:51:24 +0000348#if ARM_GPT_SUPPORT
349/*
350 * This overrides the default PLAT_ARM_FIP_OFFSET_IN_GPT in board_css_def.h.
351 * Offset of the FIP in the GPT image. BL1 component uses this option
352 * as it does not load the partition table to get the FIP base
353 * address. At sector 48 for TC to align with ATU page size boundaries (8KiB)
354 * (i.e. after reserved sectors 0-47).
355 * Offset = 48 * 512 = 0x6000
356 */
357#undef PLAT_ARM_FIP_OFFSET_IN_GPT
358#define PLAT_ARM_FIP_OFFSET_IN_GPT 0x6000
359#endif /* ARM_GPT_SUPPORT */
360
annsai017c607f22023-02-20 13:34:57 +0000361/* UART related constants */
362
Boyan Karatotev95562762023-11-15 11:54:33 +0000363#define TC_UART0 0x2a400000
364#define TC_UART1 0x2a410000
annsai017c607f22023-02-20 13:34:57 +0000365
Boyan Karatotev95562762023-11-15 11:54:33 +0000366/*
367 * TODO: if any more undefs are needed, it's better to consider dropping the
368 * board_css_def.h include above
369 */
370#undef PLAT_ARM_BOOT_UART_BASE
annsai017c607f22023-02-20 13:34:57 +0000371#undef PLAT_ARM_RUN_UART_BASE
annsai017c607f22023-02-20 13:34:57 +0000372#undef PLAT_ARM_SP_MIN_RUN_UART_BASE
373#define PLAT_ARM_SP_MIN_RUN_UART_BASE PLAT_ARM_RUN_UART_BASE
374
375#undef PLAT_ARM_CRASH_UART_BASE
Boyan Karatotev95562762023-11-15 11:54:33 +0000376#undef PLAT_ARM_BOOT_UART_CLK_IN_HZ
377#undef PLAT_ARM_RUN_UART_CLK_IN_HZ
378
379#if TARGET_FLAVOUR_FVP
380#define PLAT_ARM_BOOT_UART_BASE TC_UART1
381#define TC_UARTCLK 7372800
382#else /* TARGET_FLAVOUR_FPGA */
383#define PLAT_ARM_BOOT_UART_BASE TC_UART0
384#if TARGET_PLATFORM <= 2
385#define TC_UARTCLK 5000000
386#elif TARGET_PLATFORM >= 3
387#define TC_UARTCLK 3750000
388#endif /* TARGET_PLATFORM >= 3 */
389#undef ARM_CONSOLE_BAUDRATE
390#define ARM_CONSOLE_BAUDRATE 38400
391#endif /* TARGET_FLAVOUR_FPGA */
392
393#define PLAT_ARM_RUN_UART_BASE TC_UART0
394#define PLAT_ARM_SP_MIN_RUN_UART_BASE PLAT_ARM_RUN_UART_BASE
annsai017c607f22023-02-20 13:34:57 +0000395#define PLAT_ARM_CRASH_UART_BASE PLAT_ARM_RUN_UART_BASE
396
Boyan Karatotev95562762023-11-15 11:54:33 +0000397#define PLAT_ARM_BOOT_UART_CLK_IN_HZ TC_UARTCLK
398#define PLAT_ARM_RUN_UART_CLK_IN_HZ TC_UARTCLK
399
Usama Arifbec5afd2020-04-17 16:13:39 +0100400#endif /* PLATFORM_DEF_H */