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
02956560
Unverified
Commit
02956560
authored
6 years ago
by
Dimitris Papastamos
Committed by
GitHub
6 years ago
Browse files
Options
Download
Plain Diff
Merge pull request #1339 from dp-arm/dp/smccc
Fixup SMCCC_FEATURES return value for SMCCC_ARCH_WORKAROUND_1
parents
93883a29
59dc4ef4
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
docs/cpu-specific-build-macros.rst
+5
-1
docs/cpu-specific-build-macros.rst
services/arm_arch_svc/arm_arch_svc_setup.c
+4
-7
services/arm_arch_svc/arm_arch_svc_setup.c
with
9 additions
and
8 deletions
+9
-8
docs/cpu-specific-build-macros.rst
View file @
02956560
...
...
@@ -18,7 +18,11 @@ TF-A exports a series of build flags which control which security
vulnerability workarounds should be applied at runtime.
- ``WORKAROUND_CVE_2017_5715``: Enables the security workaround for
`CVE-2017-5715`_. Defaults to 1.
`CVE-2017-5715`_. This flag can be set to 0 by the platform if none
of the PEs in the system need the workaround. Setting this flag to 0 provides
no performance benefit for non-affected platforms, it just helps to comply
with the recommendation in the spec regarding workaround discovery.
Defaults to 1.
CPU Errata Workarounds
----------------------
...
...
This diff is collapsed.
Click to expand it.
services/arm_arch_svc/arm_arch_svc_setup.c
View file @
02956560
...
...
@@ -19,19 +19,16 @@ static int32_t smccc_version(void)
static
int32_t
smccc_arch_features
(
u_register_t
arg
)
{
int
ret
;
switch
(
arg
)
{
case
SMCCC_VERSION
:
case
SMCCC_ARCH_FEATURES
:
return
SMC_OK
;
#if WORKAROUND_CVE_2017_5715
case
SMCCC_ARCH_WORKAROUND_1
:
ret
=
check_workaround_cve_2017_5715
();
if
(
ret
==
ERRATA_APPLIES
)
return
0
;
else
if
(
ret
==
ERRATA_NOT_APPLIES
)
if
(
check_workaround_cve_2017_5715
()
==
ERRATA_NOT_APPLIES
)
return
1
;
return
-
1
;
/* ERRATA_MISSING */
return
0
;
/* ERRATA_APPLIES || ERRATA_MISSING */
#endif
default:
return
SMC_UNK
;
}
...
...
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