From nobody Wed Dec 25 03:03:40 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 1511870537971831.2849025307925; Tue, 28 Nov 2017 04:02:17 -0800 (PST) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id DCA37203564C5; Tue, 28 Nov 2017 03:57:53 -0800 (PST) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id E0389203564C5 for ; Tue, 28 Nov 2017 03:57:49 -0800 (PST) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 28 Nov 2017 04:02:12 -0800 Received: from ray-dev.ccr.corp.intel.com ([10.239.9.50]) by fmsmga002.fm.intel.com with ESMTP; 28 Nov 2017 04:02:12 -0800 X-Original-To: edk2-devel@lists.01.org Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=134.134.136.24; helo=mga09.intel.com; envelope-from=ruiyu.ni@intel.com; receiver=edk2-devel@lists.01.org X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.44,468,1505804400"; d="scan'208";a="1249439453" From: Ruiyu Ni To: edk2-devel@lists.01.org Date: Tue, 28 Nov 2017 20:02:07 +0800 Message-Id: <20171128120207.186068-3-ruiyu.ni@intel.com> X-Mailer: git-send-email 2.15.0.gvfs.1.preview.4 In-Reply-To: <20171128120207.186068-1-ruiyu.ni@intel.com> References: <20171128120207.186068-1-ruiyu.ni@intel.com> Subject: [edk2] [PATCH 2/2] ShellPkg/DynamicCommand: Fix bug that cannot start in boot X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Jaben Carsey MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail: RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" When dynamic command drivers are built into FV and start during boot, they fails. Because Shell protocol doesn't exist during boot. The patch sets Shell protocol and also set PcdShellLibAutoInitialize to FALSE to ensure that 1. Shell protocol check doesn't happen in driver's entry point. 2. Driver can get the Shell protocol in DynamicCommand.Handler(). Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ruiyu Ni Cc: Jaben Carsey --- ShellPkg/DynamicCommand/DpDynamicCommand/DpDynamicCommand.c | 1 + ShellPkg/DynamicCommand/TftpDynamicCommand/TftpDynamicCommand.c | 1 + ShellPkg/ShellPkg.dsc | 7 ++++++- 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/ShellPkg/DynamicCommand/DpDynamicCommand/DpDynamicCommand.c b/= ShellPkg/DynamicCommand/DpDynamicCommand/DpDynamicCommand.c index 6f3997fff4..b10c59f49c 100644 --- a/ShellPkg/DynamicCommand/DpDynamicCommand/DpDynamicCommand.c +++ b/ShellPkg/DynamicCommand/DpDynamicCommand/DpDynamicCommand.c @@ -38,6 +38,7 @@ DpCommandHandler ( ) { gEfiShellParametersProtocol =3D ShellParameters; + gEfiShellProtocol =3D Shell; return RunDp (gImageHandle, SystemTable); } =20 diff --git a/ShellPkg/DynamicCommand/TftpDynamicCommand/TftpDynamicCommand.= c b/ShellPkg/DynamicCommand/TftpDynamicCommand/TftpDynamicCommand.c index 928ef08468..9e6489dd6f 100644 --- a/ShellPkg/DynamicCommand/TftpDynamicCommand/TftpDynamicCommand.c +++ b/ShellPkg/DynamicCommand/TftpDynamicCommand/TftpDynamicCommand.c @@ -39,6 +39,7 @@ TftpCommandHandler ( ) { gEfiShellParametersProtocol =3D ShellParameters; + gEfiShellProtocol =3D Shell; return RunTftp (gImageHandle, SystemTable); } =20 diff --git a/ShellPkg/ShellPkg.dsc b/ShellPkg/ShellPkg.dsc index 65e8959455..86382139a5 100644 --- a/ShellPkg/ShellPkg.dsc +++ b/ShellPkg/ShellPkg.dsc @@ -120,9 +120,14 @@ [Components] !endif #$(NO_SHELL_PROFILES) } =20 - ShellPkg/DynamicCommand/TftpDynamicCommand/TftpDynamicCommand.inf + ShellPkg/DynamicCommand/TftpDynamicCommand/TftpDynamicCommand.inf { + + gEfiShellPkgTokenSpaceGuid.PcdShellLibAutoInitialize|FALSE + } ShellPkg/DynamicCommand/TftpDynamicCommand/TftpApp.inf ShellPkg/DynamicCommand/DpDynamicCommand/DpDynamicCommand.inf { + + gEfiShellPkgTokenSpaceGuid.PcdShellLibAutoInitialize|FALSE PerformanceLib|MdeModulePkg/Library/DxeSmmPerformanceLib/DxeSmmPerfo= rmanceLib.inf } --=20 2.15.0.gvfs.1.preview.4 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel