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
5219862c
Commit
5219862c
authored
10 years ago
by
danh-arm
Browse files
Options
Download
Plain Diff
Merge pull request #140 from athoelke/at/psci_smc_handler
PSCI SMC handler improvements
parents
5298f2cb
5003ecab
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
v2.0
v2.0-rc0
v1.6
v1.6-rc1
v1.6-rc0
v1.5
v1.5-rc3
v1.5-rc2
v1.5-rc1
v1.5-rc0
v1.4
v1.4-rc0
v1.3
v1.3_rc2
v1.3_rc1
v1.3-rc0
v1.2
v1.2-rc0
v1.1
v1.1-rc3
v1.1-rc2
v1.1-rc1
v1.1-rc0
v1.1-Juno-0.1
v1.0
v1.0-rc0
v0.4-Juno-0.6-rc1
arm_cca_v0.2
arm_cca_v0.1
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
services/std_svc/psci/psci_main.c
+62
-44
services/std_svc/psci/psci_main.c
with
62 additions
and
44 deletions
+62
-44
services/std_svc/psci/psci_main.c
View file @
5219862c
...
...
@@ -221,50 +221,68 @@ uint64_t psci_smc_handler(uint32_t smc_fid,
void
*
handle
,
uint64_t
flags
)
{
uint64_t
rc
;
switch
(
smc_fid
)
{
case
PSCI_VERSION
:
rc
=
psci_version
();
break
;
case
PSCI_CPU_OFF
:
rc
=
__psci_cpu_off
();
break
;
case
PSCI_CPU_SUSPEND_AARCH64
:
case
PSCI_CPU_SUSPEND_AARCH32
:
rc
=
__psci_cpu_suspend
(
x1
,
x2
,
x3
);
break
;
case
PSCI_CPU_ON_AARCH64
:
case
PSCI_CPU_ON_AARCH32
:
rc
=
psci_cpu_on
(
x1
,
x2
,
x3
);
break
;
case
PSCI_AFFINITY_INFO_AARCH32
:
case
PSCI_AFFINITY_INFO_AARCH64
:
rc
=
psci_affinity_info
(
x1
,
x2
);
break
;
case
PSCI_MIG_AARCH32
:
case
PSCI_MIG_AARCH64
:
rc
=
psci_migrate
(
x1
);
break
;
case
PSCI_MIG_INFO_TYPE
:
rc
=
psci_migrate_info_type
();
break
;
case
PSCI_MIG_INFO_UP_CPU_AARCH32
:
case
PSCI_MIG_INFO_UP_CPU_AARCH64
:
rc
=
psci_migrate_info_up_cpu
();
break
;
default:
rc
=
SMC_UNK
;
WARN
(
"Unimplemented PSCI Call: 0x%x
\n
"
,
smc_fid
);
if
(
is_caller_secure
(
flags
))
SMC_RET1
(
handle
,
SMC_UNK
);
if
(((
smc_fid
>>
FUNCID_CC_SHIFT
)
&
FUNCID_CC_MASK
)
==
SMC_32
)
{
/* 32-bit PSCI function, clear top parameter bits */
x1
=
(
uint32_t
)
x1
;
x2
=
(
uint32_t
)
x2
;
x3
=
(
uint32_t
)
x3
;
switch
(
smc_fid
)
{
case
PSCI_VERSION
:
SMC_RET1
(
handle
,
psci_version
());
case
PSCI_CPU_OFF
:
SMC_RET1
(
handle
,
__psci_cpu_off
());
case
PSCI_CPU_SUSPEND_AARCH32
:
SMC_RET1
(
handle
,
__psci_cpu_suspend
(
x1
,
x2
,
x3
));
case
PSCI_CPU_ON_AARCH32
:
SMC_RET1
(
handle
,
psci_cpu_on
(
x1
,
x2
,
x3
));
case
PSCI_AFFINITY_INFO_AARCH32
:
SMC_RET1
(
handle
,
psci_affinity_info
(
x1
,
x2
));
case
PSCI_MIG_AARCH32
:
SMC_RET1
(
handle
,
psci_migrate
(
x1
));
case
PSCI_MIG_INFO_TYPE
:
SMC_RET1
(
handle
,
psci_migrate_info_type
());
case
PSCI_MIG_INFO_UP_CPU_AARCH32
:
SMC_RET1
(
handle
,
psci_migrate_info_up_cpu
());
default:
break
;
}
}
else
{
/* 64-bit PSCI function */
switch
(
smc_fid
)
{
case
PSCI_CPU_SUSPEND_AARCH64
:
SMC_RET1
(
handle
,
__psci_cpu_suspend
(
x1
,
x2
,
x3
));
case
PSCI_CPU_ON_AARCH64
:
SMC_RET1
(
handle
,
psci_cpu_on
(
x1
,
x2
,
x3
));
case
PSCI_AFFINITY_INFO_AARCH64
:
SMC_RET1
(
handle
,
psci_affinity_info
(
x1
,
x2
));
case
PSCI_MIG_AARCH64
:
SMC_RET1
(
handle
,
psci_migrate
(
x1
));
case
PSCI_MIG_INFO_UP_CPU_AARCH64
:
SMC_RET1
(
handle
,
psci_migrate_info_up_cpu
());
default:
break
;
}
}
SMC_RET1
(
handle
,
rc
);
WARN
(
"Unimplemented PSCI Call: 0x%x
\n
"
,
smc_fid
);
SMC_RET1
(
handle
,
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
Menu
Projects
Groups
Snippets
Help