From nobody Mon Feb 9 09:32:27 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+87139+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+87139+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1646126389; cv=none; d=zohomail.com; s=zohoarc; b=esE7Jn3ZSF+UqAM9msm8ICEVUD8z7eTQfQNHaFGDhOwGsy67GieqKjhTza1JYM8/Hk4cAFpK6bl/PKIEvMX3y8XB5P4pQLcgseR9nhjLHV1wpaGZVp6NNknv+CxAeW9nN4t1VJw1pP+HE5GwtjNnne/AhFmUF2Aswsg+CvnUILA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1646126389; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=v92P3xbXrM5l79yLM0JTZsFA0G6Y0f5H7VSaYWc7hLM=; b=hTSjC/94SqeFyxojAPEMfKEE4MwUWzg/TXDNlOxr+b+f/qwi9R5HgnbTSq0UqAoK5uJs4Gmcni9ieCY3BlWI7+FhdVY0ILLqBh+YVZwuOmQwwjEiFDKX1PMMGdZxbC7mSywZoABz0RrZGCgel0v0t9D8Z440KL/2C6WLrVQswGw= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+87139+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1646126389371654.5664128091406; Tue, 1 Mar 2022 01:19:49 -0800 (PST) Return-Path: X-Received: by 127.0.0.2 with SMTP id yRZ5YY1788612xvQ8bCVOzNM; Tue, 01 Mar 2022 01:19:49 -0800 X-Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by mx.groups.io with SMTP id smtpd.web10.6266.1646126386729812009 for ; Tue, 01 Mar 2022 01:19:48 -0800 X-IronPort-AV: E=McAfee;i="6200,9189,10272"; a="253286519" X-IronPort-AV: E=Sophos;i="5.90,145,1643702400"; d="scan'208";a="253286519" X-Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Mar 2022 01:19:48 -0800 X-IronPort-AV: E=Sophos;i="5.90,145,1643702400"; d="scan'208";a="708986771" X-Received: from guominji-mobl1.ccr.corp.intel.com ([10.238.15.53]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Mar 2022 01:19:46 -0800 From: "Guomin Jiang" To: devel@edk2.groups.io Cc: Jian J Wang , Liming Gao , Zhichao Gao , Ray Ni Subject: [edk2-devel] [PATCH v2 1/2] MdeModulePkg/GraphicsConsoleDxe: Check status to make sure no error Date: Tue, 1 Mar 2022 17:18:49 +0800 Message-Id: <20220301091850.828-2-guomin.jiang@intel.com> In-Reply-To: <20220301091850.828-1-guomin.jiang@intel.com> References: <20220301091850.828-1-guomin.jiang@intel.com> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,guomin.jiang@intel.com X-Gm-Message-State: D6jL2ufwGMvS6HvyUPvcSRayx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1646126389; bh=6FOAMn4qt3oe04h7MWI3/gBSRGDyM2WTvBF8ws2ouLg=; h=Cc:Date:From:Reply-To:Subject:To; b=STPu4dcYWjxAaoY6DNZN4mwluqoFPLNTXdAJ6W+V1h9Sczl2Of9mnyUd6Olil1JxLau dfhabivR2tpquXOZBDeCo8bnrNRizxylpUcHs6GuntyrKHvjheLpcRzf4Mp8ADQc4i+In Wjyp7TDSs5qmgaLYeqgy7yUOr5hX5GiQxyU= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1646126391477100001 Content-Type: text/plain; charset="utf-8" REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D2668 SetMode will fail in some case. for example, without XServer. Should handle these case when SetMode fail. If we don't handle it, it will Segmentation fault. Cc: Jian J Wang Cc: Liming Gao Cc: Zhichao Gao Cc: Ray Ni Signed-off-by: Guomin Jiang Reviewed-by: Ray Ni --- .../Universal/Console/GraphicsConsoleDxe/GraphicsConsole.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsCons= ole.c b/MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsole.c index 8f0cba9fcde9..07436cbd15bf 100644 --- a/MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsole.c +++ b/MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsole.c @@ -1,7 +1,7 @@ /** @file This is the main routine for initializing the Graphics Console support r= outines. =20 -Copyright (c) 2006 - 2019, Intel Corporation. All rights reserved.
+Copyright (c) 2006 - 2022, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent =20 **/ @@ -518,7 +518,7 @@ GraphicsConsoleControllerDriverStart ( } } =20 - if (ModeNumber !=3D Private->GraphicsOutput->Mode->Mode) { + if (EFI_ERROR (Status) || (ModeNumber !=3D Private->GraphicsOutput->Mo= de->Mode)) { // // Current graphics mode is not set or is not set to the mode which = we have found, // set the new graphic mode. --=20 2.35.1.windows.2 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#87139): https://edk2.groups.io/g/devel/message/87139 Mute This Topic: https://groups.io/mt/89472123/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-