summaryrefslogtreecommitdiff
path: root/ArmPkg/Library/StandaloneMmMmuLib
diff options
context:
space:
mode:
authorPierre Gondois <Pierre.Gondois@arm.com>2020-12-10 13:14:49 +0000
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2021-01-06 16:22:54 +0000
commit0931171f54b2f357623d932fe1a987325d9c2077 (patch)
treee4aea1cac7a2e8fed2699ec7e14a35e2eac9a191 /ArmPkg/Library/StandaloneMmMmuLib
parent58bba221b78ba9dd8d2bc3a75f032299b2b951ca (diff)
downloadedk2-0931171f54b2f357623d932fe1a987325d9c2077.zip
edk2-0931171f54b2f357623d932fe1a987325d9c2077.tar.gz
edk2-0931171f54b2f357623d932fe1a987325d9c2077.tar.bz2
ArmPkg: Fix Ecc error 5007 in StandaloneMmMmuLib
This patch fixes the following Ecc reported error: There should be no initialization of a variable as part of its declaration Signed-off-by: Pierre Gondois <Pierre.Gondois@arm.com> Reviewed-by: Ard Biesheuvel <ard.biesheuvel@arm.com>
Diffstat (limited to 'ArmPkg/Library/StandaloneMmMmuLib')
-rw-r--r--ArmPkg/Library/StandaloneMmMmuLib/AArch64/ArmMmuStandaloneMmLib.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/ArmPkg/Library/StandaloneMmMmuLib/AArch64/ArmMmuStandaloneMmLib.c b/ArmPkg/Library/StandaloneMmMmuLib/AArch64/ArmMmuStandaloneMmLib.c
index 3806490..5a316bc 100644
--- a/ArmPkg/Library/StandaloneMmMmuLib/AArch64/ArmMmuStandaloneMmLib.c
+++ b/ArmPkg/Library/StandaloneMmMmuLib/AArch64/ArmMmuStandaloneMmLib.c
@@ -1,7 +1,7 @@
/** @file
* File managing the MMU for ARMv8 architecture in S-EL0
*
-* Copyright (c) 2017 - 2018, ARM Limited. All rights reserved.
+* Copyright (c) 2017 - 2021, Arm Limited. All rights reserved.<BR>
*
* SPDX-License-Identifier: BSD-2-Clause-Patent
*
@@ -14,6 +14,7 @@
#include <Library/ArmMmuLib.h>
#include <Library/ArmSvcLib.h>
#include <Library/BaseLib.h>
+#include <Library/BaseMemoryLib.h>
#include <Library/DebugLib.h>
STATIC
@@ -23,12 +24,12 @@ GetMemoryPermissions (
OUT UINT32 *MemoryAttributes
)
{
- ARM_SVC_ARGS GetMemoryPermissionsSvcArgs = {0};
+ ARM_SVC_ARGS GetMemoryPermissionsSvcArgs;
+
+ ZeroMem (&GetMemoryPermissionsSvcArgs, sizeof (ARM_SVC_ARGS));
GetMemoryPermissionsSvcArgs.Arg0 = ARM_SVC_ID_SP_GET_MEM_ATTRIBUTES_AARCH64;
GetMemoryPermissionsSvcArgs.Arg1 = BaseAddress;
- GetMemoryPermissionsSvcArgs.Arg2 = 0;
- GetMemoryPermissionsSvcArgs.Arg3 = 0;
ArmCallSvc (&GetMemoryPermissionsSvcArgs);
if (GetMemoryPermissionsSvcArgs.Arg0 == ARM_SVC_SPM_RET_INVALID_PARAMS) {
@@ -49,7 +50,9 @@ RequestMemoryPermissionChange (
)
{
EFI_STATUS Status;
- ARM_SVC_ARGS ChangeMemoryPermissionsSvcArgs = {0};
+ ARM_SVC_ARGS ChangeMemoryPermissionsSvcArgs;
+
+ ZeroMem (&ChangeMemoryPermissionsSvcArgs, sizeof (ARM_SVC_ARGS));
ChangeMemoryPermissionsSvcArgs.Arg0 = ARM_SVC_ID_SP_SET_MEM_ATTRIBUTES_AARCH64;
ChangeMemoryPermissionsSvcArgs.Arg1 = BaseAddress;