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
993dc0ec
Commit
993dc0ec
authored
Jun 23, 2020
by
Manish Pandey
Committed by
TrustedFirmware Code Review
Jun 23, 2020
Browse files
Merge "FFA Version interface update" into integration
parents
3fbec436
4388f28f
Changes
2
Show whitespace changes
Inline
Side-by-side
include/services/ffa_svc.h
View file @
993dc0ec
...
@@ -35,6 +35,8 @@
...
@@ -35,6 +35,8 @@
#define FFA_VERSION_MINOR U(0)
#define FFA_VERSION_MINOR U(0)
#define FFA_VERSION_MINOR_SHIFT 0
#define FFA_VERSION_MINOR_SHIFT 0
#define FFA_VERSION_MINOR_MASK U(0xFFFF)
#define FFA_VERSION_MINOR_MASK U(0xFFFF)
#define FFA_VERSION_BIT31_MASK U(0x1u << 31)
#define MAKE_FFA_VERSION(major, minor) \
#define MAKE_FFA_VERSION(major, minor) \
((((major) & FFA_VERSION_MAJOR_MASK) << FFA_VERSION_MAJOR_SHIFT) | \
((((major) & FFA_VERSION_MAJOR_MASK) << FFA_VERSION_MAJOR_SHIFT) | \
...
...
services/std_svc/spmd/spmd_main.c
View file @
993dc0ec
...
@@ -350,6 +350,7 @@ uint64_t spmd_smc_handler(uint32_t smc_fid,
...
@@ -350,6 +350,7 @@ uint64_t spmd_smc_handler(uint32_t smc_fid,
spmd_spm_core_context_t
*
ctx
=
spmd_get_context
();
spmd_spm_core_context_t
*
ctx
=
spmd_get_context
();
bool
secure_origin
;
bool
secure_origin
;
int32_t
ret
;
int32_t
ret
;
uint32_t
input_version
;
/* Determine which security state this SMC originated from */
/* Determine which security state this SMC originated from */
secure_origin
=
is_caller_secure
(
flags
);
secure_origin
=
is_caller_secure
(
flags
);
...
@@ -375,15 +376,24 @@ uint64_t spmd_smc_handler(uint32_t smc_fid,
...
@@ -375,15 +376,24 @@ uint64_t spmd_smc_handler(uint32_t smc_fid,
break
;
/* not reached */
break
;
/* not reached */
case
FFA_VERSION
:
case
FFA_VERSION
:
input_version
=
(
uint32_t
)(
0xFFFFFFFF
&
x1
);
/*
/*
* TODO: This is an optimization that the version information
* If caller is secure and SPMC was initialized,
* provided by the SPM Core manifest is returned by the SPM
* return FFA_VERSION of SPMD.
* dispatcher. It might be a better idea to simply forward this
* If caller is non secure and SPMC was initialized,
* call to the SPM Core and wash our hands completely.
* return SPMC's version.
* Sanity check to "input_version".
*/
*/
ret
=
MAKE_FFA_VERSION
(
spmc_attrs
.
major_version
,
if
((
input_version
&
FFA_VERSION_BIT31_MASK
)
||
spmc_attrs
.
minor_version
);
(
ctx
->
state
==
SPMC_STATE_RESET
))
{
SMC_RET8
(
handle
,
FFA_SUCCESS_SMC32
,
FFA_TARGET_INFO_MBZ
,
ret
,
ret
=
FFA_ERROR_NOT_SUPPORTED
;
}
else
if
(
!
secure_origin
)
{
ret
=
MAKE_FFA_VERSION
(
spmc_attrs
.
major_version
,
spmc_attrs
.
minor_version
);
}
else
{
ret
=
MAKE_FFA_VERSION
(
FFA_VERSION_MAJOR
,
FFA_VERSION_MINOR
);
}
SMC_RET8
(
handle
,
ret
,
FFA_TARGET_INFO_MBZ
,
FFA_TARGET_INFO_MBZ
,
FFA_PARAM_MBZ
,
FFA_PARAM_MBZ
,
FFA_PARAM_MBZ
,
FFA_PARAM_MBZ
,
FFA_PARAM_MBZ
,
FFA_PARAM_MBZ
,
FFA_PARAM_MBZ
,
FFA_PARAM_MBZ
);
FFA_PARAM_MBZ
,
FFA_PARAM_MBZ
);
break
;
/* not reached */
break
;
/* not reached */
...
...
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