From: "Rohit Mathew" <rohit.mathew@arm.com>
To: Thomas Abraham <thomas.abraham@arm.com>,devel@edk2.groups.io
Subject: Re: [edk2-devel] [edk2][PATCH V3 1/1] ArmPlatformPkg/PrePeiCore: Explicitly invoke constructor for SEC phase
Date: Mon, 18 Jul 2022 11:11:13 -0700 [thread overview]
Message-ID: <17823.1658167873475486381@groups.io> (raw)
In-Reply-To: <94dcbbe0-dd1f-6e92-fa44-ff5895d8e75c@arm.com>
[-- Attachment #1: Type: text/plain, Size: 2888 bytes --]
Hi Team,
Gentle reminder for this patch.
Regards,
Rohit
On Wed, Jul 6, 2022 at 03:20 PM, Thomas Abraham wrote:
>
> On 06/07/2022 14:42, Rohit Mathew wrote:
>
>> Invoke the constructor in the SEC phase to call into initialization
>> functions associated with libraries linked with this particular module.
>> For instance, PrePeiCore's CEntryPoint function calls DebugLib library's
>> print API before the library is initialized. This change is essential
>> to initialize uart for SEC phase.
>>
>> Signed-off-by: Rohit Mathew <rohit.mathew@arm.com>
>> ---
>> ArmPlatformPkg/PrePeiCore/PrePeiCore.h | 11 ++++++++++-
>> ArmPlatformPkg/PrePeiCore/PrePeiCore.c | 6 +++++-
>> 2 files changed, 15 insertions(+), 2 deletions(-)
>>
>> Changes since V1:
>> - Rebased on top of latest master branch.
>> - Addressed comments from Ard.
>>
>> Changes since V2:
>> - Rebased on top of latest master branch.
>>
>> Link to github branch for the patch -
>> https://github.com/rohit-arm/edk2/tree/sec_constructor_issue
>>
>> diff --git a/ArmPlatformPkg/PrePeiCore/PrePeiCore.h
>> b/ArmPlatformPkg/PrePeiCore/PrePeiCore.h
>> index 0345dd7bdd2a..b752c4b9e617 100644
>> --- a/ArmPlatformPkg/PrePeiCore/PrePeiCore.h
>> +++ b/ArmPlatformPkg/PrePeiCore/PrePeiCore.h
>> @@ -1,7 +1,7 @@
>> /** @file
>> Main file supporting the transition to PEI Core in Normal World for
>> Versatile Express
>>
>> - Copyright (c) 2011, ARM Limited. All rights reserved.
>> + Copyright (c) 2011 - 2022, ARM Limited. All rights reserved.
>>
>> SPDX-License-Identifier: BSD-2-Clause-Patent
>>
>> @@ -73,4 +73,13 @@ PeiCommonExceptionEntry (
>> IN UINTN LR
>> );
>>
>> +/*
>> + * Constructor for SEC phase
>> + */
>> +VOID
>> +EFIAPI
>> +ProcessLibraryConstructorList (
>> + VOID
>> + );
>> +
>> #endif
>> diff --git a/ArmPlatformPkg/PrePeiCore/PrePeiCore.c
>> b/ArmPlatformPkg/PrePeiCore/PrePeiCore.c
>> index 6dd9bcdea24f..9654866f0c13 100644
>> --- a/ArmPlatformPkg/PrePeiCore/PrePeiCore.c
>> +++ b/ArmPlatformPkg/PrePeiCore/PrePeiCore.c
>> @@ -1,7 +1,7 @@
>> /** @file
>> Main file supporting the transition to PEI Core in Normal World for
>> Versatile Express
>>
>> - Copyright (c) 2011-2014, ARM Limited. All rights reserved.
>> + Copyright (c) 2011 - 2022, ARM Limited. All rights reserved.
>>
>> SPDX-License-Identifier: BSD-2-Clause-Patent
>>
>> @@ -86,6 +86,10 @@ CEntryPoint (
>> ArmEnableVFP ();
>> }
>>
>> + // Explicitly invoke the library constructor to resolve any library
>> + // dependency.
>> + ProcessLibraryConstructorList();
>> +
>> // Note: The MMU will be enabled by MemoryPeim. Only the primary core will
>> have the MMU on.
>>
>> // If not primary Jump to Secondary Main
>
> Reviewed-by: Thomas Abraham <thomas.abraham@arm.com>
> Tested-by: Thomas Abraham <thomas.abraham@arm.com>
>
> Thanks.
[-- Attachment #2: Type: text/html, Size: 3366 bytes --]
next prev parent reply other threads:[~2022-07-18 18:11 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-06 13:42 [edk2][PATCH V3 1/1] ArmPlatformPkg/PrePeiCore: Explicitly invoke constructor for SEC phase Rohit Mathew
2022-07-06 14:20 ` Thomas Abraham
2022-07-18 18:11 ` Rohit Mathew [this message]
2022-07-21 15:54 ` Sami Mujawar
2022-07-22 17:08 ` [edk2-devel] " Rohit Mathew
2022-07-21 16:26 ` Sami Mujawar
2022-07-22 17:12 ` Rohit Mathew
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=17823.1658167873475486381@groups.io \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox