From patchwork Thu May 14 20:43:31 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Roy Franz X-Patchwork-Id: 48540 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f200.google.com (mail-wi0-f200.google.com [209.85.212.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id AC2962121F for ; Thu, 14 May 2015 20:43:57 +0000 (UTC) Received: by wizk4 with SMTP id k4sf26714830wiz.2 for ; Thu, 14 May 2015 13:43:57 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:mime-version:in-reply-to:references :date:message-id:from:to:cc:subject:precedence:reply-to:list-id :list-unsubscribe:list-archive:list-post:list-help:list-subscribe :content-type:content-transfer-encoding:errors-to:x-original-sender :x-original-authentication-results:mailing-list; bh=piTZ18XusUtdfiA5+r3y+tF43sARuIjp/LtHT3PIy0o=; b=LTiFkTZaFDP6xbHbKSmKBzpKS+bE9Rfb/fZj2/MewC6INlfYx7dsG/k52fKf377wEr WsLDfPB3kT7aG08kwZCJe7+Vpvv4Ftf9nBuOSJqyR3ipyrJhbTkT47dID/kT+e+dlJJn D3n3XncQp/MuAUhuvpSsCaNuO1ZX8QX4irZOLrrJuOL5nZbyvNt1dDsbYXymgA8KUaDl ab9BlFBv5HENK3Yd49o/wDzEOKF4iEvM3gLQOj1dCtU5BrliEhU19VSG1HCkyCXgY0dO mnWYy8pEgV1XTv0q3onK5Hs25VzQmCsMU0q9W7cCwcFBMtujtBuY9hCHI0GWDGvzfaMZ nFUA== X-Gm-Message-State: ALoCoQmmxvZPaFSbGa1RIQs0LGLh+M+Lokd/Ef1CoWN4yV++yOwPDeNJMOk3i5dU40LmAhv8NaCq X-Received: by 10.112.130.71 with SMTP id oc7mr4276786lbb.23.1431636236982; Thu, 14 May 2015 13:43:56 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.28.231 with SMTP id e7ls424652lah.38.gmail; Thu, 14 May 2015 13:43:55 -0700 (PDT) X-Received: by 10.112.157.164 with SMTP id wn4mr4605926lbb.100.1431636235223; Thu, 14 May 2015 13:43:55 -0700 (PDT) Received: from mail-la0-f47.google.com (mail-la0-f47.google.com. [209.85.215.47]) by mx.google.com with ESMTPS id js14si15240291lab.166.2015.05.14.13.43.54 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 14 May 2015 13:43:54 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.47 as permitted sender) client-ip=209.85.215.47; Received: by lagr1 with SMTP id r1so4427661lag.0 for ; Thu, 14 May 2015 13:43:54 -0700 (PDT) X-Received: by 10.152.36.161 with SMTP id r1mr1157154laj.88.1431636234778; Thu, 14 May 2015 13:43:54 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.108.230 with SMTP id hn6csp1519968lbb; Thu, 14 May 2015 13:43:53 -0700 (PDT) X-Received: by 10.50.111.131 with SMTP id ii3mr7032494igb.47.1431636233697; Thu, 14 May 2015 13:43:53 -0700 (PDT) Received: from lists.sourceforge.net (lists.sourceforge.net. [216.34.181.88]) by mx.google.com with ESMTPS id q7si1978155icp.66.2015.05.14.13.43.52 (version=TLSv1 cipher=RC4-SHA bits=128/128); Thu, 14 May 2015 13:43:53 -0700 (PDT) Received-SPF: pass (google.com: domain of edk2-devel-bounces@lists.sourceforge.net designates 216.34.181.88 as permitted sender) client-ip=216.34.181.88; Received: from localhost ([127.0.0.1] helo=sfs-ml-1.v29.ch3.sourceforge.com) by sfs-ml-1.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1Yszyn-00070t-TN; Thu, 14 May 2015 20:43:41 +0000 Received: from sog-mx-4.v43.ch3.sourceforge.com ([172.29.43.194] helo=mx.sourceforge.net) by sfs-ml-1.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1Yszym-00070n-5x for edk2-devel@lists.sourceforge.net; Thu, 14 May 2015 20:43:40 +0000 Received-SPF: pass (sog-mx-4.v43.ch3.sourceforge.com: domain of linaro.org designates 209.85.215.44 as permitted sender) client-ip=209.85.215.44; envelope-from=roy.franz@linaro.org; helo=mail-la0-f44.google.com; Received: from mail-la0-f44.google.com ([209.85.215.44]) by sog-mx-4.v43.ch3.sourceforge.com with esmtps (TLSv1:RC4-SHA:128) (Exim 4.76) id 1Yszyk-0002Mq-49 for edk2-devel@lists.sourceforge.net; Thu, 14 May 2015 20:43:40 +0000 Received: by lagr1 with SMTP id r1so4412673lag.0 for ; Thu, 14 May 2015 13:43:31 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.152.6.105 with SMTP id z9mr4448135laz.98.1431636211669; Thu, 14 May 2015 13:43:31 -0700 (PDT) Received: by 10.25.87.146 with HTTP; Thu, 14 May 2015 13:43:31 -0700 (PDT) In-Reply-To: References: <1431561241-1411-1-git-send-email-roy.franz@linaro.org> <74D8A39837DF1E4DA445A8C0B3885C5001316C54@shsmsx102.ccr.corp.intel.com> <74D8A39837DF1E4DA445A8C0B3885C5001316CBB@shsmsx102.ccr.corp.intel.com> <74D8A39837DF1E4DA445A8C0B3885C5001316DCD@shsmsx102.ccr.corp.intel.com> Date: Thu, 14 May 2015 13:43:31 -0700 Message-ID: From: Roy Franz To: "Kinney, Michael D" X-Spam-Score: -1.5 (-) X-Spam-Report: Spam Filtering performed by mx.sourceforge.net. See http://spamassassin.org/tag/ for more details. -1.5 SPF_CHECK_PASS SPF reports sender host as permitted sender for sender-domain -0.0 SPF_PASS SPF: sender matches SPF record X-Headers-End: 1Yszyk-0002Mq-49 Cc: "edk2-devel@lists.sourceforge.net" , "linaro-uefi@lists.linaro.org" Subject: Re: [edk2] [RFC 0/4] New terminal type for Linux X-BeenThere: edk2-devel@lists.sourceforge.net X-Mailman-Version: 2.1.9 Precedence: list Reply-To: edk2-devel@lists.sourceforge.net List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , Errors-To: edk2-devel-bounces@lists.sourceforge.net X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: roy.franz@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.47 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 On Thu, May 14, 2015 at 12:31 PM, Kinney, Michael D wrote: > Jiewen, > > I think most of the terminal emulators being discussed here layer on top of a TTY device. > > How about TtyTerm instead? I think this is a more appropriate name. Michael - I'll also try to address feedback on the new GUID going in the wrong place, as the patchset did grow larger than I expected it to be. If I understand correctly the new GUID should just be present in the TerminalDxe module. I do want to try to keep the size of this change in check, as fixing backspace for the problematic cases can be done with the following patch. Fixing delete is slightly bigger, but if I create a completely separate terminal module it will be 95+% directly copied from TerminalDxe. I have no further plans beyond backspace/delete, so unless others want to extend this new terminal I don't foresee more being done. Thanks, Roy > > -----Original Message----- > From: Yao, Jiewen > Sent: Wednesday, May 13, 2015 7:13 PM > To: Kinney, Michael D; edk2-devel@lists.sourceforge.net; linaro-uefi@lists.linaro.org; Tian, Feng > Subject: RE: [edk2] [RFC 0/4] New terminal type for Linux > > Definitely, I fully agree we should add new capability for terminal type to support more OS. It is question of "how", not "if". :-) > > Back to naming, I feel a little strange to use "Linux". Does it also work for other *nix system? > I suggest we had better give a name for terminal type, instead of OS type. > > Mike or Andrew > Do you have better suggestion on naming? > > Thank you > Yao Jiewen > > -----Original Message----- > From: Kinney, Michael D > Sent: Thursday, May 14, 2015 9:23 AM > To: Yao, Jiewen; edk2-devel@lists.sourceforge.net; linaro-uefi@lists.linaro.org; Tian, Feng; Kinney, Michael D > Subject: RE: [edk2] [RFC 0/4] New terminal type for Linux > > Jiewen, > > Adding more GUIDs is possible if there is no agreement between different terminal emulators. I recommend we allow the patch to be reviewed and encourage expanding the capabilities of this new terminal type as required to maximize compatibility. > > Mike > > -----Original Message----- > From: Yao, Jiewen > Sent: Wednesday, May 13, 2015 6:16 PM > To: Kinney, Michael D; edk2-devel@lists.sourceforge.net; linaro-uefi@lists.linaro.org; Tian, Feng > Subject: RE: [edk2] [RFC 0/4] New terminal type for Linux > > OK. I also have interest to know how to handle below case mentioned by patch submitter : > "I do not think that all Linux distributions agree on all the details, so my goal is to have a terminal defition that mostly works in many configurations." > > If one distribution think it should do A, other distribution think it should do B. Should we just keep adding new GUID type? > > Thank you > Yao Jiewen > > -----Original Message----- > From: Kinney, Michael D > Sent: Thursday, May 14, 2015 9:12 AM > To: Yao, Jiewen; edk2-devel@lists.sourceforge.net; linaro-uefi@lists.linaro.org; Tian, Feng; Kinney, Michael D > Subject: RE: [edk2] [RFC 0/4] New terminal type for Linux > > Jiewen, > > If there is a size concern, we can add Feature Flag PCDs to enable/disable support for different terminal types in the TerminalDxe driver. > > Since this new terminal type is very close to another terminal type that is already supported by TerminalDxe, the size impact of adding this new terminal type should be very small. Especially since the TerminalDxe driver is usually compressed. > > Thanks, > > Mike > > -----Original Message----- > From: Yao, Jiewen > Sent: Wednesday, May 13, 2015 5:59 PM > To: edk2-devel@lists.sourceforge.net; linaro-uefi@lists.linaro.org; Tian, Feng; Kinney, Michael D > Subject: RE: [edk2] [RFC 0/4] New terminal type for Linux > > Or can we provide a standalone LinuxTerminalDxe driver? > > The original TerminalDxe handle the default types defined in UEFI spec. > The new LinuxTerminalDxe can support the extension like this. > > That can also made code size small, if a platform BIOS decides to only support a subset of terminal types. > > Thank you > Yao Jiewen > > > -----Original Message----- > From: Kinney, Michael D [mailto:michael.d.kinney@intel.com] > Sent: Thursday, May 14, 2015 8:44 AM > To: edk2-devel@lists.sourceforge.net; linaro-uefi@lists.linaro.org; Tian, Feng; Kinney, Michael D > Subject: Re: [edk2] [RFC 0/4] New terminal type for Linux > > Roy, > > The new GUID for this terminal type should not be defined in the MdePkg. The MdePkg is intended to only contain content from industry standard specifications. > > I recommend you add the GUID for this new terminal type to the MdeModulePkg so it is in the same package that contains the terminal driver that uses it. > > I think this means you should not modify PcAnsi.h in BaseTools or the EdkCompatibilityPkg. > > It also means that the UEFI Device Path Libs in the MdePkg cannot know about this GUID and will show the VenMedia() node with a GUID value. > > Hopefully with these changes, the patch set will be much smaller. > > Thanks, > > Mike > > -----Original Message----- > From: Roy Franz [mailto:roy.franz@linaro.org] > Sent: Wednesday, May 13, 2015 4:54 PM > To: edk2-devel@lists.sourceforge.net; linaro-uefi@lists.linaro.org; Tian, Feng > Subject: [edk2] [RFC 0/4] New terminal type for Linux > > This patchset is a follow on to my previous backspace patchse, and adds a new terminal type "LinuxTerm" > (for lack of a better name) that better handles the typical Linux terminal (xterm/rxvt/gnome terminal/etc.) These often treat backspace/delete differently than the existing EDK2 terminal types expect, particularly in emulated environments where the emulated serial port is connected to a graphical terminal rather than a serial console. > For a description of how Debian has dealt with the terminal backspace/delete/^H mess, see the "Keyboard configuration" > section of: > > https://www.debian.org/doc/debian-policy/ch-opersys.html#s9.8">KeyboardConfiguration > > I do not think that all Linux distributions agree on all the details, so my goal is to have a terminal defition that mostly works in many configurations. > > Backspace being broken in these environments is the primary motivation for this, but this terminal type could be exentend to better support the typical graphical terminal now in use. > This terminal type may be of use in BSD environments as well, so I'm open to more generic name suggestions. I deliberately avoided calling it "xterm", as my intention is to try to work with multiple terminal types to the degree possible. > > > > Roy Franz (4): > Add "LinuxTerm" terminal type to TerminalDxe > Treat ASCII 0x7F as backspace for LinuxTerm terminal > accept [3~ as delete for LinuxTerm terminals > Change QEMU terminal type to LinuxTerm > > .../ArmVirtualizationPkg/ArmVirtualizationQemu.dsc | 4 +- > BaseTools/Source/C/Include/Guid/PcAnsi.h | 6 +++ > .../Foundation/Efi/Guid/PcAnsi/PcAnsi.c | 2 + > .../Foundation/Efi/Guid/PcAnsi/PcAnsi.h | 6 +++ > .../Universal/BdsDxe/BootMaint/BootMaint.h | 2 +- > .../Universal/BdsDxe/BootMaint/Data.c | 5 ++- > .../Universal/Console/TerminalDxe/Terminal.c | 44 ++++++++++++++++---- > .../Universal/Console/TerminalDxe/Terminal.h | 2 + > .../Universal/Console/TerminalDxe/TerminalConIn.c | 47 ++++++++++++++++++++-- .../Universal/Console/TerminalDxe/TerminalConOut.c | 2 + .../Universal/Console/TerminalDxe/TerminalDxe.inf | 1 + > MdePkg/Include/Guid/PcAnsi.h | 6 +++ > MdePkg/Include/Protocol/DevicePath.h | 1 + > .../Library/UefiDevicePathLib/DevicePathFromText.c | 27 +++++++++++++ > .../Library/UefiDevicePathLib/DevicePathToText.c | 3 ++ > .../UefiDevicePathLib/UefiDevicePathLib.inf | 2 + > ...UefiDevicePathLibOptionalDevicePathProtocol.inf | 4 +- > MdePkg/MdePkg.dec | 3 ++ > .../UefiHandleParsingLib/UefiHandleParsingLib.c | 1 + > .../UefiHandleParsingLib/UefiHandleParsingLib.inf | 1 + > 20 files changed, 153 insertions(+), 16 deletions(-) > > -- > 1.9.1 > > > ------------------------------------------------------------------------------ > One dashboard for servers and applications across Physical-Virtual-Cloud Widest out-of-the-box monitoring support with 50+ applications Performance metrics, stats and reports that give you Actionable Insights Deep dive visibility with transaction tracing using APM Insight. > http://ad.doubleclick.net/ddm/clk/290420510;117567292;y > _______________________________________________ > edk2-devel mailing list > edk2-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/edk2-devel > > ------------------------------------------------------------------------------ > One dashboard for servers and applications across Physical-Virtual-Cloud Widest out-of-the-box monitoring support with 50+ applications Performance metrics, stats and reports that give you Actionable Insights Deep dive visibility with transaction tracing using APM Insight. > http://ad.doubleclick.net/ddm/clk/290420510;117567292;y > _______________________________________________ > edk2-devel mailing list > edk2-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/edk2-devel ------------------------------------------------------------------------------ One dashboard for servers and applications across Physical-Virtual-Cloud Widest out-of-the-box monitoring support with 50+ applications Performance metrics, stats and reports that give you Actionable Insights Deep dive visibility with transaction tracing using APM Insight. http://ad.doubleclick.net/ddm/clk/290420510;117567292;y diff --git a/MdeModulePkg/Universal/Console/TerminalDxe/TerminalConIn.c b/MdeModulePkg/Universal/Console/TerminalDxe/TerminalConIn.c index 51492f3..70ec370 100644 --- a/MdeModulePkg/Universal/Console/TerminalDxe/TerminalConIn.c +++ b/MdeModulePkg/Universal/Console/TerminalDxe/TerminalConIn.c @@ -1561,8 +1561,14 @@ UnicodeToEfiKey ( } if (UnicodeChar == DEL) { - Key.ScanCode = SCAN_DELETE; - Key.UnicodeChar = 0; + if (PcgGetBool(TerminalTreatAsciiDelAsBackspace) {^M + Key.ScanCode = SCAN_NULL;^M + Key.UnicodeChar = CHAR_BACKSPACE;^M + }^M + else {^M + Key.ScanCode = SCAN_DELETE;^M + Key.UnicodeChar = 0;^M + }^M > > Mike