From: Laszlo Ersek <lersek@redhat.com>
To: "Piotr Król" <piotr.krol@3mdeb.com>, edk2-devel@lists.01.org
Subject: Re: CorebootPayloadPkg: redirect UEFI Shell to serial
Date: Fri, 14 Jul 2017 03:06:06 +0200 [thread overview]
Message-ID: <6c6655ec-a01d-c2ee-ed38-453e707dd3ac@redhat.com> (raw)
In-Reply-To: <5f50924b-c781-2715-2447-a7a94d571efb@3mdeb.com>
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
next prev parent reply other threads:[~2017-07-14 1:04 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-10 21:31 CorebootPayloadPkg: redirect UEFI Shell to serial Piotr Król
2017-07-11 18:01 ` Laszlo Ersek
2017-07-13 23:53 ` Piotr Król
2017-07-14 1:06 ` Laszlo Ersek [this message]
2017-07-15 13:00 ` Piotr Król
2017-07-25 9:16 ` Laszlo Ersek
2017-08-05 0:13 ` Piotr Król
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=6c6655ec-a01d-c2ee-ed38-453e707dd3ac@redhat.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox