diff options
author | Antonio Niño Díaz <antonio.ninodiaz@arm.com> | 2018-11-16 14:46:37 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-11-16 14:46:37 +0100 |
commit | cabe0a31801e99e7abb84d2114ded6bb56f3c71e (patch) | |
tree | 81804a428b9d302c635f8550704f871cc223a69e /include/lib/utils_def.h | |
parent | 0a650ee451a7da61e63b33a28c44f3830474f9c8 (diff) | |
parent | 8b7a26d0d6e358809ae873d50461780637eaa8e6 (diff) |
Merge pull request #1683 from Yann-lms/stm32mp1_multi_console
Add multi console support for STM32MP1
Diffstat (limited to 'include/lib/utils_def.h')
-rw-r--r-- | include/lib/utils_def.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/lib/utils_def.h b/include/lib/utils_def.h index 1dd57cb3..fa13caa6 100644 --- a/include/lib/utils_def.h +++ b/include/lib/utils_def.h @@ -30,11 +30,19 @@ * position @h. For example * GENMASK_64(39, 21) gives us the 64bit vector 0x000000ffffe00000. */ +#if defined(__LINKER__) || defined(__ASSEMBLY__) +#define GENMASK_32(h, l) \ + (((0xFFFFFFFF) << (l)) & (0xFFFFFFFF >> (32 - 1 - (h)))) + +#define GENMASK_64(h, l) \ + ((~0 << (l)) & (~0 >> (64 - 1 - (h)))) +#else #define GENMASK_32(h, l) \ (((~UINT32_C(0)) << (l)) & (~UINT32_C(0) >> (32 - 1 - (h)))) #define GENMASK_64(h, l) \ (((~UINT64_C(0)) << (l)) & (~UINT64_C(0) >> (64 - 1 - (h)))) +#endif #ifdef AARCH32 #define GENMASK GENMASK_32 |