From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.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 2997321D0B663 for ; Thu, 13 Jul 2017 18:04:20 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 6E26688E60; Fri, 14 Jul 2017 01:06:08 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 6E26688E60 Authentication-Results: ext-mx01.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx01.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=lersek@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 6E26688E60 Received: from lacos-laptop-7.usersys.redhat.com (ovpn-116-47.phx2.redhat.com [10.3.116.47]) by smtp.corp.redhat.com (Postfix) with ESMTP id A27905D6A7; Fri, 14 Jul 2017 01:06:07 +0000 (UTC) To: =?UTF-8?Q?Piotr_Kr=c3=b3l?= , edk2-devel@lists.01.org References: <721bf59b-166b-7a67-a1e7-b3e30d2487d3@3mdeb.com> <5f50924b-c781-2715-2447-a7a94d571efb@3mdeb.com> From: Laszlo Ersek Message-ID: <6c6655ec-a01d-c2ee-ed38-453e707dd3ac@redhat.com> Date: Fri, 14 Jul 2017 03:06:06 +0200 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: <5f50924b-c781-2715-2447-a7a94d571efb@3mdeb.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Fri, 14 Jul 2017 01:06:08 +0000 (UTC) Subject: Re: CorebootPayloadPkg: redirect UEFI Shell to serial 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: Fri, 14 Jul 2017 01:04:20 -0000 Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit On 07/14/17 01:53, Piotr Król wrote: > I was able to get some results after removing: > DebugLib|MdePkg/Library/UefiDebugLibConOut/UefiDebugLibConOut.inf > from Shell.inf section in DSC. Boot log: > http://81.95.197.197:7777/isenazutac > > As you can see I'm getting some logs from Shell entry point and it > looks like DoShellPrompt start, but it doesn't appear on serial. In > DoShellPrompt thing wait on > ShellInfoObject.NewEfiShellProtocol->ReadFile so it seems no input > from serial is accepted. > > Any further steps appreciated. I believe I need no stuff related to > GOP, maybe it cause some problems ? There are two paths to the serial port: (1) Via SerialPortLib APIs directly (or a bit more indirectly, via a DebugLib instance that relies on SerialPortLib). This is working for you already. (2) Using EfiSimpleTextOutProtocol. ConSplitterDxe installs a "fake" one of this, and then splits the output to all "actual" ones. This isn't working for you. >>From the log, the problem seems to me that ConPlatformDxe does not install a NULL EfiConsoleOutDevice protocol instance on the EfiSimpleTextOutProtocol instance that comes from TerminalDxe. Therefore, ConSplitterDxe does not consider the terminal as a device that it should split console output to. So when any application writes to ConSplitterDxe's own "fake" EfiSimpleTextOutProtocol, ConSplitterDxe does not forward the data to TerminalDxe's EfiSimpleTextOutProtocol, and the output is lost. The reason for ConPlatformDxe's behavior could be that your PlatformBootManagerLib instance does not add, in the PlatformBootManagerBeforeConsole() function, a device path to the L"ConOut" global variable that would match the device path of TerminalDxe's EfiSimpleTextOutProtocol instance. For example, see "ArmVirtPkg/Library/PlatformBootManagerLib/PlatformBm.c", function PlatformBootManagerBeforeConsole(): // // Add the hardcoded serial console device path to ConIn, ConOut, ErrOut. // CopyGuid (&mSerialConsole.TermType.Guid, PcdGetPtr (PcdTerminalTypeGuidBuffer)); EfiBootManagerUpdateConsoleVariable (ConIn, (EFI_DEVICE_PATH_PROTOCOL *)&mSerialConsole, NULL); EfiBootManagerUpdateConsoleVariable (ConOut, (EFI_DEVICE_PATH_PROTOCOL *)&mSerialConsole, NULL); EfiBootManagerUpdateConsoleVariable (ErrOut, (EFI_DEVICE_PATH_PROTOCOL *)&mSerialConsole, NULL); See the initialization of "mSerialConsole" near the top of that file. In short, in PlatformBootManagerBeforeConsole(), you need to add the device paths of all the EfiSimpleTextOutProtocol instances to L"ConOut" that you want to use as output consoles. Similarly for input and error. Thanks Laszlo