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
a6151e7c
Commit
a6151e7c
authored
Jul 28, 2020
by
Madhukar Pappireddy
Committed by
TrustedFirmware Code Review
Jul 28, 2020
Browse files
Merge "SMCCC: Introduce function to check SMCCC function availability" into integration
parents
894eb3ee
6f0a2f04
Changes
4
Hide whitespace changes
Inline
Side-by-side
docs/getting_started/porting-guide.rst
View file @
a6151e7c
...
...
@@ -1130,6 +1130,7 @@ This function returns soc version which mainly consist of below fields
soc_version[30:24] = JEP-106 continuation code for the SiP
soc_version[23:16] = JEP-106 identification code with parity bit for the SiP
soc_version[15:0] = Implementation defined SoC ID
Function : plat_get_soc_revision()
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
...
...
@@ -1145,6 +1146,18 @@ This function returns soc revision in below format
soc_revision[0:30] = SOC revision of specific SOC
Function : plat_is_smccc_feature_available()
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
::
Argument : u_register_t
Return : int32_t
This function returns SMC_ARCH_CALL_SUCCESS if the platform supports
the SMCCC function specified in the argument; otherwise returns
SMC_ARCH_CALL_NOT_SUPPORTED.
Modifications specific to a Boot Loader stage
---------------------------------------------
...
...
include/plat/common/platform.h
View file @
a6151e7c
...
...
@@ -341,4 +341,9 @@ int32_t plat_get_soc_version(void);
*/
int32_t
plat_get_soc_revision
(
void
);
/*
* Optional function to check for SMCCC function availability for platform
*/
int32_t
plat_is_smccc_feature_available
(
u_register_t
fid
);
#endif
/* PLATFORM_H */
plat/common/plat_bl_common.c
View file @
a6151e7c
...
...
@@ -11,6 +11,7 @@
#include <common/debug.h>
#include <lib/xlat_tables/xlat_tables_compat.h>
#include <plat/common/platform.h>
#include <services/arm_arch_svc.h>
#include <smccc_helpers.h>
#include <tools_share/firmware_encrypted.h>
...
...
@@ -25,6 +26,7 @@
#pragma weak bl2_plat_handle_post_image_load
#pragma weak plat_try_next_boot_source
#pragma weak plat_get_enc_key_info
#pragma weak plat_is_smccc_feature_available
#pragma weak plat_get_soc_version
#pragma weak plat_get_soc_revision
...
...
@@ -38,6 +40,11 @@ int32_t plat_get_soc_revision(void)
return
SMC_ARCH_CALL_NOT_SUPPORTED
;
}
int32_t
plat_is_smccc_feature_available
(
u_register_t
fid
__unused
)
{
return
SMC_ARCH_CALL_NOT_SUPPORTED
;
}
void
bl2_el3_plat_prepare_exit
(
void
)
{
}
...
...
services/arm_arch_svc/arm_arch_svc_setup.c
View file @
a6151e7c
...
...
@@ -24,8 +24,9 @@ static int32_t smccc_arch_features(u_register_t arg1)
switch
(
arg1
)
{
case
SMCCC_VERSION
:
case
SMCCC_ARCH_FEATURES
:
return
SMC_ARCH_CALL_SUCCESS
;
case
SMCCC_ARCH_SOC_ID
:
return
SMC_OK
;
return
plat_is_smccc_feature_available
(
arg1
)
;
#if WORKAROUND_CVE_2017_5715
case
SMCCC_ARCH_WORKAROUND_1
:
if
(
check_wa_cve_2017_5715
()
==
ERRATA_NOT_APPLIES
)
...
...
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