Skip to content

Commit

Permalink
qemu/armv7-r: add poweroff
Browse files Browse the repository at this point in the history
This adds poweroff function to qemu-armv7r:nsh using
semihosting based approach.

Signed-off-by: Yanfeng Liu <[email protected]>
  • Loading branch information
yf13 authored and anchao committed Feb 8, 2025
1 parent 20098f3 commit ac4b539
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions arch/arm/src/qemu/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ config ARCH_CHIP_QEMU_CORTEXR5
select ARCH_CORTEXR5
select ARCH_HAVE_FPU
select ARCH_HAVE_LOWVECTORS
select ARM_SEMIHOSTING_POWEROFF
select ARMV7R_HAVE_GICv2
select ARMV7R_HAVE_PTM

Expand Down
4 changes: 3 additions & 1 deletion boards/arm/qemu/qemu-armv7r/src/qemu_boardinit.c
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,9 @@ int board_power_off(int status)
{
UNUSED(status);

/* TODO: find a solution */
#ifdef CONFIG_ARM_SEMIHOSTING_POWEROFF
up_systempoweroff();
#endif

return 0;
}
Expand Down

0 comments on commit ac4b539

Please sign in to comment.