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
b1d810bd
Commit
b1d810bd
authored
Jan 29, 2020
by
Soby Mathew
Committed by
TrustedFirmware Code Review
Jan 29, 2020
Browse files
Merge "qemu: Implement PSCI_CPU_OFF." into integration
parents
458dde3c
33e8c569
Changes
7
Hide whitespace changes
Inline
Side-by-side
lib/psci/psci_common.c
View file @
b1d810bd
...
...
@@ -775,7 +775,7 @@ void psci_warmboot_entrypoint(void)
* suspend.
*/
if
(
psci_get_aff_info_state
()
==
AFF_STATE_OFF
)
{
ERROR
(
"Unexpected affinity info state"
);
ERROR
(
"Unexpected affinity info state
.
\n
"
);
panic
();
}
...
...
plat/qemu/common/aarch32/plat_helpers.S
View file @
b1d810bd
...
...
@@ -72,8 +72,14 @@ func plat_secondary_cold_boot_setup
/
*
Wait
until
we
have
a
go
*/
poll_mailbox
:
ldr
r1
,
[
r2
,
r0
]
cmp
r1
,
#
0
cmp
r1
,
#
PLAT_QEMU_HOLD_STATE_WAIT
beq
1
f
/
*
Clear
the
mailbox
again
ready
for
next
time
.
*/
mov
r1
,
#
PLAT_QEMU_HOLD_STATE_WAIT
str
r1
,
[
r2
,
r0
]
/
*
Jump
to
the
provided
entrypoint
.
*/
mov_imm
r0
,
PLAT_QEMU_TRUSTED_MAILBOX_BASE
ldr
r1
,
[
r0
]
bx
r1
...
...
plat/qemu/common/aarch64/plat_helpers.S
View file @
b1d810bd
...
...
@@ -70,6 +70,12 @@ func plat_secondary_cold_boot_setup
poll_mailbox
:
ldr
x1
,
[
x2
,
x0
]
cbz
x1
,
1
f
/
*
Clear
the
mailbox
again
ready
for
next
time
.
*/
mov
x1
,
#
PLAT_QEMU_HOLD_STATE_WAIT
str
x1
,
[
x2
,
x0
]
/
*
Jump
to
the
provided
entrypoint
.
*/
mov_imm
x0
,
PLAT_QEMU_TRUSTED_MAILBOX_BASE
ldr
x1
,
[
x0
]
br
x1
...
...
plat/qemu/common/qemu_gicv2.c
View file @
b1d810bd
...
...
@@ -37,3 +37,8 @@ void qemu_pwr_gic_on_finish(void)
/* Enable the gic cpu interface */
gicv2_cpuif_enable
();
}
void
qemu_pwr_gic_off
(
void
)
{
gicv2_cpuif_disable
();
}
plat/qemu/common/qemu_gicv3.c
View file @
b1d810bd
...
...
@@ -44,3 +44,9 @@ void qemu_pwr_gic_on_finish(void)
gicv3_rdistif_init
(
plat_my_core_pos
());
gicv3_cpuif_enable
(
plat_my_core_pos
());
}
void
qemu_pwr_gic_off
(
void
)
{
gicv3_cpuif_disable
(
plat_my_core_pos
());
gicv3_rdistif_off
(
plat_my_core_pos
());
}
plat/qemu/common/qemu_pm.c
View file @
b1d810bd
...
...
@@ -152,9 +152,18 @@ static int qemu_pwr_domain_on(u_register_t mpidr)
* Platform handler called when a power domain is about to be turned off. The
* target_state encodes the power state that each level should transition to.
******************************************************************************/
void
qemu_pwr_domain_off
(
const
psci_power_state_t
*
target_state
)
static
void
qemu_pwr_domain_off
(
const
psci_power_state_t
*
target_state
)
{
assert
(
0
);
qemu_pwr_gic_off
();
}
void
__dead2
plat_secondary_cold_boot_setup
(
void
);
static
void
__dead2
qemu_pwr_domain_pwr_down_wfi
(
const
psci_power_state_t
*
target_state
)
{
disable_mmu_el3
();
plat_secondary_cold_boot_setup
();
}
/*******************************************************************************
...
...
@@ -209,6 +218,7 @@ static const plat_psci_ops_t plat_qemu_psci_pm_ops = {
.
cpu_standby
=
qemu_cpu_standby
,
.
pwr_domain_on
=
qemu_pwr_domain_on
,
.
pwr_domain_off
=
qemu_pwr_domain_off
,
.
pwr_domain_pwr_down_wfi
=
qemu_pwr_domain_pwr_down_wfi
,
.
pwr_domain_suspend
=
qemu_pwr_domain_suspend
,
.
pwr_domain_on_finish
=
qemu_pwr_domain_on_finish
,
.
pwr_domain_suspend_finish
=
qemu_pwr_domain_suspend_finish
,
...
...
plat/qemu/common/qemu_private.h
View file @
b1d810bd
...
...
@@ -32,5 +32,6 @@ void qemu_console_init(void);
void
plat_qemu_gic_init
(
void
);
void
qemu_pwr_gic_on_finish
(
void
);
void
qemu_pwr_gic_off
(
void
);
#endif
/* QEMU_PRIVATE_H */
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