Topics

Number of rows in the ACRN shell


Geoffroy Van Cutsem
 

Hi folks,

Why do we have "#define SHELL_ROWS      10" in hypervisor/debug.shell.c? I'm kind of guessing that the idea is to not scroll passed a maximum of 10 lines when displaying something. But it does not really seem to do what it is intending to. I have always seen it continue through to the end, without waiting for user input. That gives this rather ugly (although harmless) message in the middle - see:

```
  sos_console      - Switch to the SOS's console. Use [Ctrl+Spacebar] to return to the ACRN shell console
  int              - List interrupt information per CPU
  pt               - Show pass-through device information
  vioapic         <vm id> - Show virtual IOAPIC (vIOAPIC) information for a specific VM
<*** Hit any key to continue ***>
  dump_ioapic      - Show native IOAPIC information
  loglevel        [<console_loglevel> [<mem_loglevel> [npk_loglevel]]] - No argument: get the level of logging for the console, memory and npk. Set the level by giving (up to) 3 parameters between 0 and 6 (verbose)
  cpuid           <leaf> [subleaf] - Display the CPUID leaf [subleaf], in hexadecimal
```

There is a comment in the code that hints at the fact it is "normal" that it is not working:
                                /* Wait for a character from user (NOT USED) */
                                (void)shell_getc(); 

My question is twofold:
* Should this mechanism (that does not seem to do what it's meant to) be fixed or removed altogether?
* Assuming we want to keep it, would it be appropriate to make SHELL_ROWS a bigger number (e.g. 20 or 30)?

Thanks,
Geoffroy


Wang, Hongbo
 

+Like

Do you know whom the debug_shell.c is?

 

 

Best regards.

Hongbo

Tel: +86-21-6116 7445

MP: +86-1364 1793 689

Mail: hongbo.wang@...

 

From: acrn-users@... [mailto:acrn-users@...] On Behalf Of Geoffroy Van Cutsem
Sent: Tuesday, March 19, 2019 7:58 PM
To: acrn-users@...
Subject: [acrn-users] Number of rows in the ACRN shell

 

Hi folks,

Why do we have "#define SHELL_ROWS      10" in hypervisor/debug.shell.c? I'm kind of guessing that the idea is to not scroll passed a maximum of 10 lines when displaying something. But it does not really seem to do what it is intending to. I have always seen it continue through to the end, without waiting for user input. That gives this rather ugly (although harmless) message in the middle - see:

```
  sos_console      - Switch to the SOS's console. Use [Ctrl+Spacebar] to return to the ACRN shell console
  int              - List interrupt information per CPU
  pt               - Show pass-through device information
  vioapic         <vm id> - Show virtual IOAPIC (vIOAPIC) information for a specific VM
<*** Hit any key to continue ***>
  dump_ioapic      - Show native IOAPIC information
  loglevel        [<console_loglevel> [<mem_loglevel> [npk_loglevel]]] - No argument: get the level of logging for the console, memory and npk. Set the level by giving (up to) 3 parameters between 0 and 6 (verbose)
  cpuid           <leaf> [subleaf] - Display the CPUID leaf [subleaf], in hexadecimal
```

There is a comment in the code that hints at the fact it is "normal" that it is not working:
                                /* Wait for a character from user (NOT USED) */
                                (void)shell_getc(); 

My question is twofold:
* Should this mechanism (that does not seem to do what it's meant to) be fixed or removed altogether?
* Assuming we want to keep it, would it be appropriate to make SHELL_ROWS a bigger number (e.g. 20 or 30)?

Thanks,
Geoffroy