1 /* SPDX-License-Identifier: BSD-2-Clause */
2 /*
3  * Copyright (c) 2016, Sequitur Labs Inc. All rights reserved.
4  * All rights reserved.
5  *
6  * Redistribution and use in source and binary forms, with or without
7  * modification, are permitted provided that the following conditions are met:
8  *
9  * 1. Redistributions of source code must retain the above copyright notice,
10  * this list of conditions and the following disclaimer.
11  *
12  * 2. Redistributions in binary form must reproduce the above copyright notice,
13  * this list of conditions and the following disclaimer in the documentation
14  * and/or other materials provided with the distribution.
15  *
16  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
17  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19  * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
20  * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
21  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
22  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
23  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
24  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
25  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
26  * POSSIBILITY OF SUCH DAMAGE.
27  */
28 
29 #ifndef PLATFORM_CONFIG_H
30 #define PLATFORM_CONFIG_H
31 
32 #include <mm/generic_ram_layout.h>
33 
34 /* Make stacks aligned to data cache line length */
35 #define STACK_ALIGNMENT		64
36 
37 #ifdef ARM64
38 #ifdef CFG_WITH_PAGER
39 #error "Pager not supported for ARM64"
40 #endif
41 #endif /* ARM64 */
42 
43 /* 16550 UART */
44 #define CONSOLE_UART_BASE	0x3f215040 /* UART0 */
45 #define CONSOLE_BAUDRATE	115200
46 #define CONSOLE_UART_CLK_IN_HZ	19200000
47 
48 /*
49  * RPi memory map
50  *
51  * No secure memory on RPi...
52  *
53  *
54  *    Available to Linux <above>
55  *  0x0a00_0000
56  *    TA RAM: 16 MiB                          |
57  *  0x0842_0000                               | TZDRAM
58  *    TEE RAM: 4 MiB (TEE_RAM_VA_SIZE)	      |
59  *  0x0840_0000 [ARM Trusted Firmware       ] -
60  *  0x0840_0000 [TZDRAM_BASE, BL32_LOAD_ADDR] -
61  *    Shared memory: 4 MiB                    |
62  *  0x0800_0000                               | DRAM0
63  *    Available to Linux                      |
64  *  0x0000_0000 [DRAM0_BASE]                  -
65  *
66  */
67 
68 #define DRAM0_BASE		0x00000000
69 #define DRAM0_SIZE		0x40000000
70 
71 #endif /* PLATFORM_CONFIG_H */
72