* EFI Boot Stub Early Console
@ 2012-03-12 18:56 Shea Levy
2012-03-12 19:00 ` Shea Levy
0 siblings, 1 reply; 16+ messages in thread
From: Shea Levy @ 2012-03-12 18:56 UTC (permalink / raw)
To: linux-kernel; +Cc: matt.fleming
Hello,
How do I get the early boot console to show up on my screen when booting
with the EFI boot stub? I can see it through the serial port if I set
console=tty0, and I see the second half of the boot sequence after my
initrd loads fbcon, but the screen remains unchanging until then. I'm
using 3.3-rc7 on Virtualbox's EFI implementation.
Thanks,
Shea
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: EFI Boot Stub Early Console
2012-03-12 18:56 EFI Boot Stub Early Console Shea Levy
@ 2012-03-12 19:00 ` Shea Levy
2012-03-12 22:11 ` H. Peter Anvin
0 siblings, 1 reply; 16+ messages in thread
From: Shea Levy @ 2012-03-12 19:00 UTC (permalink / raw)
To: linux-kernel; +Cc: matt.fleming
On 3/12/12 2:56 PM, Shea Levy wrote:
> console=tty0
Sorry, that should have been console=ttyS0
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: EFI Boot Stub Early Console
2012-03-12 19:00 ` Shea Levy
@ 2012-03-12 22:11 ` H. Peter Anvin
2012-03-12 22:18 ` Shea Levy
0 siblings, 1 reply; 16+ messages in thread
From: H. Peter Anvin @ 2012-03-12 22:11 UTC (permalink / raw)
To: Shea Levy; +Cc: linux-kernel, matt.fleming
On 03/12/2012 12:00 PM, Shea Levy wrote:
> On 3/12/12 2:56 PM, Shea Levy wrote:
>> console=tty0
>
> Sorry, that should have been console=ttyS0
Have you tried earlyprintk=serial,ttyS0?
-hpa
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: EFI Boot Stub Early Console
2012-03-12 22:11 ` H. Peter Anvin
@ 2012-03-12 22:18 ` Shea Levy
2012-03-12 22:23 ` H. Peter Anvin
[not found] ` <CAOhV88Om7hKHeaGNp-PtFkn=y0T9EBQCbPSBE58vOYQ2+Genew@mail.gmail.com>
0 siblings, 2 replies; 16+ messages in thread
From: Shea Levy @ 2012-03-12 22:18 UTC (permalink / raw)
To: H. Peter Anvin; +Cc: linux-kernel, matt.fleming
On 3/12/12 6:11 PM, H. Peter Anvin wrote:
> On 03/12/2012 12:00 PM, Shea Levy wrote:
>> On 3/12/12 2:56 PM, Shea Levy wrote:
>>> console=tty0
>> Sorry, that should have been console=ttyS0
> Have you tried earlyprintk=serial,ttyS0?
>
> -hpa
>
Just tried. Still nothing in the VirtualBox window, serial port showed
boot output up until "[ 0.000000] console [tty0] enabled, bootconsole
disabled", when the rest of the boot process happened in VirtualBox.
~Shea
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: EFI Boot Stub Early Console
2012-03-12 22:18 ` Shea Levy
@ 2012-03-12 22:23 ` H. Peter Anvin
2012-03-12 22:28 ` Shea Levy
2012-03-17 13:12 ` Shea Levy
[not found] ` <CAOhV88Om7hKHeaGNp-PtFkn=y0T9EBQCbPSBE58vOYQ2+Genew@mail.gmail.com>
1 sibling, 2 replies; 16+ messages in thread
From: H. Peter Anvin @ 2012-03-12 22:23 UTC (permalink / raw)
To: Shea Levy; +Cc: linux-kernel, matt.fleming
On 03/12/2012 03:18 PM, Shea Levy wrote:
> On 3/12/12 6:11 PM, H. Peter Anvin wrote:
>> On 03/12/2012 12:00 PM, Shea Levy wrote:
>>> On 3/12/12 2:56 PM, Shea Levy wrote:
>>>> console=tty0
>>> Sorry, that should have been console=ttyS0
>> Have you tried earlyprintk=serial,ttyS0?
>>
>> -hpa
>>
>
> Just tried. Still nothing in the VirtualBox window, serial port showed
> boot output up until "[ 0.000000] console [tty0] enabled, bootconsole
> disabled", when the rest of the boot process happened in VirtualBox.
>
That sounds like one would expect, no?
I don't think anyone has implemented an EFI earlyconsole yet, and you
can't rely on EFI handing over the screen in a mode the kernel can
handle with earlyconsole=vga, so there aren't really any other alternatives.
-hpa
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: EFI Boot Stub Early Console
2012-03-12 22:23 ` H. Peter Anvin
@ 2012-03-12 22:28 ` Shea Levy
2012-03-17 13:12 ` Shea Levy
1 sibling, 0 replies; 16+ messages in thread
From: Shea Levy @ 2012-03-12 22:28 UTC (permalink / raw)
To: H. Peter Anvin; +Cc: linux-kernel, matt.fleming
On 3/12/12 6:23 PM, H. Peter Anvin wrote:
> I don't think anyone has implemented an EFI earlyconsole yet, and you
> can't rely on EFI handing over the screen in a mode the kernel can
> handle with earlyconsole=vga, so there aren't really any other alternatives.
Ah, ok, so what I'm looking for doesn't exist (yet?). Thanks.
~Shea
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: EFI Boot Stub Early Console
2012-03-12 22:23 ` H. Peter Anvin
2012-03-12 22:28 ` Shea Levy
@ 2012-03-17 13:12 ` Shea Levy
2012-03-18 11:21 ` Matt Fleming
1 sibling, 1 reply; 16+ messages in thread
From: Shea Levy @ 2012-03-17 13:12 UTC (permalink / raw)
To: H. Peter Anvin; +Cc: linux-kernel, matt.fleming
On 3/12/12 6:23 PM, H. Peter Anvin wrote:
> I don't think anyone has implemented an EFI earlyconsole yet
I'm considering taking a shot at this. Do you have any pointers about where to look or how to approach it? Will I have to use UGA/GOP or is there some way to take advantage of the text console after exit_boot_services?
Cheers,
Shea
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: EFI Boot Stub Early Console
[not found] ` <CAOhV88Om7hKHeaGNp-PtFkn=y0T9EBQCbPSBE58vOYQ2+Genew@mail.gmail.com>
@ 2012-03-18 4:29 ` Shea Levy
0 siblings, 0 replies; 16+ messages in thread
From: Shea Levy @ 2012-03-18 4:29 UTC (permalink / raw)
To: Nish Aravamudan; +Cc: matt.fleming, H. Peter Anvin, linux-kernel
> Would keep_bootcon make any difference to your setup?
>
Just tried this, didn't help. Thanks though.
> Thanks,
> Nish
>
~Shea
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: EFI Boot Stub Early Console
2012-03-17 13:12 ` Shea Levy
@ 2012-03-18 11:21 ` Matt Fleming
2012-03-18 12:10 ` Shea Levy
0 siblings, 1 reply; 16+ messages in thread
From: Matt Fleming @ 2012-03-18 11:21 UTC (permalink / raw)
To: Shea Levy; +Cc: H. Peter Anvin, linux-kernel
On Sat, 2012-03-17 at 09:12 -0400, Shea Levy wrote:
> On 3/12/12 6:23 PM, H. Peter Anvin wrote:
> > I don't think anyone has implemented an EFI earlyconsole yet
>
> I'm considering taking a shot at this. Do you have any pointers about
> where to look or how to approach it? Will I have to use UGA/GOP or is
> there some way to take advantage of the text console after
> exit_boot_services?
I don't think you'll need to use the graphics protocols, you should just
be able to put something together using the 'output_string' function
from the EFI simple text output protocol, e.g. something like this,
https://lkml.org/lkml/2012/3/16/193
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: EFI Boot Stub Early Console
2012-03-18 11:21 ` Matt Fleming
@ 2012-03-18 12:10 ` Shea Levy
2012-03-19 8:47 ` Matt Fleming
0 siblings, 1 reply; 16+ messages in thread
From: Shea Levy @ 2012-03-18 12:10 UTC (permalink / raw)
To: Matt Fleming; +Cc: H. Peter Anvin, linux-kernel
Hi Matt,
On 3/18/12 7:21 AM, Matt Fleming wrote:
> I don't think you'll need to use the graphics protocols, you should
> just be able to put something together using the 'output_string'
> function from the EFI simple text output protocol, e.g. something like
> this, https://lkml.org/lkml/2012/3/16/193
From the UEFI 2.3.1 spec:
> Prior to a call to ExitBootServices(), all of the fields of the EFI
> System Table are valid. After an operating system has taken control of
> the platform with a call to ExitBootServices(), only the Hdr,
> FirmwareVendor, FirmwareRevision, RuntimeServices,
> NumberOfTableEntries, and ConfigurationTable fields are valid.
Doesn't this mean that ConOut can't be used for the earlyprintk, since
any bootloader (including the bootstub) will call ExitBootServices()
before any printk'ing actually happens?? Or am I misunderstanding the
spec somehow? I suppose I could just try it and see what happens...
Cheers,
Shea
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: EFI Boot Stub Early Console
2012-03-18 12:10 ` Shea Levy
@ 2012-03-19 8:47 ` Matt Fleming
2012-03-19 15:56 ` Alan Cox
0 siblings, 1 reply; 16+ messages in thread
From: Matt Fleming @ 2012-03-19 8:47 UTC (permalink / raw)
To: Shea Levy; +Cc: H. Peter Anvin, linux-kernel
On Sun, 2012-03-18 at 08:10 -0400, Shea Levy wrote:
> Hi Matt,
>
> On 3/18/12 7:21 AM, Matt Fleming wrote:
> > I don't think you'll need to use the graphics protocols, you should
> > just be able to put something together using the 'output_string'
> > function from the EFI simple text output protocol, e.g. something like
> > this, https://lkml.org/lkml/2012/3/16/193
>
> From the UEFI 2.3.1 spec:
>
> > Prior to a call to ExitBootServices(), all of the fields of the EFI
> > System Table are valid. After an operating system has taken control of
> > the platform with a call to ExitBootServices(), only the Hdr,
> > FirmwareVendor, FirmwareRevision, RuntimeServices,
> > NumberOfTableEntries, and ConfigurationTable fields are valid.
>
> Doesn't this mean that ConOut can't be used for the earlyprintk, since
> any bootloader (including the bootstub) will call ExitBootServices()
> before any printk'ing actually happens?? Or am I misunderstanding the
> spec somehow? I suppose I could just try it and see what happens...
Oops. Good point, that isn't going to work.
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: EFI Boot Stub Early Console
2012-03-19 8:47 ` Matt Fleming
@ 2012-03-19 15:56 ` Alan Cox
2012-03-19 16:02 ` Shea Levy
2012-03-19 16:03 ` Matt Fleming
0 siblings, 2 replies; 16+ messages in thread
From: Alan Cox @ 2012-03-19 15:56 UTC (permalink / raw)
To: Matt Fleming; +Cc: Shea Levy, H. Peter Anvin, linux-kernel
> > any bootloader (including the bootstub) will call ExitBootServices()
> > before any printk'ing actually happens?? Or am I misunderstanding the
> > spec somehow? I suppose I could just try it and see what happens...
>
> Oops. Good point, that isn't going to work.
Surely it works fine if you are using bootstub directly from EFI ?
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: EFI Boot Stub Early Console
2012-03-19 15:56 ` Alan Cox
@ 2012-03-19 16:02 ` Shea Levy
2012-03-19 16:03 ` Matt Fleming
1 sibling, 0 replies; 16+ messages in thread
From: Shea Levy @ 2012-03-19 16:02 UTC (permalink / raw)
To: Alan Cox; +Cc: Matt Fleming, H. Peter Anvin, linux-kernel
On 3/19/12 11:56 AM, Alan Cox wrote:
>>> any bootloader (including the bootstub) will call ExitBootServices()
>>> before any printk'ing actually happens?? Or am I misunderstanding the
>>> spec somehow? I suppose I could just try it and see what happens...
>> Oops. Good point, that isn't going to work.
> Surely it works fine if you are using bootstub directly from EFI ?
ConOut will work before the call to ExitBootServices(), but any
bootloader (including the boot stub) calls that before starting the
normal kernel boot process. I'm working on a generic earlyprintk that
provides the same functionality as the existing earlyprintks that will
work for any EFI boot. Matt already submitted a patch for an efi_printk
that will be sufficient for the boot stub itself before the call to
ExitBootServices().
~Shea
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: EFI Boot Stub Early Console
2012-03-19 15:56 ` Alan Cox
2012-03-19 16:02 ` Shea Levy
@ 2012-03-19 16:03 ` Matt Fleming
2012-03-20 15:45 ` Maarten Lankhorst
1 sibling, 1 reply; 16+ messages in thread
From: Matt Fleming @ 2012-03-19 16:03 UTC (permalink / raw)
To: Alan Cox; +Cc: Shea Levy, H. Peter Anvin, linux-kernel
On Mon, 2012-03-19 at 15:56 +0000, Alan Cox wrote:
> > > any bootloader (including the bootstub) will call ExitBootServices()
> > > before any printk'ing actually happens?? Or am I misunderstanding the
> > > spec somehow? I suppose I could just try it and see what happens...
> >
> > Oops. Good point, that isn't going to work.
>
> Surely it works fine if you are using bootstub directly from EFI ?
Yeah, up until the point you call ExitBootServices(), which is very
early in the boot process. After that you can't rely on the validity of
the console pointers in the system table.
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: EFI Boot Stub Early Console
2012-03-19 16:03 ` Matt Fleming
@ 2012-03-20 15:45 ` Maarten Lankhorst
2012-03-20 16:43 ` H. Peter Anvin
0 siblings, 1 reply; 16+ messages in thread
From: Maarten Lankhorst @ 2012-03-20 15:45 UTC (permalink / raw)
To: Matt Fleming; +Cc: Alan Cox, Shea Levy, H. Peter Anvin, linux-kernel
Hey Matt,
Op 19-03-12 17:03, Matt Fleming schreef:
> On Mon, 2012-03-19 at 15:56 +0000, Alan Cox wrote:
>>>> any bootloader (including the bootstub) will call ExitBootServices()
>>>> before any printk'ing actually happens?? Or am I misunderstanding the
>>>> spec somehow? I suppose I could just try it and see what happens...
>>> Oops. Good point, that isn't going to work.
>> Surely it works fine if you are using bootstub directly from EFI ?
> Yeah, up until the point you call ExitBootServices(), which is very
> early in the boot process. After that you can't rely on the validity of
> the console pointers in the system table.
>
I think my system spontaneously rebooted when I tried to
do some output right after ExitBootServices when debugging
the efi stub, so not only is this unreliable, it will fail to boot for
at least some systems out there.
~Maarten
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: EFI Boot Stub Early Console
2012-03-20 15:45 ` Maarten Lankhorst
@ 2012-03-20 16:43 ` H. Peter Anvin
0 siblings, 0 replies; 16+ messages in thread
From: H. Peter Anvin @ 2012-03-20 16:43 UTC (permalink / raw)
To: Maarten Lankhorst; +Cc: Matt Fleming, Alan Cox, Shea Levy, linux-kernel
On 03/20/2012 08:45 AM, Maarten Lankhorst wrote:
> Hey Matt,
>
> Op 19-03-12 17:03, Matt Fleming schreef:
>> On Mon, 2012-03-19 at 15:56 +0000, Alan Cox wrote:
>>>>> any bootloader (including the bootstub) will call ExitBootServices()
>>>>> before any printk'ing actually happens?? Or am I misunderstanding the
>>>>> spec somehow? I suppose I could just try it and see what happens...
>>>> Oops. Good point, that isn't going to work.
>>> Surely it works fine if you are using bootstub directly from EFI ?
>> Yeah, up until the point you call ExitBootServices(), which is very
>> early in the boot process. After that you can't rely on the validity of
>> the console pointers in the system table.
>>
> I think my system spontaneously rebooted when I tried to
> do some output right after ExitBootServices when debugging
> the efi stub, so not only is this unreliable, it will fail to boot for
> at least some systems out there.
>
I would expect it to fail for just about any system.
-hpa
--
H. Peter Anvin, Intel Open Source Technology Center
I work for Intel. I don't speak on their behalf.
^ permalink raw reply [flat|nested] 16+ messages in thread
end of thread, other threads:[~2012-03-20 16:43 UTC | newest]
Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-03-12 18:56 EFI Boot Stub Early Console Shea Levy
2012-03-12 19:00 ` Shea Levy
2012-03-12 22:11 ` H. Peter Anvin
2012-03-12 22:18 ` Shea Levy
2012-03-12 22:23 ` H. Peter Anvin
2012-03-12 22:28 ` Shea Levy
2012-03-17 13:12 ` Shea Levy
2012-03-18 11:21 ` Matt Fleming
2012-03-18 12:10 ` Shea Levy
2012-03-19 8:47 ` Matt Fleming
2012-03-19 15:56 ` Alan Cox
2012-03-19 16:02 ` Shea Levy
2012-03-19 16:03 ` Matt Fleming
2012-03-20 15:45 ` Maarten Lankhorst
2012-03-20 16:43 ` H. Peter Anvin
[not found] ` <CAOhV88Om7hKHeaGNp-PtFkn=y0T9EBQCbPSBE58vOYQ2+Genew@mail.gmail.com>
2012-03-18 4:29 ` Shea Levy
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).