summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKun Qin <kuqin@microsoft.com>2025-04-08 10:56:02 -0700
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2025-04-10 17:52:48 +0000
commit18988ea3e6dfb5e0eb51c0497873fb1770ee5e2d (patch)
tree3b8150af9decac4df51adbed254d923c5b863aee
parentbe03ceb1176d71f2adc7634fb0f68491e743e699 (diff)
downloadedk2-18988ea3e6dfb5e0eb51c0497873fb1770ee5e2d.zip
edk2-18988ea3e6dfb5e0eb51c0497873fb1770ee5e2d.tar.gz
edk2-18988ea3e6dfb5e0eb51c0497873fb1770ee5e2d.tar.bz2
MdeModulePkg: ArmFfaLib: Move Rx/Tx hob definition to Include/Guid folder
Currently, ArmFfaLib uses an internally defined Guided HOB to pass information about the Rx/Tx buffer set up by the first executing agent. However, the GUID definition is solely specified in the DEC file, which is inconsistent with other GUID definitions in MdeModulePkg. This change relocates the GUID definition to the Include/Guid folder to ensure consistency across the package. Signed-off-by: Kun Qin <kun.qin@microsoft.com>
-rw-r--r--MdeModulePkg/Include/Guid/ArmFfaRxTxBufferInfo.h31
-rw-r--r--MdeModulePkg/Library/ArmFfaLib/ArmFfaDxeLib.c2
-rw-r--r--MdeModulePkg/Library/ArmFfaLib/ArmFfaPeiLib.c2
-rw-r--r--MdeModulePkg/Library/ArmFfaLib/ArmFfaRxTxMap.h17
-rw-r--r--MdeModulePkg/MdeModulePkg.dec1
5 files changed, 36 insertions, 17 deletions
diff --git a/MdeModulePkg/Include/Guid/ArmFfaRxTxBufferInfo.h b/MdeModulePkg/Include/Guid/ArmFfaRxTxBufferInfo.h
new file mode 100644
index 0000000..0b8e2b6
--- /dev/null
+++ b/MdeModulePkg/Include/Guid/ArmFfaRxTxBufferInfo.h
@@ -0,0 +1,31 @@
+/** @file
+ Arm FF-A ns common library Header file
+
+ Copyright (c) 2024, Arm Limited. All rights reserved.<BR>
+ Copyright (c), Microsoft Corporation.
+ SPDX-License-Identifier: BSD-2-Clause-Patent
+**/
+
+#ifndef ARM_FFA_RX_TX_BUFFER_INFO_H_
+#define ARM_FFA_RX_TX_BUFFER_INFO_H_
+
+/**
+ * Guid Hob Data for gArmFfaRxTxBufferInfoGuid Guid Hob.
+ */
+typedef struct ArmFfaRxTxBuffersInfo {
+ /// Tx Buffer Address.
+ VOID *TxBufferAddr;
+
+ /// Tx Buffer Size.
+ UINT64 TxBufferSize;
+
+ /// Rx Buffer Address.
+ VOID *RxBufferAddr;
+
+ /// Rx Buffer Size.
+ UINT64 RxBufferSize;
+} ARM_FFA_RX_TX_BUFFER_INFO;
+
+extern EFI_GUID gArmFfaRxTxBufferInfoGuid;
+
+#endif
diff --git a/MdeModulePkg/Library/ArmFfaLib/ArmFfaDxeLib.c b/MdeModulePkg/Library/ArmFfaLib/ArmFfaDxeLib.c
index 4d82844..8751f2f 100644
--- a/MdeModulePkg/Library/ArmFfaLib/ArmFfaDxeLib.c
+++ b/MdeModulePkg/Library/ArmFfaLib/ArmFfaDxeLib.c
@@ -28,6 +28,8 @@
#include <IndustryStandard/ArmFfaSvc.h>
+#include <Guid/ArmFfaRxTxBufferInfo.h>
+
#include "ArmFfaCommon.h"
#include "ArmFfaRxTxMap.h"
diff --git a/MdeModulePkg/Library/ArmFfaLib/ArmFfaPeiLib.c b/MdeModulePkg/Library/ArmFfaLib/ArmFfaPeiLib.c
index 8a1d892..e65a3d0 100644
--- a/MdeModulePkg/Library/ArmFfaLib/ArmFfaPeiLib.c
+++ b/MdeModulePkg/Library/ArmFfaLib/ArmFfaPeiLib.c
@@ -29,6 +29,8 @@
#include <IndustryStandard/ArmFfaSvc.h>
+#include <Guid/ArmFfaRxTxBufferInfo.h>
+
#include "ArmFfaCommon.h"
#include "ArmFfaRxTxMap.h"
diff --git a/MdeModulePkg/Library/ArmFfaLib/ArmFfaRxTxMap.h b/MdeModulePkg/Library/ArmFfaLib/ArmFfaRxTxMap.h
index 01db339..6c6bfaa 100644
--- a/MdeModulePkg/Library/ArmFfaLib/ArmFfaRxTxMap.h
+++ b/MdeModulePkg/Library/ArmFfaLib/ArmFfaRxTxMap.h
@@ -18,23 +18,6 @@
#define ARM_FFA_RX_TX_MAP_LIB_H_
/**
- * Guid Hob Data for gArmFfaRxTxBufferInfoGuid Guid Hob.
- */
-typedef struct ArmFfaRxTxBuffersInfo {
- /// Tx Buffer Address.
- VOID *TxBufferAddr;
-
- /// Tx Buffer Size.
- UINT64 TxBufferSize;
-
- /// Rx Buffer Address.
- VOID *RxBufferAddr;
-
- /// Rx Buffer Size.
- UINT64 RxBufferSize;
-} ARM_FFA_RX_TX_BUFFER_INFO;
-
-/**
Mapping Rx/Tx buffers.
This function is only called in ArmFfaLibConstructor because
Rx/Tx buffer is registered only once per partition.
diff --git a/MdeModulePkg/MdeModulePkg.dec b/MdeModulePkg/MdeModulePkg.dec
index 1234ae8..3698caf 100644
--- a/MdeModulePkg/MdeModulePkg.dec
+++ b/MdeModulePkg/MdeModulePkg.dec
@@ -494,6 +494,7 @@
## Include/Guid/DelayedDispatch.h
gEfiDelayedDispatchTableGuid = { 0x4b733449, 0x8eff, 0x488c, { 0x92, 0x1a, 0x15, 0x4a, 0xda, 0x25, 0x18, 0x07 }}
+ ## Include/Guid/ArmFfaRxTxBufferInfo.h
gArmFfaRxTxBufferInfoGuid = { 0x96fd3d26, 0x6fb1, 0x11ef, { 0x8c, 0x11, 0xf3, 0xc9, 0xc5, 0x02, 0x31, 0xab } }
[Ppis]