From nobody Mon Nov 25 18:30:33 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+66577+1787277+3901457@groups.io; helo=web01.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+66577+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1603674448; cv=none; d=zohomail.com; s=zohoarc; b=dLJXPN2BxQ3bU4zU3e62Zsb/9AwH+o0bJ6nG7cnOTAHh7+ape3OAtoiGiJmG0+UOlSjgQSdZ9b+AFR0Ka0Jc/7uEWLMCmoVUbl+38bx7aLOYa1zGAzTHbcL9lUGJ/1AAnOBmeJ7vx2SaNPI8SMjZa6j4XngkGuLxFqI7k0UEMRI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1603674448; h=Content-Transfer-Encoding:Cc:Date:From:List-Id:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Sender:Subject:To; bh=yT384naMaETTMnVDtdP4lblVxWvB2d140/XALsz/dm4=; b=C9wf9G73lw1elbM6cXoeedD2BB2SM7KyXsqcqc+JvoxVMrFBky5O4L+qhk/jlFiO1uY7t6Z7UxQSfye6Rr+AUXxNLAEaYIeea0erwOOnFb0yRhktvVmRkBpqufoSmDe+u8kZYFbtdfqfaGc1xl+GQY1zzGdzyAxjz5Ot1SBAlMY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+66577+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) header.from= Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1603674448597862.9650685939097; Sun, 25 Oct 2020 18:07:28 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id ESlHYY1788612x8KwwzLztn0; Sun, 25 Oct 2020 18:07:28 -0700 X-Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by mx.groups.io with SMTP id smtpd.web09.6895.1603674442137987747 for ; Sun, 25 Oct 2020 18:07:22 -0700 IronPort-SDR: NkuhGnKcBWAveEQbXdnUpYdBjsSuGATSKWzIf0H2wnxlXU8JSU8wLqWc4Fvvaps2McOnCD0b7V mtcwxVtHNxOg== X-IronPort-AV: E=McAfee;i="6000,8403,9785"; a="252565341" X-IronPort-AV: E=Sophos;i="5.77,417,1596524400"; d="scan'208";a="252565341" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Oct 2020 18:07:21 -0700 IronPort-SDR: 8i0F6uvAsZjl/eajJ3FlblhT8lLS/LZzJB92A7WiW6avvRGG9p88dIHFPWMj1/qfRWOg8QgN5i R/2l7EMPVIMQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,417,1596524400"; d="scan'208";a="525333818" X-Received: from hengluo-dev.ccr.corp.intel.com ([10.239.153.154]) by fmsmga005.fm.intel.com with ESMTP; 25 Oct 2020 18:07:20 -0700 From: "Heng Luo" To: devel@edk2.groups.io Cc: Eric Dong , Chasel Chiu , Nate DeSimone Subject: [edk2-devel] [Patch V2] BoardModulePkg: Early connect PCI Root Bridge in BoardBdsHookLib Date: Mon, 26 Oct 2020 09:07:17 +0800 Message-Id: <20201026010717.5240-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: 4jteL95yhSg6FBDYU9r3sqnpx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1603674448; bh=pgdoYKehxByNxQnr1VEqhPMefv2MpDjfxMrrVqhIOHs=; h=Cc:Date:From:Reply-To:Subject:To; b=EEBDzamfXrZ3L9Rxp4dyGvfLCRXe8Te2Td2jz7WZ4wMug88zon+kLygQ0J2TahmLocU xPtirEhQXR+L+VoTVxHCrD50ozwcFVSsd34uakBx0jQ1Vs5+1sVB+taDxGg91ZSvuEqeU SAapiPP4ySYc0IFDee8ovlTf9LmBXyylrl8= 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: Chasel Chiu Cc: Nate DeSimone Signed-off-by: Heng Luo Reviewed-by: Chasel Chiu Reviewed-by: Nate DeSimone --- 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 (#66577): https://edk2.groups.io/g/devel/message/66577 Mute This Topic: https://groups.io/mt/77805401/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-