[FEATURE] Describe fixed PCI assignments in the original platform handover #14

Open
opened 2026-11-13 16:52:27 +01:00 by erikinkinen · 0 comments
Owner

Problem and motivation

Native DeviceFrame loans need the original device-resource backing. Configuration access, BAR coordinates and firmware resource descriptions cannot supply that owner.

Proposed behavior and scope

Capture actual firmware-assigned root-bridge, function and BAR resources while UEFI protocols remain live. Transfer the retained assignment ledger through the original successful platform takeover. Add a known BootKernel 2.4 extension with bounded root/function/window/BAR tables and original device-path data; retain the exact standard configuration header once per function.

Logical UEFI BAR numbers remain distinct from configuration dword slots. Preserve both CPU and PCI spans, raw translations and the specific provider convention. The initial mode keeps fixed assignments; relocation and DMA isolation are separate work.

Authority, security and reliability

The source is the actual one-shot platform takeover, scoped by original assigned allocations and real parent occupations. Safe decoding creates only descriptions. A bridge aperture is routing scope, not a child allocation grant. Parent identity must agree with original firmware association and actual bridge routing; ambiguous ancestry does not broaden scope.

Exclude RAM, runtime images, boot sources, stacks, tables, APIC and independent firmware/device occupations. Framebuffer overlap needs a genuine same-origin relationship. Retain owners through failure and uncertain cleanup; after an attempted firmware exit, unrecoverable failure must not return to firmware. Every directly exposed page requires authority for all of its bytes.

Acceptance criteria

  • Add the exact known 2.4/critical-flag matrix while retaining known 2.1/2.2/2.3 decoding.
  • Decode bounded root/function/window/BAR tables and original device-path data without allocation, pointer traversal or fixed topology ceilings.
  • Preserve logical BAR/config-slot identity, both address domains and original raw configuration/provider fields as data.
  • Validate counted extents, reserved fields and canonical table associations; reject overlap, overflow and unknown formats before exposing a view.
  • Preflight encoding before mutation and cover literal unaligned, malformed, empty and large-table fixtures.
  • Update component documentation and the manual. Real platform-source construction and native mapping/revocation acceptance belong to the coordinated producer and Kernel consumer.

Alternatives and tradeoffs

Inferring ownership from BAR reads or memory-kind labels would bypass the original source. UEFI section 7 supplies the actual platform-management transition; PCI descriptions delimit existing assignments. The precise UEFI provider’s translation definition must be preserved rather than inferred from generic ACPI semantics. Unknown firmware ancestry or translation remains closed until supported explicitly.

Tracking and rollout

Coordinates Kernel #145. Builds on the loaded-runtime-image handover and its partial-exit custody. The codec, actual producer and original native consumer must be introduced together before opening DeviceFrame construction.

Primary contracts: UEFI boot services and UEFI PCI support.

## Problem and motivation Native DeviceFrame loans need the original device-resource backing. Configuration access, BAR coordinates and firmware resource descriptions cannot supply that owner. ## Proposed behavior and scope Capture actual firmware-assigned root-bridge, function and BAR resources while UEFI protocols remain live. Transfer the retained assignment ledger through the original successful platform takeover. Add a known BootKernel 2.4 extension with bounded root/function/window/BAR tables and original device-path data; retain the exact standard configuration header once per function. Logical UEFI BAR numbers remain distinct from configuration dword slots. Preserve both CPU and PCI spans, raw translations and the specific provider convention. The initial mode keeps fixed assignments; relocation and DMA isolation are separate work. ## Authority, security and reliability The source is the actual one-shot platform takeover, scoped by original assigned allocations and real parent occupations. Safe decoding creates only descriptions. A bridge aperture is routing scope, not a child allocation grant. Parent identity must agree with original firmware association and actual bridge routing; ambiguous ancestry does not broaden scope. Exclude RAM, runtime images, boot sources, stacks, tables, APIC and independent firmware/device occupations. Framebuffer overlap needs a genuine same-origin relationship. Retain owners through failure and uncertain cleanup; after an attempted firmware exit, unrecoverable failure must not return to firmware. Every directly exposed page requires authority for all of its bytes. ## Acceptance criteria - [ ] Add the exact known 2.4/critical-flag matrix while retaining known 2.1/2.2/2.3 decoding. - [ ] Decode bounded root/function/window/BAR tables and original device-path data without allocation, pointer traversal or fixed topology ceilings. - [ ] Preserve logical BAR/config-slot identity, both address domains and original raw configuration/provider fields as data. - [ ] Validate counted extents, reserved fields and canonical table associations; reject overlap, overflow and unknown formats before exposing a view. - [ ] Preflight encoding before mutation and cover literal unaligned, malformed, empty and large-table fixtures. - [ ] Update component documentation and the manual. Real platform-source construction and native mapping/revocation acceptance belong to the coordinated producer and Kernel consumer. ## Alternatives and tradeoffs Inferring ownership from BAR reads or memory-kind labels would bypass the original source. UEFI section 7 supplies the actual platform-management transition; PCI descriptions delimit existing assignments. The precise UEFI provider’s translation definition must be preserved rather than inferred from generic ACPI semantics. Unknown firmware ancestry or translation remains closed until supported explicitly. ## Tracking and rollout Coordinates [Kernel #145](https://git.erikinkinen.fi/erix/kernel/issues/145). Builds on the loaded-runtime-image handover and its partial-exit custody. The codec, actual producer and original native consumer must be introduced together before opening DeviceFrame construction. Primary contracts: [UEFI boot services](https://uefi.org/specs/UEFI/2.10/07_Services_Boot_Services.html) and [UEFI PCI support](https://uefi.org/specs/UEFI/2.10/14_Protocols_PCI_Bus_Support.html).
erikinkinen added this to the Alpha 1 milestone 2026-11-13 16:52:27 +01:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
erix/lib-handoff#14
No description provided.