From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) by mx.groups.io with SMTP id smtpd.web11.87771.1684156323937732407 for ; Mon, 15 May 2023 06:12:04 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="signature has expired" header.i=@bsdio.com header.s=fm2 header.b=WLsBv2+B; spf=pass (domain: bsdio.com, ip: 66.111.4.25, mailfrom: rebecca@bsdio.com) Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 2CA465C014E; Mon, 15 May 2023 09:12:03 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Mon, 15 May 2023 09:12:03 -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=fm2; t= 1684156323; x=1684242723; bh=+UqXCHzs4snX8axtGeUpyp+ww8Z6tWUsdIq YgBPiybQ=; b=WLsBv2+Bl30iGRGfOfDmLibS39yTPnCaQK2TPeu0ODvRoXYglg/ mcC+aQ3rh0EKXoOBTpUdkWLVGJB/YW5PooeDWxNibAgfYjGxTyrlkqlNOouvc1yh 9CkdI/JEEOTe1IOBZNCI8owlQyKNyl05UB4Nqy2ZRZrqDhgjeXlxNseCwaFiSN/w Hd02RzGnQRa9lPXmUwoQ9EGPIJfy02dtycCkDegOU/l7m+ecUwYZ5JZsSnj56kge MJ1coKQKGjf2rnpEzAnk4QPiaxGQaMGz1kl4yx0ixzlR7VZh4IEwusVHOCV7byR1 //EODg+e42zV3L2U4XYZDbQi/o7FOAMErBA== 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=fm1; t= 1684156323; x=1684242723; bh=+UqXCHzs4snX8axtGeUpyp+ww8Z6tWUsdIq YgBPiybQ=; b=ZhaHFSRp2mIWGyI7GRQsFBHOoIdE6v/YpfE15Cf+vivN1mf649L 5XKEz0/y7SXDlqsOUOr01UexLyZbMNAMssw7I3bUqfgQV2vYRBh1j+c8IODxm6JD XjQXDHy8/C4d5Fn+gpL6zO2eseHdSZ3XyW09dukzKk+P2IU6B9LQWRQJDv2BD5Vv Xa+jUnrUDvAZWzjRE6mZJ20tXX6fQBe4JGMb+h89Py0g61HqSdgdVWoOcH3+1Ofm 3rbHyFEwdOPqGKavLISsS2Icrny6LAvzymIiit96Ia0ZOwTxF9OA0iQXrnxO8Xe3 YqxDGdDHskVLOixiBWw37ssg6SMFXDkj/BA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrfeehjedgiedvucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepkfffgggfuffvvehfhfgjtgfgsehtjeertddtfeejnecuhfhrohhmpeftvggs vggttggrucevrhgrnhcuoehrvggsvggttggrsegsshguihhordgtohhmqeenucggtffrrg htthgvrhhnpeehleekgfdutedugeehgeffgffhteefhffhteetfeevhefgvdejhedthfff ieffleenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpe hrvggsvggttggrsegsshguihhordgtohhm X-ME-Proxy: Feedback-ID: i5b994698:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 15 May 2023 09:12:02 -0400 (EDT) Message-ID: <633f1e99-0e9f-5e3f-0174-f616fecf7e74@bsdio.com> Date: Mon, 15 May 2023 07:12:01 -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 1/2] Platform/SbsaQemu: read platform version To: Marcin Juszkiewicz , devel@edk2.groups.io Cc: Ard Biesheuvel , Leif Lindholm , Sami Mujawar References: <20230515102423.359916-1-marcin.juszkiewicz@linaro.org> <20230515102423.359916-2-marcin.juszkiewicz@linaro.org> From: "Rebecca Cran" In-Reply-To: <20230515102423.359916-2-marcin.juszkiewicz@linaro.org> Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 5/15/23 04:24, Marcin Juszkiewicz wrote: > + Result = ArmCallSmc0 (SIP_SVC_VERSION, &Arg0, &Arg1, NULL); > + if (Result == SMC_ARCH_CALL_SUCCESS) > + { > + Result = PcdSet32S (PcdPlatformVersionMajor, Arg0); > + ASSERT_EFI_ERROR (Result); > + Result = PcdSet32S (PcdPlatformVersionMinor, Arg1); > + ASSERT_EFI_ERROR (Result); > + } > + > + Arg0 = PcdGet32 (PcdPlatformVersionMajor); > + Arg1 = PcdGet32 (PcdPlatformVersionMinor); I didn't notice this before, but PcdSet32S returns a RETURN_STATUS, not UINTN so Result should be type RETURN_STATUS (and probably a different variable used for the result of ArmCallSmc0). Also, you should use ASSERT_RETURN_ERROR not ASSERT_EFI_ERROR (I checked ArmVirtPkg/Library/ArmVirtTimerFdtClientLib/ArmVirtTimerFdtClientLib.c to see how error handling is done there). -- Rebecca Cran