audk/ArmPkg/Library
Sami Mujawar 31eaefd4df ArmPkg: Fix uninitialised variable in ArmMmuStandaloneMmLib
The following patches added support for StandaloneMM using FF-A:
9da5ee116a ArmPkg: Allow FF-A calls to set memory region's attributes
0e43e02b9b ArmPkg: Allow FF-A calls to get memory region's attributes

However, in the error handling logic for the Get/Set Memory attributes,
the CLANG compiler reports that a status variable could be used without
initialisation. This issue is a false positive and is not seen with GCC.

The Get/Set Memory attributes operation is atomic and therefore an
FFA_INTERRUPT or FFA_SUCCESS response is not expected in response
to FFA_MSG_SEND_DIRECT_REQ. So the remaining cases that could occur
are:
 - the target sends FFA_MSG_SEND_DIRECT_RESP with a success or
   failure code.
 or
 - FFA_MSG_SEND_DIRECT_REQ transmission failure.

Therefore,
 - reorder the error handling conditions such that it prevents the
   uninitialised variable issue being flagged by CLANG.
 - move the repetitive code to a static helper function and add
   documentation at the appropriate places.
 - fix error handling in functions that invoke GetMemoryPermissions().

Signed-off-by: Sami Mujawar <sami.mujawar@arm.com>
Tested-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Sughosh Ganu <sughosh.ganu@linaro.org>
2021-02-27 10:59:13 +00:00
..
ArmArchTimerLib ArmPkg: use helper to check for Security extensions in ArmArchTimerLib 2020-12-18 15:27:26 +00:00
ArmCacheMaintenanceLib ArmPkg: Fix Ecc error 5007 in ArmCacheMaintenanceLib 2021-01-06 16:22:54 +00:00
ArmDisassemblerLib ArmPkg: Fix Ecc error 5007 in ArmDisassemblerLib 2021-01-06 16:22:54 +00:00
ArmExceptionLib ArmPkg: Fix Ecc error 5005 in ArmExceptionLib 2021-01-06 16:22:54 +00:00
ArmGenericTimerPhyCounterLib
ArmGenericTimerVirtCounterLib
ArmGicArchLib ArmPkg: remove duplicated ARM/AArch64 ArmGicArchLib sources 2020-12-18 15:27:26 +00:00
ArmGicArchSecLib ArmPkg: remove duplicated ARM/AArch64 ArmGicArchSecLib sources 2020-12-18 15:27:26 +00:00
ArmHvcLib
ArmLib ArmPkg: Add helper to read the CCSIDR2 register 2021-02-08 19:35:23 +00:00
ArmMmuLib ArmPkg: Fix Ecc error 5007 in ArmMmuLib 2021-01-06 16:22:54 +00:00
ArmMtlNullLib
ArmPsciResetSystemLib
ArmSmcLib
ArmSmcLibNull ArmPkg: convert LFs to CRLF, expand hard TABs 2020-03-04 12:22:07 +00:00
ArmSmcPsciResetSystemLib
ArmSoftFloatLib ArmPkg: convert LFs to CRLF, expand hard TABs 2020-03-04 12:22:07 +00:00
ArmSvcLib ArmPkg/ArmSvcLib: Return x4-x7 in output parameters 2021-02-23 15:40:37 +00:00
CompilerIntrinsicsLib ArmPkg: Fix Ecc error 5007 in CompilerIntrinsicsLib 2021-01-06 16:22:54 +00:00
DebugAgentSymbolsBaseLib
DebugPeCoffExtraActionLib
DefaultExceptionHandlerLib ArmPkg: Fix Ecc error 5007 in DefaultExceptionHandlerLib 2021-01-06 16:22:54 +00:00
GccLto ArmPkg: convert LFs to CRLF, expand hard TABs 2020-03-04 12:22:07 +00:00
OpteeLib ArmPkg: Fix Ecc error 3002 in OpteeLib 2021-01-06 16:22:54 +00:00
PeiServicesTablePointerLib
PlatformBootManagerLib ArmPkg/Library: prevent endless reboot loop with emulated NV varstore 2021-02-04 16:11:23 +00:00
RvdPeCoffExtraActionLib
SemiHostingDebugLib
SemiHostingSerialPortLib ArmPkg: Fix Ecc error 5007 in SemiHostingSerialPortLib 2021-01-06 16:22:54 +00:00
SemihostLib ArmPkg: Fix Ecc error 5007 in SemihostLib 2021-01-06 16:22:54 +00:00
StandaloneMmMmuLib ArmPkg: Fix uninitialised variable in ArmMmuStandaloneMmLib 2021-02-27 10:59:13 +00:00