aboutsummaryrefslogtreecommitdiff
path: root/plat/layerscape/common/include/plat_ls.h
blob: 49526ca8b69785122f3a66a063f0846411425e0c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
/*
 * Copyright (c) 2018, ARM Limited and Contributors. All rights reserved.
 *
 * SPDX-License-Identifier: BSD-3-Clause
 */

#ifndef PLAT_LS_H
#define PLAT_LS_H

#include <cpu_data.h>
#include <stdint.h>

/* BL1 utility functions */
void ls_bl1_platform_setup(void);
void ls_bl1_early_platform_setup(void);

/* BL2 utility functions */
void ls_bl2_early_platform_setup(meminfo_t *mem_layout);
uint32_t ls_get_spsr_for_bl32_entry(void);
uint32_t ls_get_spsr_for_bl33_entry(void);

/* BL3 utility functions */
void ls_bl31_early_platform_setup(void *from_bl2,
				void *plat_params_from_bl2);

/* IO storage utility functions */
void plat_ls_io_setup(void);


void ls_setup_page_tables(uintptr_t total_base,
			size_t total_size,
			uintptr_t code_start,
			uintptr_t code_limit,
			uintptr_t rodata_start,
			uintptr_t rodata_limit
#if USE_COHERENT_MEM
			, uintptr_t coh_start,
			uintptr_t coh_limit
#endif
);

/* PSCI utility functions */
int ls_check_mpidr(u_register_t mpidr);

/* Security utility functions */
int tzc380_setup(void);

/* Timer utility functions */
uint64_t ls_get_timer(uint64_t start);
void ls_delay_timer_init(void);

/* TSP utility functions */
void ls_tsp_early_platform_setup(void);

/* Helper functions */
unsigned int plat_ls_calc_core_pos(u_register_t mpidr);

/* others */
unsigned int plat_ls_get_cluster_core_count(u_register_t mpidr);

#endif /* PLAT_LS_H */