<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body style="overflow-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;"><br><div><br><blockquote type="cite"><div>On Sep 7, 2023, at 8:00 AM, Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org> wrote:</div><br class="Apple-interchange-newline"><div><div>Is there a way to have VT100 (or any other black/white, non-ANSI) terminal for UEFI Shell?<br><br>I do many runs of QEMU/sbsa-ref with logging and all those ANSI colour codes only make problems.<br><br></div></div></blockquote><div><br></div><div>These are the supported consoles [1]</div><div><br></div><div><div>EFI_GUID  *mTerminalType[] = {</div><div>  &gEfiPcAnsiGuid,</div><div>  &gEfiVT100Guid,</div><div>  &gEfiVT100PlusGuid,</div><div>  &gEfiVTUTF8Guid,</div><div>  &gEfiTtyTermGuid,</div><div>  &gEdkiiLinuxTermGuid,</div><div>  &gEdkiiXtermR6Guid,</div><div>  &gEdkiiVT400Guid,</div><div>  &gEdkiiSCOTermGuid</div><div>};</div><div><br></div><div>CHAR16  *mSerialConsoleNames[] = {</div><div>  L"PC-ANSI Serial Console",</div><div>  L"VT-100 Serial Console",</div><div>  L"VT-100+ Serial Console",</div><div>  L"VT-UTF8 Serial Console",</div><div>  L"Tty Terminal Serial Console",</div><div>  L"Linux Terminal Serial Console",</div><div>  L"Xterm R6 Serial Console",</div><div>  L"VT-400 Serial Console",</div><div>  L"SCO Terminal Serial Console"</div><div>};</div><div><br></div></div><div>I think the OVMF default is coming from here [2]</div><div>VENDOR_DEVICE_PATH    gTerminalTypeDeviceNode    = gVtUtf8Terminal;</div><div><br></div><div>If you look up gVtUtf8Terminal you see [3]</div><div><div>#define gVtUtf8Terminal \</div><div>  { \</div><div>    { \</div><div>      MESSAGING_DEVICE_PATH, \</div><div>      MSG_VENDOR_DP, \</div><div>      { \</div><div>        (UINT8) (sizeof (VENDOR_DEVICE_PATH)), \</div><div>        (UINT8) ((sizeof (VENDOR_DEVICE_PATH)) >> 8) \</div><div>      } \</div><div>    }, \</div><div>    DEVICE_PATH_MESSAGING_VT_UTF8 \</div><div>  }</div><div><br></div><div>Thus we get to the TL;DR part… The console NVRAM variables that point to the UART has a MESSAGING_DEVICE_PATH MSG_VENDOR_DP node after the UART definition that has a UUID (EFI_GUID) that defines the type of terminal emulation to use. </div><div><br></div><div>The definition of the ConIn and ConOut variables is here [4]</div></div><div><br></div><div></div><div>[1] <a href="https://github.com/tianocore/edk2/blob/master/MdeModulePkg/Universal/Console/TerminalDxe/Terminal.c#L24">https://github.com/tianocore/edk2/blob/master/MdeModulePkg/Universal/Console/TerminalDxe/Terminal.c#L24</a></div><div>[2] <a href="https://github.com/tianocore/edk2/blob/master/OvmfPkg/Library/PlatformBootManagerLib/PlatformData.c#L50">https://github.com/tianocore/edk2/blob/master/OvmfPkg/Library/PlatformBootManagerLib/PlatformData.c#L50</a></div><div>[3] <a href="https://github.com/tianocore/edk2/blob/master/OvmfPkg/Library/PlatformBootManagerLib/BdsPlatform.h#L129">https://github.com/tianocore/edk2/blob/master/OvmfPkg/Library/PlatformBootManagerLib/BdsPlatform.h#L129</a></div><div>[4] <a href="https://uefi.org/specs/UEFI/2.10/03_Boot_Manager.html#globally-defined-variables">https://uefi.org/specs/UEFI/2.10/03_Boot_Manager.html#globally-defined-variables</a></div><div><br></div><div>Thanks,</div><div><br></div><div>Andrew Fish</div><br><blockquote type="cite"><div><div><br><br><br><br></div></div></blockquote></div><br></body></html>


<div width="1" style="color:white;clear:both">_._,_._,_</div>
<hr>


Groups.io Links:<p>


  
    You receive all messages sent to this group.
  
  


<p>
<a target="_blank" href="https://edk2.groups.io/g/devel/message/108407">View/Reply Online (#108407)</a> |


  

|

  <a target="_blank" href="https://groups.io/mt/101216135/1813853">Mute This Topic</a>


| <a href="https://edk2.groups.io/g/devel/post">New Topic</a>

<br>




<a href="https://edk2.groups.io/g/devel/editsub/1813853">Your Subscription</a> |
<a href="mailto:devel+owner@edk2.groups.io">Contact Group Owner</a> |

<a href="https://edk2.groups.io/g/devel/leave/3943202/1813853/130120423/xyzzy">Unsubscribe</a>

 [edk2-devel-archive@redhat.com]<br>
<div width="1" style="color:white;clear:both">_._,_._,_</div>