From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from alexa-out-sd-02.qualcomm.com (alexa-out-sd-02.qualcomm.com [199.106.114.39]) by mx.groups.io with SMTP id smtpd.web09.6009.1663765497900859225 for ; Wed, 21 Sep 2022 06:04:58 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@quicinc.com header.s=qcdkim header.b=R5d8R0aA; spf=permerror, err=parse error for token &{10 18 %{ir}.%{v}.%{d}.spf.has.pphosted.com}: invalid domain name (domain: quicinc.com, ip: 199.106.114.39, mailfrom: quic_rcran@quicinc.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; i=@quicinc.com; q=dns/txt; s=qcdkim; t=1663765497; x=1695301497; h=from:message-id:date:mime-version:subject:to:cc: references:in-reply-to:content-transfer-encoding; bh=SWz+a0djqsQeD3e+kMF6h7HpUMS+/NORunB2Y7VVRTw=; b=R5d8R0aA7501lY4Axt5raBAaW/ajnEv38xG1Wc93EJdrfy9ws23fJDGL mxGkviK2JZXRIXiCo3dWzHdr/NHUSyz3bIO4RS06W1ZZA7Lz8WgG/bRvl 3XmbRTK9YwSLEs8j2smDJ240ESy9ptFhCHKRIJ3z2fciililqA0tWpp8F Y=; Received: from unknown (HELO ironmsg04-sd.qualcomm.com) ([10.53.140.144]) by alexa-out-sd-02.qualcomm.com with ESMTP; 21 Sep 2022 06:04:57 -0700 From: "Rebecca Cran" X-QCInternal: smtphost Received: from nasanex01b.na.qualcomm.com ([10.46.141.250]) by ironmsg04-sd.qualcomm.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Sep 2022 06:04:57 -0700 Received: from [10.110.91.253] (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; Wed, 21 Sep 2022 06:04:57 -0700 Message-ID: <53f57150-e0d8-a3f3-fca1-3921545f6d79@quicinc.com> Date: Wed, 21 Sep 2022 07:04:56 -0600 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.2.2 Subject: Re: [edk2-devel] [PATCH 1/1] ArmPlatformPkg/PrePeiCore: Print the firmware version early in boot To: Oliver Steffen , , Sami Mujawar CC: Ard Biesheuvel , Gerd Hoffmann References: <15026.1658420593869880980@groups.io> In-Reply-To: Return-Path: rebecca@quicinc.com X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01a.na.qualcomm.com (10.52.223.231) To nasanex01b.na.qualcomm.com (10.46.141.250) Content-Language: en-US Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit I am still interested in it! I'm just currently working through a bit of a backlog (next on the list is working on my MP Services patch, since I've found it doesn't work on the N2 FVP). -- Rebecca Cran On 9/21/22 01:03, Oliver Steffen wrote: > Hi all, > > Is anybody still interested in this? > Rohit's "Invoke constructors for SEC phase" patch was merged. > > Link to the original thread: > https://edk2.groups.io/g/devel/message/88884 > > Regards, >  Oliver > > On Thu, Jul 21, 2022 at 6:24 PM Sami Mujawar wrote: > > Hi Rebecca, Ard, > > On Tue, May 3, 2022 at 12:43 AM, Ard Biesheuvel wrote: > > // Data Cache enabled on Primary core when MMU is enabled. > ArmDisableDataCache (); > // Invalidate instruction cache > @@ -90,6 +95,18 @@ CEntryPoint ( > > // If not primary Jump to Secondary Main > if (ArmPlatformIsPrimaryCore (MpId)) { > + // Initialize the Serial Port > + SerialPortInitialize (); > + CharCount = AsciiSPrint ( > + Buffer, > + sizeof (Buffer), > + "UEFI firmware (version %s built at %a on %a)\n\r", > + (CHAR16 *)PcdGetPtr (PcdFirmwareVersionString), > > Given that this runs before any library constructors are > called, I'd > be inclined to use FixedPcdGetPtr() here (and [FixedPcd] in > the .INFs > below), to ensure that we don't dereference garbage. > > I also wonder whether we need a call to > ProcessLibraryConstructorList() somewhere. > > [SAMI] There is a patch at > https://edk2.groups.io/g/devel/message/91113 which aims to call > ProcessLibraryConstructorList(). The idea being that the DebugLib > constructor would be called which initializes the serial port. > So, maybe these patches need adjustment so that we avoid calling > SerialPortInitialize () twice. > [/SAMI] > > regards, > > Sami Mujawar > > > + __TIME__, > + __DATE__ > + ); > + SerialPortWrite ((UINT8 *)Buffer, CharCount); > > >