2 * Copyright (C) 2018 Marvell International Ltd.
4 * SPDX-License-Identifier: BSD-3-Clause
5 * https://spdx.org/licenses
8 #include <platform_def.h>
11 #include <bl1/bl1_private.h>
12 #include <common/bl_common.h>
13 #include <common/debug.h>
14 #include <drivers/arm/sp805.h>
15 #include <drivers/console.h>
16 #include <plat/common/platform.h>
18 #include <plat_marvell.h>
20 /* Weak definitions may be overridden in specific Marvell standard platform */
21 #pragma weak bl1_early_platform_setup
22 #pragma weak bl1_plat_arch_setup
23 #pragma weak bl1_platform_setup
24 #pragma weak bl1_plat_sec_mem_layout
26 /* Data structure which holds the extents of the RAM for BL1*/
27 static meminfo_t bl1_ram_layout
;
29 meminfo_t
*bl1_plat_sec_mem_layout(void)
31 return &bl1_ram_layout
;
35 * BL1 specific platform actions shared between Marvell standard platforms.
37 void marvell_bl1_early_platform_setup(void)
39 /* Initialize the console to provide early debug support */
40 marvell_console_boot_init();
42 /* Allow BL1 to see the whole Trusted RAM */
43 bl1_ram_layout
.total_base
= MARVELL_BL_RAM_BASE
;
44 bl1_ram_layout
.total_size
= MARVELL_BL_RAM_SIZE
;
47 void bl1_early_platform_setup(void)
49 marvell_bl1_early_platform_setup();
53 * Perform the very early platform specific architecture setup shared between
54 * MARVELL standard platforms. This only does basic initialization. Later
55 * architectural setup (bl1_arch_setup()) does not do anything platform
58 void marvell_bl1_plat_arch_setup(void)
60 marvell_setup_page_tables(bl1_ram_layout
.total_base
,
61 bl1_ram_layout
.total_size
,
67 , BL_COHERENT_RAM_BASE
,
74 void bl1_plat_arch_setup(void)
76 marvell_bl1_plat_arch_setup();
80 * Perform the platform specific architecture setup shared between
81 * MARVELL standard platforms.
83 void marvell_bl1_platform_setup(void)
85 /* Initialise the IO layer and register platform IO devices */
86 plat_marvell_io_setup();
89 void bl1_platform_setup(void)
91 marvell_bl1_platform_setup();
94 void bl1_plat_prepare_exit(entry_point_info_t
*ep_info
)
96 #ifdef EL3_PAYLOAD_BASE
98 * Program the EL3 payload's entry point address into the CPUs mailbox
99 * in order to release secondary CPUs from their holding pen and make
102 marvell_program_trusted_mailbox(ep_info
->pc
);