You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: doc/tutorials/enable_s5.rst
+42-45Lines changed: 42 additions & 45 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,10 +6,9 @@ Platform S5 Enable Guide
6
6
Introduction
7
7
************
8
8
9
-
S5 is one of the `ACPI Sleep State <http://acpi.sourceforge.net/documentation/sleep.html>`_.
10
-
It refers to the system being shut down (although some power may still be supplied to
9
+
S5 is one of the `ACPI sleep states <http://acpi.sourceforge.net/documentation/sleep.html>`_ that refers to the system being shut down (although some power may still be supplied to
11
10
certain devices). In this document, S5 means the function to shut down the
12
-
**User VMs**, **the Service VM**, the hypervisor, and the hardware. In most cases,
11
+
**User VMs**, **the Service VM**, the hypervisor, and the hardware. In most cases,
13
12
directly shutting down the power of a computer system is not advisable because it can
14
13
damage some components. It can cause corruption and put the system in an unknown or
15
14
unstable state. On ACRN, the User VM must be shut down before powering off the Service VM.
@@ -21,7 +20,7 @@ S5 Architecture
21
20
***************
22
21
23
22
ACRN provides a mechanism to trigger the S5 state transition throughout the system.
24
-
It uses vUART channel to communicate between the Service VM and the User VMs.
23
+
It uses a vUART channel to communicate between the Service and User VMs.
25
24
The diagram below shows the overall architecture:
26
25
27
26
.. figure:: images/s5_overall_architecture.png
@@ -31,47 +30,46 @@ The diagram below shows the overall architecture:
31
30
32
31
- **Scenario I**:
33
32
34
-
The User VM's serial port device (``ttySn``) is emulated in Device Model, the channel from Service VM to User VM:
33
+
The User VM's serial port device (``ttySn``) is emulated in the Device Model, the channel from the Service VM to the User VM:
35
34
36
35
.. graphviz:: images/s5-scenario-1.dot
37
36
:name: s5-scenario-1
38
37
39
38
- **Scenario II**:
40
39
41
-
The User VM's (like RT-Linux or other RT-VMs) serial port device (``ttySn``) is emulated in Hypervisor,
42
-
the channel from Service OS to User VM:
40
+
The User VM's (like RT-Linux or other RT-VMs) serial port device (``ttySn``) is emulated in the Hypervisor,
41
+
the channel from the Service OS to the User VM:
43
42
44
43
.. graphviz:: images/s5-scenario-2.dot
45
44
:name: s5-scenario-2
46
45
47
-
How to trigger User VM's S5?
48
-
============================
46
+
Trigger the User VM's S5
47
+
========================
49
48
50
-
On Service VM side, it uses the ``acrnctl`` tool to trigger the User VM's S5 flow:
51
-
``acrnctl stop user-vm-name``. ThenDevice Model will send a ``shutdown`` command
52
-
to User VM through channel, if User VM receives the command, it will send an "ACK"
53
-
to Device Model. It is the responsibility of Service VM to check if the User VMs
49
+
On the Service VM side, it uses the ``acrnctl`` tool to trigger the User VM's S5 flow:
50
+
``acrnctl stop user-vm-name``. Then, the Device Model sends a ``shutdown`` command
51
+
to the User VM through a channel. If the User VM receives the command, it will send an "ACK"
52
+
to the Device Model. It is the Service VM's responsibility to check if the User VMs
54
53
shutdown successfully or not, and decides when to power off itself.
55
54
56
-
What does "life cycle manager" in User VM do?
57
-
=============================================
58
-
59
-
As current S5 reference design, there is a life-cycle manager daemon (life_mngr) running in
60
-
User VM to implement S5. It will wait for the command from Service VM on the
61
-
paired serial port, there is a simple protocol between Service VM and User VM:
62
-
when it receives ``shutdown``, then send "acked" to Service VM, then it can power off
63
-
User VM.
55
+
User VM "life-cycle manager"
56
+
============================
64
57
65
-
However, if the User VM is not ready to power off, it can ignore the ``shutdown`` command.
58
+
As part of the current S5 reference design, a life-cycle manager daemon (life_mngr) runs in the
59
+
User VM to implement S5. It waits for the command from the Service VM on the
60
+
paired serial port. The simple protocol between the Service VM and User VM is as follows:
61
+
When the daemon receives ``shutdown``, it sends "acked" to the Service VM;
62
+
then it can power off the User VM. If the User VM is not ready to power off,
63
+
it can ignore the ``shutdown`` command.
66
64
67
65
.. _enable_s5:
68
66
69
67
Enable S5
70
68
*********
71
69
72
-
Enable S5 based on the the particular OS:
70
+
The procedure for enabling S5 is specific to the particular OS:
73
71
74
-
* For Linux (LaaG) or Windows (WaaG), refer to the following configurations in
72
+
* For Linux (LaaG) or Windows (WaaG), refer to the following configurations in the
75
73
``devicemodel/samples/nuc/launch_uos.sh`` launch script for ``acrn-dm``.
0 commit comments