1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
use SbiRet;
/// System-Suspend extension.
///
/// The system-suspend extension defines a set of system-level sleep states and a
/// function which allows the supervisor-mode software to request that the system
/// transitions to a sleep state. Sleep states are identified with 32-bit wide
/// identifiers (`sleep_type`). The possible values for the identifiers are shown
/// in the table below:
///
/// | Type | Name | Description
/// |-------------------------|----------------|-------------------------------
/// | 0 | SUSPEND_TO_RAM | This is a "suspend to RAM" sleep type, similar to ACPI’s S2 or S3. Entry requires all but the calling hart be in the HSM `STOPPED` state and all hart registers and CSRs saved to RAM.
/// | 0x00000001 - 0x7fffffff | | Reserved for future use
/// | 0x80000000 - 0xffffffff | | Platform-specific system sleep types
/// | > 0xffffffff | | Reserved
///
/// The term "system" refers to the world-view of supervisor software. The
/// underlying SBI implementation may be provided by machine mode firmware or a
/// hypervisor.
///
/// The system suspend extension does not provide any way for supported sleep types
/// to be probed. Platforms are expected to specify their supported system sleep
/// types and per-type wake-up devices in their hardware descriptions. The
/// `SUSPEND_TO_RAM` sleep type is the one exception, and its presence is implied
/// by that of the extension.