xref: /rk3399_ARM-atf/bl1/bl1_private.h (revision c02fcc4a3849af4e534c8cf726562694f69b9a04)
15b827a8fSDan Handley /*
2*c02fcc4aSSandrine Bailleux  * Copyright (c) 2013-2016, ARM Limited and Contributors. All rights reserved.
35b827a8fSDan Handley  *
45b827a8fSDan Handley  * Redistribution and use in source and binary forms, with or without
55b827a8fSDan Handley  * modification, are permitted provided that the following conditions are met:
65b827a8fSDan Handley  *
75b827a8fSDan Handley  * Redistributions of source code must retain the above copyright notice, this
85b827a8fSDan Handley  * list of conditions and the following disclaimer.
95b827a8fSDan Handley  *
105b827a8fSDan Handley  * Redistributions in binary form must reproduce the above copyright notice,
115b827a8fSDan Handley  * this list of conditions and the following disclaimer in the documentation
125b827a8fSDan Handley  * and/or other materials provided with the distribution.
135b827a8fSDan Handley  *
145b827a8fSDan Handley  * Neither the name of ARM nor the names of its contributors may be used
155b827a8fSDan Handley  * to endorse or promote products derived from this software without specific
165b827a8fSDan Handley  * prior written permission.
175b827a8fSDan Handley  *
185b827a8fSDan Handley  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
195b827a8fSDan Handley  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
205b827a8fSDan Handley  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
215b827a8fSDan Handley  * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
225b827a8fSDan Handley  * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
235b827a8fSDan Handley  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
245b827a8fSDan Handley  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
255b827a8fSDan Handley  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
265b827a8fSDan Handley  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
275b827a8fSDan Handley  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
285b827a8fSDan Handley  * POSSIBILITY OF SUCH DAMAGE.
295b827a8fSDan Handley  */
305b827a8fSDan Handley 
315b827a8fSDan Handley #ifndef __BL1_PRIVATE_H__
325b827a8fSDan Handley #define __BL1_PRIVATE_H__
335b827a8fSDan Handley 
3448bfb88eSYatharth Kochar #include <types.h>
3548bfb88eSYatharth Kochar 
368f55dfb4SSandrine Bailleux /*******************************************************************************
378f55dfb4SSandrine Bailleux  * Declarations of linker defined symbols which will tell us where BL1 lives
38*c02fcc4aSSandrine Bailleux  * in Trusted ROM and RAM
398f55dfb4SSandrine Bailleux  ******************************************************************************/
40*c02fcc4aSSandrine Bailleux extern uint64_t __BL1_ROM_END__;
41*c02fcc4aSSandrine Bailleux #define BL1_ROM_END (uint64_t)(&__BL1_ROM_END__)
42*c02fcc4aSSandrine Bailleux 
438f55dfb4SSandrine Bailleux extern uint64_t __BL1_RAM_START__;
448f55dfb4SSandrine Bailleux extern uint64_t __BL1_RAM_END__;
458f55dfb4SSandrine Bailleux #define BL1_RAM_BASE (uint64_t)(&__BL1_RAM_START__)
468f55dfb4SSandrine Bailleux #define BL1_RAM_LIMIT (uint64_t)(&__BL1_RAM_END__)
478f55dfb4SSandrine Bailleux 
485b827a8fSDan Handley /******************************************
495b827a8fSDan Handley  * Function prototypes
505b827a8fSDan Handley  *****************************************/
51c6bc0710SDan Handley void bl1_arch_setup(void);
52c6bc0710SDan Handley void bl1_arch_next_el_setup(void);
535b827a8fSDan Handley 
547baff11fSYatharth Kochar void bl1_prepare_next_image(unsigned int image_id);
5548bfb88eSYatharth Kochar 
5648bfb88eSYatharth Kochar register_t bl1_fwu_smc_handler(unsigned int smc_fid,
5748bfb88eSYatharth Kochar 		register_t x1,
5848bfb88eSYatharth Kochar 		register_t x2,
5948bfb88eSYatharth Kochar 		register_t x3,
6048bfb88eSYatharth Kochar 		register_t x4,
6148bfb88eSYatharth Kochar 		void *cookie,
6248bfb88eSYatharth Kochar 		void *handle,
6348bfb88eSYatharth Kochar 		unsigned int flags);
645b827a8fSDan Handley #endif /* __BL1_PRIVATE_H__ */
65