5 #include <asm/global_data.h>
7 #define __secure __section("._secure.text")
8 #define __secure_data __section("._secure.data")
12 typedef struct secure_svc_tbl {
14 #ifdef CONFIG_ARMV8_PSCI
21 * Macro to declare a SiP function service in '_secure_svc_tbl_entries' section
23 #define DECLARE_SECURE_SVC(_name, _id, _fn) \
24 static const secure_svc_tbl_t __secure_svc_ ## _name \
25 __used __section("._secure_svc_tbl_entries") \
32 #ifdef CONFIG_ARMV8_PSCI
33 #define SECURE_SVC_TBL_OFFSET 16
35 #define SECURE_SVC_TBL_OFFSET 8
39 #endif /* __ASSEMBLY__ */
41 #if defined(CONFIG_ARMV7_SECURE_BASE) || defined(CONFIG_ARMV8_SECURE_BASE)
43 * Warning, horror ahead.
45 * The target code lives in our "secure ram", but u-boot doesn't know
46 * that, and has blindly added reloc_off to every relocation
47 * entry. Gahh. Do the opposite conversion. This hack also prevents
48 * GCC from generating code veeners, which u-boot doesn't relocate at
51 #define secure_ram_addr(_fn) ({ \
52 DECLARE_GLOBAL_DATA_PTR; \
54 typeof(_fn) *__tmp = (__fn - gd->reloc_off); \
58 #define secure_ram_addr(_fn) (_fn)