blob: 2331bb7eb68306163103b5313be4e93aa3ebc2e5 [file] [log] [blame]
Dan Handleyed6ff952014-05-14 17:44:19 +01001/*
2 * Copyright (c) 2014, ARM Limited and Contributors. All rights reserved.
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are met:
6 *
7 * Redistributions of source code must retain the above copyright notice, this
8 * list of conditions and the following disclaimer.
9 *
10 * Redistributions in binary form must reproduce the above copyright notice,
11 * this list of conditions and the following disclaimer in the documentation
12 * and/or other materials provided with the distribution.
13 *
14 * Neither the name of ARM nor the names of its contributors may be used
15 * to endorse or promote products derived from this software without specific
16 * prior written permission.
17 *
18 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
19 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
22 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
23 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
24 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
25 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
26 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
27 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
28 * POSSIBILITY OF SUCH DAMAGE.
29 */
30
31#ifndef __FVP_PRIVATE_H__
32#define __FVP_PRIVATE_H__
33
34#include <bl_common.h>
35#include <platform_def.h>
36
37
38typedef volatile struct mailbox {
39 unsigned long value
40 __attribute__((__aligned__(CACHE_WRITEBACK_GRANULE)));
41} mailbox_t;
42
43/*******************************************************************************
44 * This structure represents the superset of information that is passed to
45 * BL31 e.g. while passing control to it from BL2 which is bl31_params
46 * and bl31_plat_params and its elements
47 ******************************************************************************/
48typedef struct bl2_to_bl31_params_mem {
49 bl31_params_t bl31_params;
50 image_info_t bl31_image_info;
51 image_info_t bl32_image_info;
52 image_info_t bl33_image_info;
53 entry_point_info_t bl33_ep_info;
54 entry_point_info_t bl32_ep_info;
55 entry_point_info_t bl31_ep_info;
56} bl2_to_bl31_params_mem_t;
57
58/*******************************************************************************
Dan Handley7ce42df2014-05-15 14:11:36 +010059 * Forward declarations
60 ******************************************************************************/
61struct meminfo;
62
63/*******************************************************************************
Dan Handleyed6ff952014-05-14 17:44:19 +010064 * Function and variable prototypes
65 ******************************************************************************/
Dan Handleyea451572014-05-15 14:53:30 +010066void fvp_configure_mmu_el1(unsigned long total_base,
67 unsigned long total_size,
68 unsigned long,
69 unsigned long,
70 unsigned long,
71 unsigned long);
72void fvp_configure_mmu_el3(unsigned long total_base,
73 unsigned long total_size,
74 unsigned long,
75 unsigned long,
76 unsigned long,
77 unsigned long);
78unsigned long fvp_get_cfgvar(unsigned int);
79int fvp_config_setup(void);
Dan Handleyed6ff952014-05-14 17:44:19 +010080
81#if RESET_TO_BL31
Dan Handleyea451572014-05-15 14:53:30 +010082void fvp_get_entry_point_info(unsigned long target_security,
Dan Handleyed6ff952014-05-14 17:44:19 +010083 struct entry_point_info *target_entry_info);
84#endif
85void fvp_cci_setup(void);
86
87/* Declarations for fvp_gic.c */
88void gic_cpuif_deactivate(unsigned int);
89void gic_cpuif_setup(unsigned int);
90void gic_pcpu_distif_setup(unsigned int);
91void gic_setup(void);
92
93/* Declarations for fvp_topology.c */
Dan Handleyea451572014-05-15 14:53:30 +010094int fvp_setup_topology(void);
Dan Handleyed6ff952014-05-14 17:44:19 +010095
Dan Handleyea451572014-05-15 14:53:30 +010096/* Declarations for fvp_io_storage.c */
97void fvp_io_setup(void);
Dan Handleyed6ff952014-05-14 17:44:19 +010098
Dan Handleyea451572014-05-15 14:53:30 +010099/* Declarations for fvp_security.c */
100void fvp_security_setup(void);
Dan Handleyed6ff952014-05-14 17:44:19 +0100101
102/* Sets the entrypoint for BL32 */
103void fvp_set_bl32_ep_info(struct entry_point_info *bl32_ep);
104
105/* Sets the entrypoint for BL33 */
106void fvp_set_bl33_ep_info(struct entry_point_info *bl33_ep);
107
108
109#endif /* __FVP_PRIVATE_H__ */