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.12881.1665522021555625350 for ; Tue, 11 Oct 2022 14:00:21 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=ZX0TsdzL; 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 (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 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding : content-type; s=qcppdkim1; bh=JTP/Elvruty2l3UJM8WkiySVxl/+WG1IqQNEn7cjxdY=; b=ZX0TsdzLMH0eDU/w9Vny7Tduv6EavokIaOvl9FfajuSDvsNm+UJtH5Bz50pWTWT9LngU UW90RuVCm+xnILPG/6i0vA0GUw8SKgtDOl4eKBjiTWu2IocM4OqmNawde7dMjUgLuB+N kT+SMNmXb0IxF76ZC+VKJ9PT3Kb46tLTfujf9C7VLyvIvf5ckWTcBclRZUoq5dsJruQQ CZ3SB2y1Ptjs9SwuG7LFFsGdGkJo4aIiSXMtX4l/puy7um5b8pcqalxUsqICqbkN9TDp 2CY6A2M6GPO3xURj+FPUeR9onTbU3xXUf/Sfd+r+5t6Z2fRpdRugTLIkcd1hOjokXeDb Ww== 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 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 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 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 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 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: [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> X-Mailer: git-send-email 2.30.2 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-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: HZ8uSKpF2JKO-O2YGjUp4TFlYDdFzrS4 X-Proofpoint-ORIG-GUID: HZ8uSKpF2JKO-O2YGjUp4TFlYDdFzrS4 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.895,Hydra:6.0.545,FMLib:17.11.122.1 definitions=2022-10-11_08,2022-10-11_02,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 clxscore=1015 mlxscore=0 priorityscore=1501 spamscore=0 bulkscore=0 malwarescore=0 adultscore=0 suspectscore=0 mlxlogscore=898 impostorscore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2209130000 definitions=main-2210110121 Content-Transfer-Encoding: 8bit Content-Type: text/plain 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 --- 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/ArmPlatformPkg/PrePeiCore/PrePeiCoreMPCore.inf index a5b4722459d1..4a3112b58dcb 100644 --- a/ArmPlatformPkg/PrePeiCore/PrePeiCoreMPCore.inf +++ b/ArmPlatformPkg/PrePeiCore/PrePeiCoreMPCore.inf @@ -54,6 +54,9 @@ [Ppis] gEfiTemporaryRamSupportPpiGuid gArmMpCoreInfoPpiGuid +[Pcd] + gEfiMdeModulePkgTokenSpaceGuid.PcdFirmwareVersionString + [FeaturePcd] gArmPlatformTokenSpaceGuid.PcdSendSgiToBringUpSecondaryCores diff --git a/ArmPlatformPkg/PrePeiCore/PrePeiCoreUniCore.inf b/ArmPlatformPkg/PrePeiCore/PrePeiCoreUniCore.inf index 466a2b01c384..ab5bf1dac2d8 100644 --- a/ArmPlatformPkg/PrePeiCore/PrePeiCoreUniCore.inf +++ b/ArmPlatformPkg/PrePeiCore/PrePeiCoreUniCore.inf @@ -52,6 +52,9 @@ [LibraryClasses] [Ppis] gEfiTemporaryRamSupportPpiGuid +[Pcd] + gEfiMdeModulePkgTokenSpaceGuid.PcdFirmwareVersionString + [FeaturePcd] gArmPlatformTokenSpaceGuid.PcdSendSgiToBringUpSecondaryCores diff --git a/ArmPlatformPkg/PrePeiCore/PrePeiCore.c b/ArmPlatformPkg/PrePeiCore/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 #include "PrePeiCore.h" @@ -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 constructors // called. ProcessLibraryConstructorList (); + CharCount = AsciiSPrint ( + Buffer, + sizeof (Buffer), + "UEFI firmware (version %s built at %a on %a)\n\r", + (CHAR16 *)PcdGetPtr (PcdFirmwareVersionString), + __TIME__, + __DATE__ + ); + SerialPortWrite ((UINT8 *)Buffer, CharCount); // Initialize the Debug Agent for Source Level Debugging InitializeDebugAgent (DEBUG_AGENT_INIT_POSTMEM_SEC, NULL, NULL); -- 2.30.2