public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Andrew Fish" <afish@apple.com>
To: discuss <discuss@edk2.groups.io>,
	"Desimone, Nathaniel L" <nathaniel.l.desimone@intel.com>
Cc: edk2-devel-groups-io <devel@edk2.groups.io>,
	"lersek@redhat.com" <lersek@redhat.com>,
	"cadenkline9@gmail.com" <cadenkline9@gmail.com>,
	"Ard Biesheuvel (TianoCore)" <ardb+tianocore@kernel.org>,
	"Leif Lindholm (Nuvia address)" <leif@nuviainc.com>
Subject: Re: [edk2-devel] [edk2-discuss] Google Summer of Code Interested Student
Date: Mon, 22 Mar 2021 16:07:58 -0700	[thread overview]
Message-ID: <E81D0145-8239-46E3-BFF3-2B65FB0CCCC4@apple.com> (raw)
In-Reply-To: <44CC6C4E-FD2E-4667-BC3B-441D33AFEF0F@intel.com>

[-- Attachment #1: Type: text/plain, Size: 7575 bytes --]



> On Mar 22, 2021, at 11:31 AM, Nate DeSimone <nathaniel.l.desimone@intel.com> wrote:
> 
> Hi Andrew,
> 
> I tested VT_UTF8 on the macOs Terminal software and I can confirm that VT_UTF8 renders nicely. See the attached screenshot.
> 

Nate,

Yes it is close to VT_UTF8, but not quite the same. I was looking back through the driver and I’d forgotten how similar it really is. 

Symbols used in table below
===========================
  ESC = 0x1B
  CSI = 0x9B
  DEL = 0x7f
  ^   = CTRL

+=========+======+===========+==========+==========+=============+
|         | EFI  | EFI 1.10  |          |          |             |
|         | Scan |           |  VT100+  |          |             |
|   KEY   | Code |  PC ANSI  |  VTUTF8  |   VT100  | xterm-color | 
+=========+======+===========+==========+==========+=============+
| NULL    | 0x00 |           |          |          |             |
| UP      | 0x01 | ESC [ A   | ESC [ A  | ESC [ A  | ESC [ A     |
| DOWN    | 0x02 | ESC [ B   | ESC [ B  | ESC [ B  | ESC [ B     |
| RIGHT   | 0x03 | ESC [ C   | ESC [ C  | ESC [ C  | ESC [ C     |
| LEFT    | 0x04 | ESC [ D   | ESC [ D  | ESC [ D  | ESC [ D     |
| HOME    | 0x05 | ESC [ H   | ESC h    | ESC [ H  | ESC [ H     |
|         |      |           |          |          | ^A          |
| END     | 0x06 | ESC [ F   | ESC k    | ESC [ K  | ESC [ F     |
| INSERT  | 0x07 | ESC [ @   | ESC +    | ESC [ @  | ^E          |
|         |      | ESC [ L   |          | ESC [ L  |             |
| DELETE  | 0x08 | ESC [ X   | ESC -    | ESC [ P  | 0x7f        |
| PG UP   | 0x09 | ESC [ I   | ESC ?    | ESC [ V  | ESC [ 5 ~   |
|         |      |           |          | ESC [ ?  | ^P          |
| PG DOWN | 0x0A | ESC [ G   | ESC /    | ESC [ U  | ESC [ 6 ~   |
|         |      |           |          | ESC [ /  | ^N          |
| F1      | 0x0B | ESC [ M   | ESC 1    | ESC O P  | ESC O P     |
| F2      | 0x0C | ESC [ N   | ESC 2    | ESC O Q  | ESC O Q     |
| F3      | 0x0D | ESC [ O   | ESC 3    | ESC O w  | ESC O R     |
| F4      | 0x0E | ESC [ P   | ESC 4    | ESC O x  | ESC O S     |
| F5      | 0x0F | ESC [ Q   | ESC 5    | ESC O t  | ESC [ 1 5 ~ |
| F6      | 0x10 | ESC [ R   | ESC 6    | ESC O u  | ESC [ 1 7 ~ |
| F7      | 0x11 | ESC [ S   | ESC 7    | ESC O q  | ESC [ 1 8 ~ |
| F8      | 0x12 | ESC [ T   | ESC 8    | ESC O r  | ESC [ 1 9 ~ |
| F9      | 0x13 | ESC [ U   | ESC 9    | ESC O p  | ESC [ 2 0 ~ |
| F10     | 0x14 | ESC [ V   | ESC 0    | ESC O M  | ESC [ 2 1 ~ |
| Escape  | 0x17 | ESC       | ESC      | ESC      | ESC         |
+=========+======+===========+==========+==========+=============+
| F11     | 0x16 |           |          |          | ESC [ 2 3 ~ |
| F12     | 0x16 |           |          |          | ESC [ 2 4 ~ |
+=========+======+===========+==========+==========+=============+


I’m wondering it we could pick the default terminal type based on the toolchain? 

Thanks,

Andrew Fish

> Thanks,
> Nate
> 
> On 3/17/21, 9:02 AM, "Andrew Fish" <afish@apple.com <mailto:afish@apple.com>> wrote:
> 
>    If we are mentioning terminal types the default terminal type on a Mac is xterm-256color. So that is going to be the default when people run OVMF on a Mac. So it would be nice if we can add that. I can help out with anything xterm-256color related. 
> 
>    Thanks,
> 
>    Andrew Fish
> 
>> On Mar 16, 2021, at 8:23 AM, Laszlo Ersek <lersek@redhat.com> wrote:
>> 
>> Hi Nate,
>> 
>> (adding Leif and Ard)
>> 
>> On 03/13/21 03:52, Desimone, Nathaniel L wrote:
>>> I've created a new wiki page for this task with all the information I
>>> have gathered thus far. I've done some more experimentation and found
>>> that there are several newer terminal emulators that don't support
>>> DEC Special Graphics so I've reduced the number of modes where DEC
>>> Special Graphics should be preferred. Laszlo, if you could take a
>>> look at the terminal type matrix I created that would be very
>>> helpful.
>>> 
>>> https://github.com/tianocore/tianocore.github.io/wiki/Tasks-Terminal-driver-improvements
>> 
>> (
>> 
>> My background:
>> 
>> I settled on plain (non-UTF-8) xterm around 1998, and have been using it
>> ever since. Whenever something was off, I always tried to hammer the
>> application into conformance with my particular xterm setup, rather than
>> the other way around. I also have some quirky terminal settings -- for
>> me, "backspace" generates ^H / keycode 22 (stty sets erase to ^H),
>> "delete" generates keycode 119, and there's no "rubout". I still don't
>> use UTF-8 (I use latin2).
>> 
>> )
>> 
>> * Regarding ArmVirtPkg, I stick with the default TTY_TERMINAL=FALSE
>> setting (which means VT-100). Using that setting, I see the following
>> kind of "ASCII approximation" for box drawing:
>> 
>> /------------------------------------------------------------------------------\
>> |                                Boot Manager                                  |
>> \------------------------------------------------------------------------------/
>> 
>> I'm really happy with this, as I don't care much for nice-looking
>> boxes; instead I prefer portability.
>> 
>> (NB: this seems to disagree with your "Current Behavior (Which is
>> wrong)" line for VT100, as it suggests CP437. That's not what I'm
>> seeing with VT100.)
>> 
>> TTY_TERMINAL=TRUE would mainly affect backspace / delete I think -- as
>> far as I recall, that's why I asked Roy not to make TTY_TERMINAL=TRUE
>> the default, in 2015:
>> 
>> http://mid.mail-archive.com/555458DB.3090602@redhat.com
>> http://mid.mail-archive.com/CAFECyb_E+bGZt5xv7QhRqyD0jX=AzoEMw7VW_tjZr+E=sQf8ww@mail.gmail.com
>> 
>> (I'd like to CC Roy, but I can't tell if he's now working for Linaro,
>> Cavium, HPE, Marvell, or another company.)
>> 
>> * Regarding OvmfPkg, currently PC_ANSI is hard-coded, and for me it
>> looks like this:
>> 
>> ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄż
>> ł                                Boot Manager                                  ł
>> ŔÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄŮ
>> 
>> Obviously I'd much prefer if I got the simple ASCII approximation here
>> as well.
>> 
>> * Whether VT100 and/or PC_ANSI and/or TTY_TERM are *officially* supposed
>> to use DEC Special Graphics, I can't tell.
>> 
>> I know what my preferences are:
>> 
>> - the current BackSpace and Delete mappings (which work fine for me
>>   with both VT100 and PC_ANSI, but *not* with TTY_TERM),
>> 
>> - and the most primitive ASCII mapping (no special graphics, no UTF-8
>>   sequences, etc). I really like a super dumb terminal, where taking
>>   simple "ASCII screenshots" (and pasting them into plaintext emails!)
>>   is *trivial*.
>> 
>> ... Looking at your "Expected Behavior" table, there is only one line
>> left with "poor man's ASCII" -- namely, TTY_TERM. Unfortunately,
>> TTY_TERM breaks my BackSpace / Delete settings :(
>> 
>> * In summary, I'd prefer if (a) VT100 stayed as-is (using "poor man's
>> ASCII", as seen in ArmVirtPkg), and (b) if OVMF used *that* VT100,
>> rather than PC_ANSI, by default.
>> 
>> Thanks!
>> Laszlo
>> 
>> 
>> 
>> 
>> 
>> 
> 
> 
> 
> 
> 
> 
> 
> <macos_terminal_vt_utf8.png>


[-- Attachment #2: Type: text/html, Size: 28326 bytes --]

      reply	other threads:[~2021-03-22 23:08 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <P6oo.1615342201438491325.TWFM@groups.io>
     [not found] ` <848a0cdb-accf-5b7c-df59-65a806ea14a7@redhat.com>
2021-03-12  5:45   ` [edk2-discuss] Google Summer of Code Interested Student Nate DeSimone
2021-03-12 18:51     ` Laszlo Ersek
2021-03-13  2:52       ` Nate DeSimone
     [not found]   ` <166B8219924C8DCE.3757@groups.io>
2021-03-13  2:52     ` Nate DeSimone
2021-03-16 15:23       ` Laszlo Ersek
2021-03-16 23:25         ` Nate DeSimone
2021-03-17 17:14           ` Laszlo Ersek
2021-03-17 12:02         ` Leif Lindholm
2021-03-17 16:00         ` [edk2-devel] " Andrew Fish
2021-03-22 18:31           ` Nate DeSimone
2021-03-22 23:07             ` Andrew Fish [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=E81D0145-8239-46E3-BFF3-2B65FB0CCCC4@apple.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox