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

[PATCH 2/5] efi: only set a console mode if the current one is invalid


  • To: xen-devel@xxxxxxxxxxxxxxxxxxxx
  • From: Roger Pau Monne <roger.pau@xxxxxxxxxx>
  • Date: Wed, 23 Nov 2022 16:45:21 +0100
  • 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=OdFMrPR8EW2lv0Zu+hrAeX4u8IAlUd+YRN8dsbbLR0w=; b=hrVq7CLn6q281VG5Nl1ocisnoL4RR+HqREpD9w2QJjPfy7y3jQAbsnI/C69yshHd5Xc7sOSmmUwzdlzwoRh+e8j6PybGG/q3XBV1ZRvZU73W7+P6rRJ2BhLW4z8pzUwieX7uOGJeuef9jFN5pc5knhpw+Ifv6H5hNnNeU+JHxIr/rr3k5/G2O1P7g8EIj8pOtQ4sIOLpqr7ek4hXjlRz0UaB+UuwYcm2SC8VDoHarMTXkVE+4AUo8e88B95ULZ19oeXg6Wy0PPfa0GrOuHizPk40ln6fzxX8lddIlEBf5KtekqV5n2UByyAawdqFld7JVnDEJs9nOQVl5eK9X1wpdQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ZJ4a0y/tFxin3qYVu+bKWAq0oq4wM9wPjnLpNNYZjR6YzIz5+LCiL9Wi4fU8fdjco40x2U0F4CZ20MfWynzvNbHYsC7ECHnE2CnNkeSU0D4yMjCH3s7e0Jf5KaWKVJ9pHSCwqito5mCDkbTw9AipoiSFDXtZXmFMQHe0fviAUxwQZrmsva+WgWs9J/lsJ+4LPHp3vGLhPwRxLQZHphwcEjb43235/ehhqsn1rIgdB6+WZ8U1jeV6tv7Ngwi66CQThcTpgdta0ozDsi+dtjCaIBGaUeDfwhe6eEc4lO0CxANPpqj0kh/bldYaCq/9DuF8XiJ0JvjREvTudUNb5dCvxg==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=citrix.com;
  • Cc: marmarek@xxxxxxxxxxxxxxxxxxxxxx, Roger Pau Monne <roger.pau@xxxxxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>
  • Delivery-date: Wed, 23 Nov 2022 15:45:59 +0000
  • Ironport-data: A9a23:5SFEIKPAZ0FZstLvrR2XlsFynXyQoLVcMsEvi/4bfWQNrUoihmNSy mZMW2uDOPzZMTb1Ldwlbdmy/RgFsZHRmtEyTwto+SlhQUwRpJueD7x1DKtS0wC6dZSfER09v 63yTvGacajYm1eF/k/F3oDJ9CU6jufQA+KmU4YoAwgpLSd8UiAtlBl/rOAwh49skLCRDhiE/ Nj/uKUzAnf8s9JPGj9SuvzrRC9H5qyo4mpB5AdmP5ingXeF/5UrJMNHTU2OByOQrrl8RoaSW +vFxbelyWLVlz9F5gSNy+uTnuUiG9Y+DCDW4pZkc/HKbitq/0Te5p0TJvsEAXq7vh3S9zxHJ HehgrTrIeshFvWkdO3wyHC0GQkmVUFN0OevzXRSLaV/ZqAJGpfh66wGMa04AWEX0txzX0pis r9AEhAiUxujjtKxm7TlbcA506zPLOGzVG8ekldJ6GmFSNMZG9XESaiM4sJE1jAtgMwIBezZe 8cSdTtoalLHfgFLPVAUTpk5mY9EhFGmK2Ee9A3T+vFxujeJpOBy+OGF3N79YNuFSN8Thk+Fj mnH4374ElcRM9n3JT+toi/w3LKexXqTtIQ6JpGl8Po6h22qmn0jCyMPFlLh+ceGlRvrMz5YA wlOksY0loAi+UruQtTjUhmQpH+fogVaS9dWC/c96gyG1uzT+QnxLm0NVDtIctElnM4wWz0x1 1WNks/pBDpgq7mcQzSW8bL8hTG4NDURLGQCTTQZVgZD6N7myLzflTrKR9dnVauq1Nv8HGmsx yjQ9XdkwbIOkcQMyqO3u0jdhC6hrYTISQhz4RjLWmWi7UVyY4vNi5GU1GU3JM1odO6xJmRtd lBd8yRCxIji1a2wqRE=
  • Ironport-hdrordr: A9a23:xytmS6FnxK3LjzTdpLqFiJLXdLJyesId70hD6qkvc3Fom52j/f xGws5x6faVslkssb8b6LK90c67MAnhHP9OkPIs1NKZMDUO11HYSL2KgbGD/9SkIVyGygc/79 YeT0EBMqyWMbESt6+TjmiF+pQbsaG6GciT9JvjJhxWPGRXgs9bnmRE4lHxKDwKeOAKP+tOKL Osou584xawc3Ueacq2QlEDQuj4vtXO0L72fBIcABYjyQ+WyRel8qTzHRS01goXF2on+8ZpzU H11yjCoomzufCyzRHRk0fV8pRtgdPkjvdTGcCWjcARCzP0ziKlfp5oVbGutC085Muv9FEput /RpApIBbU511rhOkWO5Tf90Qjp1zgjr1fk1F+jmHPm5ej0XigzBcZtjZ9QNkKx0TtpgPhMlI Zwm06JvZteCh3N2Az7+tjzThlv0m65u2Arn+I/h2FWFaEedLhSh4oC+149KuZIIAvKrKQcVM V+BsDV4/hbNXuccnDip2FqhOehW3widy32N3Qqi4iw6Xx7jXp5x0wXyIg0hXEb7q8wTJFC+q DtLrlovKsmdL5ZUYtNQMM6BeenAG3ERhzBdEiIJ078Ka0BM3XR77bq/bQO4v2wcpBg9up8pH 34aiIZiYcOQTOsNSXXt6c7sCwlAV/NEQgF8/supqSQ4dbHNf/W2S7qciFdryLvmYRaPiThYY fCBHtnOY6cEYLQI/c54+SHYeg1FZA/arxghj9pYSP4nuv7bqvXi8f8TNH/YJLQLBdMYBKNPp JEZkm/GPl9
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

Do not unconditionally set a mode in efi_console_set_mode(), do so
only if the currently set mode is not valid.

Signed-off-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>
---
 xen/common/efi/boot.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/xen/common/efi/boot.c b/xen/common/efi/boot.c
index db0340c8e2..7e8a8b7857 100644
--- 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;
+
     for ( i = 0, size = 0, best = StdOut->Mode->Mode;
           i < StdOut->Mode->MaxMode; ++i )
     {
-- 
2.37.3




 


Rackspace

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