MdeModulePkg/ArmFfaLib: Add depex on gEfiPeiMemoryDiscoveredPpiGuid

If ArmFfaLibRxTxMap is called before permanent memory is installed the
memory allocated for the FF-A buffers will be migrated to the permanent
memory after it is installed without updating gArmFfaRxTxBufferInfoGuid
or unmapping the old buffers and mapping the updated buffers.

An ASSERT in MemoryServices at ExitBootServices is triggered when
ArmFfaDxeLib tries to call FreeAlignedPages on the original buffer
reference.

Add depex on gEfiPeiMemoryDiscoveredPpiGuid for ArmFfaPeiLib so any
Peims that use FF-A are only dispatched after permanent memory is
available.

Signed-off-by: Anubhav Raina <anubhav.raina@arm.com>
This commit is contained in:
Anubhav Raina
2025-04-10 21:46:41 +01:00
committed by mergify[bot]
parent 002d69ad9e
commit 26fb5edff3

View File

@@ -1,7 +1,7 @@
## @file
# Provides FF-A ABI Library used in PEI Driver.
#
# Copyright (c) 2024, Arm Limited. All rights reserved.<BR>
# Copyright (c) 2024-2025, Arm Limited. All rights reserved.<BR>
#
# SPDX-License-Identifier: BSD-2-Clause-Patent
##
@@ -43,3 +43,6 @@
[Guids]
gArmFfaRxTxBufferInfoGuid
[Depex]
gEfiPeiMemoryDiscoveredPpiGuid