Skip to content

Conversation

@michaelescue
Copy link
Contributor

Description

Bootup fails when an endpoint requests I/O space BARs and the Root Bridge does not support I/O space causing a resource conflict during bus enumeration. While I/O space is traditionally supported in x86_64, platforms using an Arm architecture may or may not support I/O space.

This change adds logic allowing the platform to detect I/O space support for each Root Bridge and prevent submission of the required I/O resources for allocation when unsupported. Endpoints will not receive I/O resources, but they will continue to receive Memory BAR resources.

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

How This Was Tested

  • Boot on ARM64 platform with a mix of PCIe endpoints that request and do not request I/O Space BARs.

Integration Instructions

  • N/A

Copy link
Member

@ardbiesheuvel ardbiesheuvel left a comment

Choose a reason for hiding this comment

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

This looks like a reasonable workaround to me - it is a bit of a hack, but it gets rid of the system-wide PCD, and takes the properties of the individual root bridges into account.

The only thing missing here is a DEBUG() that explains that I/O resources are being disregarded because the I/O aperture is missing entirely.

@michaelescue michaelescue force-pushed the cond_submit_iospace_res branch from 4f069fa to 15d6526 Compare November 20, 2025 23:42
@josephoresko
Copy link

Looks good to me.

@michaelescue
Copy link
Contributor Author

@ardbiesheuvel, @mdkinney,
Thanks for the feedback!

The only thing missing here is a DEBUG() that explains that I/O resources are being disregarded because the I/O aperture is missing entirely.

I've added the debug print statement as requested.

Could also keep the line unconditionally sets Status to ResSubmitted, and then set to ResNone if the Root Bridge does not support the requested Type.

I agree with this and have made the necessary change.

@michaelescue michaelescue force-pushed the cond_submit_iospace_res branch 2 times, most recently from ddacf52 to 4cf7b3c Compare November 21, 2025 01:06
@michaelescue
Copy link
Contributor Author

Corrected spelling errors and capitalization.

Bootup fails when an endpoint requests I/O space BARs and the
Root Bridge does not support I/O space causing a resource conflict
during bus enumeration. While I/O space is traditionally supported
in x86_64, platforms using an Arm architecture may or may not
support I/O space.

This change adds logic allowing the platform to detect I/O space
support for each Root Bridge and prevent submission of the required
I/O resources for allocation when unsupported. Endpoints will not
receive I/O resources, but they will continue to receive Memory
BAR resources.

Signed-off-by: Michael Escue <[email protected]>
Reviewed-by: Joseph Oresko <[email protected]>
@ardbiesheuvel ardbiesheuvel force-pushed the cond_submit_iospace_res branch from 4cf7b3c to 0162968 Compare November 21, 2025 11:37
@ardbiesheuvel ardbiesheuvel added the push Auto push patch series in PR if all checks pass label Nov 21, 2025
@mergify mergify bot added the queued label Nov 21, 2025
@ardbiesheuvel ardbiesheuvel merged commit a057414 into tianocore:master Nov 21, 2025
115 of 116 checks passed
@mergify
Copy link

mergify bot commented Nov 21, 2025

This pull request has been removed from the queue for the following reason: pull request branch update failed.

The pull request can't be updated

For security reasons, Mergify can't update this pull request. Try updating locally.
GitHub response: user doesn't have permission to update head repository.

You should update or rebase your pull request manually. If you do, this pull request will automatically be requeued once the queue conditions match again.
If you think this was a flaky issue, you can requeue the pull request, without updating it, by posting a @mergifyio requeue comment.

@mergify mergify bot added dequeued and removed queued labels Nov 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dequeued push Auto push patch series in PR if all checks pass

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants