2 * Copyright (c) 2018, ARM Limited and Contributors. All rights reserved.
4 * SPDX-License-Identifier: BSD-3-Clause
7 #include <common/bl_common.h>
8 #include <common/debug.h>
13 /* Data structure which holds the extents of the trusted SRAM for BL1*/
14 static meminfo_t bl1_tzram_layout
;
16 meminfo_t
*bl1_plat_sec_mem_layout(void)
18 return &bl1_tzram_layout
;
21 /*******************************************************************************
22 * BL1 specific platform actions shared between ARM standard platforms.
23 ******************************************************************************/
24 void ls_bl1_early_platform_setup(void)
26 static console_ls_16550_t console
;
28 #if !LS1043_DISABLE_TRUSTED_WDOG
29 /* TODO: Enable watchdog */
33 /* Initialize the console to provide early debug support */
34 console_ls_16550_register(LS_TF_UART_BASE
, LS_TF_UART_CLOCK
,
35 LS_TF_UART_BAUDRATE
, &console
);
37 /* Allow BL1 to see the whole Trusted RAM */
38 bl1_tzram_layout
.total_base
= LS_SRAM_BASE
;
39 bl1_tzram_layout
.total_size
= LS_SRAM_SIZE
;
42 /******************************************************************************
43 * Perform the very early platform specific architecture setup shared between
44 * ARM standard platforms. This only does basic initialization. Later
45 * architectural setup (bl1_arch_setup()) does not do anything platform
47 *****************************************************************************/
48 void ls_bl1_plat_arch_setup(void)
50 ls_setup_page_tables(bl1_tzram_layout
.total_base
,
51 bl1_tzram_layout
.total_size
,
57 , BL_COHERENT_RAM_BASE
,
61 VERBOSE("After setup the page tables\n");
65 enable_mmu_svc_mon(0);
66 #endif /* __aarch64__ */
67 VERBOSE("After MMU enabled\n");
70 void bl1_plat_arch_setup(void)
72 ls_bl1_plat_arch_setup();
76 * Perform the platform specific architecture setup shared between
77 * ARM standard platforms.
79 void ls_bl1_platform_setup(void)
81 /* Initialise the IO layer and register platform IO devices */
85 void bl1_plat_prepare_exit(entry_point_info_t
*ep_info
)
87 #if !LS1043_DISABLE_TRUSTED_WDOG
88 /*TODO: Disable watchdog before leaving BL1 */