blob: 53078f8e9777e5e75819484a89142ae99f0a57a0 [file] [log] [blame]
Antonio Nino Diazae6779e2017-11-06 14:49:04 +00001/*
Antonio Nino Diaz1f470022018-03-27 09:39:47 +01002 * Copyright (c) 2015-2018, ARM Limited and Contributors. All rights reserved.
Antonio Nino Diazae6779e2017-11-06 14:49:04 +00003 *
4 * SPDX-License-Identifier: BSD-3-Clause
5 */
6
Antonio Nino Diaz5eb88372018-11-08 10:20:19 +00007#ifndef RPI3_PRIVATE_H
8#define RPI3_PRIVATE_H
Antonio Nino Diazae6779e2017-11-06 14:49:04 +00009
Antonio Nino Diaz4b32e622018-08-16 16:52:57 +010010#include <stdint.h>
Antonio Nino Diazae6779e2017-11-06 14:49:04 +000011
12/*******************************************************************************
13 * Function and variable prototypes
14 ******************************************************************************/
15
16/* Utility functions */
Antonio Nino Diaz1f470022018-03-27 09:39:47 +010017void rpi3_console_init(void);
Antonio Nino Diazae6779e2017-11-06 14:49:04 +000018void 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/* Optional functions required in the Raspberry Pi 3 port */
27unsigned int plat_rpi3_calc_core_pos(u_register_t mpidr);
28
29/* BL2 utility functions */
30uint32_t rpi3_get_spsr_for_bl32_entry(void);
31uint32_t rpi3_get_spsr_for_bl33_entry(void);
32
33/* IO storage utility functions */
34void plat_rpi3_io_setup(void);
35
Antonio Nino Diaz12f73ff2018-07-13 09:27:16 +010036/* Hardware RNG functions */
37void rpi3_rng_read(void *buf, size_t len);
38
Antonio Nino Diazecf34712018-07-12 13:38:53 +010039/* VideoCore firmware commands */
40int rpi3_vc_hardware_get_board_revision(uint32_t *revision);
41
Antonio Nino Diaz5eb88372018-11-08 10:20:19 +000042#endif /* RPI3_PRIVATE_H */