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); |
| 78 | unsigned long fvp_get_cfgvar(unsigned int); |
| 79 | int fvp_config_setup(void); |
Dan Handley | ed6ff95 | 2014-05-14 17:44:19 +0100 | [diff] [blame] | 80 | |
| 81 | #if RESET_TO_BL31 |
Dan Handley | ea45157 | 2014-05-15 14:53:30 +0100 | [diff] [blame] | 82 | void fvp_get_entry_point_info(unsigned long target_security, |
Dan Handley | ed6ff95 | 2014-05-14 17:44:19 +0100 | [diff] [blame] | 83 | struct entry_point_info *target_entry_info); |
| 84 | #endif |
| 85 | void fvp_cci_setup(void); |
| 86 | |
| 87 | /* Declarations for fvp_gic.c */ |
| 88 | void gic_cpuif_deactivate(unsigned int); |
| 89 | void gic_cpuif_setup(unsigned int); |
| 90 | void gic_pcpu_distif_setup(unsigned int); |
| 91 | void gic_setup(void); |
| 92 | |
| 93 | /* Declarations for fvp_topology.c */ |
Dan Handley | ea45157 | 2014-05-15 14:53:30 +0100 | [diff] [blame] | 94 | int fvp_setup_topology(void); |
Dan Handley | ed6ff95 | 2014-05-14 17:44:19 +0100 | [diff] [blame] | 95 | |
Dan Handley | ea45157 | 2014-05-15 14:53:30 +0100 | [diff] [blame] | 96 | /* Declarations for fvp_io_storage.c */ |
| 97 | void fvp_io_setup(void); |
Dan Handley | ed6ff95 | 2014-05-14 17:44:19 +0100 | [diff] [blame] | 98 | |
Dan Handley | ea45157 | 2014-05-15 14:53:30 +0100 | [diff] [blame] | 99 | /* Declarations for fvp_security.c */ |
| 100 | void fvp_security_setup(void); |
Dan Handley | ed6ff95 | 2014-05-14 17:44:19 +0100 | [diff] [blame] | 101 | |
| 102 | /* Sets the entrypoint for BL32 */ |
| 103 | void fvp_set_bl32_ep_info(struct entry_point_info *bl32_ep); |
| 104 | |
| 105 | /* Sets the entrypoint for BL33 */ |
| 106 | void fvp_set_bl33_ep_info(struct entry_point_info *bl33_ep); |
| 107 | |
| 108 | |
| 109 | #endif /* __FVP_PRIVATE_H__ */ |