Skip to content

drivers/gop: Prove console framebuffer ownership via ConOut - #3

Merged
SnowCheetos merged 1 commit into
ft/gpu-handofffrom
ft/gop-conout-owner-proof
Aug 27, 2026
Merged

drivers/gop: Prove console framebuffer ownership via ConOut#3
SnowCheetos merged 1 commit into
ft/gpu-handofffrom
ft/gop-conout-owner-proof

Conversation

@SnowCheetos

Copy link
Copy Markdown

Lunar Lake firmware (Lenovo 83JT, QPCN13WW) installs GOP on a console aggregate handle: it carries no device path, and no PCI function records an EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER relation naming it. Both existing proofs therefore fail and the framebuffer's source is reported unknown, even though the firmware knows exactly which device scans it out.

For that one handle the firmware states the answer in its own ConOut variable. On this machine it reads
PciRoot(0x0)/Pci(0x2,0x0)/AcpiAdr(0x80011400), naming 00:02.0 — the Arc 130V/140V function. Add a third proof, gated on the GOP handle being exactly gST->ConsoleOutHandle, that walks that multi-instance path and resolves each instance through EFI_PCI_IO_PROTOCOL. Every instance that resolves must agree on one function; a console scanning out via two devices proves ownership of neither and stays unknown. This remains a firmware-asserted binding, not an inference from display class or framebuffer address.

LocateDevicePath stops only at an end-of-entire-path node, so an instance closed by an end-of-instance node would let it read into the next instance. The variable is read into our own buffer, so promote that node for the call and restore it after.

Also add revision 1 of the framebuffer-source extension: a per-framebuffer probe mask recording how far each proof got. Rung-level notes can then name the firmware shape that defeated attribution — no device path, a path with no PCI prefix, a ConOut naming two devices — which are indistinguishable from an unknown source alone, and are different bugs. The revision-0 prefix is unchanged, so existing readers are unaffected.

Lunar Lake firmware (Lenovo 83JT, QPCN13WW) installs GOP on a console
aggregate handle: it carries no device path, and no PCI function records an
EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER relation naming it. Both existing
proofs therefore fail and the framebuffer's source is reported unknown, even
though the firmware knows exactly which device scans it out.

For that one handle the firmware states the answer in its own ConOut
variable. On this machine it reads
PciRoot(0x0)/Pci(0x2,0x0)/AcpiAdr(0x80011400), naming 00:02.0 — the Arc
130V/140V function. Add a third proof, gated on the GOP handle being exactly
gST->ConsoleOutHandle, that walks that multi-instance path and resolves each
instance through EFI_PCI_IO_PROTOCOL. Every instance that resolves must agree
on one function; a console scanning out via two devices proves ownership of
neither and stays unknown. This remains a firmware-asserted binding, not an
inference from display class or framebuffer address.

LocateDevicePath stops only at an end-of-entire-path node, so an instance
closed by an end-of-instance node would let it read into the next instance.
The variable is read into our own buffer, so promote that node for the call
and restore it after.

Also add revision 1 of the framebuffer-source extension: a per-framebuffer
probe mask recording how far each proof got. Rung-level notes can then name
the firmware shape that defeated attribution — no device path, a path with no
PCI prefix, a ConOut naming two devices — which are indistinguishable from an
unknown source alone, and are different bugs. The revision-0 prefix is
unchanged, so existing readers are unaffected.

Signed-off-by: Cass Sheng <cass@microperceptron.com>
Copilot AI lite review requested due to automatic review settings August 27, 2026 04:31
@SnowCheetos SnowCheetos self-assigned this Aug 27, 2026
@SnowCheetos
SnowCheetos merged commit 09e7d03 into ft/gpu-handoff Aug 27, 2026
2 of 4 checks passed

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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

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