Skip to content

drivers/gop: Resolve GOP child controller ownership - #2

Merged
SnowCheetos merged 1 commit into
ft/gpu-handofffrom
codex/limine-gop-child-owner
Aug 26, 2026
Merged

drivers/gop: Resolve GOP child controller ownership#2
SnowCheetos merged 1 commit into
ft/gpu-handofffrom
codex/limine-gop-child-owner

Conversation

@SnowCheetos

@SnowCheetos SnowCheetos commented Aug 26, 2026

Copy link
Copy Markdown

Summary

  • retain device-path resolution as the first GOP-to-PCI ownership proof
  • fall back to the explicit UEFI EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER relationship when firmware installs GOP on an unresolvable child handle
  • continue reporting unknown rather than guessing from framebuffer address or display class

Why

A Lunar Lake boot using the first framebuffer-source extension enumerated the exact 8086:64a0 display identity, but the source remained unknown and Kore correctly stopped at ownership note 6. On this firmware, the GOP handle does not appear to expose a device path that LocateDevicePath(EFI_PCI_IO_PROTOCOL) can resolve.

The fallback enumerates PCI I/O handles and accepts a candidate only when OpenProtocolInformation(EFI_PCI_IO_PROTOCOL) contains a BY_CHILD_CONTROLLER record whose controller handle is exactly the GOP handle. It returns unknown when that positive UEFI relationship is absent or ambiguous.

Verification

  • x86 UEFI target built with --enable-werror
  • full BIOS/UEFI multi-architecture build completed with --enable-all --enable-werror
  • git diff --check origin/ft/gpu-handoff...HEAD
  • Copilot review: no findings

The repository's “targetting trunk” policy check is expected to fail because this integration PR intentionally targets the requested ft/gpu-handoff branch. Both compilation checks are green.

Assisted-by: Codex:gpt-5.6-sol
Signed-off-by: Cass Sheng <cass@microperceptron.com>
Copilot AI lite review requested due to automatic review settings August 26, 2026 20:31

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR improves how the UEFI GOP driver determines framebuffer ownership by PCI endpoint when the GOP handle’s device path cannot be resolved to an EFI_PCI_IO_PROTOCOL provider, adding a standards-based fallback while still avoiding heuristic guesses.

Changes:

  • Refactors PCI framebuffer-source extraction into a reusable helper and returns success/failure to drive fallback behavior.
  • Adds a fallback path that uses OpenProtocolInformation() and the EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER relationship to match a GOP child handle to its owning PCI I/O controller.
  • Updates extension documentation to describe the two-step (device-path first, child-controller relationship second) ownership proof.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
EXTENSIONS.md Documents the refined GOP-to-PCI ownership resolution strategy and when “unknown” is reported.
common/drivers/gop.c Implements the child-controller relationship fallback for GOP-to-PCI ownership and refactors PCI source assignment into a helper.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@SnowCheetos SnowCheetos self-assigned this Aug 26, 2026
@SnowCheetos
SnowCheetos merged commit 613f351 into ft/gpu-handoff Aug 26, 2026
3 of 4 checks passed
@SnowCheetos
SnowCheetos deleted the codex/limine-gop-child-owner branch August 26, 2026 20:36
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.

2 participants