From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by spool.mail.gandi.net (Postfix) with ESMTPS id 2432ED80A13 for ; Thu, 7 Sep 2023 17:40:48 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=3m8OES8DRDRCRki5BcVH23jwQIob0CS2THnuYPWvqYI=; c=relaxed/simple; d=groups.io; h=From:MIME-version:Subject:Date:References:To:In-reply-to:Message-id:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-type; s=20140610; t=1694108447; v=1; b=QetmY4rSCV3rSHCxDlEKqpSWt7NTyTrDaSAXjwdXHgOILKUlvhhynOCTzFPsIBQ5GR4o5m8C PU+07GeJdKKZAKQ3RgCftT89NjGfDDcnmrScFnscln/lJdn/TxPMznc+GlhisACe3RCH6WSNum5 eJzKDl6UzrHEIyzWtNPIK+io= X-Received: by 127.0.0.2 with SMTP id ObRNYY7687511xahlWQBeecf; Thu, 07 Sep 2023 10:40:47 -0700 X-Received: from ma-mailsvcp-mx-lapp02.apple.com (ma-mailsvcp-mx-lapp02.apple.com [17.32.222.23]) by mx.groups.io with SMTP id smtpd.web11.19874.1694108447053055292 for ; Thu, 07 Sep 2023 10:40:47 -0700 X-Received: from ma-mailsvcp-mta-lapp02.corp.apple.com (ma-mailsvcp-mta-lapp02.corp.apple.com [10.226.18.134]) by ma-mailsvcp-mx-lapp02.apple.com (Oracle Communications Messaging Server 8.1.0.23.20230328 64bit (built Mar 28 2023)) with ESMTPS id <0S0M00K2BMEP5D10@ma-mailsvcp-mx-lapp02.apple.com> for devel@edk2.groups.io; Thu, 07 Sep 2023 10:40:46 -0700 (PDT) X-Proofpoint-GUID: 7TfGEoqtj91Hl4Y_xHWK8ArdOFM4iyFh X-Proofpoint-ORIG-GUID: 7TfGEoqtj91Hl4Y_xHWK8ArdOFM4iyFh X-Received: from ma-mailsvcp-mmp-lapp04.apple.com (ma-mailsvcp-mmp-lapp04.apple.com [17.32.222.17]) by ma-mailsvcp-mta-lapp02.corp.apple.com (Oracle Communications Messaging Server 8.1.0.23.20230328 64bit (built Mar 28 2023)) with ESMTPS id <0S0M00B98MFD6N70@ma-mailsvcp-mta-lapp02.corp.apple.com>; Thu, 07 Sep 2023 10:40:25 -0700 (PDT) X-Received: from process_milters-daemon.ma-mailsvcp-mmp-lapp04.apple.com by ma-mailsvcp-mmp-lapp04.apple.com (Oracle Communications Messaging Server 8.1.0.23.20230328 64bit (built Mar 28 2023)) id <0S0M00U00M121R00@ma-mailsvcp-mmp-lapp04.apple.com>; Thu, 07 Sep 2023 10:40:25 -0700 (PDT) X-Va-A: X-Va-T-CD: 0fc4ca8cc3f20265c7d442bbbc719557 X-Va-E-CD: e9a34982685f34b802d9c70c467e8be9 X-Va-R-CD: 9111b37acaa85b525cf1cb2d685b7d78 X-Va-ID: d492fb63-2d2e-4ec5-bd67-a75ce5c32c24 X-Va-CD: 0 X-V-A: X-V-T-CD: 0fc4ca8cc3f20265c7d442bbbc719557 X-V-E-CD: e9a34982685f34b802d9c70c467e8be9 X-V-R-CD: 9111b37acaa85b525cf1cb2d685b7d78 X-V-ID: 614ed776-0d4c-46ef-a37d-5487c816a6b9 X-V-CD: 0 X-Received: from smtpclient.apple (unknown [17.10.152.189]) by ma-mailsvcp-mmp-lapp04.apple.com (Oracle Communications Messaging Server 8.1.0.23.20230328 64bit (built Mar 28 2023)) with ESMTPSA id <0S0M00ML1MFBHY00@ma-mailsvcp-mmp-lapp04.apple.com>; Thu, 07 Sep 2023 10:40:25 -0700 (PDT) From: "Andrew Fish via groups.io" MIME-version: 1.0 (Mac OS X Mail 16.0 \(3731.700.6\)) Subject: Re: [edk2-devel] VT100 terminal for UEFI shell Date: Thu, 07 Sep 2023 10:40:13 -0700 References: <812a1801-17e1-470b-851b-d363469f84c1@linaro.org> To: devel@edk2.groups.io, marcin.juszkiewicz@linaro.org In-reply-to: <812a1801-17e1-470b-851b-d363469f84c1@linaro.org> Message-id: Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,afish@apple.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: UW5Ig2WDh09eOpviVtmh3vq6x7686176AA= Content-type: multipart/alternative; boundary="Apple-Mail=_7F90017E-0D05-4FCF-9C95-224C8190C040" X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b=QetmY4rS; spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io; dmarc=none --Apple-Mail=_7F90017E-0D05-4FCF-9C95-224C8190C040 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Sep 7, 2023, at 8:00 AM, Marcin Juszkiewicz wrote: >=20 > Is there a way to have VT100 (or any other black/white, non-ANSI) termina= l for UEFI Shell? >=20 > I do many runs of QEMU/sbsa-ref with logging and all those ANSI colour co= des only make problems. >=20 These are the supported consoles [1] EFI_GUID *mTerminalType[] =3D { &gEfiPcAnsiGuid, &gEfiVT100Guid, &gEfiVT100PlusGuid, &gEfiVTUTF8Guid, &gEfiTtyTermGuid, &gEdkiiLinuxTermGuid, &gEdkiiXtermR6Guid, &gEdkiiVT400Guid, &gEdkiiSCOTermGuid }; CHAR16 *mSerialConsoleNames[] =3D { L"PC-ANSI Serial Console", L"VT-100 Serial Console", L"VT-100+ Serial Console", L"VT-UTF8 Serial Console", L"Tty Terminal Serial Console", L"Linux Terminal Serial Console", L"Xterm R6 Serial Console", L"VT-400 Serial Console", L"SCO Terminal Serial Console" }; I think the OVMF default is coming from here [2] VENDOR_DEVICE_PATH gTerminalTypeDeviceNode =3D gVtUtf8Terminal; If you look up gVtUtf8Terminal you see [3] #define gVtUtf8Terminal \ { \ { \ MESSAGING_DEVICE_PATH, \ MSG_VENDOR_DP, \ { \ (UINT8) (sizeof (VENDOR_DEVICE_PATH)), \ (UINT8) ((sizeof (VENDOR_DEVICE_PATH)) >> 8) \ } \ }, \ DEVICE_PATH_MESSAGING_VT_UTF8 \ } Thus we get to the TL;DR part=E2=80=A6 The console NVRAM variables that poi= nt to the UART has a MESSAGING_DEVICE_PATH MSG_VENDOR_DP node after the UAR= T definition that has a UUID (EFI_GUID) that defines the type of terminal e= mulation to use.=20 The definition of the ConIn and ConOut variables is here [4] [1] https://github.com/tianocore/edk2/blob/master/MdeModulePkg/Universal/Co= nsole/TerminalDxe/Terminal.c#L24 [2] https://github.com/tianocore/edk2/blob/master/OvmfPkg/Library/PlatformB= ootManagerLib/PlatformData.c#L50 [3] https://github.com/tianocore/edk2/blob/master/OvmfPkg/Library/PlatformB= ootManagerLib/BdsPlatform.h#L129 [4] https://uefi.org/specs/UEFI/2.10/03_Boot_Manager.html#globally-defined-= variables Thanks, Andrew Fish >=20 >=20 >=20 >=20 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#108407): https://edk2.groups.io/g/devel/message/108407 Mute This Topic: https://groups.io/mt/101216135/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/leave/12367111/7686176/19134562= 12/xyzzy [rebecca@openfw.io] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- --Apple-Mail=_7F90017E-0D05-4FCF-9C95-224C8190C040 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8

