diff options
author | Sami Mujawar <sami.mujawar@arm.com> | 2021-02-25 17:11:10 +0000 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2021-02-27 10:59:13 +0000 |
commit | 31eaefd4df78d58ad4087a13f6fc7607b266d04e (patch) | |
tree | 4d21befbb9d5f0548d39177f69c8789f5826a873 /FmpDevicePkg | |
parent | cd14150c1594d8deeee6ecf80feb5751dcd7f315 (diff) | |
download | edk2-31eaefd4df78d58ad4087a13f6fc7607b266d04e.zip edk2-31eaefd4df78d58ad4087a13f6fc7607b266d04e.tar.gz edk2-31eaefd4df78d58ad4087a13f6fc7607b266d04e.tar.bz2 |
ArmPkg: Fix uninitialised variable in ArmMmuStandaloneMmLib
The following patches added support for StandaloneMM using FF-A:
9da5ee116a28 ArmPkg: Allow FF-A calls to set memory region's attributes
0e43e02b9bd8 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>
Diffstat (limited to 'FmpDevicePkg')
0 files changed, 0 insertions, 0 deletions