<feed xmlns='http://www.w3.org/2005/Atom'>
<title>Tianocore/edk2.git/MdeModulePkg/Library/ArmFfaLib, branch dependabot/github_actions/github/codeql-action-4</title>
<subtitle>EDK II (mirror)</subtitle>
<id>https://git.radix-linux.su/Tianocore/edk2.git/atom?h=dependabot%2Fgithub_actions%2Fgithub%2Fcodeql-action-4</id>
<link rel='self' href='https://git.radix-linux.su/Tianocore/edk2.git/atom?h=dependabot%2Fgithub_actions%2Fgithub%2Fcodeql-action-4'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/'/>
<updated>2025-10-31T07:26:12+00:00</updated>
<entry>
<title>MdeModulePkg: ArmFfaLib: Add FFA_YIELD handling</title>
<updated>2025-10-31T07:26:12+00:00</updated>
<author>
<name>kuqin12</name>
<email>42554914+kuqin12@users.noreply.github.com</email>
</author>
<published>2025-09-12T05:02:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=94065db3dc726124b5f607896431e47b36707c90'/>
<id>urn:sha1:94065db3dc726124b5f607896431e47b36707c90</id>
<content type='text'>
If a secure partition on AArch64 platforms would consume extended time
to operate with peripherals, it might elect to yield the control back to
normal world and expect the normal world to callback after hinted period
of time.

This change adds the FFA_YIELD handling from ArmFfaLib to support long
operations from secure partitions. Timeout arguments are ignored because
systems in this context cannot benefit from the timeout period. Treating
FFA_YIELD like FFA_INTERRUPT and expecting the caller to invoke FFA_RUN
is the least disruptive approach while achieving the intended behavior.

This was tested on proprietary hardware platforms and booted to Windows.

Signed-off-by: Kun Qin &lt;kun.qin@microsoft.com&gt;
</content>
</entry>
<entry>
<title>MdeModulePkg/ArmFfaLib: Add MemoryAllocationLib</title>
<updated>2025-09-12T07:31:53+00:00</updated>
<author>
<name>Michael Kubacki</name>
<email>michael.kubacki@microsoft.com</email>
</author>
<published>2025-09-11T20:00:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=282a324bf43b5c7825e4b1ef946d29178cbd07dc'/>
<id>urn:sha1:282a324bf43b5c7825e4b1ef946d29178cbd07dc</id>
<content type='text'>
ArmFfaRxTxMap.c is built by both ArmFfaPeiLib and ArmFfaDxeLib.

ArmFfaSecRxTxMap.c is built by ArmFfaSecLib.

ArmFfaStandaloneMmRxTxMap.c is built by ArmFfaStandaloneMm*Lib.

The files depend on `MemoryAllocationLib` APIs such as
`AllocateAlignedPages()`. This change adds `MemoryAllocationLib` to
those library INF files.

Signed-off-by: Michael Kubacki &lt;michael.kubacki@microsoft.com&gt;
</content>
</entry>
<entry>
<title>MdeModulePkg/ArmFfaLib: Add HobLib to StMm instances</title>
<updated>2025-09-12T07:31:53+00:00</updated>
<author>
<name>Michael Kubacki</name>
<email>michael.kubacki@microsoft.com</email>
</author>
<published>2025-09-11T18:59:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=2558af552d7330e69e7704d7371d640bdbd94423'/>
<id>urn:sha1:2558af552d7330e69e7704d7371d640bdbd94423</id>
<content type='text'>
ArmFfaCommon.c is built by both ArmFfaStandaloneMmCoreLib and
ArmFfaStandaloneMmLib. It links against HobLiib APIs such as
`GetFirstHob()`. Right now, the symbols fail to link:

```
lld-link: error: undefined symbol: GetFirstHob
          ArmFfaStandaloneMmCoreLib.lib(ArmFfaCommon.obj)
```

Signed-off-by: Michael Kubacki &lt;michael.kubacki@microsoft.com&gt;
</content>
</entry>
<entry>
<title>MdeModulePkg: consider UNSUPPORTED return as valid in ArmFfaStandaloneMmLib</title>
<updated>2025-09-08T15:09:48+00:00</updated>
<author>
<name>Levi Yun</name>
<email>yeoreum.yun@arm.com</email>
</author>
<published>2025-08-16T10:01:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=d7832b480009f8304c1f60af7c9beb6b99d1c7e4'/>
<id>urn:sha1:d7832b480009f8304c1f60af7c9beb6b99d1c7e4</id>
<content type='text'>
commit b534cabbdac4 ("ArmFfaLib: Add Rx/Tx support for Stmm secure partition")
makes ArmFfaStandlaoneMm(Core)Lib map Rx/Tx buffer in its constructor.

This makes a failure of loading StandaloneMm in legacy platform
which doesn't implements Rx/Tx buffer related API since it doesn't need to.

StandaloneMm could be only service provider not cosumer in some platform
where doesn't need to map RxTx buffer.
Therefore, Considier EFI_UNSUPPORTED return in ArmFfaStandaloneMmLib's
constructor.

Fixes: b534cabbdac4 ("ArmFfaLib: Add Rx/Tx support for Stmm secure partition")
Signed-off-by: Yeoreum Yun &lt;yeoreum.yun@arm.com&gt;
</content>
</entry>
<entry>
<title>Global: fix ArmFfaLibRun() caller couldn't get ret-args</title>
<updated>2025-09-08T13:14:00+00:00</updated>
<author>
<name>Levi Yun</name>
<email>yeoreum.yun@arm.com</email>
</author>
<published>2025-08-13T09:11:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=d8e875e62505e15a48f82ccb49db42be9fda519f'/>
<id>urn:sha1:d8e875e62505e15a48f82ccb49db42be9fda519f</id>
<content type='text'>
When ArmFfaLibDirectMsgReq(2) is preempted, caller of these functions
should resume it works via ArmFfaLibRun() and the secure partition
will be return with FFA_DIRECT_MSG_RESP(2) with return arguments.

However, since ArmFfaLibRun() gets its return in its stack variable,
So caller of ArmFfaLibRun() doesn't get the return arguments from
secure partition.

To resolve this, add output parameter to ArmFfaLibRun() to
receive return arguments.

Continuous-integration-options: PatchCheck.ignore-multi-package
Fixes: 5d1b38dd07c4 ("ArmPkg: Add ArmFfaLib used in Dxe driver")
Reported-by: Mariam Elshakfy &lt;Mariam.Elshakfy@arm.com&gt;
Signed-off-by: Yeoreum Yun &lt;yeoreum.yun@arm.com&gt;
</content>
</entry>
<entry>
<title>MdeModulePkg/Include: change type of buffer address in ArmFfaRxTxBufferInfo</title>
<updated>2025-07-14T11:59:38+00:00</updated>
<author>
<name>Levi Yun</name>
<email>yeoreum.yun@arm.com</email>
</author>
<published>2025-06-30T10:03:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=f85c71816702b068019957e7fd532db51dab9c7e'/>
<id>urn:sha1:f85c71816702b068019957e7fd532db51dab9c7e</id>
<content type='text'>
Change type of buffer address type in ArmFfaRxTxBufferInfo
so that reduce the type casting.

Signed-off-by: Yeoreum Yun &lt;yeoreum.yun@arm.com&gt;
</content>
</entry>
<entry>
<title>MdeModulePkg/Library: commonize some duplicate code in ArmFfaLib</title>
<updated>2025-07-14T11:59:38+00:00</updated>
<author>
<name>Levi Yun</name>
<email>yeoreum.yun@arm.com</email>
</author>
<published>2025-06-06T14:16:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=5a2713ec2b369da8c46fd2b41cc044e2d5026300'/>
<id>urn:sha1:5a2713ec2b369da8c46fd2b41cc044e2d5026300</id>
<content type='text'>
Some of code for handling Rx/Tx buffer is duplicate.
This patch commonize some of duplication routine used in
Rx/Tx buffer related functions.

Signed-off-by: Yeoreum Yun &lt;yeoreum.yun@arm.com&gt;
</content>
</entry>
<entry>
<title>MdeModulePkg/Library: add ArmFfaSecLib</title>
<updated>2025-07-14T11:59:38+00:00</updated>
<author>
<name>Levi Yun</name>
<email>yeoreum.yun@arm.com</email>
</author>
<published>2025-06-02T22:12:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=a7e27682cffe7cfbb48bcbaa11daf550a5cdd79c'/>
<id>urn:sha1:a7e27682cffe7cfbb48bcbaa11daf550a5cdd79c</id>
<content type='text'>
To use Arm-FFA intereface in PeilessSec, implments
ArmFfaSecLib used by PeilessSec.
For example, communicate with TPM service using CRB over ARM-FFA
(via Tpm2DeviceLibFfa), PeilessSec need to use Arm-FFA interface.

Signed-off-by: Yeoreum Yun &lt;yeoreum.yun@arm.com&gt;
</content>
</entry>
<entry>
<title>MdeModulePkg/Library: fix memory leak Rx/Tx Buffer in ArmFfaPeiLib</title>
<updated>2025-07-14T11:59:38+00:00</updated>
<author>
<name>Levi Yun</name>
<email>yeoreum.yun@arm.com</email>
</author>
<published>2025-06-02T22:11:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=b336d9b87aeb8713a8894c3c06f3fdb9579d456a'/>
<id>urn:sha1:b336d9b87aeb8713a8894c3c06f3fdb9579d456a</id>
<content type='text'>
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 &lt;yeoreum.yun@arm.com&gt;
Continuous-integration-options: PatchCheck.ignore-multi-package
</content>
</entry>
<entry>
<title>MdePkg, MdeModulePkg: ArmFfaLib: Expose FFA_ARGS and ArmCallFfa</title>
<updated>2025-06-26T17:38:28+00:00</updated>
<author>
<name>Kun Qin</name>
<email>kuqin@microsoft.com</email>
</author>
<published>2025-04-24T22:32:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=22142b4f4a7822872aed9281bf3a5994199754b3'/>
<id>urn:sha1:22142b4f4a7822872aed9281bf3a5994199754b3</id>
<content type='text'>
FFA is a framework that supports various protocols built on top. i.e.
memory protocol, which is nothing that can be done through existing
interfaces.

Instead of requiring protocol authors to check conduit PCD in every
implementation, exposing the ArmCallFfa is a unified way to allow other
protocols to leverage FFA interfaces.

Continuous-integration-options: PatchCheck.ignore-multi-package
Signed-off-by: Kun Qin &lt;kun.qin@microsoft.com&gt;
</content>
</entry>
</feed>
