From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2a00:1450:400c:c0c::242; helo=mail-wr0-x242.google.com; envelope-from=leif.lindholm@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-wr0-x242.google.com (mail-wr0-x242.google.com [IPv6:2a00:1450:400c:c0c::242]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id AFFA8221786A3 for ; Thu, 30 Nov 2017 08:27:08 -0800 (PST) Received: by mail-wr0-x242.google.com with SMTP id k61so7209494wrc.4 for ; Thu, 30 Nov 2017 08:31:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=+Wgp6PEPUA0oSF4sTZgcWsNm2XdGlVmnI6hYELQHYdU=; b=AjI+DiUDS5eBaGaYpT6q/M6Lsu2KtbZxNB/c2jG71nj8I8XnJSD36vSR9okDpt8rgo mPOURVxR2OIODhQ3nsUyEdphor2m8xBjpGiDwVJNXK12dp3wn+5vR/GWm0UYpAZM6m5P uOWX2PJ8d/wZReoAh0YjEE4M5sGPWQqduTyPY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=+Wgp6PEPUA0oSF4sTZgcWsNm2XdGlVmnI6hYELQHYdU=; b=d3IHbf4pRIyybcZa+RMpeF5doAS5tlCfdx3p3VKf+3Bev/Bl6p5pfDAcGaGQN4/G9j CmwinounmyYEuq/pXg5Gus30niTf20IWmJntJW6OjN2z4ZPQjW9BzIKjPj/0jTS7EXmB va2w1lnz00swuGl1UeEXmyxv9LqDPcJfXyRI2jI/xOS8oRohkK9l/1j3fqksgd59MHVl 9xD1sGattoKEjH4ryztewcMmtdiRkn1QJAeMeExINlS/WW8lhdvoDqCZgYBv8Rqs2zOt lwiVsBmHSLM83koTmiZBLjrroWZwl2hDWpFcagtBBy9T00JfFX8R9YL+uNxSZVeCoZnF uSBA== X-Gm-Message-State: AJaThX4fRQpZ2JFrYxLWYTmwmquTn483rPkM5RSyEBYIIInDSw8/iO0L hkuOXzEPmh+5N7+WuMoH4k1RPQ== X-Google-Smtp-Source: AGs4zMaazYv0Wm3YhT4IJEDNLPlMztlojdhUsFmoSjXiRsOU92FaEocbX5azghseOizhSev4gjddzA== X-Received: by 10.223.196.194 with SMTP id o2mr2409291wrf.246.1512059492766; Thu, 30 Nov 2017 08:31:32 -0800 (PST) Received: from bivouac.eciton.net (bivouac.eciton.net. [2a00:1098:0:86:1000:23:0:2]) by smtp.gmail.com with ESMTPSA id j13sm5113052wre.55.2017.11.30.08.31.31 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 30 Nov 2017 08:31:31 -0800 (PST) Date: Thu, 30 Nov 2017 16:31:29 +0000 From: Leif Lindholm To: Ard Biesheuvel Cc: edk2-devel@lists.01.org, Udit Kumar , Meenakshi Aggarwal , Sakar Arora Message-ID: <20171130163129.ddh7xtg5co2d3bbd@bivouac.eciton.net> References: <20171130152453.19205-1-ard.biesheuvel@linaro.org> <20171130152453.19205-7-ard.biesheuvel@linaro.org> MIME-Version: 1.0 In-Reply-To: <20171130152453.19205-7-ard.biesheuvel@linaro.org> User-Agent: NeoMutt/20170113 (1.7.2) Subject: Re: [PATCH 6/7] ArmPlatformPkg/PrePi; call all constructors by hand 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: , X-List-Received-Date: Thu, 30 Nov 2017 16:27:09 -0000 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Thu, Nov 30, 2017 at 03:24:52PM +0000, Ard Biesheuvel wrote: > Call ProcessLibraryConstructorList () to invoke all library constructors > by hand rather than calling only some of them explicitly. > > Contributed-under: TianoCore Contribution Agreement 1.1 > Signed-off-by: Ard Biesheuvel > --- > ArmPlatformPkg/PrePi/PrePi.c | 13 +++---------- > 1 file changed, 3 insertions(+), 10 deletions(-) > > diff --git a/ArmPlatformPkg/PrePi/PrePi.c b/ArmPlatformPkg/PrePi/PrePi.c > index a60cafdce45e..76a53bc871d2 100644 > --- a/ArmPlatformPkg/PrePi/PrePi.c > +++ b/ArmPlatformPkg/PrePi/PrePi.c > @@ -33,15 +33,9 @@ > UINT64 mSystemMemoryEnd = FixedPcdGet64(PcdSystemMemoryBase) + > FixedPcdGet64(PcdSystemMemorySize) - 1; > > -EFI_STATUS > -EFIAPI > -ExtractGuidedSectionLibConstructor ( > - VOID > - ); > - > -EFI_STATUS > +VOID > EFIAPI > -LzmaDecompressLibConstructor ( > +ProcessLibraryConstructorList ( > VOID > ); Hmm ... Do we need this local declaration? Is there some header we could use? If not - could we move it out to PrePi.h? > @@ -162,8 +156,7 @@ PrePiMain ( > PERF_START (NULL, "PEI", NULL, StartTimeStamp); > > // SEC phase needs to run library constructors by hand. > - ExtractGuidedSectionLibConstructor (); > - LzmaDecompressLibConstructor (); > + ProcessLibraryConstructorList (); > > // Assume the FV that contains the SEC (our code) also contains a compressed FV. > Status = DecompressFirstFv (); > -- > 2.11.0 >