Merge changes from topic "xlnx_zynqmp_sizefixes" into integration

* changes:
  fix(zynqmp): type cast addresses to fix overflow issue
  fix: integer suffix macro definition
This commit is contained in:
Manish Pandey 2023-06-20 18:45:23 +02:00 committed by TrustedFirmware Code Review
commit 732af872d4
2 changed files with 14 additions and 10 deletions

View file

@ -27,10 +27,14 @@
#else #else
# define U_(_x) (_x##U) # define U_(_x) (_x##U)
# define U(_x) U_(_x) # define U(_x) U_(_x)
# define UL(_x) (_x##UL) # define UL_(_x) (_x##UL)
# define ULL(_x) (_x##ULL) # define UL(_x) UL_(_x)
# define L(_x) (_x##L) # define ULL_(_x) (_x##ULL)
# define LL(_x) (_x##LL) # define ULL(_x) ULL_(_x)
# define L_(_x) (_x##L)
# define L(_x) L_(_x)
# define LL_(_x) (_x##LL)
# define LL(_x) LL_(_x)
#endif #endif

View file

@ -47,10 +47,10 @@
# define BL31_LIMIT U(0x80000) # define BL31_LIMIT U(0x80000)
#endif #endif
#else #else
# define BL31_BASE (ZYNQMP_ATF_MEM_BASE) # define BL31_BASE U(ZYNQMP_ATF_MEM_BASE)
# define BL31_LIMIT (ZYNQMP_ATF_MEM_BASE + ZYNQMP_ATF_MEM_SIZE) # define BL31_LIMIT (UL(ZYNQMP_ATF_MEM_BASE) + U(ZYNQMP_ATF_MEM_SIZE))
# ifdef ZYNQMP_ATF_MEM_PROGBITS_SIZE # ifdef ZYNQMP_ATF_MEM_PROGBITS_SIZE
# define BL31_PROGBITS_LIMIT (ZYNQMP_ATF_MEM_BASE + ZYNQMP_ATF_MEM_PROGBITS_SIZE) # define BL31_PROGBITS_LIMIT (UL(ZYNQMP_ATF_MEM_BASE) + U(ZYNQMP_ATF_MEM_PROGBITS_SIZE))
# endif # endif
#endif #endif
@ -61,8 +61,8 @@
# define BL32_BASE U(0x60000000) # define BL32_BASE U(0x60000000)
# define BL32_LIMIT U(0x80000000) # define BL32_LIMIT U(0x80000000)
#else #else
# define BL32_BASE (ZYNQMP_BL32_MEM_BASE) # define BL32_BASE U(ZYNQMP_BL32_MEM_BASE)
# define BL32_LIMIT (ZYNQMP_BL32_MEM_BASE + ZYNQMP_BL32_MEM_SIZE) # define BL32_LIMIT (UL(ZYNQMP_BL32_MEM_BASE) + U(ZYNQMP_BL32_MEM_SIZE))
#endif #endif
/******************************************************************************* /*******************************************************************************
@ -71,7 +71,7 @@
#ifndef PRELOADED_BL33_BASE #ifndef PRELOADED_BL33_BASE
# define PLAT_ARM_NS_IMAGE_BASE U(0x8000000) # define PLAT_ARM_NS_IMAGE_BASE U(0x8000000)
#else #else
# define PLAT_ARM_NS_IMAGE_BASE PRELOADED_BL33_BASE # define PLAT_ARM_NS_IMAGE_BASE U(PRELOADED_BL33_BASE)
#endif #endif
/******************************************************************************* /*******************************************************************************