blob: d70fbb466fca59433ac8b17f615a746d6013634c [file] [log] [blame]
Dan Handley9df48042015-03-19 18:58:55 +00001/*
Vikram Kanigirieade34c2016-01-20 15:57:35 +00002 * Copyright (c) 2015-2016, ARM Limited and Contributors. All rights reserved.
Dan Handley9df48042015-03-19 18:58:55 +00003 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are met:
6 *
7 * Redistributions of source code must retain the above copyright notice, this
8 * list of conditions and the following disclaimer.
9 *
10 * Redistributions in binary form must reproduce the above copyright notice,
11 * this list of conditions and the following disclaimer in the documentation
12 * and/or other materials provided with the distribution.
13 *
14 * Neither the name of ARM nor the names of its contributors may be used
15 * to endorse or promote products derived from this software without specific
16 * prior written permission.
17 *
18 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
19 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
22 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
23 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
24 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
25 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
26 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
27 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
28 * POSSIBILITY OF SUCH DAMAGE.
29 */
30#ifndef __BOARD_ARM_DEF_H__
31#define __BOARD_ARM_DEF_H__
32
33#include <v2m_def.h>
34
35
36/*
37 * Required platform porting definitions common to all ARM
38 * development platforms
39 */
40
41/* Size of cacheable stacks */
Soby Mathewc9bac9c2016-01-19 17:52:28 +000042#if IMAGE_BL1
Dan Handley9df48042015-03-19 18:58:55 +000043#if TRUSTED_BOARD_BOOT
44# define PLATFORM_STACK_SIZE 0x1000
45#else
46# define PLATFORM_STACK_SIZE 0x440
47#endif
48#elif IMAGE_BL2
49# if TRUSTED_BOARD_BOOT
50# define PLATFORM_STACK_SIZE 0x1000
51# else
52# define PLATFORM_STACK_SIZE 0x400
53# endif
Yatharth Kochar3a11eda2015-10-14 15:28:11 +010054#elif IMAGE_BL2U
55# define PLATFORM_STACK_SIZE 0x200
Dan Handley9df48042015-03-19 18:58:55 +000056#elif IMAGE_BL31
57# define PLATFORM_STACK_SIZE 0x400
58#elif IMAGE_BL32
59# define PLATFORM_STACK_SIZE 0x440
60#endif
61
62/*
Vikram Kanigirieade34c2016-01-20 15:57:35 +000063 * The constants below are not optimised for memory usage. Platforms that wish
64 * to optimise these constants should set `ARM_BOARD_OPTIMISE_MMAP` to 1 and
65 * provide there own values.
Dan Handley9df48042015-03-19 18:58:55 +000066 */
Vikram Kanigirieade34c2016-01-20 15:57:35 +000067#if !ARM_BOARD_OPTIMISE_MMAP
Dan Handley9df48042015-03-19 18:58:55 +000068/*
Vikram Kanigirieade34c2016-01-20 15:57:35 +000069 * PLAT_ARM_MMAP_ENTRIES depends on the number of entries in the
70 * plat_arm_mmap array defined for each BL stage.
71 *
72 * Provide relatively optimised values for the runtime images (BL31 and BL32).
73 * Optimisation is less important for the other, transient boot images so a
74 * common, maximum value is used across these images.
Dan Handley9df48042015-03-19 18:58:55 +000075 */
Vikram Kanigirieade34c2016-01-20 15:57:35 +000076#if IMAGE_BL31 || IMAGE_BL32
77# define PLAT_ARM_MMAP_ENTRIES 6
Vikram Kanigirieade34c2016-01-20 15:57:35 +000078# define MAX_XLAT_TABLES 4
David Wang0ba499f2016-03-07 11:02:57 +080079#else
80# define PLAT_ARM_MMAP_ENTRIES 10
81# define MAX_XLAT_TABLES 5
Dan Handley9df48042015-03-19 18:58:55 +000082#endif
83
Vikram Kanigirieade34c2016-01-20 15:57:35 +000084#endif /* ARM_BOARD_OPTIMISE_MMAP */
Dan Handley9df48042015-03-19 18:58:55 +000085
86#define MAX_IO_DEVICES 3
87#define MAX_IO_HANDLES 4
88
89#define PLAT_ARM_TRUSTED_SRAM_SIZE 0x00040000 /* 256 KB */
90
91#define PLAT_ARM_FIP_BASE V2M_FLASH0_BASE
92#define PLAT_ARM_FIP_MAX_SIZE V2M_FLASH0_SIZE
93
Yatharth Kocharf11b29a2016-02-01 11:04:46 +000094#define PLAT_ARM_NVM_BASE V2M_FLASH0_BASE
95#define PLAT_ARM_NVM_SIZE V2M_FLASH0_SIZE
96
Dan Handley9df48042015-03-19 18:58:55 +000097
98#endif /* __BOARD_ARM_DEF_H__ */