mirror of
https://gitlab.com/qemu-project/edk2.git
synced 2025-11-03 07:59:00 +08:00
ArmPkg: Add ArmFfaLib used in StandaloneMm
Add ArmFfaLib used in StandaloneMmCore/StandaloneMm Driver. Continuous-integration-options: PatchCheck.ignore-multi-package Signed-off-by: Levi Yun <yeoreum.yun@arm.com>
This commit is contained in:
@ -136,6 +136,8 @@
|
|||||||
ArmPkg/Library/ArmTransferListLib/ArmTransferListLib.inf
|
ArmPkg/Library/ArmTransferListLib/ArmTransferListLib.inf
|
||||||
ArmPkg/Library/ArmFfaLib/ArmFfaPeiLib.inf
|
ArmPkg/Library/ArmFfaLib/ArmFfaPeiLib.inf
|
||||||
ArmPkg/Library/ArmFfaLib/ArmFfaDxeLib.inf
|
ArmPkg/Library/ArmFfaLib/ArmFfaDxeLib.inf
|
||||||
|
ArmPkg/Library/ArmFfaLib/ArmFfaStandaloneMmCoreLib.inf
|
||||||
|
ArmPkg/Library/ArmFfaLib/ArmFfaStandaloneMmLib.inf
|
||||||
|
|
||||||
ArmPkg/Filesystem/SemihostFs/SemihostFs.inf
|
ArmPkg/Filesystem/SemihostFs/SemihostFs.inf
|
||||||
|
|
||||||
|
|||||||
36
ArmPkg/Library/ArmFfaLib/ArmFfaStandaloneMmCoreLib.inf
Normal file
36
ArmPkg/Library/ArmFfaLib/ArmFfaStandaloneMmCoreLib.inf
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
## @file
|
||||||
|
# Provides FF-A ABI Library used in StandaloneMmCore.
|
||||||
|
#
|
||||||
|
# Copyright (c) 2024, Arm Limited. All rights reserved.<BR>
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: BSD-2-Clause-Patent
|
||||||
|
##
|
||||||
|
|
||||||
|
[Defines]
|
||||||
|
INF_VERSION = 0x0001001B
|
||||||
|
BASE_NAME = ArmFfaStandaloneMmCoreLib
|
||||||
|
FILE_GUID = 80d2c4dc-5f0b-11ef-bc86-43b3fb486d6d
|
||||||
|
MODULE_TYPE = MM_CORE_STANDALONE
|
||||||
|
VERSION_STRING = 1.0
|
||||||
|
PI_SPECIFICATION_VERSION = 0x00010032
|
||||||
|
LIBRARY_CLASS = ArmFfaLib
|
||||||
|
CONSTRUCTOR = ArmFfaStandaloneMmLibConstructor
|
||||||
|
|
||||||
|
[Sources]
|
||||||
|
ArmFfaCommon.h
|
||||||
|
ArmFfaCommon.c
|
||||||
|
ArmFfaStandaloneMmLib.c
|
||||||
|
|
||||||
|
[Packages]
|
||||||
|
MdePkg/MdePkg.dec
|
||||||
|
ArmPkg/ArmPkg.dec
|
||||||
|
|
||||||
|
[LibraryClasses]
|
||||||
|
ArmSmcLib
|
||||||
|
ArmSvcLib
|
||||||
|
BaseLib
|
||||||
|
BaseMemoryLib
|
||||||
|
DebugLib
|
||||||
|
|
||||||
|
[Pcd]
|
||||||
|
gArmTokenSpaceGuid.PcdFfaLibConduitSmc
|
||||||
72
ArmPkg/Library/ArmFfaLib/ArmFfaStandaloneMmLib.c
Normal file
72
ArmPkg/Library/ArmFfaLib/ArmFfaStandaloneMmLib.c
Normal file
@ -0,0 +1,72 @@
|
|||||||
|
/** @file
|
||||||
|
Arm Ffa library code for StandaloneMmCore.
|
||||||
|
|
||||||
|
Copyright (c) 2024, Arm Limited. All rights reserved.<BR>
|
||||||
|
SPDX-License-Identifier: BSD-2-Clause-Patent
|
||||||
|
|
||||||
|
@par Glossary:
|
||||||
|
- FF-A - Firmware Framework for Arm A-profile
|
||||||
|
|
||||||
|
@par Reference(s):
|
||||||
|
- Arm Firmware Framework for Arm A-Profile [https://developer.arm.com/documentation/den0077/latest]
|
||||||
|
|
||||||
|
**/
|
||||||
|
|
||||||
|
#include <PiMm.h>
|
||||||
|
|
||||||
|
#include <Library/ArmLib.h>
|
||||||
|
#include <Library/ArmSmcLib.h>
|
||||||
|
#include <Library/ArmFfaLib.h>
|
||||||
|
#include <Library/BaseLib.h>
|
||||||
|
#include <Library/BaseMemoryLib.h>
|
||||||
|
#include <Library/DebugLib.h>
|
||||||
|
|
||||||
|
#include "ArmFfaCommon.h"
|
||||||
|
|
||||||
|
/**
|
||||||
|
Get mapped Rx/Tx buffers.
|
||||||
|
|
||||||
|
@param [out] TxBuffer Address of TxBuffer
|
||||||
|
@param [out] TxBufferSize Size of TxBuffer
|
||||||
|
@param [out] RxBuffer Address of RxBuffer
|
||||||
|
@param [out] RxBufferSize Size of RxBuffer
|
||||||
|
|
||||||
|
@retval EFI_SUCCESS
|
||||||
|
@retval Others Error.
|
||||||
|
|
||||||
|
**/
|
||||||
|
EFI_STATUS
|
||||||
|
EFIAPI
|
||||||
|
ArmFfaLibGetRxTxBuffers (
|
||||||
|
OUT VOID **TxBuffer,
|
||||||
|
OUT UINT64 *TxBufferSize,
|
||||||
|
OUT VOID **RxBuffer,
|
||||||
|
OUT UINT64 *RxBufferSize
|
||||||
|
)
|
||||||
|
{
|
||||||
|
/*
|
||||||
|
* StandaloneMm doesn't use Rx/Tx buffer.
|
||||||
|
* So, return EFI_UNSUPPORTED.
|
||||||
|
*/
|
||||||
|
return EFI_UNSUPPORTED;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
ArmFfaLib Constructor.
|
||||||
|
|
||||||
|
@param [in] ImageHandle The firmware allocated handle for the EFI image
|
||||||
|
@param [in] MmSystemTable A pointer to the Management mode System Table
|
||||||
|
|
||||||
|
@retval EFI_SUCCESS Success
|
||||||
|
@retval Others Error
|
||||||
|
|
||||||
|
**/
|
||||||
|
EFI_STATUS
|
||||||
|
EFIAPI
|
||||||
|
ArmFfaStandaloneMmLibConstructor (
|
||||||
|
IN EFI_HANDLE ImageHandle,
|
||||||
|
IN EFI_MM_SYSTEM_TABLE *MmSystemTable
|
||||||
|
)
|
||||||
|
{
|
||||||
|
return ArmFfaLibCommonInit ();
|
||||||
|
}
|
||||||
37
ArmPkg/Library/ArmFfaLib/ArmFfaStandaloneMmLib.inf
Normal file
37
ArmPkg/Library/ArmFfaLib/ArmFfaStandaloneMmLib.inf
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
## @file
|
||||||
|
# Provides FF-A ABI Library used in StandaloneMmCore.
|
||||||
|
#
|
||||||
|
# Copyright (c) 2024, Arm Limited. All rights reserved.<BR>
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: BSD-2-Clause-Patent
|
||||||
|
##
|
||||||
|
|
||||||
|
[Defines]
|
||||||
|
INF_VERSION = 0x0001001B
|
||||||
|
BASE_NAME = ArmFfaStandaloneMmLib
|
||||||
|
FILE_GUID = e07db74e-6a95-11ef-97ea-c7a6149e81c9
|
||||||
|
MODULE_TYPE = MM_STANDALONE
|
||||||
|
VERSION_STRING = 1.0
|
||||||
|
PI_SPECIFICATION_VERSION = 0x00010032
|
||||||
|
LIBRARY_CLASS = ArmFfaLib
|
||||||
|
CONSTRUCTOR = ArmFfaStandaloneMmLibConstructor
|
||||||
|
|
||||||
|
[Sources]
|
||||||
|
ArmFfaCommon.h
|
||||||
|
ArmFfaCommon.c
|
||||||
|
ArmFfaStandaloneMmLib.c
|
||||||
|
|
||||||
|
[Packages]
|
||||||
|
MdePkg/MdePkg.dec
|
||||||
|
ArmPkg/ArmPkg.dec
|
||||||
|
|
||||||
|
[LibraryClasses]
|
||||||
|
ArmSmcLib
|
||||||
|
ArmSvcLib
|
||||||
|
BaseLib
|
||||||
|
BaseMemoryLib
|
||||||
|
DebugLib
|
||||||
|
|
||||||
|
[Pcd]
|
||||||
|
gArmTokenSpaceGuid.PcdFfaLibConduitSmc
|
||||||
|
|
||||||
@ -82,6 +82,7 @@
|
|||||||
|
|
||||||
[LibraryClasses.common.MM_CORE_STANDALONE]
|
[LibraryClasses.common.MM_CORE_STANDALONE]
|
||||||
HobLib|StandaloneMmPkg/Library/StandaloneMmCoreHobLib/StandaloneMmCoreHobLib.inf
|
HobLib|StandaloneMmPkg/Library/StandaloneMmCoreHobLib/StandaloneMmCoreHobLib.inf
|
||||||
|
ArmFfaLib|ArmPkg/Library/ArmFfaLib/ArmFfaStandaloneMmCoreLib.inf
|
||||||
|
|
||||||
[LibraryClasses.common.MM_STANDALONE]
|
[LibraryClasses.common.MM_STANDALONE]
|
||||||
MemoryAllocationLib|StandaloneMmPkg/Library/StandaloneMmMemoryAllocationLib/StandaloneMmMemoryAllocationLib.inf
|
MemoryAllocationLib|StandaloneMmPkg/Library/StandaloneMmMemoryAllocationLib/StandaloneMmMemoryAllocationLib.inf
|
||||||
|
|||||||
Reference in New Issue
Block a user