Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ARM/VExpressPkg: Remove Hob creation in StandaloneMm. #209

Merged
merged 8 commits into from
Jan 17, 2025

Conversation

LeviYeoReum
Copy link
Contributor

This patchset fixes build failure StandaloneMm on VExporessPkg
and apply remove hob creation in StandaloneMm.

When StandaloneMm running with SPM_MM,
It passes Boot Hob list created in TF-A via transfer list according to firmware handoff spec[0].
When StandaloneMm running with FF-A,
It passes Boot Hob list created in TF-A via FF-A boot protocol[1].

For this, add related Libraries in StandaloneMm dsc file.

Links: https://github.com/FirmwareHandoff/firmware_handoff [0]
Links: https://developer.arm.com/documentation/den0077/latest/ [1]

@LeviYeoReum LeviYeoReum force-pushed the ffa_milestone2 branch 3 times, most recently from bc4c9eb to 1b50b57 Compare December 5, 2024 13:26
ArmTransferList is used to pass boot information according to
firmware handoff protocol specification [0].

When initializing StandaloneMm, it gets boot information formatted with
PHIT_HOB in TransferList.

To get boot information from transfer list, add ArmTransferLib for
StandaloneMm.

Signed-off-by: Levi.Yun <[email protected]>
apply FF-A feature on UEFI/StandaloneMm.

Signed-off-by: Levi Yun <[email protected]>
…onLib

The ExtractGuidedSectionLib implementation in Embedded package
creates HOBs to get Uncompress handler information.

Since StandaloneMM is a HOB consumer and not a HOB producer,
a StandaloneMM instance of ExtractGuidedSectionLib has been
introduced.

Therefore, switch to using the StandaloneMM instance of the
ExtractGuidedSectionLib.

Also, when using Lzma compression for StandaloneMm the size
of the image can be reduced.

The image size reduction can be seen as below:
before:
    FVMAIN_COMPACT [96%Full] 1048576 (0x100000) total,
    1016224 (0xf81a0) used, 32352 (0x7e60) free
after:
    FVMAIN_COMPACT [38%Full] 1048576 (0x100000) total,
    402880 (0x625c0) used, 645696 (0x9da40) free

Signed-off-by: Levi Yun <[email protected]>
Instead of using Svc directly to request storage operation,
use ArmFfaLib.
Also, memory endpoint is no more used. so remove it.

Signed-off-by: Levi Yun <[email protected]>
commit 8bc44608b8ea ("MdeModulePkg: Add ImagePropertiesRecordLib")
makes build failure on StandaloneMm.

commit f8d9a0a ("Update to New StackCheckLib")
replace BaseStackCheckLib to StackCheckLibNull.

To fix build failure,
   1. add ImagePropertiesRecordLib and related libraries,
   2. replace StackCheckLib to StackCheckLibNull.

Signed-off-by: Levi.Yun <[email protected]>
Add related libraries and Pcds to build StandaloneMm with FF-A v1.2.

Signed-off-by: Levi Yun <[email protected]>
StandaloneMmCoreEntryPoint Library and StandaloneMmCpu Driver for Arm
are moved from StandaloneMmPkg to ArmPkg.

apply this change.

Signed-off-by: Levi.yun <[email protected]>
StandaloneMmCoreEntryPoint Library and StandaloneMmCpu Driver for Arm
are moved from StandaloneMmPkg to ArmPkg.

apply this change.

Signed-off-by: Levi Yun <[email protected]>
@samimujawar
Copy link
Contributor

If there are no further comments, then I plan to merge tianocore/edk2#6116 and this PR on 17th Jan 2025.

@samimujawar samimujawar merged commit 1c360db into tianocore:master Jan 17, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants