summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIlias Apalodimas <ilias.apalodimas@linaro.org>2020-07-07 09:35:52 +0300
committerIlias Apalodimas <ilias.apalodimas@linaro.org>2020-07-14 16:41:38 +0300
commit3e2f82910b92581ec404440bf5f3cf3a1a54d05b (patch)
treedb1e69cbcb75710e34973862f4b0f456708f6e5c
parent1a9a90ae94f6940a1b52d645e89c4e43ca5de560 (diff)
stmm: fixes for FFAstmm_ffa
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
-rw-r--r--ArmPkg/Library/StandaloneMmMmuLib/AArch64/ArmMmuStandaloneMmLib.c6
-rw-r--r--StandaloneMmPkg/Drivers/StandaloneMmCpu/AArch64/EventHandle.c3
-rw-r--r--StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/AArch64/StandaloneMmCoreEntryPoint.c8
3 files changed, 9 insertions, 8 deletions
diff --git a/ArmPkg/Library/StandaloneMmMmuLib/AArch64/ArmMmuStandaloneMmLib.c b/ArmPkg/Library/StandaloneMmMmuLib/AArch64/ArmMmuStandaloneMmLib.c
index 6070510a01..ac3cd1437b 100644
--- a/ArmPkg/Library/StandaloneMmMmuLib/AArch64/ArmMmuStandaloneMmLib.c
+++ b/ArmPkg/Library/StandaloneMmMmuLib/AArch64/ArmMmuStandaloneMmLib.c
@@ -27,7 +27,7 @@ GetMemoryPermissions (
ARM_SVC_ARGS GetMemoryPermissionsSvcArgs = {0};
GetMemoryPermissionsSvcArgs.Arg0 = ARM_SVC_ID_FFA_MSG_SEND_DIRECT_REQ_AARCH64;
- GetMemoryPermissionsSvcArgs.Arg1 = 0;
+ GetMemoryPermissionsSvcArgs.Arg1 = 0x3;
GetMemoryPermissionsSvcArgs.Arg2 = 0;
GetMemoryPermissionsSvcArgs.Arg3 = ARM_SVC_ID_SP_GET_MEM_ATTRIBUTES_AARCH64;
GetMemoryPermissionsSvcArgs.Arg4 = BaseAddress;
@@ -54,8 +54,8 @@ RequestMemoryPermissionChange (
ARM_SVC_ARGS ChangeMemoryPermissionsSvcArgs = {0};
ChangeMemoryPermissionsSvcArgs.Arg0 = ARM_SVC_ID_FFA_MSG_SEND_DIRECT_REQ_AARCH64;
- ChangeMemoryPermissionsSvcArgs.Arg1 = 0;
- ChangeMemoryPermissionsSvcArgs.Arg2 = 0;
+ ChangeMemoryPermissionsSvcArgs.Arg1 = 0x3;
+ ChangeMemoryPermissionsSvcArgs.Arg2 = 0x0;
ChangeMemoryPermissionsSvcArgs.Arg3 = ARM_SVC_ID_SP_SET_MEM_ATTRIBUTES_AARCH64;
ChangeMemoryPermissionsSvcArgs.Arg4 = BaseAddress;
ChangeMemoryPermissionsSvcArgs.Arg5 = EFI_SIZE_TO_PAGES(Length);
diff --git a/StandaloneMmPkg/Drivers/StandaloneMmCpu/AArch64/EventHandle.c b/StandaloneMmPkg/Drivers/StandaloneMmCpu/AArch64/EventHandle.c
index 6a25c4c548..2475ca08b8 100644
--- a/StandaloneMmPkg/Drivers/StandaloneMmCpu/AArch64/EventHandle.c
+++ b/StandaloneMmPkg/Drivers/StandaloneMmCpu/AArch64/EventHandle.c
@@ -23,6 +23,7 @@
#include <Guid/MmramMemoryReserve.h>
#include <IndustryStandard/ArmStdSmc.h>
+#include <IndustryStandard/ArmFfaSvc.h>
#include "StandaloneMmCpu.h"
@@ -78,7 +79,7 @@ PiMmStandaloneArmTfCpuDriverEntry (
// receipt of a synchronous MM request. Use the Event ID to distinguish
// between synchronous and asynchronous events.
//
- if (ARM_SMC_ID_MM_COMMUNICATE_AARCH64 != EventId) {
+ if (ARM_SMC_ID_MM_COMMUNICATE_AARCH64 != EventId && ARM_SVC_ID_FFA_MSG_SEND_DIRECT_REQ_AARCH64 != EventId) {
DEBUG ((DEBUG_INFO, "UnRecognized Event - 0x%x\n", EventId));
return EFI_INVALID_PARAMETER;
}
diff --git a/StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/AArch64/StandaloneMmCoreEntryPoint.c b/StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/AArch64/StandaloneMmCoreEntryPoint.c
index 5ddd97b51d..6996800a63 100644
--- a/StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/AArch64/StandaloneMmCoreEntryPoint.c
+++ b/StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/AArch64/StandaloneMmCoreEntryPoint.c
@@ -32,8 +32,8 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
#define SPM_MINOR_VER_MASK 0x0000FFFF
#define SPM_MAJOR_VER_SHIFT 16
-CONST UINT32 SPM_MAJOR_VER = 1;
-CONST UINT32 SPM_MINOR_VER = 0;
+CONST UINT32 SPM_MAJOR_VER = 0x08400;
+CONST UINT32 SPM_MINOR_VER = 0x063;
CONST UINT8 BOOT_PAYLOAD_VERSION = 1;
@@ -125,9 +125,9 @@ DelegatedEventLoop (
DEBUG ((DEBUG_INFO, "X7 : 0x%x\n", (UINT32) EventCompleteSvcArgs->Arg7));
Status = CpuDriverEntryPoint (
- EventCompleteSvcArgs->Arg3,
+ EventCompleteSvcArgs->Arg0,
EventCompleteSvcArgs->Arg6,
- EventCompleteSvcArgs->Arg4
+ EventCompleteSvcArgs->Arg3
);
if (EFI_ERROR (Status)) {