From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM03-DM3-obe.outbound.protection.outlook.com (mail-dm3nam03on0056.outbound.protection.outlook.com [104.47.41.56]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 70C6921E2DA65 for ; Wed, 16 Aug 2017 08:01:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amdcloud.onmicrosoft.com; s=selector1-amd-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=6irxSRi5lC1RkV8LmAwsbkyjOFVSwEQsHMKJixe4v5k=; b=dt4B2iFMnh7r/lYz7vHlZsGOQdTLKIzOlmrGtU8EVDXZLSuItOxWA51wExkqjCyS768/0ryjIz/ubui/N8eef/0ad3qqQFYdXmFRMJ3ys7XDtXh/2MaWYppMb9q2DdFsPLUzNpqHfCQrz5ZFS+smt59liUXanyl9o9mRff8sNXM= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=brijesh.singh@amd.com; Received: from [10.236.136.62] (165.204.77.1) by CY1PR12MB0149.namprd12.prod.outlook.com (10.161.173.19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.1.1341.21; Wed, 16 Aug 2017 15:03:40 +0000 Cc: brijesh.singh@amd.com, Ard Biesheuvel , Heyi Guo , Star Zeng To: Laszlo Ersek , edk2-devel-01 References: <20170816121040.15757-1-lersek@redhat.com> <20170816121040.15757-2-lersek@redhat.com> From: Brijesh Singh Message-ID: Date: Wed, 16 Aug 2017 10:03:36 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: <20170816121040.15757-2-lersek@redhat.com> X-Originating-IP: [165.204.77.1] X-ClientProxiedBy: MWHPR14CA0009.namprd14.prod.outlook.com (10.173.227.19) To CY1PR12MB0149.namprd12.prod.outlook.com (10.161.173.19) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 247a3d8b-1403-4315-b74d-08d4e4b7fb8b X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(2017030254152)(300000503095)(300135400095)(48565401081)(201703131423075)(201703031133081)(201702281549075)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095); SRVR:CY1PR12MB0149; X-Microsoft-Exchange-Diagnostics: 1; CY1PR12MB0149; 3:rg7kCHUENcNxVmUjiX7b8R4DUzftCWfOCBGKltP+8V4jKSAZngmxyIbWuEztWmILIc516DHTc/190dyfn9CF14ruDeth8HR6xQADAOElVVmUw0fS1CuHKCj3ztk+o1qeB3H17iPdFWX3PI6WRpNwm8YLxGJebmu4aIx/mnazhn1QaNC38dIapikMYn3c9EsqhJQj5rJVLfh/TuB9QhN+XvtEu4IyKfTCxy+l6e0v000pJxzBlJgpi1STtXxQNBCs; 25:VbndYefTQiAU6CC6VHqU0Mo8Kyo0oQ9dEacVfu35NWtULQBgBTpvc/N/4GQvwT5qp+k3J1QfmgotjZcR2sc5Q68Jwsife3jSgZbgHJWdI12eKMDllKqrIrz9+xJ0IhKIVBvtfFMj8Znz3wy1KTvoc1XY4Z7dCV9WKm8Rutz4oDpDd5ehGk6OFfkv5joZ0UT6Hswr4OJy1ehvQqcTZq2av9evZ8P1YWyJLwlddxhVQtg65YgNk573c2VXjJuIihItuptMhJQxWisFtlrCOVVCkK9XwV6o/zGvdOCZyj1gaJ4f0YJ7YOBnuGbqno1QjWstmVnVR+5T+QWqmdsG+i7RLA==; 31:ZWnebvFZ3X4mBE4u4BGPjePau9yUXu9Ma7HWqGFIgee/JkOIYknwm9w0AWFYMWaZgIJyZy1S+/JbyDagu2fLN+SUYX7ODnw4w6uvrMHYW9xbVaucxXXJG/JxdAY9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test: UriScan:(50582790962513)(767451399110)(228905959029699); X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(8121501046)(5005006)(10201501046)(3002001)(100000703101)(100105400095)(93006095)(93001095)(6055026)(6041248)(20161123555025)(20161123564025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123562025)(20161123560025)(20161123558100)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:CY1PR12MB0149; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:CY1PR12MB0149; X-Forefront-PRVS: 0401647B7F X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(7370300001)(4630300001)(6009001)(6049001)(39860400002)(199003)(377424004)(189002)(24454002)(51914003)(377454003)(189998001)(2950100002)(6666003)(4001150100001)(8676002)(33646002)(81166006)(81156014)(478600001)(50466002)(4326008)(53546010)(54906002)(31686004)(6246003)(7736002)(305945005)(2906002)(86362001)(68736007)(31696002)(53936002)(6306002)(65826007)(966005)(97736004)(83506001)(50986999)(101416001)(65806001)(7350300001)(106356001)(77096006)(66066001)(65956001)(6486002)(42186005)(5660300001)(229853002)(47776003)(76176999)(54356999)(64126003)(230700001)(23676002)(105586002)(4001350100001)(25786009)(6116002)(36756003)(3846002)(90366009)(15760500002)(19627235001); DIR:OUT; SFP:1101; SCL:1; SRVR:CY1PR12MB0149; H:[10.236.136.62]; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; Received-SPF: None (protection.outlook.com: amd.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtDWTFQUjEyTUIwMTQ5OzIzOitjYllPeEVXRDUzYVdDaHZtckdUQlY5Lzd6?= =?utf-8?B?T3BBZmZR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VKfQ21f8YsqV9P+gOBwH7kNDCkXXgOVUYrivj7vuaEkIOROMREwa2ksCbbvtR4D8gQfjgSflcLP5simTeLEvI/IO5PX80OWpFCyIS7jVFv5QR1MTpk/u8Tdw++GUggPaQwPub73XW2D/ELZ62jFoEOQWdWAt4WXPiVn4= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; CY1PR12MB0149; 20:dGFznY59RHk5hx09kIRKQ1he2uaJ+1jTLeOvnPyZJzU5UszlYqjtXELC+CM6WGQR/IMaoNeLxkwpihrHLpGVfXJUi/+WgjvNp0NpMzMPSoGRG5aoNFXn3c9fG8Fg/Toskc9hMRlUyBcikG5Sjz4xUP6Wazs3LapGPW0RaiJZc0GeMxvNLrJ+Zg8FHhRvqTw2zRHOcAkQQfF92RdQHDLvU9XVvo0140jjaYK9wLtwyX5+PS/bKgnEXrYiVjdrRXCs X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Aug 2017 15:03:40.7093 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR12MB0149 Subject: Re: [PATCH 1/1] ArmVirtPkg/FdtPL011SerialPortLib: call PL011UartLib in all SerialPortLib APIs 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, 16 Aug 2017 15:01:18 -0000 Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Hi Laszlo, Thanks for the patch. On 08/16/2017 07:10 AM, Laszlo Ersek wrote: > With the SerialDxe change in commit 4cf3f37c87ba ("MdeModulePkg SerialDxe: > Process timeout consistently in SerialRead", 2017-07-18), setting > EFI_SERIAL_INPUT_BUFFER_EMPTY in the "Control" output parameter, in the > GetControl() SerialPortLib function, is no longer a "small optimization". > Namely, due to the SerialDxe change, the GetOneKeyFromSerial() call in > TerminalDxe's TerminalConInTimerHandler() can take very long if the input > queue is empty, even if GetOneKeyFromSerial()'s return value causes the > loop to be exited right after, in the first iteration. > > This issue causes a boot hang in ArmVirtQemu: with the input queue empty, > TerminalConInTimerHandler() takes so long to return that, by the time it > returns, there's another execution queued already (due to the associated > timer event being signaled meanwhile). The boot process is stuck in the > timer event handler. > > Therefore even the first GetOneKeyFromSerial() iteration must be prevented > in TerminalConInTimerHandler() if the input queue is empty, and that > requires implementing GetControl() for real. > > Implement the SetAttributes(), SetControl() and GetControl() APIs (of > SerialPortExtLib origin) in FdtPL011SerialPortLib with calls to matching > PL011UartLib functions. This follows the example of > "ArmPlatformPkg/Library/PL011SerialPortLib" and also matches Star's > original idea under [1]. > > The patch can be considered a continuation of commit ad7f6bc2e116 > ("ArmVirtPkg: Use SerialDxe in MdeModulePkg instead of EmbeddedPkg", > 2015-11-26), based on the mailing list threads [1] [2] [3]. > > [1] http://mid.mail-archive.com/1447752930-32880-12-git-send-email-star.zeng@intel.com > [2] http://mid.mail-archive.com/1448243067-1880-12-git-send-email-star.zeng@intel.com > [3] http://mid.mail-archive.com/b748580c-cb51-32c9-acf9-780841ef15da@redhat.com > > Cc: Ard Biesheuvel > Cc: Brijesh Singh > Cc: Heyi Guo > Cc: Star Zeng > Originally-suggested-by: Star Zeng > Reported-by: Brijesh Singh > Contributed-under: TianoCore Contribution Agreement 1.1 > Signed-off-by: Laszlo Ersek > --- I can confirm that with this patch I am able to boot to the UEFI shell prompt. Tested-by: Brijesh Singh