Skip to content

ArmPkg: MmCommunicationDxe: Fix Comm Buffer Init#1803

Merged
os-d merged 1 commit into
microsoft:release/202511from
os-d:mmcomm_buffer_init
May 20, 2026
Merged

ArmPkg: MmCommunicationDxe: Fix Comm Buffer Init#1803
os-d merged 1 commit into
microsoft:release/202511from
os-d:mmcomm_buffer_init

Conversation

@os-d
Copy link
Copy Markdown
Contributor

@os-d os-d commented May 19, 2026

Description

Currently, MmCommunicationDxe expects the MM comm buffer to either be not added by the platform or added and allocated by the platform. However, not all platforms follow this pattern.

This commit makes the handling more generic by checking to see if a GCD descriptor exists that covers this range. If it does, the capabilities are updated as needed. If only a partial desc exists for this range, the driver will fail as that is a platform misconfiguration.

If the descriptor does not exist, the driver will add the buffer.

Then, for all successful cases, the attributes are updated on the buffer to what the driver expects them to be.

This will be taken to edk2 in parallel.

  • Impacts functionality?
  • Impacts security?
  • Breaking change?
  • Includes tests?
  • Includes documentation?

How This Was Tested

Tested on an aarch64 platform that was producing the HOB but not having it allocated. This fixed it.

Integration Instructions

Platforms must either not produce a resource descriptor HOB for the MM Communicate Buffer or must produce a HOB fully covering the region.

@os-d os-d requested review from apop5, cfernald, kuqin12 and makubacki May 19, 2026 22:37
@mu-automation
Copy link
Copy Markdown
Contributor

mu-automation Bot commented May 19, 2026

⏩ QEMU Validation Skipped

The PR was merged before validation completed.

This comment was automatically generated by the Mu QEMU PR Validation workflow.

Comment thread ArmPkg/Drivers/MmCommunicationDxe/MmCommunication.c
@os-d os-d force-pushed the mmcomm_buffer_init branch from 1ace79e to 312cc23 Compare May 20, 2026 15:51
Comment thread ArmPkg/Drivers/MmCommunicationDxe/MmCommunication.c
Comment thread ArmPkg/Drivers/MmCommunicationDxe/MmCommunication.c
Comment thread ArmPkg/Drivers/MmCommunicationDxe/MmCommunication.c
Currently, MmCommunicationDxe expects the MM comm buffer
to either be not added by the platform or added and allocated
by the platform. However, not all platforms follow this pattern.

This commit makes the handling more generic by checking to see
if a GCD descriptor exists that covers this range. If it does,
the capabilities are updated as needed. If only a partial desc
exists for this range, the driver will fail as that is a platform
misconfiguration.

If the descriptor does not exist, the driver will add the buffer.

Then, for all successful cases, the attributes are updated on the
buffer to what the driver expects them to be.

Signed-off-by: Oliver Smith-Denny <osde@microsoft.com>
@os-d os-d force-pushed the mmcomm_buffer_init branch from 312cc23 to 04b47bc Compare May 20, 2026 16:42
@os-d
Copy link
Copy Markdown
Contributor Author

os-d commented May 20, 2026

@makubacki I addressed the current feedback and re-tested, please re-review when you have a chance.

@os-d os-d enabled auto-merge (rebase) May 20, 2026 16:46
@os-d os-d merged commit 1800e61 into microsoft:release/202511 May 20, 2026
56 checks passed
@os-d os-d deleted the mmcomm_buffer_init branch May 20, 2026 17:33
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