xref: /rk3399_ARM-atf/plat/rpi/common/include/rpi_shared.h (revision 97ef53052b1a45ae82de696b8f56ae76afd9ba9e)
1 /*
2  * Copyright (c) 2015-2024, Arm Limited and Contributors. All rights reserved.
3  *
4  * SPDX-License-Identifier: BSD-3-Clause
5  */
6 
7 #ifndef RPI_SHARED_H
8 #define RPI_SHARED_H
9 
10 #include <stdint.h>
11 
12 /*******************************************************************************
13  * Function and variable prototypes
14  ******************************************************************************/
15 
16 /* Utility functions */
17 void rpi3_console_init(void);
18 void rpi3_setup_page_tables(uintptr_t total_base, size_t total_size,
19 			    uintptr_t code_start, uintptr_t code_limit,
20 			    uintptr_t rodata_start, uintptr_t rodata_limit
21 #if USE_COHERENT_MEM
22 			    , uintptr_t coh_start, uintptr_t coh_limit
23 #endif
24 			    );
25 
26 uintptr_t rpi4_get_dtb_address(void);
27 
28 /* Optional functions required in the Raspberry Pi 3 port */
29 unsigned int plat_rpi3_calc_core_pos(u_register_t mpidr);
30 
31 /* BL2 utility functions */
32 uint32_t rpi3_get_spsr_for_bl32_entry(void);
33 uint32_t rpi3_get_spsr_for_bl33_entry(void);
34 
35 /* IO storage utility functions */
36 void plat_rpi3_io_setup(void);
37 
38 /* VideoCore firmware commands */
39 int rpi3_vc_hardware_get_board_revision(uint32_t *revision);
40 
41 int plat_rpi_get_model(void);
42 
43 /*******************************************************************************
44  * Platform implemented functions
45  ******************************************************************************/
46 
47 void plat_rpi_bl31_custom_setup(void);
48 
49 #endif /* RPI3_PRIVATE_H */
50