From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from wout1-smtp.messagingengine.com (wout1-smtp.messagingengine.com [64.147.123.24]) by mx.groups.io with SMTP id smtpd.web11.21114.1683733794964139011 for ; Wed, 10 May 2023 08:49:55 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="signature has expired" header.i=@bsdio.com header.s=fm1 header.b=IgOCM6QK; spf=pass (domain: bsdio.com, ip: 64.147.123.24, mailfrom: rebecca@bsdio.com) Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.west.internal (Postfix) with ESMTP id E0D043200925; Wed, 10 May 2023 11:49:53 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Wed, 10 May 2023 11:49:54 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdio.com; h=cc :cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to; s=fm1; t= 1683733793; x=1683820193; bh=GZMqQgnel2/nBQcKWA8uhTzJvRu5Mn6VESI wPJnVpKk=; b=IgOCM6QKKIywf+GZBjL9VN3W2Yg+cVqisSXaevhm87vwsRe3YP/ Ckkwm0AWTITcjzVFfiDKKyAgcdjMyUjxrSpDC7WkLz9yuJf9voVtw11fDiXt4Fnq 3c3H79mAHQkAM2Fu5iACQF6/KOfH2JLscsona1F3AFo6h9CVJeImyJurxNxD8nsm MvSKNNQsymq54cf1lMfLw5FV9Vab0vEipZDx+csYvL0NYSeht9NZkQ2axiacBRLZ KzSz76ExS/oXWsBKFVNNNTeM9XeFVmNaW5jsogND7PzsKtVJQGfyf95qI8HluNz6 dy2zwVfUTnTe7woxo2Xy8MnBIqXsFi4kjUw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t= 1683733793; x=1683820193; bh=GZMqQgnel2/nBQcKWA8uhTzJvRu5Mn6VESI wPJnVpKk=; b=dKPORGKeZPkXYnBANi5Z5E6M0X1XwIC1yYzqe4IndOPJDhtnWTi f6/JaLhZ/19k5sDTSn3gshZyl2/IWIVR5w6fiXzj8S91z0qvNFOoe2wVkdf61czJ dRlBaGA//qKBKXcy8FXmREHkJNKom2ThyLTlGU1xjJTfC1b1Vlcw19Gy6twQeqnV R0MbgSdVdcmbg1w4fv3+rgoHDDhZkX7r5e2inkO1wT7ffADWz0JQzvRR8fGqdczC 6NckbZYSZltMvXoKsDoNbzhAzMsUUh9gMJ2ldvce2Ffg/PVpNRDFjBTDUN+YBacI DTKfSQsIcpWa5QAGfukElm+dI64tuMSBqJQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrfeegiedgjedvucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepkfffgggfuffvvehfhfgjtgfgsehtjeertddtfeejnecuhfhrohhmpeftvggs vggttggrucevrhgrnhcuoehrvggsvggttggrsegsshguihhordgtohhmqeenucggtffrrg htthgvrhhnpeehleekgfdutedugeehgeffgffhteefhffhteetfeevhefgvdejhedthfff ieffleenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpe hrvggsvggttggrsegsshguihhordgtohhm X-ME-Proxy: Feedback-ID: i5b994698:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 10 May 2023 11:49:52 -0400 (EDT) Message-ID: <40996fe8-7fc3-40cc-a106-a2e85e952703@bsdio.com> Date: Wed, 10 May 2023 09:49:51 -0600 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.10.0 Subject: Re: [PATCH v2 1/1] Platform/SbsaQemu: read platform version To: Marcin Juszkiewicz , devel@edk2.groups.io Cc: Ard Biesheuvel , Leif Lindholm , Sami Mujawar References: <89ef45e7-4d21-e63b-46a9-72f20da572ec@bsdio.com> <20230510154026.196475-1-marcin.juszkiewicz@linaro.org> From: "Rebecca Cran" In-Reply-To: <20230510154026.196475-1-marcin.juszkiewicz@linaro.org> Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 5/10/23 09:40, Marcin Juszkiewicz wrote: > @@ -26,6 +36,9 @@ InitializeSbsaQemuPlatformDxe ( > EFI_STATUS Status; > UINTN Size; > VOID* Base; > + UINTN Major; > + UINTN Minor; > + UINTN Result; > > DEBUG ((DEBUG_INFO, "%a: InitializeSbsaQemuPlatformDxe called\n", __FUNCTION__)); > > @@ -51,5 +64,16 @@ InitializeSbsaQemuPlatformDxe ( > return Status; > } > > + Result = ArmCallSmc0 (SIP_SVC_VERSION, &Major, &Minor, NULL); > + if (Result == SMC_ARCH_CALL_SUCCESS) > + { > + Result = PcdSet32S (PcdPlatformVersionMajor, Major); > + ASSERT_EFI_ERROR (Result); > + Result = PcdSet32S (PcdPlatformVersionMinor, Minor); > + ASSERT_EFI_ERROR (Result); > + } > + > + DEBUG((DEBUG_ERROR, "Platform version: %d.%d\n", Major, Minor)); > + > return EFI_SUCCESS; > } That should probably be logged at DEBUG_INFO instead of DEBUG_ERROR. Also, if the SMC call fails Major and Minor are uninitialized. With a slightly older TF-A I get: Platform version: -71457408.-8905312 -- Rebecca Cran