blob: 2dcb327ff1ac87ce998a9474d2b15c03f414d5a8 [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);
Dan Handleyea451572014-05-15 14:53:30 +010078int fvp_config_setup(void);
Dan Handleyed6ff952014-05-14 17:44:19 +010079
Dan Handleybe234f92014-08-04 16:11:15 +010080void fvp_cci_init(void);
81void fvp_cci_enable(void);
Dan Handleyed6ff952014-05-14 17:44:19 +010082
Dan Handleyfb42b122014-06-20 09:43:15 +010083void fvp_gic_init(void);
Dan Handleyed6ff952014-05-14 17:44:19 +010084
85/* Declarations for fvp_topology.c */
Dan Handleyea451572014-05-15 14:53:30 +010086int fvp_setup_topology(void);
Dan Handleyed6ff952014-05-14 17:44:19 +010087
Dan Handleyea451572014-05-15 14:53:30 +010088/* Declarations for fvp_io_storage.c */
89void fvp_io_setup(void);
Dan Handleyed6ff952014-05-14 17:44:19 +010090
Dan Handleyea451572014-05-15 14:53:30 +010091/* Declarations for fvp_security.c */
92void fvp_security_setup(void);
Dan Handleyed6ff952014-05-14 17:44:19 +010093
Vikram Kanigiricf79bf52014-06-02 14:59:00 +010094/* Gets the SPR for BL32 entry */
95uint32_t fvp_get_spsr_for_bl32_entry(void);
Dan Handleyed6ff952014-05-14 17:44:19 +010096
Vikram Kanigiricf79bf52014-06-02 14:59:00 +010097/* Gets the SPSR for BL33 entry */
98uint32_t fvp_get_spsr_for_bl33_entry(void);
Dan Handleyed6ff952014-05-14 17:44:19 +010099
100
101#endif /* __FVP_PRIVATE_H__ */