From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=17.171.2.68; helo=ma1-aaemail-dr-lapp02.apple.com; envelope-from=afish@apple.com; receiver=edk2-devel@lists.01.org Received: from ma1-aaemail-dr-lapp02.apple.com (ma1-aaemail-dr-lapp02.apple.com [17.171.2.68]) (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 6EF5B211C2800 for ; Wed, 30 Jan 2019 08:56:54 -0800 (PST) Received: from pps.filterd (ma1-aaemail-dr-lapp02.apple.com [127.0.0.1]) by ma1-aaemail-dr-lapp02.apple.com (8.16.0.27/8.16.0.27) with SMTP id x0UGqKG1031541; Wed, 30 Jan 2019 08:56:50 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=apple.com; h=mime-version : content-type : sender : from : message-id : subject : date : in-reply-to : cc : to : references; s=20180706; bh=um2BY14FfuB5T2oynliki74Hz09sbt47L29MNzcZ9JI=; b=xEIg4HKk4NYrXzsmMBXxeQHM5QdJE2/IbNBjeeALMbGH1eKZOAMXNCxYQ3QxRnM2wM1b cXNWjW6kcceeO2RjqqQtkHF9zzfYVI/EORXx5D1HUP1ZzkwDVjJLZe4NjXRiQUxlw75n 430rroVTIIxyJwA9H6U+VyfJQdODtsLi+rSS4bDXPL61aG+dkX5dyVWfu3P/+QlZF80B sBRDGCGlPvk7jcdDC6OR9FLxMDkoqMMMM7vKZ+YwH4BMh4VlJj5wkPFGmokqFD5HDojb Jzp/0eYraBvcTNEdoHuWMV6SXuCiamDwnlVQRgrNyTB2JClyCOmolaUnnLoYT9F6WagM nw== Received: from ma1-mtap-s01.corp.apple.com (ma1-mtap-s01.corp.apple.com [17.40.76.5]) by ma1-aaemail-dr-lapp02.apple.com with ESMTP id 2q8n435pdu-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NO); Wed, 30 Jan 2019 08:56:50 -0800 MIME-version: 1.0 Received: from nwk-mmpp-sz10.apple.com (nwk-mmpp-sz10.apple.com [17.128.115.122]) by ma1-mtap-s01.corp.apple.com (Oracle Communications Messaging Server 8.0.2.3.20181024 64bit (built Oct 24 2018)) with ESMTPS id <0PM500BXZLQP5RD0@ma1-mtap-s01.corp.apple.com>; Wed, 30 Jan 2019 08:56:50 -0800 (PST) Received: from process_viserion-daemon.nwk-mmpp-sz10.apple.com by nwk-mmpp-sz10.apple.com (Oracle Communications Messaging Server 8.0.2.3.20181024 64bit (built Oct 24 2018)) id <0PM500G00LM9KC00@nwk-mmpp-sz10.apple.com>; Wed, 30 Jan 2019 08:56:50 -0800 (PST) X-Va-A: X-Va-T-CD: 8ce756654ae98313d4f7f72588eaf5e9 X-Va-E-CD: edd46986e65aa3d8318d23ed41da02a0 X-Va-R-CD: ca4fb4837c5c73507117b86d7c4d667c X-Va-CD: 0 X-Va-ID: 317aa6c2-3729-418e-a5d3-31f1c9c3c92d X-V-A: X-V-T-CD: 8ce756654ae98313d4f7f72588eaf5e9 X-V-E-CD: edd46986e65aa3d8318d23ed41da02a0 X-V-R-CD: ca4fb4837c5c73507117b86d7c4d667c X-V-CD: 0 X-V-ID: e7148b66-e178-49ce-b552-123e5f0067c4 Received: from process_milters-daemon.nwk-mmpp-sz10.apple.com by nwk-mmpp-sz10.apple.com (Oracle Communications Messaging Server 8.0.2.3.20181024 64bit (built Oct 24 2018)) id <0PM500300LANOT00@nwk-mmpp-sz10.apple.com>; Wed, 30 Jan 2019 08:56:49 -0800 (PST) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2019-01-30_13:,, signatures=0 Received: from da0602a-dhcp105.apple.com (da0602a-dhcp105.apple.com [17.226.23.105]) by nwk-mmpp-sz10.apple.com (Oracle Communications Messaging Server 8.0.2.3.20181024 64bit (built Oct 24 2018)) with ESMTPSA id <0PM500CIGLQPY850@nwk-mmpp-sz10.apple.com>; Wed, 30 Jan 2019 08:56:49 -0800 (PST) Sender: afish@apple.com From: Andrew Fish Message-id: <8B9AE27D-6C20-4D27-9CCE-C91BB00F0314@apple.com> Date: Wed, 30 Jan 2019 08:56:46 -0800 In-reply-to: <609fae1744b07f3256d768680a50585683e3817d.camel@linux.intel.com> Cc: Ard Biesheuvel , edk2-devel@lists.01.org, Mike Kinney , Harry Hsiung , eric.jin@intel.com, pawel.orlowski@intel.com, kamil.kacperski@intel.com To: Ryszard Knop References: <20181115023353.20159-1-ard.biesheuvel@linaro.org> <20181115023353.20159-8-ard.biesheuvel@linaro.org> <609fae1744b07f3256d768680a50585683e3817d.camel@linux.intel.com> X-Mailer: Apple Mail (2.3445.6.18) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2019-01-30_13:, , signatures=0 X-Content-Filtered-By: Mailman/MimeDel 2.1.29 Subject: Re: [PATCH edk2-staging 07/20] IntelUndiPkg/XGigUndiDxe: drop definition of gImageHandle 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: Wed, 30 Jan 2019 16:56:54 -0000 X-List-Received-Date: Wed, 30 Jan 2019 16:56:54 -0000 X-List-Received-Date: Wed, 30 Jan 2019 16:56:54 -0000 X-List-Received-Date: Wed, 30 Jan 2019 16:56:54 -0000 Content-Type: text/plain; CHARSET=US-ASCII Content-Transfer-Encoding: 7BIT > On Jan 30, 2019, at 8:05 AM, Ryszard Knop wrote: > > Hmm, is there a list/something I can generate to see which globals > build tools emit? There are some more variables I'd happily get rid > of, eg if I could drop gSystemTable and others. > Ryszard, You need to use libs by including the include file, and listing the lib in the INF. The library constructor initializes the globals. https://github.com/tianocore/edk2/blob/master/MdePkg/Include/Library/DxeServicesTableLib.h https://github.com/tianocore/edk2/blob/master/MdePkg/Include/Library/UefiBootServicesTableLib.h https://github.com/tianocore/edk2/blob/master/MdePkg/Include/Library/UefiRuntimeServicesTableLib.h For edk2 the library constructors get called prior calling your drivers entry point. Thanks, Andrew Fish > Reviewed-by: Ryszard Knop > > On Wed, 2018-11-14 at 18:33 -0800, ard.biesheuvela wrote: >> Remove duplicate definition of gImageHandle, which is emitted by >> the build tools as well. >> >> Contributed-under: TianoCore Contribution Agreement 1.1 >> Signed-off-by: Ard Biesheuvel >> --- >> IntelUndiPkg/XGigUndiDxe/Init.c | 2 -- >> 1 file changed, 2 deletions(-) >> >> diff --git a/IntelUndiPkg/XGigUndiDxe/Init.c >> b/IntelUndiPkg/XGigUndiDxe/Init.c >> index 84e06ea071c5..03e3942a1944 100644 >> --- a/IntelUndiPkg/XGigUndiDxe/Init.c >> +++ b/IntelUndiPkg/XGigUndiDxe/Init.c >> @@ -47,7 +47,6 @@ UINT16 mActiveChildren = 0; >> EFI_EVENT gEventNotifyExitBs; >> EFI_EVENT gEventNotifyVirtual; >> >> -EFI_HANDLE gImageHandle; >> EFI_SYSTEM_TABLE *gSystemTable; >> >> EFI_GUID gEfiNiiPointerGuid = EFI_NII_POINTER_PROTOCOL_GUID; >> @@ -502,7 +501,6 @@ InitializeXGigUndiDriver ( >> { >> EFI_STATUS Status; >> >> - gImageHandle = ImageHandle; >> gSystemTable = SystemTable; >> >> Status = EfiLibInstallDriverBinding (ImageHandle, SystemTable, >> &gUndiDriverBinding, ImageHandle); > > _______________________________________________ > edk2-devel mailing list > edk2-devel@lists.01.org > https://lists.01.org/mailman/listinfo/edk2-devel