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
37e8ab53
Unverified
Commit
37e8ab53
authored
6 years ago
by
Antonio Niño Díaz
Committed by
GitHub
6 years ago
Browse files
Options
Download
Plain Diff
Merge pull request #1688 from JoelHutton/jh/variant_1_mitigations
Initial Spectre V1 mitigations (CVE-2017-5753).
parents
3af48da7
9edd8912
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
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
include/lib/utils_def.h
+7
-0
include/lib/utils_def.h
lib/psci/psci_stat.c
+2
-2
lib/psci/psci_stat.c
with
9 additions
and
2 deletions
+9
-2
include/lib/utils_def.h
View file @
37e8ab53
...
...
@@ -162,4 +162,11 @@
#define COMPILER_BARRIER() __asm__ volatile ("" ::: "memory")
/* Compiler builtin of GCC >= 9 and planned in llvm */
#ifdef __HAVE_SPECULATION_SAFE_VALUE
# define SPECULATION_SAFE_VALUE(var) __builtin_speculation_safe_value(var)
#else
# define SPECULATION_SAFE_VALUE(var) var
#endif
#endif
/* UTILS_DEF_H */
This diff is collapsed.
Click to expand it.
lib/psci/psci_stat.c
View file @
37e8ab53
...
...
@@ -206,9 +206,9 @@ static int psci_get_stat(u_register_t target_cpu, unsigned int power_state,
if
(
pwrlvl
>
PSCI_CPU_PWR_LVL
)
{
/* Get the power domain index */
parent_idx
=
psci_cpu_pd_nodes
[
target_idx
].
parent_node
;
parent_idx
=
SPECULATION_SAFE_VALUE
(
psci_cpu_pd_nodes
[
target_idx
].
parent_node
)
;
for
(
lvl
=
PSCI_CPU_PWR_LVL
+
1U
;
lvl
<
pwrlvl
;
lvl
++
)
parent_idx
=
psci_non_cpu_pd_nodes
[
parent_idx
].
parent_node
;
parent_idx
=
SPECULATION_SAFE_VALUE
(
psci_non_cpu_pd_nodes
[
parent_idx
].
parent_node
)
;
/* Get the non cpu power domain stats */
*
psci_stat
=
psci_non_cpu_stat
[
parent_idx
][
stat_idx
];
...
...
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