Hi all,
I have an issue on tty terminal. I setup PL011 serial console as the tty terminal on HiKey platform. When it's built in debug mode, arrow key works well. When it's built in release mode, arrow key can't work.
For example, DOWN key is gotten in terminal with "~[B" value in debug build. DOWN key is gotten in terminal with "~" value in release build. These values are fetched by GetOneKeyFromSerial().
But I can't find any difference on PL011 serial driver between debug and release mode.
Do you have any idea on this?
Best Regards Haojian
On 7 Feb 2018, at 15:50, Haojian Zhuang haojian.zhuang@linaro.org wrote:
Hi all,
I have an issue on tty terminal. I setup PL011 serial console as the tty terminal on HiKey platform. When it's built in debug mode, arrow key works well. When it's built in release mode, arrow key can't work.
For example, DOWN key is gotten in terminal with "~[B" value in debug build. DOWN key is gotten in terminal with "~" value in release build. These values are fetched by GetOneKeyFromSerial().
But I can't find any difference on PL011 serial driver between debug and release mode.
Do you have any idea on this?
You need to set the FIFO depth to 16 iirc
On 7 February 2018 at 23:52, Ard Biesheuvel ard.biesheuvel@linaro.org wrote:
On 7 Feb 2018, at 15:50, Haojian Zhuang haojian.zhuang@linaro.org wrote:
Hi all,
I have an issue on tty terminal. I setup PL011 serial console as the tty terminal on HiKey platform. When it's built in debug mode, arrow key works well. When it's built in release mode, arrow key can't work.
For example, DOWN key is gotten in terminal with "~[B" value in debug build. DOWN key is gotten in terminal with "~" value in release build. These values are fetched by GetOneKeyFromSerial().
But I can't find any difference on PL011 serial driver between debug and release mode.
Do you have any idea on this?
You need to set the FIFO depth to 16 iirc
I think you mean the initialization code in PL011UartInitializePort ().
HardwareFifoDepth = (PL011_UARTPID2_VER (MmioRead32 (UartBase + UARTPID2)) \ > PL011_VER_R1P4) \ ? 32 : 16 ;
I tried to hardcode the value with both 32 and 16. The issue still exists.
Best Regards Haojian
On 7 February 2018 at 16:12, Haojian Zhuang haojian.zhuang@linaro.org wrote:
On 7 February 2018 at 23:52, Ard Biesheuvel ard.biesheuvel@linaro.org wrote:
On 7 Feb 2018, at 15:50, Haojian Zhuang haojian.zhuang@linaro.org wrote:
Hi all,
I have an issue on tty terminal. I setup PL011 serial console as the tty terminal on HiKey platform. When it's built in debug mode, arrow key works well. When it's built in release mode, arrow key can't work.
For example, DOWN key is gotten in terminal with "~[B" value in debug build. DOWN key is gotten in terminal with "~" value in release build. These values are fetched by GetOneKeyFromSerial().
But I can't find any difference on PL011 serial driver between debug and release mode.
Do you have any idea on this?
You need to set the FIFO depth to 16 iirc
I think you mean the initialization code in PL011UartInitializePort ().
HardwareFifoDepth = (PL011_UARTPID2_VER (MmioRead32 (UartBase + UARTPID2)) \ > PL011_VER_R1P4) \ ? 32 : 16 ;
I tried to hardcode the value with both 32 and 16. The issue still exists.
Actually, it is the other way around. You need to set
gEfiMdePkgTokenSpaceGuid.PcdUartDefaultReceiveFifoDepth|0
as the default is 1, which makes no sense at all.
On 8 February 2018 at 00:13, Ard Biesheuvel ard.biesheuvel@linaro.org wrote:
On 7 February 2018 at 16:12, Haojian Zhuang haojian.zhuang@linaro.org wrote:
On 7 February 2018 at 23:52, Ard Biesheuvel ard.biesheuvel@linaro.org wrote:
On 7 Feb 2018, at 15:50, Haojian Zhuang haojian.zhuang@linaro.org wrote:
Hi all,
I have an issue on tty terminal. I setup PL011 serial console as the tty terminal on HiKey platform. When it's built in debug mode, arrow key works well. When it's built in release mode, arrow key can't work.
For example, DOWN key is gotten in terminal with "~[B" value in debug build. DOWN key is gotten in terminal with "~" value in release build. These values are fetched by GetOneKeyFromSerial().
But I can't find any difference on PL011 serial driver between debug and release mode.
Do you have any idea on this?
You need to set the FIFO depth to 16 iirc
I think you mean the initialization code in PL011UartInitializePort ().
HardwareFifoDepth = (PL011_UARTPID2_VER (MmioRead32 (UartBase + UARTPID2)) \ > PL011_VER_R1P4) \ ? 32 : 16 ;
I tried to hardcode the value with both 32 and 16. The issue still exists.
Actually, it is the other way around. You need to set
gEfiMdePkgTokenSpaceGuid.PcdUartDefaultReceiveFifoDepth|0
as the default is 1, which makes no sense at all.
After updating the PCD value to 0, this issue is gone. Great thanks for your help.
Now I have a new question. Why do I miss the issue in debug build? Do you have any idea?
Best Regards Haojian
On 7 February 2018 at 16:43, Haojian Zhuang haojian.zhuang@linaro.org wrote:
On 8 February 2018 at 00:13, Ard Biesheuvel ard.biesheuvel@linaro.org wrote:
On 7 February 2018 at 16:12, Haojian Zhuang haojian.zhuang@linaro.org wrote:
On 7 February 2018 at 23:52, Ard Biesheuvel ard.biesheuvel@linaro.org wrote:
On 7 Feb 2018, at 15:50, Haojian Zhuang haojian.zhuang@linaro.org wrote:
Hi all,
I have an issue on tty terminal. I setup PL011 serial console as the tty terminal on HiKey platform. When it's built in debug mode, arrow key works well. When it's built in release mode, arrow key can't work.
For example, DOWN key is gotten in terminal with "~[B" value in debug build. DOWN key is gotten in terminal with "~" value in release build. These values are fetched by GetOneKeyFromSerial().
But I can't find any difference on PL011 serial driver between debug and release mode.
Do you have any idea on this?
You need to set the FIFO depth to 16 iirc
I think you mean the initialization code in PL011UartInitializePort ().
HardwareFifoDepth = (PL011_UARTPID2_VER (MmioRead32 (UartBase + UARTPID2)) \ > PL011_VER_R1P4) \ ? 32 : 16 ;
I tried to hardcode the value with both 32 and 16. The issue still exists.
Actually, it is the other way around. You need to set
gEfiMdePkgTokenSpaceGuid.PcdUartDefaultReceiveFifoDepth|0
as the default is 1, which makes no sense at all.
After updating the PCD value to 0, this issue is gone. Great thanks for your help.
Now I have a new question. Why do I miss the issue in debug build? Do you have any idea?
Because the DEBUG build uses the serial port for DEBUG output, and performs its own initialization.
Hi,
On 02/07/2018 09:50 AM, Haojian Zhuang wrote:
Hi all,
I have an issue on tty terminal. I setup PL011 serial console as the tty terminal on HiKey platform. When it's built in debug mode, arrow key works well. When it's built in release mode, arrow key can't work.
For example, DOWN key is gotten in terminal with "~[B" value in debug build. DOWN key is gotten in terminal with "~" value in release build. These values are fetched by GetOneKeyFromSerial().
But I can't find any difference on PL011 serial driver between debug and release mode.
Do you have any idea on this?
Just to add an additional data point.
I see arrow key issue on the hikey as well as the ARM models. The problem seems to have shown up sometime late last year and happens in my case when the machine directly boots into distro provided grub. Strangely, exiting to the BDS and then starting the boot from the BDS seems to clear up the problem and the arrow keys work (or pressing escape and going to the BDS first, either way poping up the BDS menus seem to work around the issue).
Best Regards Haojian _______________________________________________ Linaro-uefi mailing list Linaro-uefi@lists.linaro.org https://lists.linaro.org/mailman/listinfo/linaro-uefi