Skip to content

[Code First] GI 11627: Add DXE_SERVICES.ADD_MEMORY_SPACEV2#11628

Closed
os-d wants to merge 7 commits into
tianocore:masterfrom
os-d:GI11627_addmemoryspacev2
Closed

[Code First] GI 11627: Add DXE_SERVICES.ADD_MEMORY_SPACEV2#11628
os-d wants to merge 7 commits into
tianocore:masterfrom
os-d:GI11627_addmemoryspacev2

Conversation

@os-d
Copy link
Copy Markdown
Contributor

@os-d os-d commented Oct 16, 2025

Description

This change adds the AddMemorySpaceV2 function to DXE Services. This function behaves exactly the same as
DXE_SERVICES.ADD_MEMORY_SPACE except that it takes an additional parameter, Attributes, which are the memory
attributes to be set on that range. This is equivalent to calling DXE_SERVICES.ADD_MEMORY_SPACE and then
DXE_SERVICES.SET_MEMORY_SPACE_ATTRIBUTES except that error handling is cleaner. It follows in the spirit of other proposed PI spec changes that are merging adding memory ranges with setting attributes on them.

  • 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

Tested on OVMF.

Integration Instructions

Callers may use gDS->AddMemorySpaceV2() to add a memory space and set attributes on it.

os-d added 2 commits October 15, 2025 16:04
This adds the required markdown template for AddMemorySpaceV2.

Signed-off-by: Oliver Smith-Denny <osde@microsoft.com>
As part of the edk2 Code First process, this commit adds
the EFI_ADD_MEMORY_SPACEV2 DXE Service definition.

This function behaves exactly the same as the
EFI_ADD_MEMORY_SPACE DXE Service except it takes an additional
attributes parameter and sets those attributes on the newly
added range.

Signed-off-by: Oliver Smith-Denny <osde@microsoft.com>
@os-d os-d changed the title Gi11627 addmemoryspacev2 [Code First] GI 11627: Add DXE_SERVICES.ADD_MEMORY_SPACEV2 Oct 16, 2025
@os-d os-d linked an issue Oct 16, 2025 that may be closed by this pull request
@os-d
Copy link
Copy Markdown
Contributor Author

os-d commented Oct 16, 2025

Code First GH Issue: #11628

@os-d
Copy link
Copy Markdown
Contributor Author

os-d commented Oct 16, 2025

Note: CI will fail on this for uncrustify until tianocore/uncrustify#5 is resolved.

os-d added 5 commits October 16, 2025 21:44
As part of the edk2 Code First Process, this adds
the implemenation of the new EFI_ADD_MEMORY_SPACE_V2
DXE Service.

This services adds a new memory space to the GCD and sets
the specified attributes on the range.

Signed-off-by: Oliver Smith-Denny <osde@microsoft.com>
This updates MmCommunicationDxe to use the new
AddMemorySpaceV2 DXE Service instead of AddMemorySpace
+ SetMemorySpaceAttributes.

Signed-off-by: Oliver Smith-Denny <osde@microsoft.com>
This updates PL031RealTimeClockLib to use the new
AddMemorySpaceV2 DXE Service instead of AddMemorySpace
+ SetMemorySpaceAttributes.

Signed-off-by: Oliver Smith-Denny <osde@microsoft.com>
This updates KvmtoolRtcFdtClientLib to use the new
AddMemorySpaceV2 DXE Service instead of AddMemorySpace
+ SetMemorySpaceAttributes.

Signed-off-by: Oliver Smith-Denny <osde@microsoft.com>
This updates various modules in OvmfPkg to use the new
AddMemorySpaceV2 DXE Service instead of AddMemorySpace
+ SetMemorySpaceAttributes.

Signed-off-by: Oliver Smith-Denny <osde@microsoft.com>
@os-d os-d force-pushed the GI11627_addmemoryspacev2 branch from 81b234a to aed7f33 Compare October 16, 2025 21:45
@github-actions
Copy link
Copy Markdown

This PR has been automatically marked as stale because it has not had activity in 60 days. It will be closed if no further activity occurs within 7 days. Thank you for your contributions.

@github-actions github-actions Bot added the stale Due to lack of updates, this item is pending deletion. label Dec 15, 2025
@github-actions
Copy link
Copy Markdown

This pull request has been automatically been closed because it did not have any activity in 60 days and no follow up within 7 days after being marked stale. Thank you for your contributions.

@github-actions github-actions Bot closed this Dec 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

stale Due to lack of updates, this item is pending deletion.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Code First]: Add DXE_SERVICES.EFI_ADD_MEMORY_SPACEV2

1 participant