audk/ArmPkg
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
..
Drivers ArmPkg: Fix Ecc error 5007 in TimerDxe 2021-01-06 16:22:54 +00:00
Filesystem/SemihostFs ArmPkg: Fix Ecc error 5007 in SemihostFs 2021-01-06 16:22:54 +00:00
Include ArmPkg: Allow FF-A calls to get memory region's attributes 2021-02-23 15:40:37 +00:00
Library ArmPkg: Fix uninitialised variable in ArmMmuStandaloneMmLib 2021-02-27 10:59:13 +00:00
Universal/Smbios ArmPkg: Update OemGetChassisType function to return MISC_CHASSIS_TYPE 2021-02-23 12:37:51 +00:00
ArmPkg.dec ArmPkg: Introduce support for PcdFfaEnable 2021-02-23 15:40:37 +00:00
ArmPkg.dsc ArmPkg: Add Universal/Smbios/SmbiosMiscDxe 2021-02-08 19:35:23 +00:00