Dan Handley | ed6ff95 | 2014-05-14 17:44:19 +0100 | [diff] [blame] | 1 | /* |
| 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 | |
| 38 | typedef 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 | ******************************************************************************/ |
| 48 | typedef 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 Handley | 7ce42df | 2014-05-15 14:11:36 +0100 | [diff] [blame] | 59 | * Forward declarations |
| 60 | ******************************************************************************/ |
| 61 | struct meminfo; |
| 62 | |
| 63 | /******************************************************************************* |
Dan Handley | ed6ff95 | 2014-05-14 17:44:19 +0100 | [diff] [blame] | 64 | * Function and variable prototypes |
| 65 | ******************************************************************************/ |
Dan Handley | ea45157 | 2014-05-15 14:53:30 +0100 | [diff] [blame] | 66 | void 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); |
| 72 | void 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 Handley | ea45157 | 2014-05-15 14:53:30 +0100 | [diff] [blame] | 78 | int fvp_config_setup(void); |
Dan Handley | ed6ff95 | 2014-05-14 17:44:19 +0100 | [diff] [blame] | 79 | |
Dan Handley | be234f9 | 2014-08-04 16:11:15 +0100 | [diff] [blame] | 80 | void fvp_cci_init(void); |
| 81 | void fvp_cci_enable(void); |
Dan Handley | ed6ff95 | 2014-05-14 17:44:19 +0100 | [diff] [blame] | 82 | |
Dan Handley | fb42b12 | 2014-06-20 09:43:15 +0100 | [diff] [blame] | 83 | void fvp_gic_init(void); |
Dan Handley | ed6ff95 | 2014-05-14 17:44:19 +0100 | [diff] [blame] | 84 | |
| 85 | /* Declarations for fvp_topology.c */ |
Dan Handley | ea45157 | 2014-05-15 14:53:30 +0100 | [diff] [blame] | 86 | int fvp_setup_topology(void); |
Dan Handley | ed6ff95 | 2014-05-14 17:44:19 +0100 | [diff] [blame] | 87 | |
Dan Handley | ea45157 | 2014-05-15 14:53:30 +0100 | [diff] [blame] | 88 | /* Declarations for fvp_io_storage.c */ |
| 89 | void fvp_io_setup(void); |
Dan Handley | ed6ff95 | 2014-05-14 17:44:19 +0100 | [diff] [blame] | 90 | |
Dan Handley | ea45157 | 2014-05-15 14:53:30 +0100 | [diff] [blame] | 91 | /* Declarations for fvp_security.c */ |
| 92 | void fvp_security_setup(void); |
Dan Handley | ed6ff95 | 2014-05-14 17:44:19 +0100 | [diff] [blame] | 93 | |
Vikram Kanigiri | cf79bf5 | 2014-06-02 14:59:00 +0100 | [diff] [blame] | 94 | /* Gets the SPR for BL32 entry */ |
| 95 | uint32_t fvp_get_spsr_for_bl32_entry(void); |
Dan Handley | ed6ff95 | 2014-05-14 17:44:19 +0100 | [diff] [blame] | 96 | |
Vikram Kanigiri | cf79bf5 | 2014-06-02 14:59:00 +0100 | [diff] [blame] | 97 | /* Gets the SPSR for BL33 entry */ |
| 98 | uint32_t fvp_get_spsr_for_bl33_entry(void); |
Dan Handley | ed6ff95 | 2014-05-14 17:44:19 +0100 | [diff] [blame] | 99 | |
| 100 | |
| 101 | #endif /* __FVP_PRIVATE_H__ */ |