On Sep 7, 2023, at 8:00 AM, Marcin Juszkiewicz <marcin.juszki= ewicz@linaro.org> wrote:

Is there a way to have VT100 (or any other black/white, non-ANSI) t= erminal for UEFI Shell?

I do many runs of QEMU/sbsa-ref with logging= and all those ANSI colour codes only make problems.


These are the supported consoles [1]

EFI_GUID  *mTerminalType[] =3D {
 = ; &gEfiPcAnsiGuid,
  &gEfiVT100Guid,
 = ; &gEfiVT100PlusGuid,
  &gEfiVTUTF8Guid,
&= nbsp; &gEfiTtyTermGuid,
  &gEdkiiLinuxTermGuid,
  &gEdkiiXtermR6Guid,
  &gEdkiiVT400Guid,=
  &gEdkiiSCOTermGuid
};

<= div>CHAR16  *mSerialConsoleNames[] =3D {
  L"PC-ANSI Se= rial Console",
  L"VT-100 Serial Console",
  = L"VT-100+ Serial Console",
  L"VT-UTF8 Serial Console",
  L"Tty Terminal Serial Console",
  L"Linux Termi= nal Serial Console",
  L"Xterm R6 Serial Console",
  L"VT-400 Serial Console",
  L"SCO Terminal Serial Co= nsole"
};

I think the OVMF default= is coming from here [2]
VENDOR_DEVICE_PATH    gTermina= lTypeDeviceNode    =3D gVtUtf8Terminal;

= If you look up gVtUtf8Terminal you see [3]
#define gVtUtf8Te= rminal \
  { \
    { \
  =     MESSAGING_DEVICE_PATH, \
      MSG_V= ENDOR_DP, \
      { \
    &nbs= p;   (UINT8) (sizeof (VENDOR_DEVICE_PATH)), \
    =     (UINT8) ((sizeof (VENDOR_DEVICE_PATH)) >> 8) \
      } \
    }, \
  &n= bsp; DEVICE_PATH_MESSAGING_VT_UTF8 \
  }

Thus we get to the TL;DR part=E2=80=A6 The console NVRAM variables th= at point to the UART has a MESSAGING_DEVICE_PATH MSG_VENDOR_DP node af= ter the UART definition that has a UUID (EFI_GUID) that defines the type of= terminal emulation to use. 

The definition o= f the ConIn and ConOut variables is here [4]


Thanks,

=
Andrew Fish





_._,_._,_

Groups.io Links:

=20 You receive all messages sent to this group. =20 =20

View/Reply Online (#108407) | =20 | Mute= This Topic | New Topic
Your Subscriptio= n | Contact Group Owner | Unsubscribe [rebecca@openfw.io]

_._,_._,_
--Apple-Mail=_7F90017E-0D05-4FCF-9C95-224C8190C040--