Skip to content

RFC SBI system suspend (SUSP) extension

Andrew Jones opensbi 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest11 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/11lib: sbi_hsm: Factor out invalid state detectionlib/sbi/sbi_hsm.c+24 -411 reply
2/11lib: sbi_hsm: Don't try to restore state on failed changelib/sbi/sbi_hsm.c+2 -51 reply
3/11lib: sbi_hsm: Ensure errors are consistent with speclib/sbi/sbi_hsm.c+3 -31 reply
4/11lib: sbi_hsm: Move misplaced commentlib/sbi/sbi_hsm.c+4 -21 reply
5/11lib: sbi_hsm: Remove unnecessary includelib/sbi/sbi_ecall_hsm.c+2 -21 reply
6/11lib: sbi_hsm: Export some functionsinclude/sbi/sbi_hsm.h lib/sbi/sbi_hsm.c+14 -21 reply
7/11lib: sbi: Add system suspend skeletoninclude/sbi/sbi_ecall_interface.h include/sbi/sbi_system.h lib/sbi/Kconfig +3 more+106 -01 reply
8/11lib: sbi: Add system_suspend_allowed domain propertydocs/domain_support.md include/sbi/sbi_domain.h lib/sbi/sbi_domain.c +1 more+18 -01 reply
9/11lib: sbi: Implement system suspendlib/sbi/sbi_system.c+56 -11 reply
10/11docs: Correct opensbi-domain property namedocs/domain_support.md+3 -31 reply
11/11platform: generic: Add system suspend testdocs/domain_support.md include/sbi/sbi_system.h lib/sbi/sbi_system.c +1 more+54 -11 reply

Reviews trailers per patch

All 11 patches have a Reviewed-by or Acked-by.

PatchAnup Patel
1/11R-b
2/11R-b
3/11R-b
4/11R-b
5/11R-b
6/11R-b
7/11R-b
8/11R-b
9/11R-b
10/11R-b
11/11R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [RFC PATCH 00/11] SBI system suspend (SUSP) extension

This series implements the SBI system suspend support in OpenSBI as-per the draft proposal for SBI system suspend which can be found at
https://github.com/jones-drew/riscv-sbi-doc/commit/d9e43e9a938fc3eb510e023c3f352462876f7785

The first half of the series are a few cleanups and fixes for HSM, as system suspend makes use of some of its code and patterns. The second half implements support for the extension and includes a patch which allows testing to be enabled, even when low-level firmware does not provide support. Regarding the test mode, it's currently enabled by adding a 'system-suspend-test' DT property, but Anup has suggested that FW_OPTION could also be used. I'm all ears for what people think the best way to control test functionality in OpenSBI is and am happy to switch it. To test with Linux the kernel must include the patch at
https://github.com/jones-drew/linux/commits/riscv/sbi-susp-rfc and be built with CONFIG_SUSPEND enabled.

The patches are based on v1.2 and "treewide: Replace TRUE/FALSE with true/false" and can also be found at
https://github.com/jones-drew/opensbi/commits/susp-rfc

Andrew Jones (11):
lib: sbi_hsm: Factor out invalid state detection
lib: sbi_hsm: Don't try to restore state on failed change
lib: sbi_hsm: Ensure errors are consistent with spec
lib: sbi_hsm: Move misplaced comment
lib: sbi_hsm: Remove unnecessary include
lib: sbi_hsm: Export some functions
lib: sbi: Add system suspend skeleton
lib: sbi: Add system_suspend_allowed domain property
lib: sbi: Implement system suspend
docs: Correct opensbi-domain property name
platform: generic: Add system suspend test

 docs/domain_support.md            |  15 +++-
 include/sbi/sbi_domain.h          |   2 +
 include/sbi/sbi_ecall_interface.h |   8 +++
 include/sbi/sbi_hsm.h             |   4 ++
 include/sbi/sbi_system.h          |  18 +++++
 lib/sbi/Kconfig                   |   4 ++
 lib/sbi/objects.mk                |   3 +
 lib/sbi/sbi_domain.c              |   4 ++
 lib/sbi/sbi_ecall_hsm.c           |   4 +-
 lib/sbi/sbi_ecall_susp.c          |  48 +++++++++++++
 lib/sbi/sbi_hsm.c                 |  92 +++++++++++--------------
 lib/sbi/sbi_system.c              | 111 ++++++++++++++++++++++++++++++
 lib/utils/fdt/fdt_domain.c        |   7 ++
 platform/generic/platform.c       |  20 +++++-
 14 files changed, 283 insertions(+), 57 deletions(-)
 create mode 100644 lib/sbi/sbi_ecall_susp.c
Signature · 1 line
2.39.0