6 #define __secure __attribute__ ((section ("._secure.text")))
7 #define __secure_data __attribute__ ((section ("._secure.data")))
11 typedef struct secure_svc_tbl {
13 #ifdef CONFIG_ARMV8_PSCI
20 * Macro to declare a SiP function service in '_secure_svc_tbl_entries' section
22 #define DECLARE_SECURE_SVC(_name, _id, _fn) \
23 static const secure_svc_tbl_t __secure_svc_ ## _name \
24 __attribute__((used, section("._secure_svc_tbl_entries"))) \
31 #ifdef CONFIG_ARMV8_PSCI
32 #define SECURE_SVC_TBL_OFFSET 16
34 #define SECURE_SVC_TBL_OFFSET 8
38 #endif /* __ASSEMBLY__ */
40 #if defined(CONFIG_ARMV7_SECURE_BASE) || defined(CONFIG_ARMV8_SECURE_BASE)
42 * Warning, horror ahead.
44 * The target code lives in our "secure ram", but u-boot doesn't know
45 * that, and has blindly added reloc_off to every relocation
46 * entry. Gahh. Do the opposite conversion. This hack also prevents
47 * GCC from generating code veeners, which u-boot doesn't relocate at
50 #define secure_ram_addr(_fn) ({ \
51 DECLARE_GLOBAL_DATA_PTR; \
53 typeof(_fn) *__tmp = (__fn - gd->reloc_off); \
57 #define secure_ram_addr(_fn) (_fn)