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
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>
Copy file name to clipboardExpand all lines: doc/tutorials/vuart_configuration.rst
+24-24Lines changed: 24 additions & 24 deletions
Original file line number
Diff line number
Diff line change
@@ -8,7 +8,7 @@ Introduction
8
8
9
9
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.
10
10
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.
12
12
13
13
.. code-block:: none
14
14
@@ -48,7 +48,7 @@ Console enable list
48
48
How to configure a console port
49
49
===============================
50
50
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.
52
52
53
53
- COM1_BASE (0x3F8) + COM1_IRQ(4)
54
54
- COM2_BASE (0x2F8) + COM2_IRQ(3)
@@ -68,9 +68,9 @@ Example:
68
68
How to configure a communication port
69
69
=====================================
70
70
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.
72
72
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.
74
74
75
75
**t_vuart.vm_id** is the target VM's vm_id, start from 0. (0 means VM0)
76
76
@@ -123,7 +123,7 @@ Launch script
123
123
=============
124
124
125
125
- *-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.
127
127
128
128
- *-B " ....,console=ttyS0, ..."*
129
129
Add this to the kernel-based system.
@@ -133,26 +133,26 @@ Test the communication port
133
133
134
134
After you have configured the communication port in hypervisor, you can access the corresponding port. For example, in Clear Linux:
135
135
136
-
1. With `echo` and `cat`
136
+
1. With ``echo`` and ``cat``
137
137
138
-
On VM1: `# cat /dev/ttyS1`
138
+
On VM1: ``# cat /dev/ttyS1``
139
139
140
-
On VM2: `# echo "test test" > /dev/ttyS1`
140
+
On VM2: ``# echo "test test" > /dev/ttyS1``
141
141
142
-
you can find the message from VM1 `/dev/ttyS1`.
142
+
you can find the message from VM1 ``/dev/ttyS1``.
143
143
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.
145
145
146
146
147
-
#. With mimicom
147
+
#. With minicom
148
148
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.
150
150
151
151
152
152
#. Limitations
153
153
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.
156
156
157
157
vUART design
158
158
============
@@ -169,18 +169,18 @@ vUART design
169
169
:align:center
170
170
:name:communication-vuart
171
171
172
-
Com port configurations for Post-Launched VMs
172
+
COM port configurations for Post-Launched VMs
173
173
=============================================
174
174
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:
176
176
177
-
`-s 1:0,lpc -l com1,stdio`
177
+
``-s 1:0,lpc -l com1,stdio``
178
178
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.
180
180
181
181
**Data Flow 1:**
182
182
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:
184
184
185
185
.. figure:: images/vuart-config-3.png
186
186
:align:center
@@ -198,13 +198,13 @@ When the Post-launched VM is started only with the vUART enabled in the hypervis
198
198
199
199
**Data Flow 2:**
200
200
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:
202
202
203
203
.. figure:: images/vuart-config-4.png
204
204
:align:center
205
205
:name:PLVM2-vuart
206
206
207
-
**acrn-dm cmdline:** `-s 1:0,lpc -l com1,stdio`
207
+
**acrn-dm cmdline:** ``-s 1:0,lpc -l com1,stdio``
208
208
209
209
.. code-block:: none
210
210
@@ -215,13 +215,13 @@ When the Post-launched VM is started only with the acrn-dm cmdline of `-s 1:0,lp
215
215
216
216
**Date Flow 3:**
217
217
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:
219
219
220
220
.. figure:: images/vuart-config-5.png
221
221
:align:center
222
222
:name:PLVM3-vuart
223
223
224
-
**acrn-dm cmdline:** `-s 1:0,lpc -l com1,stdio`
224
+
**acrn-dm cmdline:** ``-s 1:0,lpc -l com1,stdio``
225
225
226
226
.. code-block:: none
227
227
@@ -232,6 +232,6 @@ When the Post-launched VM is started with both vUART enabled and the acrn-dm cmd
232
232
},
233
233
234
234
.. 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.
0 commit comments