2 * Copyright (c) 2016-2018, ARM Limited and Contributors. All rights reserved.
4 * SPDX-License-Identifier: BSD-3-Clause
6 #ifndef MTK_PLAT_COMMON_H
7 #define MTK_PLAT_COMMON_H
11 #include <common/bl_common.h>
12 #include <common/param_header.h>
14 /*******************************************************************************
15 * Function and variable prototypes
16 ******************************************************************************/
17 #define DEVINFO_SIZE 4
18 #define LINUX_KERNEL_32 0
19 #define SMC32_PARAM_MASK (0xFFFFFFFF)
22 unsigned int atf_magic
;
23 unsigned int tee_support
;
24 unsigned int tee_entry
;
25 unsigned int tee_boot_arg_addr
;
26 unsigned int hwuid
[4]; /* HW Unique id for t-base used */
27 unsigned int HRID
[2]; /* HW random id for t-base used */
28 unsigned int atf_log_port
;
29 unsigned int atf_log_baudrate
;
30 unsigned int atf_log_buf_start
;
31 unsigned int atf_log_buf_size
;
32 unsigned int atf_irq_num
;
33 unsigned int devinfo
[DEVINFO_SIZE
];
34 unsigned int atf_aee_debug_buf_start
;
35 unsigned int atf_aee_debug_buf_size
;
46 struct mtk_bl_param_t
{
48 uint64_t bootarg_size
;
49 uint64_t bl33_start_addr
;
50 uint64_t tee_info_addr
;
53 struct mtk_bl31_params
{
55 image_info_t
*bl31_image_info
;
56 entry_point_info_t
*bl32_ep_info
;
57 image_info_t
*bl32_image_info
;
58 entry_point_info_t
*bl33_ep_info
;
59 image_info_t
*bl33_image_info
;
62 /* Declarations for mtk_plat_common.c */
63 uint32_t plat_get_spsr_for_bl32_entry(void);
64 uint32_t plat_get_spsr_for_bl33_entry(void);
65 void clean_top_32b_of_param(uint32_t smc_fid
, u_register_t
*x1
,
69 void bl31_prepare_kernel_entry(uint64_t k32_64
);
70 void enable_ns_access_to_cpuectlr(void);
71 void boot_to_kernel(uint64_t x1
, uint64_t x2
, uint64_t x3
, uint64_t x4
);
72 uint64_t get_kernel_info_pc(void);
73 uint64_t get_kernel_info_r0(void);
74 uint64_t get_kernel_info_r1(void);
75 uint64_t get_kernel_info_r2(void);
77 extern struct atf_arg_t gteearg
;
78 #endif /* MTK_PLAT_COMMON_H */