From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2a00:1450:400c:c0c::242; helo=mail-wr0-x242.google.com; envelope-from=haojian.zhuang@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-wr0-x242.google.com (mail-wr0-x242.google.com [IPv6:2a00:1450:400c:c0c::242]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 5D77321F0DA60 for ; Wed, 7 Feb 2018 08:06:31 -0800 (PST) Received: by mail-wr0-x242.google.com with SMTP id t94so1630943wrc.5 for ; Wed, 07 Feb 2018 08:12:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=bvSde4mwoSra81tYJduY71T+E/uCmAZ6lzfB5awAzUI=; b=f4LkWRlJBJhlfKBVYHLxrmxut8NotY7o5CCJox7KLvG1aOoqamOqA955CRsHpYIUWh Qvkt83rB6AVFwwrFHOhqZeNJdX0x/gQifu7fIv+O4qUptZp8T0R4qXvCbt0KsGOtVx9I Jee2SE38euej2op8hQCkqi3Ek04QKpQi6O0Vc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=bvSde4mwoSra81tYJduY71T+E/uCmAZ6lzfB5awAzUI=; b=dsGk/xCas5+VCUkL8DR3DRgZrR0uQGNxrPZ7hwP/pzafFkTi+4nUFy4FOIy2cUqKYz BP+EnqwMsrzFVGYcSIoLeoP/HmYv8ZH9KlNJ8w3O7zE5UOQmuX+0QsxiHQTb4kbgkJjZ cttJhymv6LsL4gfABwwK6vIYZyXVS5+SXcu8+9mNn+r7/1htlEqBgzq2/hyft2IfqQbo k3IXSn5QQhChzv7l+wGjE1NuDnNrdaE5FDUl2NEDUAsmtkqCU3JqJKh8CX7ZozemNqoe 1qHFH2AOE5tzMGP2cTnFOm42ED9R4gfF0E7Yxy2n0K6wxpiJxeknuAEvyOw1ki6CchvL SVWA== X-Gm-Message-State: APf1xPCSjgWbdeWQyJPqVSoioIEnGOz19spiiW4JW2Iq/gIZtI+h+8CP b0iYl0VIG6yW0UHloGZfJz5jI1rXc8O5QZVG9arB5g== X-Google-Smtp-Source: AH8x226/UlRFTDHvXS0JUWfCjh75nAvBMSUpVmqddOe3lNSetmvWOH87YzQfiytdMUXWpbjLF5FRGdz+VTtHA/V5bjU= X-Received: by 10.223.158.201 with SMTP id b9mr5857964wrf.192.1518019933978; Wed, 07 Feb 2018 08:12:13 -0800 (PST) MIME-Version: 1.0 Received: by 10.28.132.12 with HTTP; Wed, 7 Feb 2018 08:12:13 -0800 (PST) In-Reply-To: <78656541-A557-41BE-A302-0CB8F9CAAA5B@linaro.org> References: <78656541-A557-41BE-A302-0CB8F9CAAA5B@linaro.org> From: Haojian Zhuang Date: Thu, 8 Feb 2018 00:12:13 +0800 Message-ID: To: Ard Biesheuvel Cc: edk2-devel-01 , Linaro UEFI Mailman List , Leif Lindholm Subject: Re: [issue] Arrow key can't be read on tty terminal in release build X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Feb 2018 16:06:32 -0000 Content-Type: text/plain; charset="UTF-8" On 7 February 2018 at 23:52, Ard Biesheuvel wrote: > >> On 7 Feb 2018, at 15:50, 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? >> >> > > 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