Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
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
621daddb
Unverified
Commit
621daddb
authored
6 years ago
by
Soby Mathew
Committed by
GitHub
6 years ago
Browse files
Options
Download
Plain Diff
Merge pull request #1669 from sandrine-bailleux-arm/sb/rm-tzc-top-fn
Remove unneeded _tzc_get_max_top_addr() function
parents
de4fc982
b56ec680
master
v2.5
v2.5-rc1
v2.5-rc0
v2.4
v2.4-rc2
v2.4-rc1
v2.4-rc0
v2.3
v2.3-rc2
v2.3-rc1
v2.3-rc0
v2.2
v2.2-rc2
v2.2-rc1
v2.2-rc0
v2.1
v2.1-rc1
v2.1-rc0
arm_cca_v0.2
arm_cca_v0.1
No related merge requests found
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
drivers/arm/tzc/tzc400.c
+2
-2
drivers/arm/tzc/tzc400.c
drivers/arm/tzc/tzc_common_private.h
+0
-35
drivers/arm/tzc/tzc_common_private.h
drivers/arm/tzc/tzc_dmc500.c
+1
-1
drivers/arm/tzc/tzc_dmc500.c
lib/compiler-rt/builtins/int_lib.h
+7
-6
lib/compiler-rt/builtins/int_lib.h
lib/compiler-rt/builtins/lshrdi3.c
+45
-0
lib/compiler-rt/builtins/lshrdi3.c
lib/compiler-rt/compiler-rt.mk
+2
-1
lib/compiler-rt/compiler-rt.mk
with
57 additions
and
45 deletions
+57
-45
drivers/arm/tzc/tzc400.c
View file @
621daddb
...
...
@@ -182,8 +182,8 @@ void tzc400_configure_region(unsigned int filters,
* Do address range check based on TZC configuration. A 64bit address is
* the max and expected case.
*/
assert
((
(
region_top
<=
_tzc_get_max_top_addr
(
tzc400
.
addr_width
))
&&
(
region_base
<
region_top
))
)
;
assert
((
region_top
<=
(
UINT64_MAX
>>
(
64U
-
tzc400
.
addr_width
))
)
&&
(
region_base
<
region_top
));
/* region_base and (region_top + 1) must be 4KB aligned */
assert
(((
region_base
|
(
region_top
+
1U
))
&
(
4096U
-
1U
))
==
0U
);
...
...
This diff is collapsed.
Click to expand it.
drivers/arm/tzc/tzc_common_private.h
View file @
621daddb
...
...
@@ -180,39 +180,4 @@ static inline unsigned int _tzc_read_peripheral_id(uintptr_t base)
return
id
;
}
#if ENABLE_ASSERTIONS
#ifdef AARCH32
static
inline
unsigned
long
long
_tzc_get_max_top_addr
(
unsigned
int
addr_width
)
{
/*
* Assume at least 32 bit wide address and initialize the max.
* This function doesn't use 64-bit integer arithmetic to avoid
* having to implement additional compiler library functions.
*/
unsigned
long
long
addr_mask
=
0xFFFFFFFFU
;
uint32_t
*
addr_ptr
=
(
uint32_t
*
)
&
addr_mask
;
assert
(
addr_width
>=
32U
);
/* This logic works only on little - endian platforms */
assert
((
read_sctlr
()
&
SCTLR_EE_BIT
)
==
0U
);
/*
* If required address width is greater than 32, populate the higher
* 32 bits of the 64 bit field with the max address.
*/
if
(
addr_width
>
32U
)
*
(
addr_ptr
+
1U
)
=
((
1U
<<
(
addr_width
-
32U
))
-
1U
);
return
addr_mask
;
}
#else
static
inline
unsigned
long
long
_tzc_get_max_top_addr
(
unsigned
int
addr_width
)
{
return
UINT64_MAX
>>
(
64U
-
addr_width
);
}
#endif
/* AARCH32 */
#endif
/* ENABLE_ASSERTIONS */
#endif
/* TZC_COMMON_PRIVATE_H */
This diff is collapsed.
Click to expand it.
drivers/arm/tzc/tzc_dmc500.c
View file @
621daddb
...
...
@@ -188,7 +188,7 @@ void tzc_dmc500_configure_region(unsigned int region_no,
* Do address range check based on DMC-TZ configuration. A 43bit address
* is the max and expected case.
*/
assert
(((
region_top
<=
_tzc_get_max_top_addr
(
43
))
&&
assert
(((
region_top
<=
(
UINT64_MAX
>>
(
64U
-
43U
)
))
&&
(
region_base
<
region_top
)));
/* region_base and (region_top + 1) must be 4KB aligned */
...
...
This diff is collapsed.
Click to expand it.
lib/compiler-rt/builtins/int_lib.h
View file @
621daddb
...
...
@@ -27,27 +27,28 @@
#if defined(__ELF__)
#define FNALIAS(alias_name, original_name) \
void alias_name() __attribute__((alias(#original_name)))
void alias_name() __attribute__((__alias__(#original_name)))
#define COMPILER_RT_ALIAS(aliasee) __attribute__((__alias__(#aliasee)))
#else
#define FNALIAS(alias, name) _Pragma("GCC error(\"alias unsupported on this file format\")")
#define COMPILER_RT_ALIAS(aliasee) _Pragma("GCC error(\"alias unsupported on this file format\")")
#endif
/* ABI macro definitions */
#if __ARM_EABI__
# define ARM_EABI_FNALIAS(aeabi_name, name) \
void __aeabi_##aeabi_name() __attribute__((alias("__" #name)));
# ifdef COMPILER_RT_ARMHF_TARGET
# define COMPILER_RT_ABI
# else
# define COMPILER_RT_ABI __attribute__((pcs("aapcs")))
# define COMPILER_RT_ABI __attribute__((
__
pcs
__
("aapcs")))
# endif
#else
# define ARM_EABI_FNALIAS(aeabi_name, name)
# define COMPILER_RT_ABI
#endif
#ifdef _MSC_VER
#define AEABI_RTABI __attribute__((__pcs__("aapcs")))
#if defined(_MSC_VER) && !defined(__clang__)
#define ALWAYS_INLINE __forceinline
#define NOINLINE __declspec(noinline)
#define NORETURN __declspec(noreturn)
...
...
This diff is collapsed.
Click to expand it.
lib/compiler-rt/builtins/lshrdi3.c
0 → 100644
View file @
621daddb
/* ===-- lshrdi3.c - Implement __lshrdi3 -----------------------------------===
*
* The LLVM Compiler Infrastructure
*
* This file is dual licensed under the MIT and the University of Illinois Open
* Source Licenses. See LICENSE.TXT for details.
*
* ===----------------------------------------------------------------------===
*
* This file implements __lshrdi3 for the compiler_rt library.
*
* ===----------------------------------------------------------------------===
*/
#include "int_lib.h"
/* Returns: logical a >> b */
/* Precondition: 0 <= b < bits_in_dword */
COMPILER_RT_ABI
di_int
__lshrdi3
(
di_int
a
,
si_int
b
)
{
const
int
bits_in_word
=
(
int
)(
sizeof
(
si_int
)
*
CHAR_BIT
);
udwords
input
;
udwords
result
;
input
.
all
=
a
;
if
(
b
&
bits_in_word
)
/* bits_in_word <= b < bits_in_dword */
{
result
.
s
.
high
=
0
;
result
.
s
.
low
=
input
.
s
.
high
>>
(
b
-
bits_in_word
);
}
else
/* 0 <= b < bits_in_word */
{
if
(
b
==
0
)
return
a
;
result
.
s
.
high
=
input
.
s
.
high
>>
b
;
result
.
s
.
low
=
(
input
.
s
.
high
<<
(
bits_in_word
-
b
))
|
(
input
.
s
.
low
>>
b
);
}
return
result
.
all
;
}
#if defined(__ARM_EABI__)
AEABI_RTABI
di_int
__aeabi_llsr
(
di_int
a
,
si_int
b
)
COMPILER_RT_ALIAS
(
__lshrdi3
);
#endif
This diff is collapsed.
Click to expand it.
lib/compiler-rt/compiler-rt.mk
View file @
621daddb
...
...
@@ -31,5 +31,6 @@
ifeq
(${ARCH},aarch32)
COMPILER_RT_SRCS
:=
lib/compiler-rt/builtins/arm/aeabi_uldivmod.S
\
lib/compiler-rt/builtins/udivmoddi4.c
\
lib/compiler-rt/builtins/ctzdi2.c
lib/compiler-rt/builtins/ctzdi2.c
\
lib/compiler-rt/builtins/lshrdi3.c
endif
This diff is collapsed.
Click to expand it.
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
Menu
Projects
Groups
Snippets
Help