From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2607:f8b0:4001:c0b::243; helo=mail-it0-x243.google.com; envelope-from=ard.biesheuvel@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-it0-x243.google.com (mail-it0-x243.google.com [IPv6:2607:f8b0:4001:c0b::243]) (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 A9C77221786A0 for ; Thu, 30 Nov 2017 08:31:17 -0800 (PST) Received: by mail-it0-x243.google.com with SMTP id z6so8986124iti.4 for ; Thu, 30 Nov 2017 08:35:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=/+cTpUe/KDEA/7Rl2FtPAPOtLGfXQQ04I30Rg+tu+OQ=; b=ICYHelcr3r4xGBUsXbvKxbLPRByt0eEpc+bN2WL5jzVdwCRIyXj67RkhWgvH1JaDyS 551mKUI4d/b4OS65l/gzozsMK8BZ9TePo80X1uSfGrMyPRqgK/fcnrCesORz22TkGvyv yRsZ+Gt2UKOIdPMgfWVo+TlImKZ19Qxkx9KeE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=/+cTpUe/KDEA/7Rl2FtPAPOtLGfXQQ04I30Rg+tu+OQ=; b=ugrC7yhG1NbNX1oxmthNv7W0igqgwuQzX8zXjSt+yRmn8olkfqCExsopauUFc656WB awvxCQ7SHVW+E5RWbKZh72ullxbqmdgAeBSHhqcJ0neAwSzfuCeMSSo+fhoDYvVGpxGG eRjE3gNqHNRSqJgMYIiuVh/6jJE+Tm9sgYabyycYHyV17TLxlU2/zb46hZPySnUPAoI4 5yMhYXqcT3Vd2kBiERKs5ZG4j8hgwfa+Uo4aDBXbeY1lPCMgOYl9R4eZlsIpq/z/OmH5 DGC48IihHkKw1eMzRTEfla27fr+3pnZL4k9/SFWHZ8VhV0LMkjg4H/1k/3FJNFeS4+dp /4Iw== X-Gm-Message-State: AJaThX6DX+mXWLsB56fDSEAQl2PRkBcjxuPYxlcHpZeVU96wcVdUzQDS 1GTY9wbRblnuHroYzi7GXPsaI1QSSxKhgkjiKJ5uqg== X-Google-Smtp-Source: AGs4zMaZbB2fsoN6tb5D61whJOfdSTjAt/BmzaZtE0OPjm5iu31Ede4d2kGdAUH9CaxLE+WW7eSIy1RkCjMtkCRskO4= X-Received: by 10.36.31.212 with SMTP id d203mr3786610itd.48.1512059742355; Thu, 30 Nov 2017 08:35:42 -0800 (PST) MIME-Version: 1.0 Received: by 10.107.104.16 with HTTP; Thu, 30 Nov 2017 08:35:41 -0800 (PST) In-Reply-To: <20171130163129.ddh7xtg5co2d3bbd@bivouac.eciton.net> References: <20171130152453.19205-1-ard.biesheuvel@linaro.org> <20171130152453.19205-7-ard.biesheuvel@linaro.org> <20171130163129.ddh7xtg5co2d3bbd@bivouac.eciton.net> From: Ard Biesheuvel Date: Thu, 30 Nov 2017 16:35:41 +0000 Message-ID: To: Leif Lindholm Cc: "edk2-devel@lists.01.org" , Udit Kumar , Meenakshi Aggarwal , Sakar Arora 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:31:17 -0000 Content-Type: text/plain; charset="UTF-8" On 30 November 2017 at 16:31, Leif Lindholm wrote: > 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? That doesn't appear to be the case, no > If not - could we move it out to PrePi.h? > Yes, that works for me. >> @@ -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 >>