Skip to content

Commit

Permalink
doc: update doc for vUART to hypervisor console switch key
Browse files Browse the repository at this point in the history
Things changed since following commit
(c623e11 debug: vuart: add guest break key support).

Tracked-On: #8583
Signed-off-by: Qiang Zhang <[email protected]>
  • Loading branch information
zhangqiang4 authored and wenlingz committed Jun 25, 2024
1 parent cc0364f commit 29137b9
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 6 deletions.
22 changes: 18 additions & 4 deletions doc/developer-guides/hld/hv-console.rst
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,24 @@ Specifically:
the hypervisor shell. Inputs to the physical UART will be
redirected to the vUART starting from the next timer event.

- The vUART is deactivated after a :kbd:`Ctrl` + :kbd:`Space` hotkey is received
from the physical UART. Inputs to the physical UART will be
handled by the hypervisor shell starting from the next timer
event.
- The vUART enters escaping mode after a BREAK character is received from
the physical UART. When in escaping mode, next received character will
be a command. After processing this command, the vUART exits the escaping
mode. So far, following escaping commands are supported:

- BREAK charater. If user sends break charater again in escaping mode,
one break charater will be sent to vUART.

- Character "e". This will deactive vUART. Inputs to the physical UART will
be handled by the hypervisor shell starting from the next timer event.

Other characters are not supported. The physical UART will prompt out an
"Unknown escaping key" message and the active vUART exits escaping mode.

Note that the BREAK character is a control character and different serial
terminals have different ways to send it, for example, `<Ctrl-A> + F`
in minicom, `<Ctrl-a> + <Ctrl-\>` in picocom, right click -> special
command -> break in putty serial terminal.

The workflows are described as follows:

Expand Down
4 changes: 3 additions & 1 deletion doc/user-guides/acrn-shell.rst
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,9 @@ vm_console

The ``vm_console <vm_id>`` command switches the ACRN's console to become the
VM's console.
Press :kbd:`Ctrl` + :kbd:`Alt` + :kbd:`Space` to return to the ACRN shell console.
Send a BREAK character to enter escaping mode and a character e to return to
the ACRN shell console. For details on how the hypervisor console works,
refer to :ref:`hv-console`.

vioapic
=======
Expand Down
2 changes: 1 addition & 1 deletion hypervisor/debug/shell_priv.h
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ struct shell {

#define SHELL_CMD_VM_CONSOLE "vm_console"
#define SHELL_CMD_VM_CONSOLE_PARAM "<vm id>"
#define SHELL_CMD_VM_CONSOLE_HELP "Switch to the VM's console. Use [Ctrl+Spacebar] to return to the ACRN shell "\
#define SHELL_CMD_VM_CONSOLE_HELP "Switch to the VM's console. Use 'BREAK + e' to return to the ACRN shell "\
"console"

#define SHELL_CMD_INTERRUPT "int"
Expand Down

0 comments on commit 29137b9

Please sign in to comment.