From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by mx.groups.io with SMTP id smtpd.web10.1172.1645055468670856399 for ; Wed, 16 Feb 2022 15:51:09 -0800 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=CoY1Qtk5; spf=pass (domain: intel.com, ip: 134.134.136.126, mailfrom: guo.dong@intel.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1645055468; x=1676591468; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=TzmqWkJw/mQ+hDQAW5QdeLZh/ioLcMkMZsEEuSEIr0E=; b=CoY1Qtk5ieMyuyVuqfPh62/gm8qcTs8AdPOEvyy7GMU4V7/WQXR+mfpJ FFCutTCcUkcfy07eeBmkRfWw3xyUR9kAbo/4wRYjeAq/B17AlxAgVO1g4 zojqso23Kt0bS0eJ6v6QuoD5xstF71X5k4XFBlKIhVdsL03PEVAViOJyC HhhrGdTgJp6ZMeUst5dW59gVVXM/YCO55eR46x4l4++0w38ivdVysur3d CpKOLck/QZ5DXT11mOuvTcDgcWP7ssjYIxDlRkuC5hJyvoavJ7Xapsb6n L6aJ8mdxckpQ4ONZpkkw1KPypA8PnLKJNuWBao22rzKMuPU8AyEBKTjQ/ Q==; X-IronPort-AV: E=McAfee;i="6200,9189,10260"; a="234283113" X-IronPort-AV: E=Sophos;i="5.88,374,1635231600"; d="scan'208";a="234283113" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Feb 2022 15:51:08 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.88,374,1635231600"; d="scan'208";a="500409605" Received: from orsmsx606.amr.corp.intel.com ([10.22.229.19]) by orsmga006.jf.intel.com with ESMTP; 16 Feb 2022 15:51:08 -0800 Received: from orsmsx609.amr.corp.intel.com (10.22.229.22) by ORSMSX606.amr.corp.intel.com (10.22.229.19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.20; Wed, 16 Feb 2022 15:51:07 -0800 Received: from ORSEDG601.ED.cps.intel.com (10.7.248.6) by orsmsx609.amr.corp.intel.com (10.22.229.22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.20 via Frontend Transport; Wed, 16 Feb 2022 15:51:07 -0800 Received: from NAM12-MW2-obe.outbound.protection.outlook.com (104.47.66.46) by edgegateway.intel.com (134.134.137.102) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2308.20; Wed, 16 Feb 2022 15:51:06 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=YbzN6EwWT86j07wFdZ3KrTc1njc1Ut3whbnJ7/VDm3fwYOalac4Cna4srep7IB75iSMsQGfhRZk+3DKx/58suxkfmXEdi+OM8TQCMtoC0gPDfpn+g4l6hrukbSwSWKF/z98AoMj6NG8farbg+VWDwbw1pMhezDiFdqi8fcUNVJ84p+64Jjx75E7cpAnLEf2k4/O1+Q9MeiM0FXn7gz/Nrm53ffKe7p6pYLKZMSx49061diKbAWuL/6uHYbmCvrqHvQUchd12bWJ0xoPh9jwDo6Q6VUXU4dbYNlPv1vfm2lvOQuJTHKwA5DPSzwY99FftXsA59XWeN4NZNITpyBaptg== 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=ikSD/N+rtfdK5FbSNJsNt3Z186bPH76XxHnXqVEHAqE=; b=V0vBqVyhHBjQwbkYZnFtqNvyw5OF4BleoxqXnzLTeHadR2Z3Hfy0OagKWz7H+FwzE+xCTNLs1bxnYVt5wvE5d6CrLHZha+ZTTbnNQ576t/+DpJKcaDLO097OaM8aUbfBxmOD/JeMPcoQ8KibOH/H4UUDgfyp6S+16PqJ0GaQxIEBMwrLfyV3uiT+vlzxc+/PbA+cCO7iTxwAs+3zleWOopN/4/ZD8Ce7RVcgtWhwfOV8akPwBeOTAoYsjgVyAgG7e9Q0achGjxQKfswhwOujjF1c+XIf9ArA8zD6aBHuvjjB34/RVX4LAj8d2H+3GjeH2w1oP8TkiyEdJvPpZTwwbw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Received: from BYAPR11MB3622.namprd11.prod.outlook.com (2603:10b6:a03:fe::30) by DM6PR11MB2986.namprd11.prod.outlook.com (2603:10b6:5:61::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4995.16; Wed, 16 Feb 2022 23:51:05 +0000 Received: from BYAPR11MB3622.namprd11.prod.outlook.com ([fe80::c461:5de1:9cf:23cf]) by BYAPR11MB3622.namprd11.prod.outlook.com ([fe80::c461:5de1:9cf:23cf%7]) with mapi id 15.20.4975.019; Wed, 16 Feb 2022 23:51:04 +0000 From: "Guo Dong" To: "Rhodes, Sean" , "devel@edk2.groups.io" CC: Patrick Rudolph , "Ma, Maurice" , "Ni, Ray" , "You, Benjamin" Subject: Re: [PATCH 15/18] UefiPayloadPkg/Library/PlatformBootManagerLib: Remove broken VGA detection Thread-Topic: [PATCH 15/18] UefiPayloadPkg/Library/PlatformBootManagerLib: Remove broken VGA detection Thread-Index: AQHYHsUV6FDviUmBikiFiIdERJqmVKyW4mUg Date: Wed, 16 Feb 2022 23:51:04 +0000 Message-ID: References: <253cc473e4d3e77a4edf6e365a52d7a54c6f1703.1644527848.git.sean@starlabs.systems> In-Reply-To: <253cc473e4d3e77a4edf6e365a52d7a54c6f1703.1644527848.git.sean@starlabs.systems> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-reaction: no-action dlp-version: 11.6.200.16 authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 767331dc-181b-42ab-bc97-08d9f1a731ea x-ms-traffictypediagnostic: DM6PR11MB2986:EE_ x-ld-processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:9508; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: DWSJNhnUsxa6FYZnRLOrInDNCsHi9vIbQJq5eRRkY4vTsfdp5jwb7bHJUQec63od6ikZZpzSm1YK5Hp7ky6vGDvlmAhhtCNL6VzlxdglJ2nd9WAElMPJNOubcrWTx+yJ4hkxvlhW4dXGC3JEbRSbjwNiuH0ibJPtc5zjtJTzxIoWSjGbzPi0WNQYGd4IJ0N3pHtKQody91OZFpteRq4RQNLFN9XgCKNljnpZQFmkCzsRXqFKOk2xJyLAQbtLcIfPPcubRFH+S/G6TFDe4TohaPv32wv/vaO+vFfajDr3CJxEmBp9CchfvDtsYwLf72MUBOFLR0McsRX5JVjIo1H2xWZ4rX6hshm0IuO1iWJ9MJ7JzhhOy8aX6o4WkU8/M6HywAEkS41DH6U00uQH0NTw9HIrZtk9kaAfO0MAnVo0QlaXLHE0hthVT/huQGnW8hHMunxn2eXNJWeDqiPS4UuNmhVJuu7QX92pNYhZ6X+UQHGetAK73s6WZ2ZhBlpil4aoJzTiwctSQbfA+UEHaODbyLdOPuP2xncCjxYdH3//LEh0AAJ7ZZ3axPdMUcL2we4p9IIBLK2VZ3ubqoS9V8mX24xoNYMfuC9hlB9iaL0eQu19ccp+Up5a/TVq8S9mPn8IEsShq/vyCURbhMsEmL6rsswtIXkJlIIwVLIygMmjTzVRRHtVTHp2ZI7cW+U3KzN2bLCqlB0FbsYOHEuKWvO63A== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BYAPR11MB3622.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230001)(366004)(107886003)(26005)(186003)(76116006)(55016003)(33656002)(9686003)(53546011)(54906003)(6506007)(122000001)(316002)(110136005)(508600001)(7696005)(71200400001)(8936002)(38070700005)(52536014)(2906002)(82960400001)(83380400001)(66446008)(86362001)(64756008)(66946007)(8676002)(66476007)(66556008)(4326008)(5660300002)(38100700002);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?wRIv+R7mxL3YizpmEbd+HO6pu8skGvBQK0V0Ncg43QTODl2/T53VvQt7oT2x?= =?us-ascii?Q?ud1ncNs+0j4445dI9oJlg/TxFv7+q6Tw6UogUM8R9+dnUZjCTw55a2m9Z76x?= =?us-ascii?Q?3MbnQ/Q7XKWoT5zaXc95NzjaWPVNnQnj5Y/mu9LOb1sI3DfUMAFioWcl8Xaz?= =?us-ascii?Q?5j3bbRYPN+Nhk4YGzrBAYepZmxs13BKO0zIPHq9Saxz08wNK5GY8E2kLgbST?= =?us-ascii?Q?9K7SDRVjYplzWxQTiecOaveaPpDcxuqoPnMqVxhQWv8QKiWFjObb0cPNL91F?= =?us-ascii?Q?rHc7gSMxqdfNTpU5noa2C18oN4aYbhArWUwSo5RdZ8i0RD/ZjxT6GqwHbuer?= =?us-ascii?Q?q6rNe2th+HjHTo/FqxoYUdP4C34JY10HeI81iXG6c2cUUEUfpR16BWCKFZkF?= =?us-ascii?Q?DDGDGv3hIRJjFli+D6vrWIdL8D/Qer84lgGLv/uLnJr9ccYUBqe5GJ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RG945+HJjitZA+ePRVVY?= =?us-ascii?Q?CvkVvVG98snQ81twT3A4pEWYhxMuazXGxObd6rUk+m6ZcB15j7WnGR+eLNjR?= =?us-ascii?Q?LXiiERUSNZbp6M7s3/SwxAqChXx3ayME92Yp3HxpO+qM9EAUUQLAVzoH/R25?= =?us-ascii?Q?7FdlgkDpwp276wWuZgH9sTTc68HzK5aiyxQKPsiLVmsRFdXPyvn3lmEoBk+c?= =?us-ascii?Q?aXRNB+C7fuVQ9Uxjblbj0rA1vmGQK6d00qzOIGeNzkcZiZvbj14CS65TpWLC?= =?us-ascii?Q?3g2Hig9NXrWmKL3ZCDHxx7k=3D?= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: BYAPR11MB3622.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 767331dc-181b-42ab-bc97-08d9f1a731ea X-MS-Exchange-CrossTenant-originalarrivaltime: 16 Feb 2022 23:51:04.7998 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: VTSEkdMGQAXht2ZEGIePcjw4J2H0cfuYWSn0jTCdWmgfDIOHPl90xdDbNqHIbMrGSVOnDe1J+kynI3kU+PpXmQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR11MB2986 Return-Path: guo.dong@intel.com X-OriginatorOrg: intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Guo Dong -----Original Message----- From: Sean Rhodes =20 Sent: Thursday, February 10, 2022 2:28 PM To: devel@edk2.groups.io Cc: Dong, Guo ; Patrick Rudolph Subject: [PATCH 15/18] UefiPayloadPkg/Library/PlatformBootManagerLib: Remov= e broken VGA detection From: Patrick Rudolph This fixes an issue where the framebuffer provided by coreboot or slimbootl= oader will only work on the primary VGA device. If the framebuffer correspo= nds to a different device the screen will stay black. In addition, the code doesn't work for multiple graphic cards, has referenc= e to non existing functions, and is a duplication of common code. Call EfiBootManagerConnectVideoController on every display device found, no= t only the legacy VGA device. This is the same as OvmfPkg does. Allows to display output on the framebuffer set up by firmware, which might= not be the VGA device. Signed-off-by: Patrick Rudolph --- .../PlatformBootManagerLib/PlatformConsole.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/UefiPayloadPkg/Library/PlatformBootManagerLib/PlatformConsole.= c b/UefiPayloadPkg/Library/PlatformBootManagerLib/PlatformConsole.c index c93c7c99b5..bfaf89e74c 100644 --- a/UefiPayloadPkg/Library/PlatformBootManagerLib/PlatformConsole.c +++ b/UefiPayloadPkg/Library/PlatformBootManagerLib/PlatformConsole.c @@ -109,7 +109,7 @@ EFI_DEVICE_PATH_PROTOCOL *gPlatformRootBridges[] =3D { NULL }; -BOOLEAN mDetectVgaOnly;+BOOLEAN mDetectDisplayOnly; /** Ad= d IsaKeyboard to ConIn; add IsaSerial to ConOut, ConIn, ErrOut.@@ -482,7 +4= 82,7 @@ DetectAndPreparePlatformPciDevicePath ( ); ASSERT_EFI_ERROR (Status); - if (!mDetectVgaOnly= ) {+ if (!mDetectDisplayOnly) { // // Here we decide whether it is= LPC Bridge //@@ -515,14 +515,14 @@ DetectAndPreparePlatformPciDevicePa= th ( } //- // Here we decide which VGA device to enable in PCI bus+ // E= nable all display devices //- if (IS_PCI_VGA (Pci)) {+ if (IS_PCI_DISPL= AY (Pci)) { // // Add them to ConOut. //- DEBUG ((DEBUG_INFO= , "Found PCI VGA device\n"));- PreparePciVgaDevicePath (Handle);+ DEB= UG ((DEBUG_INFO, "Found PCI Display device\n"));+ EfiBootManagerConnectV= ideoController (Handle); return EFI_SUCCESS; } @@ -532,7 +532,7 @@ De= tectAndPreparePlatformPciDevicePath ( /** Do platform specific PCI Device check and add them to ConOut, ConIn,= ErrOut - @param[in] DetectVgaOnly - Only detect VGA device if it's TRUE.= + @param[in] DetectDisplayOnly - Only detect display device if it's TRUE.= @retval EFI_SUCCESS - PCI Device check and Console variable update succ= essfully. @retval EFI_STATUS - PCI Device check or Console variable updat= e fail.@@ -540,10 +540,10 @@ DetectAndPreparePlatformPciDevicePath ( **/ EFI_STATUS DetectAndPreparePlatformPciDevicePaths (- BOOLEAN DetectV= gaOnly+ BOOLEAN DetectDisplayOnly ) {- mDetectVgaOnly =3D DetectVgaOnl= y;+ mDetectDisplayOnly =3D DetectDisplayOnly; EfiBootManagerUpdateConso= leVariable ( ConIn,--=20 2.32.0