blob: 49526ca8b69785122f3a66a063f0846411425e0c [file] [log] [blame]
Jiafei Pan46367ad2018-03-02 07:23:30 +00001/*
2 * Copyright (c) 2018, ARM Limited and Contributors. All rights reserved.
3 *
4 * SPDX-License-Identifier: BSD-3-Clause
5 */
6
Antonio Nino Diaz5eb88372018-11-08 10:20:19 +00007#ifndef PLAT_LS_H
8#define PLAT_LS_H
Jiafei Pan46367ad2018-03-02 07:23:30 +00009
Jiafei Pan46367ad2018-03-02 07:23:30 +000010#include <cpu_data.h>
Antonio Nino Diaz4b32e622018-08-16 16:52:57 +010011#include <stdint.h>
Jiafei Pan46367ad2018-03-02 07:23:30 +000012
13/* BL1 utility functions */
14void ls_bl1_platform_setup(void);
15void ls_bl1_early_platform_setup(void);
16
17/* BL2 utility functions */
18void ls_bl2_early_platform_setup(meminfo_t *mem_layout);
19uint32_t ls_get_spsr_for_bl32_entry(void);
20uint32_t ls_get_spsr_for_bl33_entry(void);
21
22/* BL3 utility functions */
23void ls_bl31_early_platform_setup(void *from_bl2,
24 void *plat_params_from_bl2);
25
26/* IO storage utility functions */
27void plat_ls_io_setup(void);
28
29
30void ls_setup_page_tables(uintptr_t total_base,
31 size_t total_size,
32 uintptr_t code_start,
33 uintptr_t code_limit,
34 uintptr_t rodata_start,
35 uintptr_t rodata_limit
36#if USE_COHERENT_MEM
37 , uintptr_t coh_start,
38 uintptr_t coh_limit
39#endif
40);
41
42/* PSCI utility functions */
43int ls_check_mpidr(u_register_t mpidr);
44
45/* Security utility functions */
46int tzc380_setup(void);
47
48/* Timer utility functions */
49uint64_t ls_get_timer(uint64_t start);
50void ls_delay_timer_init(void);
51
52/* TSP utility functions */
53void ls_tsp_early_platform_setup(void);
54
55/* Helper functions */
56unsigned int plat_ls_calc_core_pos(u_register_t mpidr);
57
58/* others */
59unsigned int plat_ls_get_cluster_core_count(u_register_t mpidr);
60
Antonio Nino Diaz5eb88372018-11-08 10:20:19 +000061#endif /* PLAT_LS_H */