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

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


  • To: xen-devel@xxxxxxxxxxxxxxxxxxxx
  • From: Roger Pau Monne <roger.pau@xxxxxxxxxx>
  • Date: Fri, 31 Mar 2023 11:59:46 +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=/gUHftM+0/IaXHuGHEEgkWb+8UwO8uBl34DbIg0DDU4=; b=j8OQDqtX4CkhVInjkrknSC9NTwC/sTk6OCaRBc7i+xsSh/z/gOWhzHVQhusPsoFJH6w2AA4etD3JaPNr3IycV5CA3y7ptowmtAu1uD/xLUl4lG9DDCOLTNp4trmr6nR+LzHIGAKFikV4dsv2CWu5laEuuJsRZxIlGtM267Y5iH7/v1HtsaPRMfc00+/b4Bfbn+ZtsiK/f4v+66vU9RxQYlKx9TJtRbEtX3zAPFwUjia0JSM5mjDz0DGrlSh4JNnPChSG7d2o4WsZwlNmiqRAAIqFPvI+6LQBhqb/GGR+/krcehoFSSkvbT9wElzX+CM8mHPRScySBlktoF+8fH+Gqg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=IwdbeT1NH9i3Wtr7pDMtL3YtuYKhn+nAOoYpLS0hBcw0jIFwzhIAahEGh6QuBC6BvouzqLByoiSpOkGSkP7mxTwKPzTpmlRgziv4Fiq/11RdZImzwJSe21QnSts1UI9ibx2+OWriBa4iYP7ti9NZpfz7Nf/oXA96VAY/13/qNab6sU98QTZFtvt1M54QO981P87PduSybCxFS65Y+2FtvSDapgCX+8dlFaUNHhS9WhIct9ZvxiMa0dnL8GnKRUQni8DPoOAcQAAQ/uvB0itwYJfjF77mfg80Jik6HvH3DnNIML14gO+M0i768LCfFRrNbIrbRT9afS5Uq9HkNnBSQw==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=citrix.com;
  • Cc: Roger Pau Monne <roger.pau@xxxxxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>
  • Delivery-date: Fri, 31 Mar 2023 10:00:24 +0000
  • Ironport-data: A9a23:V+H4LaholW2EJQ0My+4CBsaOX161RhEKZh0ujC45NGQN5FlHY01je htvXG3UOP+DNzfxKox0PITi/UMF68DVz4NrTVE9qyBnHn8b9cadCdqndUqhZCn6wu8v7q5Ex 55HNoSfdpBcolv0/ErF3m3J9CEkvU2wbuOgTrWCYmYpHlUMpB4J0XpLg/Q+jpNjne+3CgaMv cKai8DEMRqu1iUc3lg8sspvkzsy+qWi0N8klgZmP6sT5wSHzyB94K83fsldEVOpGuG4IcbiL wrz5OnR1n/U+R4rFuSknt7TGqHdauePVeQmoiM+t5mK2nCulARrukoIHKN0hXNsoyeIh7hMJ OBl7vRcf+uL0prkw4zxWzEAe8130DYvFLXveRBTuuTLp6HKnueFL1yDwyjaMKVBktubD12i+ tQ4MzUrdAyE3N6fmqC+E/RQgMg6duvSadZ3VnFIlVk1DN4AaLWaG+Dgw4Ad2z09wMdTAfzZe swVLyJ1awjNaAFOPVFRD48imOCvhT/0dDgwRFC9/PJrpTSMilMpluG1YbI5efTTLSlRtlyfq W/cuXzwHzkRNcCFyCrD+XWp7gPKtXqjA9JJSOLop5aGhnW49z0dExQNWWf8rMKzkmmZW4pdM A8tr39GQa8asRbDosPGdw21pjuIswARX/JUEvYm80edx6zM+QGbC2MYCDlbZ7QOtsU7WDgr3 V+hhM7yCHpkt7j9YW2Z3qeZq3W1Iyd9EIMZTSoNTA9A6d+8pog210rLVow6SP/zicDpEzbtx TzMtDI5m7gYkc8M0eO84EzDhDWv4JPOS2bZ+znqY45s1SshDKbNWmBiwQGzASpoRGpBcmS8g Q==
  • Ironport-hdrordr: A9a23:CPZTl6GnjrDZAztDpLqFrZHXdLJyesId70hD6qkRc20hTiX8ra vBoB1173/JYUkqKQ0dcLy7WZVoIkmshqKdn7NhX4tKNTOO0AGVxepZnOjfKlPbakjDHuU079 YeT0AXYuedMbAQ5/yU3OF2eexM/PC3tJmNwcPi5zNVSwduApsQnTuQyGygYzNLrM0tP+tIKH JYjPA31gZIAk5nCviTNz0+Ru3eoN+OvIv+CCR2fiIP2U21lDa177y/OASZ2xp2aUIz/Z4StV LdlhD/5OGFu/W2oyWssFP73tBtgd78zdkGItKKhtN9EESLti+YIL55XqGEvnQOgMzH0idTrP D85y04Oth16TfqcnqrrQDL0w3tuQxekEPK+BujmH7+ps68ez4gEcpGgutiA2Hk13Y=
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

Only initialize StdOut if there's no GOP available.  This avoids
forcefully switching StdOut to the maximum supported resolution, and
thus very likely changing the GOP mode without having first parsed the
command line options.

Signed-off-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>
---
Changes since v1:
 - New in this version.
---
 xen/arch/x86/efi/efi-boot.h | 15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)

diff --git a/xen/arch/x86/efi/efi-boot.h b/xen/arch/x86/efi/efi-boot.h
index f46c1f021e..42aa135446 100644
--- a/xen/arch/x86/efi/efi-boot.h
+++ b/xen/arch/x86/efi/efi-boot.h
@@ -820,12 +820,6 @@ void __init efi_multiboot2(EFI_HANDLE ImageHandle, 
EFI_SYSTEM_TABLE *SystemTable
 
     efi_init(ImageHandle, SystemTable);
 
-    efi_console_set_mode();
-
-    if ( StdOut->QueryMode(StdOut, StdOut->Mode->Mode,
-                           &cols, &rows) == EFI_SUCCESS )
-        efi_arch_console_init(cols, rows);
-
     gop = efi_get_gop(&gop_handle);
 
     if ( gop )
@@ -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);
+    }
 
     efi_arch_edd();
     efi_arch_cpu();
-- 
2.40.0




 


Rackspace

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