[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH 2/5] efi: only set a console mode if the current one is invalid
On 31.03.2023 09:37, Roger Pau Monné wrote: > On Fri, Mar 31, 2023 at 08:51:46AM +0200, Jan Beulich wrote: >> On 30.03.2023 18:17, Roger Pau Monné wrote: >>> On Thu, Mar 30, 2023 at 06:07:57PM +0200, Jan Beulich wrote: >>>> On 30.03.2023 17:44, Roger Pau Monné wrote: >>>>> I guess I'm slightly confused by the usage of both GOP and StdOut, I >>>>> would assume if we have a gop, and can correctly initialize it there's >>>>> no need to fiddle with StdOut also? >>>> >>>> Setting the GOP mode is done last before exiting boot services; this >>>> may be a graphics mode which doesn't support a text output protocol. >>> >>> Right, that's what I was missing. I assumed that all modes available >>> in GOP would be compatible with the ConOut mode. >>> >>> Would you be OK with leaving StdOut as-is when booted from multiboot2, >>> or there's a chance of things not being properly setup? >> >> On modern UEFI it may be unlikely, but I think it's not impossible (see >> below). >> >>> IMO it's not very friendly to change the StdOut mode if not explicitly >>> requested, as in the multiboot2 case that gets setup by the >>> bootloader. >> >> May get set up, that is. If it was set up, then yes, we probably should >> leave it alone unless told to use another mode. I.e. no vga= or >> vga=current should minimally result in no further mode change. Aiui we >> can't easily honor vga=gfx-... in that case, so leaving the mode alone >> there may also be better than trying to guess a mode. The only time >> where I would think it would be nice to switch by default even in the >> xen.gz case is if the boot loader handed us the screen in some text >> mode. > > How would you detect such case? > > ConOut is always text-mode like because it's a > EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL interface. > > Would it be a matter of checking whether the current GOP mode is > valid, and if so leave it as-is unless told otherwise by a command > line parameter? I think so, yes. > I would also like to avoid the unconditional resizing of the ConOut > interface that's done in efi_console_set_mode(), as that has the size > effect of changing the GOP mode, so I would only call > efi_console_set_mode() is there's no gop. Or maybe when the set mode isn't text-output capable. > Not sure it's meaningful to change the ConOut number of cols/rows if > there's no GOP, maybe it's possible to have some kind of screen that's > usable for EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL but not as a GOP? Of course there is. As said, earlier on screens started in 80x25 mode. Even going to 80x50 or 80x60 is already an improvement. Plus there are systems which support wider-than-80-cols text modes. Jan
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |