Skip to content

Commit 94394ae

Browse files
deb-intelwenlingz
authored andcommitted
Doc: Grammatical edits to the Enable S5 Guide.
Signed-off-by: Deb Taylor <deb.taylor@intel.com>
1 parent b16e598 commit 94394ae

File tree

1 file changed

+42
-45
lines changed

1 file changed

+42
-45
lines changed

doc/tutorials/enable_s5.rst

Lines changed: 42 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,9 @@ Platform S5 Enable Guide
66
Introduction
77
************
88

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
1110
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,
1312
directly shutting down the power of a computer system is not advisable because it can
1413
damage some components. It can cause corruption and put the system in an unknown or
1514
unstable state. On ACRN, the User VM must be shut down before powering off the Service VM.
@@ -21,7 +20,7 @@ S5 Architecture
2120
***************
2221

2322
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.
2524
The diagram below shows the overall architecture:
2625

2726
.. figure:: images/s5_overall_architecture.png
@@ -31,47 +30,46 @@ The diagram below shows the overall architecture:
3130

3231
- **Scenario I**:
3332

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:
3534

3635
.. graphviz:: images/s5-scenario-1.dot
3736
:name: s5-scenario-1
3837

3938
- **Scenario II**:
4039

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:
4342

4443
.. graphviz:: images/s5-scenario-2.dot
4544
:name: s5-scenario-2
4645

47-
How to trigger User VM's S5?
48-
============================
46+
Trigger the User VM's S5
47+
========================
4948

50-
On Service VM side, it uses the ``acrnctl`` tool to trigger the User VM's S5 flow:
51-
``acrnctl stop user-vm-name``. Then Device 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
5453
shutdown successfully or not, and decides when to power off itself.
5554

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+
============================
6457

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.
6664

6765
.. _enable_s5:
6866

6967
Enable S5
7068
*********
7169

72-
Enable S5 based on the the particular OS:
70+
The procedure for enabling S5 is specific to the particular OS:
7371

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
7573
``devicemodel/samples/nuc/launch_uos.sh`` launch script for ``acrn-dm``.
7674

7775
.. literalinclude:: ../../../../devicemodel/samples/nuc/launch_uos.sh
@@ -92,40 +90,40 @@ Enable S5 based on the the particular OS:
9290
:emphasize-lines: 2-3,13
9391
:language: bash
9492

95-
.. note:: For RT-Linux, the vUART is emulated in hypervisor, expose the node as ``/dev/ttySn``.
93+
.. note:: For RT-Linux, the vUART is emulated in the hypervisor; expose the node as ``/dev/ttySn``.
9694

97-
#. For LaaG and RT-Linux VM, a reference daemon is offered to run:
95+
#. For LaaG and RT-Linux VMs, run the life-cycle manager deamon:
9896

9997
a. Use these commands to build the life-cycle manager daemon, ``life_mngr``.
10098

10199
.. code-block:: none
102-
100+
103101
$ cd acrn-hypervisor/misc/life_mngr
104102
$ make life_mngr
105103
106-
#. Copy ``life_mngr`` and ``life_mngr.service`` into User VM:
104+
#. Copy ``life_mngr`` and ``life_mngr.service`` into the User VM:
107105

108106
.. code-block:: none
109107
110108
$ scp life_mngr root@<test board address>:/usr/bin/life_mngr
111109
$ scp life_mngr.service root@<test board address>:/lib/systemd/system/life_mngr.service
112110
113-
#. Use below commands to enable ``life_mngr.service`` and restart User VM.
111+
#. Use the below commands to enable ``life_mngr.service`` and restart the User VM.
114112

115113
.. code-block:: none
116114
117115
# chmod +x /usr/bin/life_mngr
118116
# systemctl enable life_mngr.service
119117
# reboot
120118
121-
#. For WaaG VM, a reference daemon is offered to run:
119+
#. For the WaaG VM, run the life-cycle manager deamon:
122120

123-
a) Build ``life_mngr_win.exe`` application::
121+
a) Build the ``life_mngr_win.exe`` application::
124122

125123
$ cd acrn-hypervisor/misc
126124
$ make life_mngr
127125

128-
.. note:: If there is no ``x86_64-w64-mingw32-gcc`` compiler, you need run ``swupd bundle-add c-basic-mingw``
126+
.. note:: If there is no ``x86_64-w64-mingw32-gcc`` compiler, you must run ``swupd bundle-add c-basic-mingw``
129127
to install it.
130128

131129
#) Set up a Windows environment:
@@ -139,20 +137,20 @@ Enable S5 based on the the particular OS:
139137
.. figure:: images/Microsoft-Visual-C-install-option-2.png
140138

141139
#) In WaaG, use the :kbd:`WIN + R` shortcut key, input "shell:startup", click :kbd:`OK`
142-
and then copy ``life_mngr_win.exe`` application into this directory.
140+
and then copy the ``life_mngr_win.exe`` application into this directory.
143141

144142
.. figure:: images/run-shell-startup.png
145143

146144
.. figure:: images/launch-startup.png
147145

148-
#) Restart the WaaG VM. The COM2 window will automatically open after reboots.
146+
#) Restart the WaaG VM. The COM2 window will automatically open after reboot.
149147

150148
.. figure:: images/open-com-success.png
151149

152150
#. If the Service VM is being shut down (transitioning to the S5 state), it can call
153151
``acrnctl stop vm-name`` to shut down the User VMs.
154152

155-
.. note:: S5 state is not automatically triggered by a Service VM shutdown, this needs
153+
.. note:: S5 state is not automatically triggered by a Service VM shutdown; this needs
156154
to be run before powering off the Service VM.
157155

158156
How to test
@@ -174,31 +172,30 @@ How to test
174172

175173
ps -ef|grep cbc; kill -9 cbc_pid
176174

177-
#. Refer to the :ref:`enable_s5` section to set up S5 environment for the User VMs.
175+
#. Refer to the :ref:`enable_s5` section to set up the S5 environment for the User VMs.
178176

179-
.. note:: RT-Linux's UUID must use ``495ae2e5-2603-4d64-af76-d4bc5a8ec0e5``, also the
180-
industry EFI image is required for launching RT-Linux VM.
177+
.. note:: RT-Linux's UUID must use ``495ae2e5-2603-4d64-af76-d4bc5a8ec0e5``. Also, the
178+
industry EFI image is required for launching the RT-Linux VM.
181179

182-
.. note:: Use ``systemctl status life_mngr.service`` command to ensure the service
183-
is working on LaaG or RT-Linux:
180+
.. note:: Use the ``systemctl status life_mngr.service`` command to ensure the service is working on the LaaG or RT-Linux:
184181

185182
.. code-block:: console
186-
183+
187184
● life_mngr.service - ACRN lifemngr daemon
188185
Loaded: loaded (/usr/lib/systemd/system/life_mngr.service; enabled; vendor p>
189186
Active: active (running) since Tue 2019-09-10 07:15:06 UTC; 1min 11s ago
190187
Main PID: 840 (life_mngr)
191188
192-
.. note:: For WaaG, we need to close ``windbg`` by using ``"bcdedit /set debug off`` command
193-
if you executed ``bcdedit /set debug on`` when set up the WaaG, because it occupies the ``COM2``.
189+
.. note:: For WaaG, we need to close ``windbg`` by using the ``"bcdedit /set debug off`` command
190+
IF you executed the ``bcdedit /set debug on`` when you set up the WaaG, because it occupies the ``COM2``.
194191

195-
#. Use ``acrnctl stop`` command on Service VM to trigger S5 to the User VMs:
192+
#. Use the``acrnctl stop`` command on the Service VM to trigger S5 to the User VMs:
196193

197194
.. code-block:: console
198195
199196
# acrnctl stop vm1
200197
201-
#. Use ``acrnctl list`` command to check the User VM status.
198+
#. Use the ``acrnctl list`` command to check the User VM status.
202199

203200
.. code-block:: console
204201

0 commit comments

Comments
 (0)