diff --git a/docs/porting-guide.rst b/docs/porting-guide.rst index dbbd102b15ad1209978430f606833b1b5d1af413..f21baf5550638a05bca78786a5154a9c9fc6e040 100644 --- a/docs/porting-guide.rst +++ b/docs/porting-guide.rst @@ -459,19 +459,19 @@ constants must also be defined: - **#define : ADDR\_SPACE\_SIZE** Defines the total size of the address space in bytes. For example, for a 32 - bit address space, this value should be ``(1ull << 32)``. This definition is + bit address space, this value should be ``(1ULL << 32)``. This definition is now deprecated, platforms should use ``PLAT_PHY_ADDR_SPACE_SIZE`` and ``PLAT_VIRT_ADDR_SPACE_SIZE`` instead. - **#define : PLAT\_VIRT\_ADDR\_SPACE\_SIZE** Defines the total size of the virtual address space in bytes. For example, - for a 32 bit virtual address space, this value should be ``(1ull << 32)``. + for a 32 bit virtual address space, this value should be ``(1ULL << 32)``. - **#define : PLAT\_PHY\_ADDR\_SPACE\_SIZE** Defines the total size of the physical address space in bytes. For example, - for a 32 bit physical address space, this value should be ``(1ull << 32)``. + for a 32 bit physical address space, this value should be ``(1ULL << 32)``. If the platform port uses the IO storage framework, the following constants must also be defined: diff --git a/include/lib/utils_def.h b/include/lib/utils_def.h index ecb261a1ddc6c4bdc62f480c0867eccf14e1031d..4a5c3e0bc1327709309ef281e867b6b4796e4887 100644 --- a/include/lib/utils_def.h +++ b/include/lib/utils_def.h @@ -80,8 +80,8 @@ # define U(_x) (_x) # define ULL(_x) (_x) #else -# define U(_x) (_x##u) -# define ULL(_x) (_x##ull) +# define U(_x) (_x##U) +# define ULL(_x) (_x##ULL) #endif /* Register size of the current architecture. */ diff --git a/include/plat/arm/common/arm_def.h b/include/plat/arm/common/arm_def.h index 9e6c7d27a71d4a68c977fabbd75745d4885af8f2..95e986bf2bf38abfa91f8f75973cf35e0d4c6ae2 100644 --- a/include/plat/arm/common/arm_def.h +++ b/include/plat/arm/common/arm_def.h @@ -279,11 +279,11 @@ * AArch64 builds */ #ifdef AARCH64 -#define PLAT_PHY_ADDR_SPACE_SIZE (1ull << 36) -#define PLAT_VIRT_ADDR_SPACE_SIZE (1ull << 36) +#define PLAT_PHY_ADDR_SPACE_SIZE (1ULL << 36) +#define PLAT_VIRT_ADDR_SPACE_SIZE (1ULL << 36) #else -#define PLAT_PHY_ADDR_SPACE_SIZE (1ull << 32) -#define PLAT_VIRT_ADDR_SPACE_SIZE (1ull << 32) +#define PLAT_PHY_ADDR_SPACE_SIZE (1ULL << 32) +#define PLAT_VIRT_ADDR_SPACE_SIZE (1ULL << 32) #endif diff --git a/lib/xlat_tables/xlat_tables_common.c b/lib/xlat_tables/xlat_tables_common.c index c6fa10ee43b520ce8fce4546ba415df93c44255e..1309936282b8ec824c1b813fb82381bf089efc25 100644 --- a/lib/xlat_tables/xlat_tables_common.c +++ b/lib/xlat_tables/xlat_tables_common.c @@ -31,7 +31,7 @@ #define debug_print(...) ((void)0) #endif -#define UNSET_DESC ~0ull +#define UNSET_DESC ~0ULL static uint64_t xlat_tables[MAX_XLAT_TABLES][XLAT_TABLE_ENTRIES] __aligned(XLAT_TABLE_SIZE) __section("xlat_table"); diff --git a/lib/xlat_tables_v2/aarch32/xlat_tables_arch.c b/lib/xlat_tables_v2/aarch32/xlat_tables_arch.c index fc7ca46af2be0b47952f5ad7d13ce45001b18257..7d67a4ad432bac7c64e07b49d20d13135ab942b3 100644 --- a/lib/xlat_tables_v2/aarch32/xlat_tables_arch.c +++ b/lib/xlat_tables_v2/aarch32/xlat_tables_arch.c @@ -22,7 +22,7 @@ unsigned long long xlat_arch_get_max_supported_pa(void) { /* Physical address space size for long descriptor format. */ - return (1ull << 40) - 1ull; + return (1ULL << 40) - 1ULL; } #endif /* ENABLE_ASSERTIONS*/ diff --git a/lib/xlat_tables_v2/aarch64/xlat_tables_arch.c b/lib/xlat_tables_v2/aarch64/xlat_tables_arch.c index aa5b9e5461bea1aa08cdb881c8fc6913ec9f3a8b..ffbc665fdde0fd492d5fdb425bf4838c0b0fddc2 100644 --- a/lib/xlat_tables_v2/aarch64/xlat_tables_arch.c +++ b/lib/xlat_tables_v2/aarch64/xlat_tables_arch.c @@ -62,7 +62,7 @@ unsigned long long xlat_arch_get_max_supported_pa(void) /* All other values are reserved */ assert(pa_range < ARRAY_SIZE(pa_range_bits_arr)); - return (1ull << pa_range_bits_arr[pa_range]) - 1ull; + return (1ULL << pa_range_bits_arr[pa_range]) - 1ULL; } #endif /* ENABLE_ASSERTIONS*/ diff --git a/plat/arm/board/fvp/drivers/pwrc/fvp_pwrc.h b/plat/arm/board/fvp/drivers/pwrc/fvp_pwrc.h index f5f21788caf3d787bd7619c435acac88886a4e63..aa89679466ab6fee5059ccc5938e4d4945b6db67 100644 --- a/plat/arm/board/fvp/drivers/pwrc/fvp_pwrc.h +++ b/plat/arm/board/fvp/drivers/pwrc/fvp_pwrc.h @@ -14,7 +14,7 @@ #define PWKUPR_OFF 0xc #define PSYSR_OFF 0x10 -#define PWKUPR_WEN (1ull << 31) +#define PWKUPR_WEN (1ULL << 31) #define PSYSR_AFF_L2 (1 << 31) #define PSYSR_AFF_L1 (1 << 30) diff --git a/plat/hisilicon/hikey/include/platform_def.h b/plat/hisilicon/hikey/include/platform_def.h index f4a3fd4e07b0d57f5dd577726e94f637b90e5c96..02b7562927bc9ff73070993f56071cc58a4f5c47 100644 --- a/plat/hisilicon/hikey/include/platform_def.h +++ b/plat/hisilicon/hikey/include/platform_def.h @@ -149,7 +149,7 @@ /* * Platform specific page table and MMU setup constants */ -#define ADDR_SPACE_SIZE (1ull << 32) +#define ADDR_SPACE_SIZE (1ULL << 32) #if defined(IMAGE_BL1) || defined(IMAGE_BL32) #define MAX_XLAT_TABLES 3 diff --git a/plat/hisilicon/hikey960/include/platform_def.h b/plat/hisilicon/hikey960/include/platform_def.h index cb7609076cda342dffe3c56f75b65a06038398cf..36fd3b5317e592f01d3069fce6d3bfaeac7f4d0d 100644 --- a/plat/hisilicon/hikey960/include/platform_def.h +++ b/plat/hisilicon/hikey960/include/platform_def.h @@ -114,7 +114,7 @@ /* * Platform specific page table and MMU setup constants */ -#define ADDR_SPACE_SIZE (1ull << 32) +#define ADDR_SPACE_SIZE (1ULL << 32) #if defined(IMAGE_BL1) || defined(IMAGE_BL31) || defined(IMAGE_BL32) #define MAX_XLAT_TABLES 3 diff --git a/plat/hisilicon/poplar/include/platform_def.h b/plat/hisilicon/poplar/include/platform_def.h index 805c152adabe0be1bc2824aa1d34e4c13dc626af..8e8f009dd6c3393fac7b6c22c498c887c75c514f 100644 --- a/plat/hisilicon/poplar/include/platform_def.h +++ b/plat/hisilicon/poplar/include/platform_def.h @@ -122,7 +122,7 @@ #define PLAT_POPLAR_NS_IMAGE_OFFSET 0x37000000 /* Page table and MMU setup constants */ -#define ADDR_SPACE_SIZE (1ull << 32) +#define ADDR_SPACE_SIZE (1ULL << 32) #define MAX_XLAT_TABLES (4) #define MAX_MMAP_REGIONS (16) diff --git a/plat/mediatek/mt6795/include/platform_def.h b/plat/mediatek/mt6795/include/platform_def.h index cb06fea666d613027868ff50a97d38b01fd5be21..6c64ba5dea3c8d326e38006b71a1a1698da3b163 100644 --- a/plat/mediatek/mt6795/include/platform_def.h +++ b/plat/mediatek/mt6795/include/platform_def.h @@ -196,7 +196,7 @@ /******************************************************************************* * Platform specific page table and MMU setup constants ******************************************************************************/ -#define ADDR_SPACE_SIZE (1ull << 32) +#define ADDR_SPACE_SIZE (1ULL << 32) #define MAX_XLAT_TABLES 7 #define MAX_MMAP_REGIONS 16 diff --git a/plat/mediatek/mt8173/include/platform_def.h b/plat/mediatek/mt8173/include/platform_def.h index 76e694bc51c8b377f7b6d01b85593221b236873c..5e79df2d74961da76049c3336e72b227b76f3c4b 100644 --- a/plat/mediatek/mt8173/include/platform_def.h +++ b/plat/mediatek/mt8173/include/platform_def.h @@ -96,8 +96,8 @@ /******************************************************************************* * Platform specific page table and MMU setup constants ******************************************************************************/ -#define PLAT_PHY_ADDR_SPACE_SIZE (1ull << 32) -#define PLAT_VIRT_ADDR_SPACE_SIZE (1ull << 32) +#define PLAT_PHY_ADDR_SPACE_SIZE (1ULL << 32) +#define PLAT_VIRT_ADDR_SPACE_SIZE (1ULL << 32) #define MAX_XLAT_TABLES 4 #define MAX_MMAP_REGIONS 16 diff --git a/plat/qemu/include/platform_def.h b/plat/qemu/include/platform_def.h index 3eafb43b8e0bc54c1370771ff6b8fad70f5a2c63..afda4f8e6ae5e84e18353f9c00032776b847db33 100644 --- a/plat/qemu/include/platform_def.h +++ b/plat/qemu/include/platform_def.h @@ -166,8 +166,8 @@ #define NS_IMAGE_OFFSET 0x60000000 -#define PLAT_PHY_ADDR_SPACE_SIZE (1ull << 32) -#define PLAT_VIRT_ADDR_SPACE_SIZE (1ull << 32) +#define PLAT_PHY_ADDR_SPACE_SIZE (1ULL << 32) +#define PLAT_VIRT_ADDR_SPACE_SIZE (1ULL << 32) #define MAX_MMAP_REGIONS 8 #define MAX_XLAT_TABLES 6 #define MAX_IO_DEVICES 3 diff --git a/plat/rockchip/rk3328/include/platform_def.h b/plat/rockchip/rk3328/include/platform_def.h index 39d3c21e1c415273e25fa33f69bf2181daaa5726..019f4e1486b2544102b25489e578f30bb9eb5819 100644 --- a/plat/rockchip/rk3328/include/platform_def.h +++ b/plat/rockchip/rk3328/include/platform_def.h @@ -85,7 +85,7 @@ /******************************************************************************* * Platform specific page table and MMU setup constants ******************************************************************************/ -#define ADDR_SPACE_SIZE (1ull << 32) +#define ADDR_SPACE_SIZE (1ULL << 32) #define MAX_XLAT_TABLES 9 #define MAX_MMAP_REGIONS 33 diff --git a/plat/rockchip/rk3368/include/platform_def.h b/plat/rockchip/rk3368/include/platform_def.h index 07b91e2683f3c0564771c47ee61fb3ebb5b793f3..a61663c4dadf69c8a5f8e51fb96d3154efb0e453 100644 --- a/plat/rockchip/rk3368/include/platform_def.h +++ b/plat/rockchip/rk3368/include/platform_def.h @@ -85,7 +85,7 @@ /******************************************************************************* * Platform specific page table and MMU setup constants ******************************************************************************/ -#define ADDR_SPACE_SIZE (1ull << 32) +#define ADDR_SPACE_SIZE (1ULL << 32) #define MAX_XLAT_TABLES 8 #define MAX_MMAP_REGIONS 16 diff --git a/plat/rockchip/rk3399/include/platform_def.h b/plat/rockchip/rk3399/include/platform_def.h index 3df2f7dc075c92d88fc4540d381af097e6f218fb..7139b41e90a920d2bb847246f62b4e46e0a4a59b 100644 --- a/plat/rockchip/rk3399/include/platform_def.h +++ b/plat/rockchip/rk3399/include/platform_def.h @@ -68,7 +68,7 @@ /******************************************************************************* * Platform specific page table and MMU setup constants ******************************************************************************/ -#define ADDR_SPACE_SIZE (1ull << 32) +#define ADDR_SPACE_SIZE (1ULL << 32) #define MAX_XLAT_TABLES 20 #define MAX_MMAP_REGIONS 25 diff --git a/plat/xilinx/zynqmp/include/platform_def.h b/plat/xilinx/zynqmp/include/platform_def.h index 5dd8d86ea4fd68ebd63f1711a8c04b02135a1267..b446235484321609ef433aa76292cdf215ea19e1 100644 --- a/plat/xilinx/zynqmp/include/platform_def.h +++ b/plat/xilinx/zynqmp/include/platform_def.h @@ -76,8 +76,8 @@ /******************************************************************************* * Platform specific page table and MMU setup constants ******************************************************************************/ -#define PLAT_PHY_ADDR_SPACE_SIZE (1ull << 32) -#define PLAT_VIRT_ADDR_SPACE_SIZE (1ull << 32) +#define PLAT_PHY_ADDR_SPACE_SIZE (1ULL << 32) +#define PLAT_VIRT_ADDR_SPACE_SIZE (1ULL << 32) #define MAX_MMAP_REGIONS 7 #define MAX_XLAT_TABLES 5