diff options
Diffstat (limited to 'include/asm-generic/memory_layout.h')
-rw-r--r-- | include/asm-generic/memory_layout.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/include/asm-generic/memory_layout.h b/include/asm-generic/memory_layout.h index 0d7ce3fe02..6af1db8113 100644 --- a/include/asm-generic/memory_layout.h +++ b/include/asm-generic/memory_layout.h @@ -1,3 +1,5 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ + #ifndef __ASM_GENERIC_MEMORY_LAYOUT_H #define __ASM_GENERIC_MEMORY_LAYOUT_H @@ -17,8 +19,21 @@ #define OPTEE_SIZE 0 #endif +#ifdef CONFIG_OPTEE_SHM_SIZE +#define OPTEE_SHM_SIZE CONFIG_OPTEE_SHM_SIZE +#else +#define OPTEE_SHM_SIZE 0 +#endif + #define HEAD_TEXT_BASE MALLOC_BASE #define MALLOC_SIZE CONFIG_MALLOC_SIZE #define STACK_SIZE CONFIG_STACK_SIZE +/* + * This generates a useless load from the specified symbol + * to ensure linker garbage collection doesn't delete it + */ +#define __keep_symbolref(sym) \ + __asm__ __volatile__("": :"r"(&sym) :) + #endif /* __ASM_GENERIC_MEMORY_LAYOUT_H */ |