[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
- To: Jan Beulich <jbeulich@xxxxxxxx>
- From: Roger Pau Monné <roger.pau@xxxxxxxxxx>
- Date: Fri, 31 Mar 2023 09:37:38 +0200
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.com; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=+aI9uKe9hlSzwKfouteDkfCzenuGzoJ/N2quFscoYNA=; b=C+etPsLb1T3QwDYCJqbBYolYvkDopaPiaZM449u84dJPU218Bc1pt3DOYcRhsXcN655MNneqzafQNtmpGi4/QsCfxqzp7HHssStKrNraoZaG/D9YRVhq+0Hz0/K68Jc2wS4FUfMjwe3c9q04EFxhhgzP8x1J94u6Z8WbwSoFiDnXps8ZUa1uNtrrQ4b3S9fJ6LucpwAosbQzLyYOxqTOWhsOOjlBh7mHTm3BGMdpDVRvunrCCjeAORfWS1pcFegHCK/8gj9uN4bZ8xnnQNSzs0lLg5wU5agnrGqscM18HGsJG2UlzpmLz6FjSLA+e2DCQgZtlGFk4TanqCUdr1difw==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=B80eWaAhnhD083jL+7eBNK5UTXNORYtLZNM0KnYooxgez9wmV9272iDl2VeZknMxUnxw6jh/xXbLB7tEeoeMN9X24i1zTvveLzf3lAMkuSL3hO7WEqazEBFNU5shxKcH0ZpxrzQd4zEaluCOemlTfB7o8raf1zHQh9NJaNZ4qXuW57pQFgB1QKtu4zI14F00+bkUZzQHVRSHLKYZ+f5wzdB7Ur0PXJa4t79HDh9CJJikp4yoEy3pX869t9AKGagCEA68rVTP3HWasPmYg2P013/N3AJdWQLSYA2UB03DQRL0aJ0u8iYDvwHLEvwGt6hvh+nfpqar/qUQBzix1t7lfg==
- Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=citrix.com;
- Cc: marmarek@xxxxxxxxxxxxxxxxxxxxxx, xen-devel@xxxxxxxxxxxxxxxxxxxx
- Delivery-date: Fri, 31 Mar 2023 07:38:01 +0000
- Ironport-data: A9a23:WKIEEKpT2y32wMin0CVKyIoKm7xeBmIlZBIvgKrLsJaIsI4StFCzt garIBmAM/bYZ2GjLdsja461pkgGsMLTzNI2TwI/pHtgES1D9puZCYyVIHmrMnLJJKUvbq7FA +Y2MYCccZ9uHhcwgj/3b9ANeFEljfngqoLUUbKCYWYpA1c/Ek/NsDo788YhmIlknNOlNA2Ev NL2sqX3NUSsnjV5KQr40YrawP9UlKm06WNwUmAWP6gR5weFzCBNVfrzGInqR5fGatgMdgKFb 76rIIGRpgvx4xorA9W5pbf3GmVirmn6ZFXmZtJ+AsBOszAazsAA+v9T2Mk0MC+7vw6hjdFpo OihgLTrIesf0g8gr8xGO/VQO3kW0aSrY9YrK1Dn2SCY5xWun3cBX5yCpaz5VGEV0r8fPI1Ay RAXABsSUzyhocay+7LlEOk0q559IM7ae7pK7xmMzRmBZRonabbqZvySoPV+g3I3jM0IGuvCb c0EbzYpdA7HfxBEJlYQDtQ5gfusgX78NTZfrTp5p4JuuzSVkFM3j+CraYKMEjCJbZw9ckKwv GXJ8n6/GhgHHNee1SCE4jSngeqncSbTAdpOTezmr6816LGV7nBDVSwJBUKkmtC8tXeTVOtDM UcZ1RN7+MDe82TuFLERRSaQonSJoxodUNp4CPAh5UeGza+8ywOQHG0NVDNCQN0gqs4tRDYu2 0OJntXmHjhmuvueTnf13qeZq3a+NDYYKUcGZDQYVk0V7t/7uoYxgxnTCNF5H8aIYsbdHDjxx 3WAqnc4jrBK1coTjfzjpBbAni6moYXPQkgt/ALLU2m57wR/Iom4e4iv7lud5vFFRGqEcmS8U LE/s5D2xIgz4VulzkRhnM1l8GmV2su4
- Ironport-hdrordr: A9a23:OsD+dKv6zf0l9p89Mfu0y+Qu7skD7tV00zEX/kB9WHVpmwKj5r +TdZMgpG7JYVcqKQ8dcL+7SdG9qB/nhOdICMwqTNGftUrdyR6VxeJZnO/fKl/balfDH7VmpN VdmsFFYbWaZzUX/KWKgjVQUexQp+Vvm5rY+Ns2oU0dMT2CqJsP0y5JTiieGk1yAC9cBZQ4E5 KYou5KvSCpd3hSTunTPAh/YwEAnbL2fV7dACIuNloC4AmKjTSnrJv7CQXw5GZrb9qH+9dSlF QtizaJlZlLrcvLuiPh6w==
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
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 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.
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?
Thanks, Roger.
|