Thanks Daniel. > -----Original Message----- > From: Schaefer, Daniel > Sent: Friday, September 11, 2020 3:59 PM > To: Chang, Abner (HPS SW/FW Technologist) <abner.ch...@hpe.com>; > devel@edk2.groups.io > Cc: Leif Lindholm <l...@nuviainc.com> > Subject: Re: [edk2-platforms][PATCH 1/2] ProcessorPkg/RiscVEdk2SbiLib: > Error handling for locating firmware context > > Oh no, what did I do here... I don't return proper error codes at all in this > file. > I forgot to revise this after the initial implementation. > So, good change but we should do that for all functions in this file. > I'll do that on Monday. > > On 9/8/20 1:48 PM, Abner Chang wrote: > > Return EFI_NOT_FOUND if opensbi firmware context can not be located > > using SBI call. > > > > Signed-off-by: Abner Chang <abner.ch...@hpe.com> > > Cc: Daniel Schaefer <daniel.schae...@hpe.com> > > Cc: Leif Lindholm <l...@nuviainc.com> > > --- > > .../ProcessorPkg/Library/RiscVEdk2SbiLib/RiscVEdk2SbiLib.c | 5 ++++- > > 1 file changed, 4 insertions(+), 1 deletion(-) > > > > diff --git > > a/Silicon/RISC-V/ProcessorPkg/Library/RiscVEdk2SbiLib/RiscVEdk2SbiLib. > > c > > b/Silicon/RISC-V/ProcessorPkg/Library/RiscVEdk2SbiLib/RiscVEdk2SbiLib. > > c > > index 0df505d267..64c30b950d 100644 > > --- > > a/Silicon/RISC-V/ProcessorPkg/Library/RiscVEdk2SbiLib/RiscVEdk2SbiLib. > > c > > +++ b/Silicon/RISC-V/ProcessorPkg/Library/RiscVEdk2SbiLib/RiscVEdk2Sbi > > +++ Lib.c > > @@ -851,6 +851,8 @@ SbiGetMscratchHartid ( > > > > @param[out] FirmwareContext The firmware context pointer. > > @retval EFI_SUCCESS The operation succeeds. > > + @retval EFI_NOT_FOUND Failed to get the pointer of > EFI_RISCV_OPENSBI_FIRMWARE_CONTEXT. > > + > > **/ > > EFI_STATUS > > EFIAPI > > @@ -866,8 +868,9 @@ SbiGetFirmwareContext ( > > ScratchSpace = (SBI_SCRATCH *)Ret.Value; > > SbiPlatform = (SBI_PLATFORM *)sbi_platform_ptr(ScratchSpace); > > *FirmwareContext = (EFI_RISCV_OPENSBI_FIRMWARE_CONTEXT > > *)SbiPlatform->firmware_context; > > + } else { > > + return EFI_NOT_FOUND; > > } > > - > > return EFI_SUCCESS; > > } > > > >
-=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#65201): https://edk2.groups.io/g/devel/message/65201 Mute This Topic: https://groups.io/mt/76703528/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-