Hi Sami,
[...] > > +STATIC > > +EFI_STATUS > > +ReadWriteRpmb ( > > + UINTN SvcAct, > > + UINTN Addr, > > + UINTN NumBytes, > > + UINTN Offset > > + ) > > +{ > > + ARM_SVC_ARGS SvcArgs; > > + EFI_STATUS Status; > > + > > + ZeroMem (&SvcArgs, sizeof (SvcArgs)); > > + > > + SvcArgs.Arg0 = ARM_SVC_ID_FFA_MSG_SEND_DIRECT_REQ_AARCH64; > > + SvcArgs.Arg1 = storage_id; > > + SvcArgs.Arg2 = 0; > > + SvcArgs.Arg3 = SvcAct; > > + SvcArgs.Arg4 = Addr; > > + SvcArgs.Arg5 = NumBytes; > > + SvcArgs.Arg6 = Offset; > > + > > + ArmCallSvc (&SvcArgs); > > + if (SvcArgs.Arg3) { > > + DEBUG ((DEBUG_ERROR, "%a: Svc Call 0x%08x Addr: 0x%08x len: 0x%x > > Offset: 0x%x failed with 0x%x\n", > > + __func__, SvcAct, Addr, NumBytes, Offset, SvcArgs.Arg3)); > > + } > > + > > + switch (SvcArgs.Arg3) { > > + case ARM_SVC_SPM_RET_SUCCESS: > > + Status = EFI_SUCCESS; > > + break; > > + > > + case ARM_SVC_SPM_RET_NOT_SUPPORTED: > > + Status = EFI_UNSUPPORTED; > > + break; > > + > > + case ARM_SVC_SPM_RET_INVALID_PARAMS: > > + Status = EFI_INVALID_PARAMETER; > > + break; > > + > > + case ARM_SVC_SPM_RET_DENIED: > > + Status = EFI_ACCESS_DENIED; > > + break; > > + > > + case ARM_SVC_SPM_RET_NO_MEMORY: > > + Status = EFI_BAD_BUFFER_SIZE; > > + break; > > + > > + default: > > + Status = EFI_ACCESS_DENIED; > > + } > > [SAMI] Should the error handling here be updated similar to the FF-A > > StandaloneMmPkg patches? > > [/SAMI] > > I actually picked up the error handling from the previous non-FFA code. > I'll check what's on Sughosh latest patches and fix it if there are > any differences. > Looking at it again EFI_BAD_BUFFER_SIZE can change to indicate out of > memory properly anyway. > Had another look at this. This seems fine if I just change EFI_BAD_BUFFER_SIZE -> EFI OUT_OF_RESOURCES because OP-TEE is only using these errors from FFA. Eventually the OP-TEE code that launches StMM today, will move to FFA and become a separate SP, so that will naturally be handled once that's done. I don't see a point of adding unused error cases. Regards /Ilias -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#71017): https://edk2.groups.io/g/devel/message/71017 Mute This Topic: https://groups.io/mt/78998101/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-