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