From nobody Sat Apr 27 20:56:40 2024 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+66464+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+66464+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1603244128; cv=none; d=zohomail.com; s=zohoarc; b=DS9c6XNdQgOcne0DMNEUr+I2ySNcfyf0oetRMUWtrUi2sVVw5ekna8VLKuY4iVF2o7x1TlMMrpspzDXAEA3OGAUjUEn8oBjBEZzLFW+etTsYlejlgrp/UamPEPPedxAcobxi13fToJSqzkfwgnZTo1oO2AiZlmRxKCIB+D+bi70= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1603244128; h=Content-Transfer-Encoding:Cc:Date:From:List-Id:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Sender:Subject:To; bh=h/RkRM95yMQeHdwOTYf7/tIJ6x7o0WfX2RYdEVbSvmI=; b=XcnkB2bUbig01qJM6u5jKtEjMALag7EE7fcbHTUxmrLcrXKolvXGhoU+lUPWe+70CX5rdgkihCJWN0o9qAVyA28Ag2ZYTZCNee+HF+o8DF5lIxoSqJcLkScW+cREZrHcCJHekvaG7aluo2RzriR4IN2pri+FEONc5NtzKj6cTa0= 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+66464+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) header.from= Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1603244128495477.44232606763603; Tue, 20 Oct 2020 18:35:28 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id 596kYY1788612xNCg8luaN2K; Tue, 20 Oct 2020 18:35:27 -0700 X-Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by mx.groups.io with SMTP id smtpd.web09.5202.1603244122507605543 for ; Tue, 20 Oct 2020 18:35:22 -0700 IronPort-SDR: wyxYmDo/xhPFu5OwmGoLs1GmN2/YIpmRnnmcoKHgXi4u+t4ewWFMQbucEDR0g4BRpeJITGaevm 4QHHnswF48lA== X-IronPort-AV: E=McAfee;i="6000,8403,9780"; a="147158162" X-IronPort-AV: E=Sophos;i="5.77,399,1596524400"; d="scan'208";a="147158162" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Oct 2020 18:35:22 -0700 IronPort-SDR: 46NPu+dhhWcstsJ9boaCmUHx10xCNvTCB2+tFUU85DISxm7XSTKBxfOTmbihN6cG5tRp5y1c0H EMAXuV9KH4yQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,399,1596524400"; d="scan'208";a="316215475" X-Received: from hengluo-dev.ccr.corp.intel.com ([10.239.153.154]) by orsmga003.jf.intel.com with ESMTP; 20 Oct 2020 18:35:19 -0700 From: "Heng Luo" To: devel@edk2.groups.io Cc: Eric Dong , Michael Kubacki , Chasel Chiu , Nate DeSimone Subject: [edk2-devel] [PATCH] BoardModulePkg: Early connect PCI Root Bridge in BoardBdsHookLib Date: Wed, 21 Oct 2020 09:35:05 +0800 Message-Id: <20201021013505.3073-1-heng.luo@intel.com> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: 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,heng.luo@intel.com X-Gm-Message-State: dBabNmpCIq9Y6FkXa3TcBGbdx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1603244127; bh=bjMPGMJZe12ZQgryRzNgcfbgOL45wS4ia3FcbPZIFR0=; h=Cc:Date:From:Reply-To:Subject:To; b=wVdd++rHKIEcAU8Yr8C9ePnnhqu+ntkx3v1RGWWmbonHWwSdBbglYk0bhJe4jG87BcB /96DZGz4TwAJLMO443e/DKJbTZ5ZaZ5iWYre88LNYtAC2tsJs+rrr02BK9AupD82inz/Z 9i11TuvH0iYb19y206cSOciDrGkwo17yitQ= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D3016 Trigger PCI Bus scanning at BdsBeforeConsoleAfterTrustedConsoleCallback(). Move the call to EnumUsbKeyboard() to after PciEnumComplete. Cc: Eric Dong Cc: Michael Kubacki Cc: Chasel Chiu Cc: Nate DeSimone Signed-off-by: Heng Luo Reviewed-by: Eric Dong --- Platform/Intel/BoardModulePkg/Library/BoardBdsHookLib/BoardBdsHookLib.c | = 77 ++++++++++++++++++++++++++++++++++++++----------------------------------= ----- 1 file changed, 38 insertions(+), 39 deletions(-) diff --git a/Platform/Intel/BoardModulePkg/Library/BoardBdsHookLib/BoardBds= HookLib.c b/Platform/Intel/BoardModulePkg/Library/BoardBdsHookLib/BoardBdsH= ookLib.c index 9d42a8c27f..d7612fb80a 100644 --- a/Platform/Intel/BoardModulePkg/Library/BoardBdsHookLib/BoardBdsHookLib= .c +++ b/Platform/Intel/BoardModulePkg/Library/BoardBdsHookLib/BoardBdsHookLib= .c @@ -1141,11 +1141,6 @@ BdsPciEnumCompleteCallback ( =20 gBootMode =3D GetBootModeHob (); =20 - // - // Connect Root Bridge to make PCI BAR resource allocated and all PciIo = created - // - ConnectRootBridge (FALSE); - // // Fill ConIn/ConOut in Full Configuration boot mode // @@ -1180,6 +1175,42 @@ BdsPciEnumCompleteCallback ( } } =20 + // + // Enumerate USB keyboard + // + EnumUsbKeyboard (); + + // + // For trusted console it must be handled here. + // + UpdateGraphicConOut (TRUE); + + // + // Register Boot Options + // + RegisterDefaultBootOption (); + + // + // Register Static Hot keys + // + RegisterStaticHotkey (); + + // + // Process Physical Preo + // + PERF_START_EX(NULL,"EventRec", NULL, AsmReadTsc(), 0x7010); + if (PcdGetBool (PcdTpm2Enable)) { + ProcessTcgPp (); + ProcessTcgMor (); + } + PERF_END_EX(NULL,"EventRec", NULL, AsmReadTsc(), 0x7011); + + // + // Perform memory test + // We should make all UEFI memory and GCD information populated before E= xitPmAuth. + // SMM may consume these information. + // + MemoryTest((EXTENDMEM_COVERAGE_LEVEL) PcdGet32 (PcdPlatformMemoryCheckLe= vel)); } =20 /** @@ -1265,41 +1296,9 @@ BdsBeforeConsoleAfterTrustedConsoleCallback ( DEBUG ((DEBUG_INFO, "Event gBdsEventBeforeConsoleBeforeEndOfDxeGuid call= back starts\n")); =20 // - // Enumerate USB keyboard - // - EnumUsbKeyboard (); - - // - // For trusted console it must be handled here. - // - UpdateGraphicConOut (TRUE); - - // - // Register Boot Options - // - RegisterDefaultBootOption (); - - // - // Register Static Hot keys - // - RegisterStaticHotkey (); - - // - // Process Physical Preo - // - PERF_START_EX(NULL,"EventRec", NULL, AsmReadTsc(), 0x7010); - if (PcdGetBool (PcdTpm2Enable)) { - ProcessTcgPp (); - ProcessTcgMor (); - } - PERF_END_EX(NULL,"EventRec", NULL, AsmReadTsc(), 0x7011); - - // - // Perform memory test - // We should make all UEFI memory and GCD information populated before E= xitPmAuth. - // SMM may consume these information. + // Connect Root Bridge to make PCI BAR resource allocated and all PciIo = created // - MemoryTest((EXTENDMEM_COVERAGE_LEVEL) PcdGet32 (PcdPlatformMemoryCheckLe= vel)); + ConnectRootBridge (FALSE); } =20 =20 --=20 2.24.0.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 (#66464): https://edk2.groups.io/g/devel/message/66464 Mute This Topic: https://groups.io/mt/77696748/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-