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
614be75d
Commit
614be75d
authored
Mar 31, 2020
by
Mark Dykes
Committed by
TrustedFirmware Code Review
Mar 31, 2020
Browse files
Merge "Add get_current_el_maybe_constant()" into integration
parents
426d5f9c
fd092be2
Changes
1
Hide whitespace changes
Inline
Side-by-side
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.
*/
...
...
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