From nobody Sat May 18 22:54:05 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+95012+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+95012+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=quicinc.com ARC-Seal: i=1; a=rsa-sha256; t=1665522022; cv=none; d=zohomail.com; s=zohoarc; b=QX/4u0rsewcPe16qlM9lwJXPPog1+q6zUvXztHIh9lMz3OhesuYMUtMrgBReoobJe6QWUJyQ+bM1GWJtzO400y5RbL4IC/2EIEgzNtesBVS+L/7FMR38KfqL10CTez6PG8X4ZworKhRQTZYY9sLlep7OKGzlZUHfJs9OQRahNvc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1665522022; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=c5w7ZiIrQaziOQgciTpBYhzWLmYCOYXS4SqXsWrMfR4=; b=kNprUK3gfZScRMLgkyraJ+ytYlbUtP/Zu2pGTpUw49TN5Ru+nlQlPjTu1rEfS26iVRhZgC58qhNXPzICP6Hd5j8ff/rie0BF8K/sI6RdcHRBxDXNvsw/qbgYKPFGNdopIkNOEBuoxpfwbVDKnrJbFWvcna7nUbBypiCtO4thMQM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+95012+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1665522022796511.04193915135045; Tue, 11 Oct 2022 14:00:22 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id pgxpYY1788612xjsJqXggCmU; Tue, 11 Oct 2022 14:00:22 -0700 X-Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) by mx.groups.io with SMTP id smtpd.web11.12881.1665522021555625350 for ; Tue, 11 Oct 2022 14:00:21 -0700 X-Received: from pps.filterd (m0279870.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 29BKPsDc019582; Tue, 11 Oct 2022 21:00:13 GMT X-Received: from nalasppmta05.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3k4rx5uaqy-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 11 Oct 2022 21:00:13 +0000 X-Received: from pps.filterd (NALASPPMTA05.qualcomm.com [127.0.0.1]) by NALASPPMTA05.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTP id 29BL0CS8015092; Tue, 11 Oct 2022 21:00:12 GMT X-Received: from pps.reinject (localhost [127.0.0.1]) by NALASPPMTA05.qualcomm.com (PPS) with ESMTPS id 3k3jnd29rr-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 11 Oct 2022 21:00:12 +0000 X-Received: from NALASPPMTA05.qualcomm.com (NALASPPMTA05.qualcomm.com [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 29BL0BJG015075; Tue, 11 Oct 2022 21:00:11 GMT X-Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA05.qualcomm.com (PPS) with ESMTPS id 29BL0B3R015071 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 11 Oct 2022 21:00:11 +0000 X-Received: from linbox.qualcomm.com (10.80.80.8) by nalasex01a.na.qualcomm.com (10.47.209.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.29; Tue, 11 Oct 2022 14:00:11 -0700 From: "Rebecca Cran" To: , Oliver Steffen , "Gerd Hoffmann" , Ard Biesheuvel , Sami Mujawar , Leif Lindholm CC: Rebecca Cran Subject: [edk2-devel] [PATCH v3 1/1] ArmPlatformPkg/PrePeiCore: Print the firmware version early in boot Date: Tue, 11 Oct 2022 14:59:52 -0600 Message-ID: <20221011205952.357499-2-rebecca@quicinc.com> In-Reply-To: <20221011205952.357499-1-rebecca@quicinc.com> References: <20221011205952.357499-1-rebecca@quicinc.com> MIME-Version: 1.0 X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01b.na.qualcomm.com (10.46.141.250) To nalasex01a.na.qualcomm.com (10.47.209.196) X-QCInternal: smtphost X-QCInternal: smtphost X-Proofpoint-GUID: HZ8uSKpF2JKO-O2YGjUp4TFlYDdFzrS4 X-Proofpoint-ORIG-GUID: HZ8uSKpF2JKO-O2YGjUp4TFlYDdFzrS4 Precedence: Bulk List-Unsubscribe: List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,quic_rcran@quicinc.com X-Gm-Message-State: 5TmSbM3FbXBGq2e7kQHMYMskx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1665522022; bh=/ndkgbcYnkLNNQj2bWImEwYd5UudxLtgdeXuO8U3JZ4=; h=CC:Content-Type:Date:From:Reply-To:Subject:To; b=QgJk8MafzvbUkzxjnXzpyVWSBkoniDPOeJ+CXXL/7bGDtcbVoGja4aMYNhXie+YDkZr xwM4F66TrjImWH6DQBlQHe9FNzNmmCTt+/+wG/RYafQL+1x2GqD9QdNSXeEst9z+Efp4G 3G8rr3iT1pa0i6jkW10SF+QLcz/TZQLLC5E= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1665522023394100001 Content-Type: text/plain; charset="utf-8" Copy code from PrePi to PrePeiCore that prints the firmware version and build date early in the boot process. Signed-off-by: Rebecca Cran Reviewed-by: Sami Mujawar Tested-by: Oliver Steffen Reviewed-by: Leif Lindholm Reviewed-by: Rebecca Cran --- ArmPlatformPkg/PrePeiCore/PrePeiCoreMPCore.inf | 3 +++ ArmPlatformPkg/PrePeiCore/PrePeiCoreUniCore.inf | 3 +++ ArmPlatformPkg/PrePeiCore/PrePeiCore.c | 14 ++++++++++++++ 3 files changed, 20 insertions(+) diff --git a/ArmPlatformPkg/PrePeiCore/PrePeiCoreMPCore.inf b/ArmPlatformPk= g/PrePeiCore/PrePeiCoreMPCore.inf index a5b4722459d1..4a3112b58dcb 100644 --- a/ArmPlatformPkg/PrePeiCore/PrePeiCoreMPCore.inf +++ b/ArmPlatformPkg/PrePeiCore/PrePeiCoreMPCore.inf @@ -54,6 +54,9 @@ [Ppis] gEfiTemporaryRamSupportPpiGuid gArmMpCoreInfoPpiGuid =20 +[Pcd] + gEfiMdeModulePkgTokenSpaceGuid.PcdFirmwareVersionString + [FeaturePcd] gArmPlatformTokenSpaceGuid.PcdSendSgiToBringUpSecondaryCores =20 diff --git a/ArmPlatformPkg/PrePeiCore/PrePeiCoreUniCore.inf b/ArmPlatformP= kg/PrePeiCore/PrePeiCoreUniCore.inf index 466a2b01c384..ab5bf1dac2d8 100644 --- a/ArmPlatformPkg/PrePeiCore/PrePeiCoreUniCore.inf +++ b/ArmPlatformPkg/PrePeiCore/PrePeiCoreUniCore.inf @@ -52,6 +52,9 @@ [LibraryClasses] [Ppis] gEfiTemporaryRamSupportPpiGuid =20 +[Pcd] + gEfiMdeModulePkgTokenSpaceGuid.PcdFirmwareVersionString + [FeaturePcd] gArmPlatformTokenSpaceGuid.PcdSendSgiToBringUpSecondaryCores =20 diff --git a/ArmPlatformPkg/PrePeiCore/PrePeiCore.c b/ArmPlatformPkg/PrePei= Core/PrePeiCore.c index 9c4b25df953d..1d4f6969b660 100644 --- a/ArmPlatformPkg/PrePeiCore/PrePeiCore.c +++ b/ArmPlatformPkg/PrePeiCore/PrePeiCore.c @@ -11,6 +11,8 @@ #include #include #include +#include +#include =20 #include "PrePeiCore.h" =20 @@ -58,6 +60,9 @@ CEntryPoint ( IN EFI_PEI_CORE_ENTRY_POINT PeiCoreEntryPoint ) { + CHAR8 Buffer[100]; + UINTN CharCount; + // Data Cache enabled on Primary core when MMU is enabled. ArmDisableDataCache (); // Invalidate instruction cache @@ -93,6 +98,15 @@ CEntryPoint ( // Invoke "ProcessLibraryConstructorList" to have all library construc= tors // called. ProcessLibraryConstructorList (); + CharCount =3D AsciiSPrint ( + Buffer, + sizeof (Buffer), + "UEFI firmware (version %s built at %a on %a)\n\r", + (CHAR16 *)PcdGetPtr (PcdFirmwareVersionString), + __TIME__, + __DATE__ + ); + SerialPortWrite ((UINT8 *)Buffer, CharCount); =20 // Initialize the Debug Agent for Source Level Debugging InitializeDebugAgent (DEBUG_AGENT_INIT_POSTMEM_SEC, NULL, NULL); --=20 2.30.2 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#95012): https://edk2.groups.io/g/devel/message/95012 Mute This Topic: https://groups.io/mt/94268480/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-