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
614be75d
Commit
614be75d
authored
5 years ago
by
Mark Dykes
Committed by
TrustedFirmware Code Review
5 years ago
Browse files
Options
Download
Plain Diff
Merge "Add get_current_el_maybe_constant()" into integration
parents
426d5f9c
fd092be2
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
arm_cca_v0.2
arm_cca_v0.1
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
include/arch/aarch64/arch_helpers.h
+17
-0
include/arch/aarch64/arch_helpers.h
with
17 additions
and
0 deletions
+17
-0
include/arch/aarch64/arch_helpers.h
View file @
614be75d
...
...
@@ -531,6 +531,23 @@ static inline unsigned int get_current_el(void)
return
GET_EL
(
read_CurrentEl
());
}
static
inline
unsigned
int
get_current_el_maybe_constant
(
void
)
{
#if defined(IMAGE_AT_EL1)
return
1
;
#elif defined(IMAGE_AT_EL2)
return
2
;
/* no use-case in TF-A */
#elif defined(IMAGE_AT_EL3)
return
3
;
#else
/*
* If we do not know which exception level this is being built for
* (e.g. built for library), fall back to run-time detection.
*/
return
get_current_el
();
#endif
}
/*
* Check if an EL is implemented from AA64PFR0 register fields.
*/
...
...
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