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



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#104869): https://edk2.groups.io/g/devel/message/104869
Mute This Topic: https://groups.io/mt/98900379/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


Reply via email to