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

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

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]

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 ArmTrnaferLib for
StandaloneMm.

Signed-off-by: Levi.Yun <yeoreum.yun@arm.com>
apply FF-A feature on UEFI/StandaloneMm.

Signed-off-by: Levi Yun <yeoreum.yun@arm.com>
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 <yeoreum.yun@arm.com>
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 <yeoreum.yun@arm.com>
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 <yeoreum.yun@arm.com>
Add related libraries and Pcds to build StandaloneMm with FF-A v1.2.

Signed-off-by: Levi Yun <yeoreum.yun@arm.com>
StandaloneMmCoreEntryPoint Library and StandaloneMmCpu Driver for Arm
are moved from StandaloneMmPkg to ArmPkg.

apply this change.

Signed-off-by: Levi.yun <yeoreum.yun@arm.com>
StandaloneMmCoreEntryPoint Library and StandaloneMmCpu Driver for Arm
are moved from StandaloneMmPkg to ArmPkg.

apply this change.

Signed-off-by: Levi Yun <yeoreum.yun@arm.com>
@@ -81,6 +81,7 @@
ArmLib|ArmPkg/Library/ArmLib/ArmBaseLib.inf
StandaloneMmMmuLib|ArmPkg/Library/StandaloneMmMmuLib/ArmMmuStandaloneMmLib.inf
ArmSvcLib|ArmPkg/Library/ArmSvcLib/ArmSvcLib.inf
ArmTransferListLib|ArmPkg/Library/ArmTransferListLib/ArmTransferListLib.inf
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please fix typo in commit message.
ArmTrnaferLib => ArmTransferLib

Also the subject line for this and other patches in this series needs to be updated.

e.g. for this patch the subject line should be
"Platform/Arm: VExpress: Add ArmTransferLib for StandaloneMm"

Similarly the subject line for patch 4 "Driver/Optee: apply ffa library" should be something like
"Drivers/OpTee/OpteeRpmbPkg: apply FF-A library"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants