From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=134.134.136.65; helo=mga03.intel.com; envelope-from=bob.c.feng@intel.com; receiver=edk2-devel@lists.01.org Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) (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 61FEC211BA45C for ; Wed, 27 Feb 2019 18:06:11 -0800 (PST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 27 Feb 2019 18:06:10 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.58,421,1544515200"; d="scan'208";a="125766702" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by fmsmga007.fm.intel.com with ESMTP; 27 Feb 2019 18:06:10 -0800 Received: from fmsmsx113.amr.corp.intel.com (10.18.116.7) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.408.0; Wed, 27 Feb 2019 18:06:10 -0800 Received: from shsmsx102.ccr.corp.intel.com (10.239.4.154) by FMSMSX113.amr.corp.intel.com (10.18.116.7) with Microsoft SMTP Server (TLS) id 14.3.408.0; Wed, 27 Feb 2019 18:06:09 -0800 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.158]) by shsmsx102.ccr.corp.intel.com ([169.254.2.163]) with mapi id 14.03.0415.000; Thu, 28 Feb 2019 10:06:07 +0800 From: "Feng, Bob C" To: "Gao, Liming" , "edk2-devel@lists.01.org" Thread-Topic: [edk2] [Patch] Revert "BaseTools:BaseTools supports to the driver combination." Thread-Index: AQHUzJ9QrFk+XtBxS0eF3Od8E6+/faX0euaA Date: Thu, 28 Feb 2019 02:06:06 +0000 Message-ID: <08650203BA1BD64D8AD9B6D5D74A85D16009E050@SHSMSX101.ccr.corp.intel.com> References: <1551053725-13244-1-git-send-email-liming.gao@intel.com> In-Reply-To: <1551053725-13244-1-git-send-email-liming.gao@intel.com> Accept-Language: zh-CN, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [Patch] Revert "BaseTools:BaseTools supports to the driver combination." X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Feb 2019 02:06:11 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Bob Feng -----Original Message----- From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Limi= ng Gao Sent: Monday, February 25, 2019 8:15 AM To: edk2-devel@lists.01.org Subject: [edk2] [Patch] Revert "BaseTools:BaseTools supports to the driver = combination." This reverts commit 838bc257bae3f9fc6723f41f3980f6cfbedb77e5. After further evaluation, there are the unclear behavior in for the driver = combination feature. To not impact Q1 stable tag, remove it first. 1. If the drivers to be combined have the different PCD or library instance setting, build should not combine them and report build break. But this commit doesn't consider this case. 2. When start the sub driver fail, continue to start other sub driver. This behavior is required to be clarifed in build spec.=20 3. Unload the sub driver when the combined driver start fail. This case nee= d=20 to call the sub driver unload function for the driver start fail only. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Liming Gao --- BaseTools/Source/Python/AutoGen/GenC.py | 32 ++++--------------= ---- .../Source/Python/Workspace/WorkspaceCommon.py | 8 ------ 2 files changed, 5 insertions(+), 35 deletions(-) diff --git a/BaseTools/Source/Python/AutoGen/GenC.py b/BaseTools/Source/Pyt= hon/AutoGen/GenC.py index 0f1b3bb9a3..a922464f56 100644 --- a/BaseTools/Source/Python/AutoGen/GenC.py +++ b/BaseTools/Source/Python/AutoGen/GenC.py @@ -1457,25 +1457,10 @@ def CreateLibraryDestructorCode(Info, AutoGenC, Aut= oGenH): def CreateModuleEntryPointCode(Info, AutoGenC, AutoGenH): if Info.IsLibrary or Info.ModuleType in [SUP_MODULE_USER_DEFINED, SUP_= MODULE_SEC]: return - ModuleEntryPointList =3D [] - for Lib in Info.DependentLibraryList: - if len(Lib.ModuleEntryPointList) > 0: - if Lib.ModuleType =3D=3D Info.ModuleType: - ModuleEntryPointList =3D ModuleEntryPointList + Lib.Module= EntryPointList - else: - EdkLogger.error( - "build", - PREBUILD_ERROR, - "Driver's ModuleType must be consistent [%s]"%(str(Lib= )), - File=3Dstr(Info.PlatformInfo), - ExtraData=3D"consumed by [%s]" % str(Info.MetaFile) - ) - ModuleEntryPointList =3D ModuleEntryPointList + Info.Module.ModuleEntr= yPointList - # # Module Entry Points # - NumEntryPoints =3D len(ModuleEntryPointList) + NumEntryPoints =3D len(Info.Module.ModuleEntryPointList) if 'PI_SPECIFICATION_VERSION' in Info.Module.Specification: PiSpecVersion =3D Info.Module.Specification['PI_SPECIFICATION_VERS= ION'] else: @@ -1485,7 +1470,7 @@ def CreateModuleEntryPointCode(Info, AutoGenC, AutoGe= nH): else: UefiSpecVersion =3D '0x00000000' Dict =3D { - 'Function' : ModuleEntryPointList, + 'Function' : Info.Module.ModuleEntryPointList, 'PiSpecVersion' : PiSpecVersion + 'U', 'UefiSpecVersion': UefiSpecVersion + 'U' } @@ -1498,7 +1483,7 @@ def CreateModuleEntryPointCode(Info, AutoGenC, AutoGe= nH): AUTOGEN_ERROR, '%s must have exactly one entry point' % Info.ModuleType= , File=3Dstr(Info), - ExtraData=3D ", ".join(ModuleEntryPointList) + ExtraData=3D ",=20 + ".join(Info.Module.ModuleEntryPointList) ) if Info.ModuleType =3D=3D SUP_MODULE_PEI_CORE: AutoGenC.Append(gPeiCoreEntryPointString.Replace(Dict)) @@ -1552,18 +1537,11 @@ def CreateModuleEntryPointCode(Info, AutoGenC, Auto= GenH): def CreateModuleUnloadImageCode(Info, AutoGenC, AutoGenH): if Info.IsLibrary or Info.ModuleType in [SUP_MODULE_USER_DEFINED, SUP_= MODULE_BASE, SUP_MODULE_SEC]: return - - ModuleUnloadImageList =3D [] - for Lib in Info.DependentLibraryList: - if len(Lib.ModuleUnloadImageList) > 0: - ModuleUnloadImageList =3D ModuleUnloadImageList + Lib.ModuleUn= loadImageList - ModuleUnloadImageList =3D ModuleUnloadImageList + Info.Module.ModuleUn= loadImageList - # # Unload Image Handlers # - NumUnloadImage =3D len(ModuleUnloadImageList) - Dict =3D {'Count':str(NumUnloadImage) + 'U', 'Function':ModuleUnloadIm= ageList} + NumUnloadImage =3D len(Info.Module.ModuleUnloadImageList) + Dict =3D {'Count':str(NumUnloadImage) + 'U',=20 + 'Function':Info.Module.ModuleUnloadImageList} if NumUnloadImage < 2: AutoGenC.Append(gUefiUnloadImageString[NumUnloadImage].Replace(Dic= t)) else: diff --git a/BaseTools/Source/Python/Workspace/WorkspaceCommon.py b/BaseToo= ls/Source/Python/Workspace/WorkspaceCommon.py index 22abda8743..b79280bc2e 100644 --- a/BaseTools/Source/Python/Workspace/WorkspaceCommon.py +++ b/BaseTools/Source/Python/Workspace/WorkspaceCommon.py @@ -20,8 +20,6 @@ from Workspace.BuildClassObject import StructurePcd from= Common.BuildToolError import RESOURCE_NOT_AVAILABLE from Common.BuildTool= Error import OPTION_MISSING from Common.BuildToolError import BUILD_ERROR = -from Common.BuildToolError import PREBUILD_ERROR -import Common.EdkLogger = as EdkLogError =20 class OrderedListDict(OrderedDict): def __init__(self, *args, **kwargs): @@ -140,12 +138,6 @@ def GetModuleLibInstances(Module, Platform, BuildDatab= ase, Arch, Target, Toolcha return [] =20 LibraryModule =3D BuildDatabase[LibraryPath, Arch, Target,= Toolchain] - if LibraryModule.ModuleEntryPointList and LibraryModule.Mo= duleType !=3D Module.ModuleType: - EdkLogError.error( - "build", PREBUILD_ERROR, - "Driver's ModuleType must be consistent [%s]" % (s= tr(Module)), - File=3Dstr(FileName), - ExtraData=3D"consumed by [%s]" % str(LibraryModule= )) # for those forced library instance (NULL library), add a = fake library class if LibraryClassName.startswith("NULL"): LibraryModule.LibraryClass.append(LibraryClassObject(L= ibraryClassName, [ModuleType])) -- 2.13.0.windows.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel