[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: Thu, 30 Mar 2023 17:44:34 +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=9FJhgGxI+xAdJfNiJr2C96Uyu4FlD2es1J5YxDl4xeQ=; b=fMzHGpkJyNjiLvMCTa/vIdJgMYiEbLv1uG2XqnbeDiDVxvPM9afSYjhgbdhFmAtxRd3VZbKpm6uctRzJCExuho0/yzcuwNjWDxd1zF+UgqRdf4N8OHFGKjWiEW1FtSd2xdmLmEE1y4fOo4Jb9mbx/y05SG1/zGcOx24XND+LS5M6VjVEI91YKvxyeCld3srYYHL3vjvBWGzDs6AnNHfjjfZTo+M+1ZMUfs9Nx4FG1+IslR8PFI271MU3EOrrtU/ploUUQ8XwvumWy+QI5cKdvubtP9XuhmYKxVdPh7G+0Cz/XKEdHC/2O4lrqiI8q77FTu8BoE1ET44QIgTUV/g8Cg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=cc0lmtxWfDEu9dAPHo8TOOsNRGN720ZiRof7QNOT7ZGMu3kwxZgIzUsVCwuectj1WMmpZIoITMOb9/86VywWBkfjotXR6tdXAo9vQ4JFoJSdQ5hUIn3xgrkAC8zXybA2U2ADg0oHHRupWS05VMykuZOzjMPXs6NOMWC6b0oB3wWZNV4PnBRNIuPPegO5ZykDpZ1n+poXnSAzsUYfcfXpB3LzqErucWSnLFKBkcRHFDrEW33uM0a4L87zQgUX3m4xW4iMFe11Jm3CTIhS/a19yMLiNFZkTcHdFBhYUADgRcCAOyvbMOImh62nItpTaBfaKfRrxzmx1PRmM9u9T6J/Ng==
  • 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: Thu, 30 Mar 2023 15:45:00 +0000
  • Ironport-data: A9a23:YO69zK6NOYj6O9Be2neGfwxRtArGchMFZxGqfqrLsTDasY5as4F+v jAWDGDSOKzZZDSkftxzPou/9R4CuJDdm9ZgGgts/HhmHi5G8cbLO4+Ufxz6V8+wwm8vb2o8t plDNYOQRCwQZiWBzvt4GuG59RGQ7YnRGvynTraCYnsrLeNdYH9JoQp5nOIkiZJfj9G8Agec0 fv/uMSaM1K+s9JOGjt8B5mr9VU+7JwehBtC5gZlPasQ5AeF/5UoJMl3yZ+ZfiOQrrZ8RoZWd 86bpJml82XQ+QsaC9/Nut4XpWVTH9Y+lSDX4pZnc/DKbipq/0Te4Y5iXBYoUm9Fii3hojxE4 I4lWapc6+seFvakdOw1C3G0GszlVEFM0OevzXOX6aR/w6BaGpdFLjoH4EweZOUlFuhL7W5m2 NpJIyorUhe42eebkKjmbu9HidstI5y+VG8fkikIITDxK98DGcyGb4CUoNhS0XE3m9xEGuvYa 4wBcz1zYR/cYhpJfFAKFJY5m+TujX76G9FagAvN+exrvC6Ml0otjtABM/KMEjCObd9SkUuC4 HrP4kzyAw0ANczZwj2Amp6prraXwXqiAd9DRNVU8NZlpmfN50o9GSQoVEGkhtuWgFTufIxQf hl8Fi0G6PJaGFaQZtv3UgC8oXWElgUBQNcWGOo/gCmIw7DR6hyUBUAFSCBAc90ssMIqRT0s2 USNltmvDjtq2JWFRHTY+rqKoDeaPSkOMXREdSICVREC4dTovMc0lB2nczp4OKu8j9mwFTSux TmP9HQ6n+9L0ZBN0Lin91fahT7qvoLOUgM++gTQWCSi8x99Y4mmIYev7DA38Mp9EWpQdXHZ1 FBspiRUxLtm4U2l/MBVfNgwIQ==
  • Ironport-hdrordr: A9a23:Sm6X/K/6WtESljnHs4huk+GYdr1zdoMgy1knxilNoENuHfBwxv rDoB1E73LJYW4qKQkdcdDpAsm9qADnhOVICOgqTP+ftWzd01dAQ7sSi7cKrwePJ8TezJ846U 4CSdk0NDSTNykCsS+S2mDRLz9J+qjDzEnCv5a8854Zd3AOV0gW1XYaNu/0KCxLrIAsP/AE/B T13LsAmxOQPVAsKuirDHgMWObO4/fRkoj9XBIADxk7rCGTkDKB8tfBYlKl9yZbdwkK7aYp8G DDnQC8zL6kqeuHxhjV0HKWx4hKmeHm1sBICKW3+4Uow3TX+0qVjbZaKvO/VQMO0aCSAZER4Z nxSiIbTotOArXqDyKISFXWqkvdOX0VmgXfIBej8AbeSIrCNXYH4rF69OVkmpey0TtmgDg06t M140uJ85VQFh/OhyL7+pzBUAxrjFO9pT44nfcUlGE3a/poVFZ9l/1rwKpuKuZ1IAvqrIQ8VO V+BsDV4/hbNVuccnDCp2FqhNihRG46EBuKSlUL/pX96UkeoFlpi08DgMAPlHYJ85wwD5FC+u TfK6xt0LVDVNUfY65xDPoIBcG3FmvOSxTRN3/6GyWQKIgXf3bW75Ln6rQ84++nPJQO0ZspgZ zEFEhVsGYjEniee/GmzdlO6FTAUW+9VTPixoVV7510vbD1X/7wPTaCREprk8y7vv0ZCMGeW/ vbAuMpPxYiFxqcJW9k5XyPZ3AJEwhjbCQ8gKdLZ26z
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On Mon, Dec 05, 2022 at 03:19:13PM +0100, Jan Beulich wrote:
> On 23.11.2022 16:45, Roger Pau Monne wrote:
> > Do not unconditionally set a mode in efi_console_set_mode(), do so
> > only if the currently set mode is not valid.
> 
> You don't say why you want to do so. Furthermore ...
> 
> > --- a/xen/common/efi/boot.c
> > +++ b/xen/common/efi/boot.c
> > @@ -799,6 +799,11 @@ static void __init efi_console_set_mode(void)
> >      UINTN cols, rows, size;
> >      unsigned int best, i;
> >  
> > +    /* Only set a mode if the current one is not valid. */
> > +    if ( StdOut->QueryMode(StdOut, StdOut->Mode->Mode, &cols, &rows) ==
> > +         EFI_SUCCESS )
> > +        return;
> 
> ... it might be okay if you put such a check in efi_multiboot2(), but
> the call here from efi_start() is specifically guarded by a check of
> whether "-basevideo" was passed to xen.efi. This _may_ not be as
> relevant anymore today, but it certainly was 20 years ago (recall
> that we've inherited this code from a much older project of ours) -
> at that time EFI usually started in 80x25 text mode. And I think that
> even today when you end up launching xen.efi from the EFI shell,
> you'd be stuck with 80x25 text mode on at least some implementations.

Won't you use console=vga vga=gfx-...

To switch to a best mode?

> Overall, looking at (for now) just the titles of subsequent patches,
> I'm not convinced the change here is needed at all. Or if anything it
> may want to go at the end, taking action only when "vga=current" was
> specified.

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?

Thanks, Roger.



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.