summaryrefslogtreecommitdiff
path: root/BaseTools/Source/Python/spd2dec
diff options
context:
space:
mode:
authorLevi Yun <yeoreum.yun@arm.com>2025-06-02 23:11:56 +0100
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2025-07-14 11:59:38 +0000
commitb336d9b87aeb8713a8894c3c06f3fdb9579d456a (patch)
treed27bfcd38fd0ff6d58e13a6fcae2bac2559c8d13 /BaseTools/Source/Python/spd2dec
parent460f2705b4cf17198d10a8053ed03c88b4de8d00 (diff)
downloadedk2-b336d9b87aeb8713a8894c3c06f3fdb9579d456a.zip
edk2-b336d9b87aeb8713a8894c3c06f3fdb9579d456a.tar.gz
edk2-b336d9b87aeb8713a8894c3c06f3fdb9579d456a.tar.bz2
MdeModulePkg/Library: fix memory leak Rx/Tx Buffer in ArmFfaPeiLib
The commit e15fe066036da ("MdeModulePkg/Library: make ArmFfaPeiLib available early PEIM stage") uses ArmFfaPeiLib in the early PEIM stage. However, the Rx/Tx buffer allocated in the early PEIM stage uses temporary memory. This results in a memory leak when the temporary memory's heap is relocated to permanent memory. For example, if the Rx/Tx buffer memory is allocated at 0x20006000 in temporary memory, and if offset between temporary memory and permanent is 0x40000000, then: - Once permanent memory installed the temporary memory at 0x20006000 is migrated to 0x60006000. - However, ArmFfaPeiLib allocates new Rx/Tx buffer without freeing the migrated Rx/Tx buffers, i.e. the buffers at 0x60006000. This results in a memory leak as the migrated Rx/Tx buffer area is lost. To address this memory leak, use the MemoryAllocationHob's name, so that the migrated memory area will be reused as Rx/Tx buffer. This patch also includes rename ArmFfaRxTxStmm.c to ArmFfaStandaloneMmRxTxMap.c to keep the file name convention in ArmFfaLib with ArmFfa{Phase}{...}.c Fixes: e15fe066036da ("MdeModulePkg/Library: ...") Signed-off-by: Yeoreum Yun <yeoreum.yun@arm.com> Continuous-integration-options: PatchCheck.ignore-multi-package
Diffstat (limited to 'BaseTools/Source/Python/spd2dec')
0 files changed, 0 insertions, 0 deletions