From 8f3c157e04713c8aa84a930040bf75d52afb7c77 Mon Sep 17 00:00:00 2001 From: "levi.yun" Date: Mon, 30 Dec 2024 10:57:34 +0000 Subject: AmrPkg/MmCommunication: move Mmcommunicate.h to common include MmCommunication.h is used in MmCommunicationDxe/Pei both. Move this header file to common include. Signed-off-by: Levi Yun --- ArmPkg/Drivers/MmCommunicationDxe/MmCommunicate.h | 22 --------------- .../Drivers/MmCommunicationDxe/MmCommunication.c | 3 +-- .../Drivers/MmCommunicationDxe/MmCommunication.inf | 1 - .../MmCommunicationPei/MmCommunicationPei.c | 11 +------- ArmPkg/Include/IndustryStandard/MmCommunicate.h | 31 ++++++++++++++++++++++ 5 files changed, 33 insertions(+), 35 deletions(-) delete mode 100644 ArmPkg/Drivers/MmCommunicationDxe/MmCommunicate.h create mode 100644 ArmPkg/Include/IndustryStandard/MmCommunicate.h (limited to 'ArmPkg') diff --git a/ArmPkg/Drivers/MmCommunicationDxe/MmCommunicate.h b/ArmPkg/Drivers/MmCommunicationDxe/MmCommunicate.h deleted file mode 100644 index 5c5fcb5768..0000000000 --- a/ArmPkg/Drivers/MmCommunicationDxe/MmCommunicate.h +++ /dev/null @@ -1,22 +0,0 @@ -/** @file - - Copyright (c) 2016-2021, Arm Limited. All rights reserved.
- - SPDX-License-Identifier: BSD-2-Clause-Patent - -**/ - -#ifndef MM_COMMUNICATE_H_ -#define MM_COMMUNICATE_H_ - -#define MM_MAJOR_VER_MASK 0xEFFF0000 -#define MM_MINOR_VER_MASK 0x0000FFFF -#define MM_MAJOR_VER_SHIFT 16 - -#define MM_MAJOR_VER(x) (((x) & MM_MAJOR_VER_MASK) >> MM_MAJOR_VER_SHIFT) -#define MM_MINOR_VER(x) ((x) & MM_MINOR_VER_MASK) - -#define MM_CALLER_MAJOR_VER 0x1UL -#define MM_CALLER_MINOR_VER 0x0 - -#endif /* MM_COMMUNICATE_H_ */ diff --git a/ArmPkg/Drivers/MmCommunicationDxe/MmCommunication.c b/ArmPkg/Drivers/MmCommunicationDxe/MmCommunication.c index 7fa0834e8c..e3455384fe 100644 --- a/ArmPkg/Drivers/MmCommunicationDxe/MmCommunication.c +++ b/ArmPkg/Drivers/MmCommunicationDxe/MmCommunication.c @@ -20,8 +20,7 @@ #include #include - -#include "MmCommunicate.h" +#include // // Partition ID if FF-A support is enabled diff --git a/ArmPkg/Drivers/MmCommunicationDxe/MmCommunication.inf b/ArmPkg/Drivers/MmCommunicationDxe/MmCommunication.inf index ad47fa2c89..1cd0a25e69 100644 --- a/ArmPkg/Drivers/MmCommunicationDxe/MmCommunication.inf +++ b/ArmPkg/Drivers/MmCommunicationDxe/MmCommunication.inf @@ -24,7 +24,6 @@ # [Sources.AARCH64] - MmCommunicate.h MmCommunication.c [Packages] diff --git a/ArmPkg/Drivers/MmCommunicationPei/MmCommunicationPei.c b/ArmPkg/Drivers/MmCommunicationPei/MmCommunicationPei.c index 864781ee32..178c9256aa 100644 --- a/ArmPkg/Drivers/MmCommunicationPei/MmCommunicationPei.c +++ b/ArmPkg/Drivers/MmCommunicationPei/MmCommunicationPei.c @@ -8,6 +8,7 @@ #include #include +#include #include #include @@ -21,16 +22,6 @@ #include #include -#define MM_MAJOR_VER_MASK 0xEFFF0000 -#define MM_MINOR_VER_MASK 0x0000FFFF -#define MM_MAJOR_VER_SHIFT 16 - -#define MM_MAJOR_VER(x) (((x) & MM_MAJOR_VER_MASK) >> MM_MAJOR_VER_SHIFT) -#define MM_MINOR_VER(x) ((x) & MM_MINOR_VER_MASK) - -#define MM_CALLER_MAJOR_VER 0x1UL -#define MM_CALLER_MINOR_VER 0x0 - // // Partition ID if FF-A support is enabled // diff --git a/ArmPkg/Include/IndustryStandard/MmCommunicate.h b/ArmPkg/Include/IndustryStandard/MmCommunicate.h new file mode 100644 index 0000000000..a1924a55b3 --- /dev/null +++ b/ArmPkg/Include/IndustryStandard/MmCommunicate.h @@ -0,0 +1,31 @@ +/** @file + Header file for Management Mode Interface via SMC. + This header file is used in normal world only. + + Copyright (c) 2016-2024, Arm Limited. All rights reserved.
+ + SPDX-License-Identifier: BSD-2-Clause-Patent + + @par Glossary: + - MM - MM Management mode. + + @par Reference(s): + - ARM Management Mode Interface Specification + [https://developer.arm.com/documentation/den0060/latest/] + +**/ + +#ifndef MM_COMMUNICATE_H_ +#define MM_COMMUNICATE_H_ + +#define MM_MAJOR_VER_MASK 0xEFFF0000 +#define MM_MINOR_VER_MASK 0x0000FFFF +#define MM_MAJOR_VER_SHIFT 16 + +#define MM_MAJOR_VER(x) (((x) & MM_MAJOR_VER_MASK) >> MM_MAJOR_VER_SHIFT) +#define MM_MINOR_VER(x) ((x) & MM_MINOR_VER_MASK) + +#define MM_CALLER_MAJOR_VER 0x1UL +#define MM_CALLER_MINOR_VER 0x0 + +#endif /* MM_COMMUNICATE_H_ */ -- cgit