diff --git a/docs/porting-guide.rst b/docs/porting-guide.rst index dbbd102..f21baf5 100644 --- a/docs/porting-guide.rst +++ b/docs/porting-guide.rst @@ -459,19 +459,19 @@ - **#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 ecb261a..4a5c3e0 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 9e6c7d2..95e986b 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 c6fa10e..1309936 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 fc7ca46..7d67a4a 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 aa5b9e5..ffbc665 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 @@ /* 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 f5f2178..aa89679 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 f4a3fd4..02b7562 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 cb76090..36fd3b5 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 805c152..8e8f009 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 cb06fea..6c64ba5 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 76e694b..5e79df2 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 3eafb43..afda4f8 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 39d3c21..019f4e1 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 07b91e2..a61663c 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 3df2f7d..7139b41 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 5dd8d86..b446235 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