Skip to content

Add UUID-GUID conversion interfaces in ArmFfaLib #11004

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

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

Conversation

kuqin12
Copy link
Contributor

@kuqin12 kuqin12 commented Apr 25, 2025

Description

UUID to EFI GUID conversion is a common operation that is needed for processing FF-A parameters.

This change adds 2 new interfaces to support such conversion and removes an implementation from Standalone MM entrypoint to leverage the new interfaces.

  • Breaking change?
    • Breaking change - Does this PR cause a break in build or boot behavior?
    • Examples: Does it add a new library class or move a module to a different repo.
  • Impacts security?
    • Security - Does this PR have a direct security impact?
    • Examples: Crypto algorithm change or buffer overflow fix.
  • Includes tests?
    • Tests - Does this PR include any explicit test code?
    • Examples: Unit tests or integration tests.

How This Was Tested

This change was tested on QEMU SBSA platform and booted to UEFI shell.

Integration Instructions

N/A

@kuqin12 kuqin12 marked this pull request as draft April 25, 2025 00:32
@kuqin12 kuqin12 marked this pull request as ready for review April 25, 2025 05:54
@kuqin12 kuqin12 changed the title Ffa common lib Add UUID-GUID conversion interfaces in ArmFfaLib Apr 25, 2025
@kuqin12
Copy link
Contributor Author

kuqin12 commented Apr 30, 2025

@samimujawar @leiflindholm @ardbiesheuvel Do you have any suggestions on this change?

Copy link
Member

@leiflindholm leiflindholm left a comment

Choose a reason for hiding this comment

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

Well, there is nothing Arm architecture specific about MS-GUID to UUID conversion, so if we're breaking it out it should move to MdePkg or MdeModulePkg.

@kuqin12
Copy link
Contributor Author

kuqin12 commented May 1, 2025

Well, there is nothing Arm architecture specific about MS-GUID to UUID conversion, so if we're breaking it out it should move to MdePkg or MdeModulePkg.

Okay, I will move it to BaseLib. Probably for the better.

kuqin12 added 3 commits May 1, 2025 10:42
With interactions between Standalone MM partitions and normal UEFI
environment, there is constant need to convert UUID to GUID and back.

This change added 2 new interfaces to BaseLib that support such usage.

Signed-off-by: Kun Qin <[email protected]>
This change moves the existing ConvertEfiGuidToUuid function to public
interface to support newly defined functions prototypes.

This change also adds the `ArmConvertUuidToEfiGuid` function
implementation, which is an inverse of the original conversion.

Signed-off-by: Kun Qin <[email protected]>
…tine

As new interfaces are made available to support UUID-GUID conversion,
this change is made to leverage new interfaces and remove the locally
duplicated code.

Signed-off-by: Kun Qin <[email protected]>
@kuqin12
Copy link
Contributor Author

kuqin12 commented May 1, 2025

These are now moved to BaseLib.

@kuqin12
Copy link
Contributor Author

kuqin12 commented May 5, 2025

@leiflindholm @samimujawar could you please let me know if there are any further comments on this PR? If not, would you mind merging the change? Thanks in advance!

Copy link
Member

@leiflindholm leiflindholm left a comment

Choose a reason for hiding this comment

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

I'm OK with this, but ideally we'd want to hear from MdePkg maintainers.

@kuqin12
Copy link
Contributor Author

kuqin12 commented May 6, 2025

@lgao4 @mdkinney could you please review and provide some feedback? Thanks in advance.

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.

4 participants