From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) by mx.groups.io with SMTP id smtpd.web11.4669.1661811483917332289 for ; Mon, 29 Aug 2022 15:18:04 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=BMLRt2Rq; spf=permerror, err=parse error for token &{10 18 %{ir}.%{v}.%{d}.spf.has.pphosted.com}: invalid domain name (domain: quicinc.com, ip: 205.220.180.131, mailfrom: quic_rcran@quicinc.com) Received: from pps.filterd (m0279871.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 27TLeSZi018607; Mon, 29 Aug 2022 22:17:57 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h=message-id : date : mime-version : subject : to : cc : references : from : in-reply-to : content-type : content-transfer-encoding; s=qcppdkim1; bh=xUK7i4xeF6PSvFu1MFe798FXTE8IZbDb33mQTtpCNtA=; b=BMLRt2Rq8GZiuvhRbbYdk6GrgXOW/EpVqoaKYh2iYhAUxnkmgKgNwWmPtoTV9GAZPnZt QaIxAqQF7jOl16CSyJ64oaxAM9qZKUnWMf0qyCGy6M6nPC1I40N/o5GeCYnSMm6RsJ3V JGB3tCGtGmlgjog5XpIQogCHe/tWyjhsL1SBSEmKEsrJBk3zA+SWfmlnNdnJOLIdETMp swengBTDppFoLSIF5bvdqGf0X8KhRp+TT8zFzq+9m6dvuIrhrtUrez9aoNxg6NjBdCHX u1OJZxOy6nqLqsrE8uS+TxINMCUgP+ve2YZhpSvZrlPY0oqsQOl5rp3a/vxkMxct1RwW 5A== Received: from nasanppmta04.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3j8x1hse6e-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 29 Aug 2022 22:17:57 +0000 Received: from nasanex01b.na.qualcomm.com (nasanex01b.na.qualcomm.com [10.46.141.250]) by NASANPPMTA04.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 27TMHuJY024801 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 29 Aug 2022 22:17:56 GMT Received: from [10.110.9.110] (10.80.80.8) by nasanex01b.na.qualcomm.com (10.46.141.250) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.29; Mon, 29 Aug 2022 15:17:54 -0700 Message-ID: Date: Mon, 29 Aug 2022 16:17:52 -0600 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.2.0 Subject: Re: [edk2-devel] [edk2][PATCH V4 1/1] ArmPlatformPkg/PrePeiCore: Invoke constructors for SEC phase To: , , Sami Mujawar CC: Ard Biesheuvel , Rebecca Cran , Pierre Gondois , Thomas Abraham , nd References: <20220722170257.32249-1-rohit.mathew@arm.com> From: "Rebecca Cran" In-Reply-To: X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01b.na.qualcomm.com (10.46.141.250) To nasanex01b.na.qualcomm.com (10.46.141.250) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: vLVY6V49HISDxClA4EoD6KfcHysou30a X-Proofpoint-ORIG-GUID: vLVY6V49HISDxClA4EoD6KfcHysou30a X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.895,Hydra:6.0.517,FMLib:17.11.122.1 definitions=2022-08-29_11,2022-08-25_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 bulkscore=0 mlxlogscore=999 priorityscore=1501 lowpriorityscore=0 adultscore=0 phishscore=0 spamscore=0 mlxscore=0 malwarescore=0 clxscore=1011 suspectscore=0 impostorscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2207270000 definitions=main-2208290098 Content-Language: en-US Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit It would be good if we could get this committed now the stable tag has been created. -- Rebecca Cran On 8/9/22 03:39, Rohit Mathew wrote: > Hi, > > Could anyone please let me know if there are any more comments on this patch? > Saw that we have moved into soft freeze for edk2 and wanted to add that we had one round of review on the patch. > > Regards, > Rohit > >> -----Original Message----- >> From: Sami Mujawar >> Sent: 25 July 2022 12:12 >> To: Rohit Mathew ; devel@edk2.groups.io >> Cc: Ard Biesheuvel ; Rebecca Cran >> ; Pierre Gondois ; Thomas >> Abraham ; nd >> Subject: Re: [edk2][PATCH V4 1/1] ArmPlatformPkg/PrePeiCore: Invoke >> constructors for SEC phase >> >> Hi Rohit, >> >> This patch looks good to me. >> >> Reviewed-by: Sami Mujawar >> >> Regards, >> >> Sami Mujawar >> >> On 22/07/2022 06:02 pm, Rohit Mathew wrote: >>> On platforms that do not have the serial console port pre-initialized >>> prior to the SEC phase and due to the absence of a call to >>> "SerialPortInitialize", this results in missing debug logs. So, call >>> the auto-generated "ProcessLibraryConstructorList" function from SEC >>> phase to have all the dependent library constructors called (this >>> includes a call to "SerialPortInitialize"). >>> >>> Signed-off-by: Rohit Mathew >>> --- >>> ArmPlatformPkg/PrePeiCore/PrePeiCore.h | 12 +++++++++++- >>> ArmPlatformPkg/PrePeiCore/PrePeiCore.c | 6 +++++- >>> 2 files changed, 16 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. >>> >>> Changes since V3: >>> - Addressed comments from Sami. >>> >>> 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..c1e13e23e11e 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,14 @@ PeiCommonExceptionEntry ( >>> IN UINTN LR >>> ); >>> >>> +/* >>> + * Autogenerated function that calls the library constructors for all >>> +of the >>> + * module's dependent libraries. >>> + */ >>> +VOID >>> +EFIAPI >>> +ProcessLibraryConstructorList ( >>> + VOID >>> + ); >>> + >>> #endif >>> diff --git a/ArmPlatformPkg/PrePeiCore/PrePeiCore.c >>> b/ArmPlatformPkg/PrePeiCore/PrePeiCore.c >>> index 6dd9bcdea24f..9c4b25df953d 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 >>> >>> @@ -90,6 +90,10 @@ CEntryPoint ( >>> >>> // If not primary Jump to Secondary Main >>> if (ArmPlatformIsPrimaryCore (MpId)) { >>> + // Invoke "ProcessLibraryConstructorList" to have all library constructors >>> + // called. >>> + ProcessLibraryConstructorList (); >>> + >>> // Initialize the Debug Agent for Source Level Debugging >>> InitializeDebugAgent (DEBUG_AGENT_INIT_POSTMEM_SEC, NULL, NULL); >>> SaveAndSetDebugTimerInterrupt (TRUE); > > > >