From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=17.151.62.28; helo=mail-in6.apple.com; envelope-from=afish@apple.com; receiver=edk2-devel@lists.01.org Received: from mail-in6.apple.com (mail-out6.apple.com [17.151.62.28]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 6EF23203564C6 for ; Tue, 28 Nov 2017 20:13:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; d=apple.com; s=mailout2048s; c=relaxed/simple; q=dns/txt; i=@apple.com; t=1511929092; h=From:Sender:Reply-To:Subject:Date:Message-id:To:Cc:MIME-version:Content-type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-reply-to:References:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=zK71/O5efnAB50DQSmMQCp6B8hKluIIlXiR2Y37VUwk=; b=h459g85cGYR7F+DLdVetK8M92lCW8tkZ+LR9ClQPJe48J8uugIiRpZu5r3CoEzsi nKLW2Miw7zyLl/ris0Ur6hF6EFZH/q3PQ8S9YtCxwIC3WoHCtj5fVXTgdpSuTEqv PBST//IiL7CdivKxHFxJRqQegNl21RJGv1ppO8KzNpM2mHN8vbdnXSQfv2T0tds1 EHcY9Rc1Qd6YgDMKwsM/sg+zkEkHg417TVgtuDOOUNj5HL42qjmeamY13PH2f3LS uKIKvQ2GhcNFZnb84c2Ra07udjhHFDPiW0hwHzpw6RBCLasWTlRwqKUii6C15O6c wuqD5eqyFnwvm+O6FwaFQw==; Received: from relay4.apple.com (relay4.apple.com [17.128.113.87]) (using TLS with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mail-in6.apple.com (Apple Secure Mail Relay) with SMTP id 33.D2.20985.4053E1A5; Tue, 28 Nov 2017 20:18:12 -0800 (PST) X-AuditID: 11973e15-7125b9c0000051f9-a4-5a1e3504a8a8 Received: from nwk-mmpp-sz09.apple.com (nwk-mmpp-sz09.apple.com [17.128.115.80]) by relay4.apple.com (Apple SCV relay) with SMTP id 6A.E2.21277.4053E1A5; Tue, 28 Nov 2017 20:18:12 -0800 (PST) MIME-version: 1.0 Received: from da0601a-dhcp180.apple.com ([17.226.15.180]) by nwk-mmpp-sz09.apple.com (Oracle Communications Messaging Server 8.0.2.1.20171102 64bit (built Nov 2 2017)) with ESMTPSA id <0P0500AHEVYCVZ50@nwk-mmpp-sz09.apple.com>; Tue, 28 Nov 2017 20:18:12 -0800 (PST) Sender: afish@apple.com From: Andrew Fish Message-id: <2D610939-ABCA-45B6-B4DE-38CD61BFB9E9@apple.com> Date: Tue, 28 Nov 2017 20:18:11 -0800 In-reply-to: <52afe6c7-2390-bbad-0159-514fdbb0413c@hpe.com> Cc: Heyi Guo , Gerd Hoffmann , "Ni, Ruiyu" , "edk2-devel@lists.01.org" , "Dong, Eric" , "Zeng, Star" To: "Brian J. Johnson" References: <1958e840-f0fe-6d8e-44d1-03ff9c9dde7b@linaro.org> <0C09AFA07DD0434D9E2A0C6AEB0483103B9B3162@shsmsx102.ccr.corp.intel.com> <734D49CCEBEEF84792F5B80ED585239D5BAB6CB0@SHSMSX104.ccr.corp.intel.com> <734D49CCEBEEF84792F5B80ED585239D5BAB6F41@SHSMSX104.ccr.corp.intel.com> <20171108090713.5hof77t5l3gikpwk@sirius.home.kraxel.org> <7c7d448c-bd00-954a-dcf4-8f83f98f43d6@linaro.org> <6eed14fe-31e7-f0ab-3e80-6fa9847e10e4@hpe.com> <110d99fc-0021-a59b-ad8d-287ef3236356@linaro.org> <52afe6c7-2390-bbad-0159-514fdbb0413c@hpe.com> X-Mailer: Apple Mail (2.3273) X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrDLMWRmVeSWpSXmKPExsUi2FAYrstiKhdlcOGdscWkvi1sFnsOHWW2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GxOAWuJo4f6mUGGMgu8YpRY8OIG2FARAT2J OWdfgNlCAh2sErPuOEKcKitxa/Yl5gmM/LOQHDgLyYGzGDmAbHWJKVNyIcLaEk/eXWCFsNUk Fv5exIQsvoCRbRWjQFFqTmKliV5iQUFOql5yfu4mRnA0FIbvYPy3zOoQowAHoxIP78UVslFC rIllxZW5hxglOJiVRHgrJwGFeFMSK6tSi/Lji0pzUosPMUpzsCiJ835eKR4lJJCeWJKanZpa kFoEk2Xi4JRqYNx1Pq1Q7/rJDXm7HON9lBy9E89Y2bgmbbrNdH9hzf2cb1N/iFzkuybzdr3a I5FFbSe+Cfxxur7Hepno8yXH3iksOzL/+fmFdduDVUJuRB58vvrr9hbbet7uLzZ6u1fH5l58 /p3rziFNzdT+YiWpUO/QO0fszIPM2VRuqi6fmfjvX8TfEkM2zS4lluKMREMt5qLiRAA7BBHM ggIAAA== X-Content-Filtered-By: Mailman/MimeDel 2.1.22 Subject: Re: [MdeModulePkg/TerminalDxe] Why do we delay 2s for ESC being pressed? X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Nov 2017 04:13:49 -0000 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Big picture I think the goal is to not make the driver depend on the PCD = protocol. A fixed at build PCD is just part of the build system, so not = an issue. Thanks, Andrew Fish > On Nov 28, 2017, at 9:55 AM, Brian J. Johnson = wrote: >=20 > On 11/24/2017 01:21 AM, Heyi Guo wrote: >> Hi Brian, >> =E5=9C=A8 11/9/2017 12:00 AM, Brian J. Johnson =E5=86=99=E9=81=93: >>> On 11/08/2017 07:34 AM, Heyi Guo wrote: >>>>=20 >>>>=20 >>>> On 11/08/2017 05:07 PM, Gerd Hoffmann wrote: >>>>> On Wed, Nov 08, 2017 at 04:44:37PM +0800, Heyi Guo wrote: >>>>>>=20 >>>>>> =E5=9C=A8 11/8/2017 4:34 PM, Ni, Ruiyu =E5=86=99=E9=81=93: >>>>>>> No. >>>>>>> Even a terminal tool can recognize F10, it still needs to = translate it into "ESC [ V" >>>>>>> and send the three bytes to firmware. >>>>>> Got it. But the 2 seconds timeout is not for this situation, = right? If >>>>>> terminal tool could translate and send the key sequence, I think = it can >>>>>> complete 3 bytes transfer in a very short time, isn't it? E.g. = 9600 baud / 8 >>>>>> =3D 1200 Bytes/s (ignore control bits). >>>>>>=20 >>>>>> So 2 seconds timeout is still for user to enter the sequence "ESC = [ V" >>>>>> manually? >>>>> No. Alot of software has this kind of delay because it is = recommended >>>>> in some classic unix documentation to avoid mis-interpreting = incomplete >>>>> terminal control sequences coming from slow terminals. >>>>>=20 >>>>> Where a "slow terminal" which actually would need such a long = delay is a >>>>> physical terminal from the 70ies of the last century, or a virtual >>>>> terminal hooked up over a *really* slow network connection. >>>>>=20 >>>>> Reducing the delay from 2 seconds to roughly 0.2 seconds should be >>>>> pretty safe, things are not that slow any more these days :) >>>> That will be great if we can make such change :) >>>>=20 >>>=20 >>> You'd be surprised how much delay you can get with a few layers of = firewalls, VPNs, and cross-country (or intercontinental) WAN links. = That's the advantage of serial: you can tunnel it anywhere. >>>=20 >>> Here's a quick workaround: if you start typing other text after the = ESC, the terminal driver will see the new keystrokes and resolve the ESC = immediately, without the delay. For instance, at the shell prompt, type = something, press ESC to clear the line, then just start typing new text = without waiting for the timeout. The line will be cleared and the new = text will appear correctly, without delay. >>>=20 >>> On setup screens, I usually hit escape to return to the previous = screen, then hit one of the arrow keys to cause the ESC to be processed = without the timeout. That works pretty well in practice. >>>=20 >>> I'd think a PCD to control this delay would be appropriate, though. >> Can we really use a PCD in TerminalDxe? I remember some experts in = the community said that TerminalDxe is a pure UEFI driver; it can't use = PCD since PCD is not defined in UEFI spec. >> Thanks, >> Gary (Heyi Guo) >=20 > Gary, >=20 > I'm not sure what the rules are for PCDs. I'm just saying that if = there's a good way to make the delay configurable for each platform, I = wouldn't be against it. 2 seconds is a long time in some contexts. >=20 > --=20 > Brian J. Johnson > Enterprise X86 Lab > Hewlett Packard Enterprise > brian.johnson@hpe.com >=20 > _______________________________________________ > edk2-devel mailing list > edk2-devel@lists.01.org > https://lists.01.org/mailman/listinfo/edk2-devel =