On 08/16/17 17:03, Brijesh Singh wrote:
> 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/[email protected]
>>
>> [2]
>> http://mid.mail-archive.com/[email protected]
>>
>> [3]
>> [email protected]">http://mid.mail-archive.com/[email protected]
>>
>>
>> Cc: Ard Biesheuvel <[email protected]>
>> Cc: Brijesh Singh <[email protected]>
>> Cc: Heyi Guo <[email protected]>
>> Cc: Star Zeng <[email protected]>
>> Originally-suggested-by: Star Zeng <[email protected]>
>> Reported-by: Brijesh Singh <[email protected]>
>> Contributed-under: TianoCore Contribution Agreement 1.1
>> Signed-off-by: Laszlo Ersek <[email protected]>
>> ---
>
>
> I can confirm that with this patch I am able to boot to the UEFI shell
> prompt.
>
> Tested-by: Brijesh Singh <[email protected]>
>
Thank you Ard and Brijesh; I'll hold off pushing the patch until
tomorrow, to see if Heyi and Star want to comment.
Thanks!
Laszlo
_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.01.org/mailman/listinfo/edk2-devel