board_arm_def.h 1.54 KB
Newer Older
1
/*
2
 * Copyright (c) 2015-2018, ARM Limited and Contributors. All rights reserved.
3
 *
dp-arm's avatar
dp-arm committed
4
 * SPDX-License-Identifier: BSD-3-Clause
5
6
7
8
9
10
11
12
13
14
15
16
 */
#ifndef __BOARD_ARM_DEF_H__
#define __BOARD_ARM_DEF_H__

#include <v2m_def.h>

/*
 * Required platform porting definitions common to all ARM
 * development platforms
 */

/* Size of cacheable stacks */
17
#if defined(IMAGE_BL1)
18
19
20
21
22
#if TRUSTED_BOARD_BOOT
# define PLATFORM_STACK_SIZE 0x1000
#else
# define PLATFORM_STACK_SIZE 0x440
#endif
23
#elif defined(IMAGE_BL2)
24
25
26
27
28
# if TRUSTED_BOARD_BOOT
#  define PLATFORM_STACK_SIZE 0x1000
# else
#  define PLATFORM_STACK_SIZE 0x400
# endif
29
#elif defined(IMAGE_BL2U)
Daniel Boulby's avatar
Daniel Boulby committed
30
# define PLATFORM_STACK_SIZE 0x400
31
#elif defined(IMAGE_BL31)
32
33
34
#if ENABLE_SPM
# define PLATFORM_STACK_SIZE 0x500
#elif PLAT_XLAT_TABLES_DYNAMIC
35
36
# define PLATFORM_STACK_SIZE 0x800
#else
37
# define PLATFORM_STACK_SIZE 0x400
38
#endif
39
#elif defined(IMAGE_BL32)
40
41
42
43
44
45
46
47
# define PLATFORM_STACK_SIZE 0x440
#endif

#define MAX_IO_DEVICES			3
#define MAX_IO_HANDLES			4

#define PLAT_ARM_TRUSTED_SRAM_SIZE	0x00040000	/* 256 KB */

48
/* Reserve the last block of flash for PSCI MEM PROTECT flag */
49
#define PLAT_ARM_FIP_BASE		V2M_FLASH0_BASE
50
#define PLAT_ARM_FIP_MAX_SIZE		(V2M_FLASH0_SIZE - V2M_FLASH_BLOCK_SIZE)
51

52
#define PLAT_ARM_NVM_BASE		V2M_FLASH0_BASE
53
#define PLAT_ARM_NVM_SIZE		(V2M_FLASH0_SIZE - V2M_FLASH_BLOCK_SIZE)
54

55
56
57
58
59
60
/*
 * Map mem_protect flash region with read and write permissions
 */
#define ARM_V2M_MAP_MEM_PROTECT		MAP_REGION_FLAT(PLAT_ARM_MEM_PROT_ADDR,	\
						V2M_FLASH_BLOCK_SIZE,		\
						MT_DEVICE | MT_RW | MT_SECURE)
61
62

#endif /* __BOARD_ARM_DEF_H__ */