[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v2 3/3] multiboot2: do not set StdOut mode unconditionally


  • To: Jan Beulich <jbeulich@xxxxxxxx>
  • From: Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • Date: Wed, 31 May 2023 12:57:13 +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=k11gLLKqtlPS8PlX5FS1VGfQ7U3VS0mLMVNd3u96KMI=; b=mKAS0TZnw1C0Pk2HaGInWqlwr/JekyMd6YW8Rqtw20xZy1z8qqn4Cy5eGpYGlMxIvUFzap2o6JpRWjcyMfTNSAPL1Pr0W/O2Atym72vwcHdMiYLCl7VNwAioEXAFXZ4NFwReYZoogn6o9U6hn5X32CAkbwX5+SwqvlhVHjCfrFCBSJlwCvpjvmaXFJR71WJ5bnEkIHRhZ1H2UNSEOV+yLTjcEL+YWJHeuWsxrEUp7uirRVQzZ2pHASzmfVe/kAWWnHSEPXNnSEe98eRlvc1SDamsf5JXWG0m9GtlerRUy0ja7PQIEM+S3wV6L9TOb0mUIqBm905xEl4VxCZhHgwyWg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=HCXdpKQsX26yj8wOL71R0PTUBvUdCV2wpHGoMoN4etako9pmrJ0uPJP2n0+3tCqAruL3gOZESs4Fge3mYxW8fWjhJ3sn2ZsRfW1nug8O/wg5TRl4qI3G9Kl76kDh1XEuFmsjCDuxuwoWoyGPfiSI+omzNTd6DP3fflU94vccW2lBL2njwPkXhP7OWnFAgFliZGuLJgVcy6oKgvGyWdJQOfCrb+G5EY08Y422a2or9JrHOaIEa6worWq8FidWfvnS2xKqCsx3MVKNcC8WnRC8n4fksUIAJgqri4mz/Inc8tAloiAKqNKaYf+S3opMa1RPHFi+6eqxvtS6KviLtHH9FA==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=citrix.com;
  • Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Wed, 31 May 2023 10:57:49 +0000
  • Ironport-data: A9a23:clLjn6imFJAhiPJGzm/B2LF0X161RhEKZh0ujC45NGQN5FlHY01je htvWj+FOP3fNmCgLtgga4nl904Ev5TSyIA1SARkpShmRSob9cadCdqndUqhZCn6wu8v7q5Ex 55HNoSfdpBcolv0/ErF3m3J9CEkvU2wbuOgTrWCYmYpHlUMpB4J0XpLg/Q+jpNjne+3CgaMv cKai8DEMRqu1iUc3lg8sspvkzsx+qyq0N8klgZmP6sT4QSHzyB94K83fsldEVOpGuG4IcbiL wrz5OnR1n/U+R4rFuSknt7TGqHdauePVeQmoiM+t5mK2nCulARrukoIHKN0hXNsoyeIh7hMJ OBl7vRcf+uL0prkw4zxWzEAe8130DYvFLXveRBTuuTLp6HKnueFL1yDwyjaMKVBktubD12i+ tQlBTsMViHA29mOnpLnFLZtg+Q/L8TkadZ3VnFIlVk1DN4AaLWaGuDmwIEd2z09wMdTAfzZe swVLyJ1awjNaAFOPVFRD48imOCvhT/0dDgwRFC9/PJrpTSMilEuluGya7I5efTTLSlRtlyfq W/cuXzwHzkRNcCFyCrD+XWp7gPKtXqjCdJLSuHippaGhnW33Dc/KTgESWG3uKWCs2eAa9tUc kMtr39GQa8asRbDosPGdx+yrWOAvxUcc8FNCOB84waIooLL5y6JC25CSSROAPQ2uclzSTE02 1uhm9LyGScpoLCTUWia9LqfsXW1Iyd9EIMZTSoNTA9A79y9pog210vLVow6T/XzicDpEzbtx TzMtDI5m7gYkc8M0eO84EzDhDWv4JPOS2bZ+znqY45s1SshDKbNWmBiwQKzASpoRGpBcmS8g Q==
  • Ironport-hdrordr: A9a23:bQnVGqwYvDYNqSwVkXmvKrPwhb1zdoMgy1knxilNoHxuH/BwWf re/8jztCWE8gr5PUtLpTnuAtj5fZqxz+8N3WBVB9mftWrdyQmVxeNZnO3fKlTbckWUmoFgPO VbEpSWY+eAaGSS4/yb3CCIV/QtzMC8/Ke07N2uq0uENGpRGtpdBn9Ce2GmO3wzeSJBApYVEp 6V5s18pzSmdXl/VLXLOlA1G9XpodrGsonnbx4ADxsM4mC1/EyVwY+/LjOf2Rs5SDNAwbAr9E fflQiR3NTcj9iLjiL20WjeyY9Xltvnwt5/AqW3+7QoAySpjhy3IIdsX7DHuzwquuSi9Usni7 D30modA/g=
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On Wed, Apr 05, 2023 at 12:36:55PM +0200, Jan Beulich wrote:
> On 31.03.2023 11:59, Roger Pau Monne wrote:
> > @@ -887,6 +881,15 @@ void __init efi_multiboot2(EFI_HANDLE ImageHandle, 
> > EFI_SYSTEM_TABLE *SystemTable
> >  
> >          efi_arch_edid(gop_handle);
> >      }
> > +    else
> > +    {
> > +        /* If no GOP, init ConOut (StdOut) to the max supported size. */
> > +        efi_console_set_mode();
> > +
> > +        if ( StdOut->QueryMode(StdOut, StdOut->Mode->Mode,
> > +                               &cols, &rows) == EFI_SUCCESS )
> > +            efi_arch_console_init(cols, rows);
> > +    }
> 
> Instead of making this an "else", wouldn't you better check that a
> valid gop_mode was found? efi_find_gop_mode() can return ~0 after all.

When using vga=current gop_mode would also be ~0, in order for
efi_set_gop_mode() to not change the current mode, I was trying to
avoid exposing keep_current or similar extra variable to signal this.

> Furthermore, what if the active mode doesn't support text output? (I
> consider the spec unclear in regard to whether this is possible, but
> maybe I simply didn't find the right place stating it.)
> 
> Finally I think efi_arch_console_init() wants calling nevertheless.
> 
> So altogether maybe
> 
>     if ( gop_mode == ~0 ||
>          StdOut->QueryMode(StdOut, StdOut->Mode->Mode,
>                            &cols, &rows) != EFI_SUCCESS )

I think it would make more sense to call efi_console_set_mode() only
if the current StdOut mode is not valid, as anything different from
vga=current will already force a GOP mode change.

Thanks, Roger.



 


Rackspace

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