Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
adam.huang
Arm Trusted Firmware
Commits
bd8e6a99
Unverified
Commit
bd8e6a99
authored
Feb 28, 2018
by
davidcunado-arm
Committed by
GitHub
Feb 28, 2018
Browse files
Merge pull request #1287 from davidcunado-arm/dc/fix_misra
Update ULL() macro and instances of ull to comply with MISRA
parents
c69145fc
5724481f
Changes
17
Hide whitespace changes
Inline
Side-by-side
docs/porting-guide.rst
View file @
bd8e6a99
...
@@ -459,19 +459,19 @@ constants must also be defined:
...
@@ -459,19 +459,19 @@ constants must also be defined:
- **#define : ADDR\_SPACE\_SIZE**
- **#define : ADDR\_SPACE\_SIZE**
Defines the total size of the address space in bytes. For example, for a 32
Defines the total size of the address space in bytes. For example, for a 32
bit address space, this value should be ``(1
ull
<< 32)``. This definition is
bit address space, this value should be ``(1
ULL
<< 32)``. This definition is
now deprecated, platforms should use ``PLAT_PHY_ADDR_SPACE_SIZE`` and
now deprecated, platforms should use ``PLAT_PHY_ADDR_SPACE_SIZE`` and
``PLAT_VIRT_ADDR_SPACE_SIZE`` instead.
``PLAT_VIRT_ADDR_SPACE_SIZE`` instead.
- **#define : PLAT\_VIRT\_ADDR\_SPACE\_SIZE**
- **#define : PLAT\_VIRT\_ADDR\_SPACE\_SIZE**
Defines the total size of the virtual address space in bytes. For example,
Defines the total size of the virtual address space in bytes. For example,
for a 32 bit virtual address space, this value should be ``(1
ull
<< 32)``.
for a 32 bit virtual address space, this value should be ``(1
ULL
<< 32)``.
- **#define : PLAT\_PHY\_ADDR\_SPACE\_SIZE**
- **#define : PLAT\_PHY\_ADDR\_SPACE\_SIZE**
Defines the total size of the physical address space in bytes. For example,
Defines the total size of the physical address space in bytes. For example,
for a 32 bit physical address space, this value should be ``(1
ull
<< 32)``.
for a 32 bit physical address space, this value should be ``(1
ULL
<< 32)``.
If the platform port uses the IO storage framework, the following constants
If the platform port uses the IO storage framework, the following constants
must also be defined:
must also be defined:
...
...
include/lib/utils_def.h
View file @
bd8e6a99
...
@@ -80,8 +80,8 @@
...
@@ -80,8 +80,8 @@
# define U(_x) (_x)
# define U(_x) (_x)
# define ULL(_x) (_x)
# define ULL(_x) (_x)
#else
#else
# define U(_x) (_x##
u
)
# define U(_x) (_x##
U
)
# define ULL(_x) (_x##
ull
)
# define ULL(_x) (_x##
ULL
)
#endif
#endif
/* Register size of the current architecture. */
/* Register size of the current architecture. */
...
...
include/plat/arm/common/arm_def.h
View file @
bd8e6a99
...
@@ -279,11 +279,11 @@
...
@@ -279,11 +279,11 @@
* AArch64 builds
* AArch64 builds
*/
*/
#ifdef AARCH64
#ifdef AARCH64
#define PLAT_PHY_ADDR_SPACE_SIZE (1
ull
<< 36)
#define PLAT_PHY_ADDR_SPACE_SIZE (1
ULL
<< 36)
#define PLAT_VIRT_ADDR_SPACE_SIZE (1
ull
<< 36)
#define PLAT_VIRT_ADDR_SPACE_SIZE (1
ULL
<< 36)
#else
#else
#define PLAT_PHY_ADDR_SPACE_SIZE (1
ull
<< 32)
#define PLAT_PHY_ADDR_SPACE_SIZE (1
ULL
<< 32)
#define PLAT_VIRT_ADDR_SPACE_SIZE (1
ull
<< 32)
#define PLAT_VIRT_ADDR_SPACE_SIZE (1
ULL
<< 32)
#endif
#endif
...
...
lib/xlat_tables/xlat_tables_common.c
View file @
bd8e6a99
...
@@ -31,7 +31,7 @@
...
@@ -31,7 +31,7 @@
#define debug_print(...) ((void)0)
#define debug_print(...) ((void)0)
#endif
#endif
#define UNSET_DESC ~0
ull
#define UNSET_DESC ~0
ULL
static
uint64_t
xlat_tables
[
MAX_XLAT_TABLES
][
XLAT_TABLE_ENTRIES
]
static
uint64_t
xlat_tables
[
MAX_XLAT_TABLES
][
XLAT_TABLE_ENTRIES
]
__aligned
(
XLAT_TABLE_SIZE
)
__section
(
"xlat_table"
);
__aligned
(
XLAT_TABLE_SIZE
)
__section
(
"xlat_table"
);
...
...
lib/xlat_tables_v2/aarch32/xlat_tables_arch.c
View file @
bd8e6a99
...
@@ -22,7 +22,7 @@
...
@@ -22,7 +22,7 @@
unsigned
long
long
xlat_arch_get_max_supported_pa
(
void
)
unsigned
long
long
xlat_arch_get_max_supported_pa
(
void
)
{
{
/* Physical address space size for long descriptor format. */
/* Physical address space size for long descriptor format. */
return
(
1
ull
<<
40
)
-
1
ull
;
return
(
1
ULL
<<
40
)
-
1
ULL
;
}
}
#endif
/* ENABLE_ASSERTIONS*/
#endif
/* ENABLE_ASSERTIONS*/
...
...
lib/xlat_tables_v2/aarch64/xlat_tables_arch.c
View file @
bd8e6a99
...
@@ -62,7 +62,7 @@ unsigned long long xlat_arch_get_max_supported_pa(void)
...
@@ -62,7 +62,7 @@ unsigned long long xlat_arch_get_max_supported_pa(void)
/* All other values are reserved */
/* All other values are reserved */
assert
(
pa_range
<
ARRAY_SIZE
(
pa_range_bits_arr
));
assert
(
pa_range
<
ARRAY_SIZE
(
pa_range_bits_arr
));
return
(
1
ull
<<
pa_range_bits_arr
[
pa_range
])
-
1
ull
;
return
(
1
ULL
<<
pa_range_bits_arr
[
pa_range
])
-
1
ULL
;
}
}
#endif
/* ENABLE_ASSERTIONS*/
#endif
/* ENABLE_ASSERTIONS*/
...
...
plat/arm/board/fvp/drivers/pwrc/fvp_pwrc.h
View file @
bd8e6a99
...
@@ -14,7 +14,7 @@
...
@@ -14,7 +14,7 @@
#define PWKUPR_OFF 0xc
#define PWKUPR_OFF 0xc
#define PSYSR_OFF 0x10
#define PSYSR_OFF 0x10
#define PWKUPR_WEN (1
ull
<< 31)
#define PWKUPR_WEN (1
ULL
<< 31)
#define PSYSR_AFF_L2 (1 << 31)
#define PSYSR_AFF_L2 (1 << 31)
#define PSYSR_AFF_L1 (1 << 30)
#define PSYSR_AFF_L1 (1 << 30)
...
...
plat/hisilicon/hikey/include/platform_def.h
View file @
bd8e6a99
...
@@ -149,7 +149,7 @@
...
@@ -149,7 +149,7 @@
/*
/*
* Platform specific page table and MMU setup constants
* Platform specific page table and MMU setup constants
*/
*/
#define ADDR_SPACE_SIZE (1
ull
<< 32)
#define ADDR_SPACE_SIZE (1
ULL
<< 32)
#if defined(IMAGE_BL1) || defined(IMAGE_BL32)
#if defined(IMAGE_BL1) || defined(IMAGE_BL32)
#define MAX_XLAT_TABLES 3
#define MAX_XLAT_TABLES 3
...
...
plat/hisilicon/hikey960/include/platform_def.h
View file @
bd8e6a99
...
@@ -114,7 +114,7 @@
...
@@ -114,7 +114,7 @@
/*
/*
* Platform specific page table and MMU setup constants
* Platform specific page table and MMU setup constants
*/
*/
#define ADDR_SPACE_SIZE (1
ull
<< 32)
#define ADDR_SPACE_SIZE (1
ULL
<< 32)
#if defined(IMAGE_BL1) || defined(IMAGE_BL31) || defined(IMAGE_BL32)
#if defined(IMAGE_BL1) || defined(IMAGE_BL31) || defined(IMAGE_BL32)
#define MAX_XLAT_TABLES 3
#define MAX_XLAT_TABLES 3
...
...
plat/hisilicon/poplar/include/platform_def.h
View file @
bd8e6a99
...
@@ -122,7 +122,7 @@
...
@@ -122,7 +122,7 @@
#define PLAT_POPLAR_NS_IMAGE_OFFSET 0x37000000
#define PLAT_POPLAR_NS_IMAGE_OFFSET 0x37000000
/* Page table and MMU setup constants */
/* Page table and MMU setup constants */
#define ADDR_SPACE_SIZE (1
ull
<< 32)
#define ADDR_SPACE_SIZE (1
ULL
<< 32)
#define MAX_XLAT_TABLES (4)
#define MAX_XLAT_TABLES (4)
#define MAX_MMAP_REGIONS (16)
#define MAX_MMAP_REGIONS (16)
...
...
plat/mediatek/mt6795/include/platform_def.h
View file @
bd8e6a99
...
@@ -196,7 +196,7 @@
...
@@ -196,7 +196,7 @@
/*******************************************************************************
/*******************************************************************************
* Platform specific page table and MMU setup constants
* Platform specific page table and MMU setup constants
******************************************************************************/
******************************************************************************/
#define ADDR_SPACE_SIZE (1
ull
<< 32)
#define ADDR_SPACE_SIZE (1
ULL
<< 32)
#define MAX_XLAT_TABLES 7
#define MAX_XLAT_TABLES 7
#define MAX_MMAP_REGIONS 16
#define MAX_MMAP_REGIONS 16
...
...
plat/mediatek/mt8173/include/platform_def.h
View file @
bd8e6a99
...
@@ -96,8 +96,8 @@
...
@@ -96,8 +96,8 @@
/*******************************************************************************
/*******************************************************************************
* Platform specific page table and MMU setup constants
* Platform specific page table and MMU setup constants
******************************************************************************/
******************************************************************************/
#define PLAT_PHY_ADDR_SPACE_SIZE (1
ull
<< 32)
#define PLAT_PHY_ADDR_SPACE_SIZE (1
ULL
<< 32)
#define PLAT_VIRT_ADDR_SPACE_SIZE (1
ull
<< 32)
#define PLAT_VIRT_ADDR_SPACE_SIZE (1
ULL
<< 32)
#define MAX_XLAT_TABLES 4
#define MAX_XLAT_TABLES 4
#define MAX_MMAP_REGIONS 16
#define MAX_MMAP_REGIONS 16
...
...
plat/qemu/include/platform_def.h
View file @
bd8e6a99
...
@@ -166,8 +166,8 @@
...
@@ -166,8 +166,8 @@
#define NS_IMAGE_OFFSET 0x60000000
#define NS_IMAGE_OFFSET 0x60000000
#define PLAT_PHY_ADDR_SPACE_SIZE (1
ull
<< 32)
#define PLAT_PHY_ADDR_SPACE_SIZE (1
ULL
<< 32)
#define PLAT_VIRT_ADDR_SPACE_SIZE (1
ull
<< 32)
#define PLAT_VIRT_ADDR_SPACE_SIZE (1
ULL
<< 32)
#define MAX_MMAP_REGIONS 8
#define MAX_MMAP_REGIONS 8
#define MAX_XLAT_TABLES 6
#define MAX_XLAT_TABLES 6
#define MAX_IO_DEVICES 3
#define MAX_IO_DEVICES 3
...
...
plat/rockchip/rk3328/include/platform_def.h
View file @
bd8e6a99
...
@@ -85,7 +85,7 @@
...
@@ -85,7 +85,7 @@
/*******************************************************************************
/*******************************************************************************
* Platform specific page table and MMU setup constants
* Platform specific page table and MMU setup constants
******************************************************************************/
******************************************************************************/
#define ADDR_SPACE_SIZE (1
ull
<< 32)
#define ADDR_SPACE_SIZE (1
ULL
<< 32)
#define MAX_XLAT_TABLES 9
#define MAX_XLAT_TABLES 9
#define MAX_MMAP_REGIONS 33
#define MAX_MMAP_REGIONS 33
...
...
plat/rockchip/rk3368/include/platform_def.h
View file @
bd8e6a99
...
@@ -85,7 +85,7 @@
...
@@ -85,7 +85,7 @@
/*******************************************************************************
/*******************************************************************************
* Platform specific page table and MMU setup constants
* Platform specific page table and MMU setup constants
******************************************************************************/
******************************************************************************/
#define ADDR_SPACE_SIZE (1
ull
<< 32)
#define ADDR_SPACE_SIZE (1
ULL
<< 32)
#define MAX_XLAT_TABLES 8
#define MAX_XLAT_TABLES 8
#define MAX_MMAP_REGIONS 16
#define MAX_MMAP_REGIONS 16
...
...
plat/rockchip/rk3399/include/platform_def.h
View file @
bd8e6a99
...
@@ -68,7 +68,7 @@
...
@@ -68,7 +68,7 @@
/*******************************************************************************
/*******************************************************************************
* Platform specific page table and MMU setup constants
* Platform specific page table and MMU setup constants
******************************************************************************/
******************************************************************************/
#define ADDR_SPACE_SIZE (1
ull
<< 32)
#define ADDR_SPACE_SIZE (1
ULL
<< 32)
#define MAX_XLAT_TABLES 20
#define MAX_XLAT_TABLES 20
#define MAX_MMAP_REGIONS 25
#define MAX_MMAP_REGIONS 25
...
...
plat/xilinx/zynqmp/include/platform_def.h
View file @
bd8e6a99
...
@@ -76,8 +76,8 @@
...
@@ -76,8 +76,8 @@
/*******************************************************************************
/*******************************************************************************
* Platform specific page table and MMU setup constants
* Platform specific page table and MMU setup constants
******************************************************************************/
******************************************************************************/
#define PLAT_PHY_ADDR_SPACE_SIZE (1
ull
<< 32)
#define PLAT_PHY_ADDR_SPACE_SIZE (1
ULL
<< 32)
#define PLAT_VIRT_ADDR_SPACE_SIZE (1
ull
<< 32)
#define PLAT_VIRT_ADDR_SPACE_SIZE (1
ULL
<< 32)
#define MAX_MMAP_REGIONS 7
#define MAX_MMAP_REGIONS 7
#define MAX_XLAT_TABLES 5
#define MAX_XLAT_TABLES 5
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment