Skip to content

Commit e7d048b

Browse files
Geoffroy Van Cutsemwenlingz
authored andcommitted
doc: tweak vUART tutorial for improved rendering
Tweak the "vUART configuration" tutorial to fix a few typos and change some formatting to improve its readability. Signed-off-by: Geoffroy Van Cutsem <geoffroy.vancutsem@intel.com>
1 parent 8be0977 commit e7d048b

File tree

1 file changed

+24
-24
lines changed

1 file changed

+24
-24
lines changed

doc/tutorials/vuart_configuration.rst

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Introduction
88

99
The virtual universal asynchronous receiver-transmitter (vUART) supports two functions: one is the console, the other is communication. vUART only works on a single function.
1010

11-
Currently, only two vUARTs configurations are added to the `/hypervisor/scenarios/<xxx>/vm_configuration.c` file, but you can change the value in it.
11+
Currently, only two vUART configurations are added to the ``hypervisor/scenarios/<xxx>/vm_configuration.c`` file, but you can change the value in it.
1212

1313
.. code-block:: none
1414
@@ -48,7 +48,7 @@ Console enable list
4848
How to configure a console port
4949
===============================
5050

51-
To enable the console port for a VM, change only the port_base and irq. If the irq number has been used in your system (`cat /proc/interrupt`), choose another irq number. If you set the .irq =0, the vuart will work in polling mode.
51+
To enable the console port for a VM, change only the ``port_base`` and ``irq``. If the irq number is already in use in your system (``cat /proc/interrupt``), choose another irq number. If you set the ``.irq =0``, the vuart will work in polling mode.
5252

5353
- COM1_BASE (0x3F8) + COM1_IRQ(4)
5454
- COM2_BASE (0x2F8) + COM2_IRQ(3)
@@ -68,9 +68,9 @@ Example:
6868
How to configure a communication port
6969
=====================================
7070

71-
To enable the communication port, configure vuart[1] in the two VMs that want to communicate.
71+
To enable the communication port, configure ``vuart[1]`` in the two VMs that want to communicate.
7272

73-
The port_base and irq should not repeat with the vuart[0] in the same VM.
73+
The port_base and irq should differ from the ``vuart[0]`` in the same VM.
7474

7575
**t_vuart.vm_id** is the target VM's vm_id, start from 0. (0 means VM0)
7676

@@ -123,7 +123,7 @@ Launch script
123123
=============
124124

125125
- *-s 1:0,lpc -l com1,stdio*
126-
This option is only needed for WaaG and vxWorks (and currently, OVMF). The common port is that they all depend on the ACPI table, but only acrn-dm can provide the ACPI table for UART.
126+
This option is only needed for WaaG and VxWorks (and also when using OVMF). They depend on the ACPI table, and only ``acrn-dm`` can provide the ACPI table for UART.
127127

128128
- *-B " ....,console=ttyS0, ..."*
129129
Add this to the kernel-based system.
@@ -133,26 +133,26 @@ Test the communication port
133133

134134
After you have configured the communication port in hypervisor, you can access the corresponding port. For example, in Clear Linux:
135135

136-
1. With `echo` and `cat`
136+
1. With ``echo`` and ``cat``
137137

138-
On VM1: `# cat /dev/ttyS1`
138+
On VM1: ``# cat /dev/ttyS1``
139139

140-
On VM2: `# echo "test test" > /dev/ttyS1`
140+
On VM2: ``# echo "test test" > /dev/ttyS1``
141141

142-
you can find the message from VM1 `/dev/ttyS1`.
142+
you can find the message from VM1 ``/dev/ttyS1``.
143143

144-
If you are not sure which port is the communication port, you can run "dmesg | grep ttyS" under the Linux shell to check the base address. If it matches what you have set in the `vm_configuration.c` file, it is the correct port.
144+
If you are not sure which port is the communication port, you can run ``dmesg | grep ttyS`` under the Linux shell to check the base address. If it matches what you have set in the ``vm_configuration.c`` file, it is the correct port.
145145

146146

147-
#. With mimicom
147+
#. With minicom
148148

149-
Run `minicom -D /dev/ttyS1` on both VM1 and VM2 and enter `test` in VM1's minicom. The message should appear in VM2's minicom. Close the flow control in minicom.
149+
Run ``minicom -D /dev/ttyS1`` on both VM1 and VM2 and enter ``test`` in VM1's minicom. The message should appear in VM2's minicom. Disable flow control in minicom.
150150

151151

152152
#. Limitations
153153

154-
- The msg can not longer than 256 bytes.
155-
- This cannot be used to transfer files because flow control is not supported so data may lost.
154+
- The msg cannot be longer than 256 bytes.
155+
- This cannot be used to transfer files because flow control is not supported so data may be lost.
156156

157157
vUART design
158158
============
@@ -169,18 +169,18 @@ vUART design
169169
:align: center
170170
:name: communication-vuart
171171

172-
Com port configurations for Post-Launched VMs
172+
COM port configurations for Post-Launched VMs
173173
=============================================
174174

175-
For a post-launched VM, the acrn-dm cmdline also provides a com port configuration:
175+
For a post-launched VM, the ``acrn-dm`` cmdline also provides a COM port configuration:
176176

177-
`-s 1:0,lpc -l com1,stdio`
177+
``-s 1:0,lpc -l com1,stdio``
178178

179-
This adds com1(0x3f8) and com2(0x2f8) modules in the Guest VM, including the ACPI info for these two ports.
179+
This adds ``com1 (0x3f8)`` and ``com2 (0x2f8)`` modules in the Guest VM, including the ACPI info for these two ports.
180180

181181
**Data Flow 1:**
182182

183-
When the Post-launched VM is started only with the vUART enabled in the hypervisor configuration file, the data flow is shown as below:
183+
When the post-launched VM is started with the vUART enabled in the hypervisor configuration file only, the data flow is shown as below:
184184

185185
.. figure:: images/vuart-config-3.png
186186
:align: center
@@ -198,13 +198,13 @@ When the Post-launched VM is started only with the vUART enabled in the hypervis
198198
199199
**Data Flow 2:**
200200

201-
When the Post-launched VM is started only with the acrn-dm cmdline of `-s 1:0,lpc -l com1,stdio`, the data flow is shown as below:
201+
When the post-launched VM is started with the ``acrn-dm`` cmdline of ``-s 1:0,lpc -l com1,stdio`` only, the data flow is shown as below:
202202

203203
.. figure:: images/vuart-config-4.png
204204
:align: center
205205
:name: PLVM2-vuart
206206

207-
**acrn-dm cmdline:** `-s 1:0,lpc -l com1,stdio`
207+
**acrn-dm cmdline:** ``-s 1:0,lpc -l com1,stdio``
208208

209209
.. code-block:: none
210210
@@ -215,13 +215,13 @@ When the Post-launched VM is started only with the acrn-dm cmdline of `-s 1:0,lp
215215
216216
**Date Flow 3:**
217217

218-
When the Post-launched VM is started with both vUART enabled and the acrn-dm cmdline of `-s 1:0,lpc -l com1,stdio`, the data flow is show as below:
218+
When the post-launched VM is started with both vUART enabled and the ``acrn-dm`` cmdline of ``-s 1:0,lpc -l com1,stdio``, the data flow is show as below:
219219

220220
.. figure:: images/vuart-config-5.png
221221
:align: center
222222
:name: PLVM3-vuart
223223

224-
**acrn-dm cmdline:** `-s 1:0,lpc -l com1,stdio`
224+
**acrn-dm cmdline:** ``-s 1:0,lpc -l com1,stdio``
225225

226226
.. code-block:: none
227227
@@ -232,6 +232,6 @@ When the Post-launched VM is started with both vUART enabled and the acrn-dm cmd
232232
},
233233
234234
.. note::
235-
For operating systems such as vxWorks and Windows that depend on the ACPI table to probe the uart driver, only adding the vuart configuration in the hypervisor is not enough. Currently, we recommend that you use the configuration in Data Flow 3. This may be refined in the future.
235+
For operating systems such as VxWorks and Windows that depend on the ACPI table to probe the uart driver, adding the vuart configuration in the hypervisor is not sufficient. Currently, we recommend that you use the configuration in Data Flow 3. This may be refined in the future.
236236

237237

0 commit comments

Comments
 (0)