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

StandaloneMM fixes for x86 #5814

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

Conversation

PatrickRudolph
Copy link
Contributor

Description

StandaloneMM fixes for x86.

How This Was Tested

Build using edk2-platform.

Integration Instructions

N/A

EFI_FV_FILETYPE_MM_STANDALONE contains PE32 images, so add it to the list
to make sure the files are also rebased.

Cc: Bob Feng <[email protected]>
Cc: Liming Gao <[email protected]>
Cc: Rebecca Cran <[email protected]>
Cc: Yuwei Chen <[email protected]>

Signed-off-by: Patrick Rudolph <[email protected]>
PE32 in StandaloneMmPkg can be loaded into memory can be executed
in place (XiP). That saves memory as they don't need to be relocated
to memory when already residing in memory.

Cc: Ard Biesheuvel <[email protected]>
Cc: Jiaxin Wu <[email protected]>
Cc: Ray Ni <[email protected]>
Cc: Sami Mujawar <[email protected]>

Signed-off-by: Patrick Rudolph <[email protected]>
Currently the StandaloneMm loader needs to find a free memory range in
the secure world and provide it to StandaloneMM to use it as free pool
for runtime memory allocations.  The caller might not now how much memory
space to allocate. In addition allocating a separate memory region in the
trusted MM memory space increases the complexity on the MM loader side.

Add a PCD that allows to use a fixed size memory buffer on the heap as
free memory pool. Using this option will increase the binary size, but
it removes the callers need to provide a memory range that can be used
as runtime memory.

Cc: Ard Biesheuvel <[email protected]>
Cc: Jiaxin Wu <[email protected]>
Cc: Ray Ni <[email protected]>
Cc: Sami Mujawar <[email protected]>

Signed-off-by: Patrick Rudolph <[email protected]>
Add missing EFIAPI qualifier.

Cc: Ard Biesheuvel <[email protected]>
Cc: Jiaxin Wu <[email protected]>
Cc: Ray Ni <[email protected]>
Cc: Sami Mujawar <[email protected]>

Signed-off-by: Patrick Rudolph <[email protected]>
@PatrickRudolph PatrickRudolph marked this pull request as ready for review June 25, 2024 05:55
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.

None yet

1 participant