Skip to content

[feature/patina-boot] patina_boot: Implement full console discovery#1375

Merged
kat-perez merged 1 commit intoOpenDevicePartnership:feature/patina-bootfrom
kat-perez:console-discovery
Mar 17, 2026
Merged

[feature/patina-boot] patina_boot: Implement full console discovery#1375
kat-perez merged 1 commit intoOpenDevicePartnership:feature/patina-bootfrom
kat-perez:console-discovery

Conversation

@kat-perez
Copy link
Copy Markdown
Contributor

@kat-perez kat-perez commented Mar 6, 2026

Description

Rewrite discover_console_devices() from a stub into a full implementation that enumerates console protocol handles, builds multi-instance device paths, and writes ConIn, ConOut, and ErrOut UEFI global variables via SetVariable.

  • Adds EFI_GLOBAL_VARIABLE GUID to patina::guids
  • Adds build_multi_instance_device_path() helper for constructing multi-instance device paths from protocol handles
  • Updates is_partial_device_path() to recognize FV/FvFile paths as non-partial
  • Includes get_variable readback verification with device path display logging

Depends on #1333. Closes #1230

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

How This Was Tested

Verified on QEMU Q35 with VGA enabled. Console variables written and read back successfully:

  • ConIn: 24 bytes (SimpleTextInput)
  • ConOut: 60 bytes (SimpleTextOutput + GOP)
  • ErrOut: 30 bytes (SimpleTextOutput)

Integration Instructions

N/A

@patina-automation
Copy link
Copy Markdown
Contributor

patina-automation Bot commented Mar 6, 2026

QEMU Validation Failed

QEMU validation did not complete successfully or did not shutdown as expected.

Workflow run: https://github.com/OpenDevicePartnership/patina/actions/runs/23162060534

Job Results

Job Result
Gather Incoming PR Metadata
Run Patina QEMU Validation / Preflight Checks
Run Patina QEMU Validation / Post In-Progress Notification
Run Patina QEMU Validation / Get Constants / Get Repository Constants
Run Patina QEMU Validation / Validate QEMU Q35 (Windows)
Run Patina QEMU Validation / Validate QEMU - SBSA (Linux)
Run Patina QEMU Validation / Validate QEMU - Q35 (Linux)
Run Patina QEMU Validation / Emit PR Metadata

Error Details

qemu-validation-logs-Linux-SBSA/sbsa-linux.log (4 error/warning sections)
warning: patch `patina_boot v20.1.1 (/__w/patina/patina/components/patina_boot)` was not used in the crate graph
help: Check that the patched package version and available features are compatible

warning: patch `patina_boot v20.1.1 (/__w/patina/patina/components/patina_boot)` was not used in the crate graph
help: Check that the patched package version and available features are compatible

warning: patch `patina_boot v20.1.1 (/__w/patina/patina/components/patina_boot)` was not used in the crate graph
help: Check that the patched package version and available features are compatible

warning: patch `patina_boot v20.1.1 (/__w/patina/patina/components/patina_boot)` was not used in the crate graph
help: Check that the patched package version and available features are compatible

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

@codecov
Copy link
Copy Markdown

codecov Bot commented Mar 6, 2026

Codecov Report

❌ Patch coverage is 96.97885% with 10 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
components/patina_boot/src/helpers.rs 96.89% 10 Missing ⚠️

📢 Thoughts on this report? Let us know!

@kat-perez kat-perez force-pushed the console-discovery branch from 9554b32 to 9ff54bf Compare March 6, 2026 17:27
@kat-perez kat-perez changed the title patina_boot: Implement full console discovery [feature/patina-boot] patina_boot: Implement full console discovery Mar 6, 2026
@kat-perez kat-perez force-pushed the console-discovery branch from 9ff54bf to c03b1c4 Compare March 6, 2026 17:32
@kat-perez kat-perez changed the base branch from main to feature/patina-boot March 6, 2026 17:34
@kat-perez kat-perez force-pushed the feature/patina-boot branch from 0b98841 to b635499 Compare March 6, 2026 18:37
@kat-perez kat-perez force-pushed the console-discovery branch from c03b1c4 to d1e70cf Compare March 6, 2026 18:56
@kat-perez kat-perez marked this pull request as ready for review March 6, 2026 19:07
@makubacki
Copy link
Copy Markdown
Collaborator

@kat-perez, should #1230 be linked to this PR?

@kat-perez
Copy link
Copy Markdown
Contributor Author

@kat-perez, should #1230 be linked to this PR?

yes, that's the issue I was working on

@makubacki makubacki linked an issue Mar 9, 2026 that may be closed by this pull request
Comment thread components/patina_boot/src/helpers.rs Outdated
Comment thread components/patina_boot/src/helpers.rs Outdated
Comment thread components/patina_boot/src/helpers.rs Outdated
Comment thread components/patina_boot/src/helpers.rs Outdated
@kat-perez kat-perez force-pushed the console-discovery branch 3 times, most recently from 7095a88 to 8098a4b Compare March 10, 2026 15:38
@kat-perez kat-perez requested a review from os-d March 10, 2026 15:41
Comment thread components/patina_boot/src/helpers.rs Outdated
Comment thread components/patina_boot/src/helpers.rs
Comment thread components/patina_boot/src/helpers.rs Outdated
Comment thread components/patina_boot/src/helpers.rs Outdated
@kat-perez kat-perez force-pushed the console-discovery branch 6 times, most recently from 65e789e to 96beb64 Compare March 16, 2026 18:18
Rewrite discover_console_devices() to enumerate console protocol handles,
build multi-instance device paths, and write ConIn/ConOut/ErrOut UEFI
global variables. Adds EFI_GLOBAL_VARIABLE GUID and is_partial_device_path
fix for FV/FvFile paths.
@kat-perez kat-perez merged commit 65c2d6a into OpenDevicePartnership:feature/patina-boot Mar 17, 2026
9 checks passed
kat-perez added a commit that referenced this pull request Mar 24, 2026
…1375)

## Description

Rewrite `discover_console_devices()` from a stub into a full
implementation that enumerates console protocol handles, builds
multi-instance device paths, and writes `ConIn`, `ConOut`, and `ErrOut`
UEFI global variables via `SetVariable`.

- Adds `EFI_GLOBAL_VARIABLE` GUID to `patina::guids`
- Adds `build_multi_instance_device_path()` helper for constructing
multi-instance device paths from protocol handles
- Updates `is_partial_device_path()` to recognize FV/FvFile paths as
non-partial
- Includes get_variable readback verification with device path display
logging

Depends on #1333. Closes #1230

- [x] Impacts functionality?
- [ ] Impacts security?
- [ ] Breaking change?
- [ ] Includes tests?
- [ ] Includes documentation?

## How This Was Tested

Verified on QEMU Q35 with VGA enabled. Console variables written and
read back successfully:
- ConIn: 24 bytes (SimpleTextInput)
- ConOut: 60 bytes (SimpleTextOutput + GOP)
- ErrOut: 30 bytes (SimpleTextOutput)

## Integration Instructions

N/A
kat-perez added a commit that referenced this pull request Mar 24, 2026
…1375)

## Description

Rewrite `discover_console_devices()` from a stub into a full
implementation that enumerates console protocol handles, builds
multi-instance device paths, and writes `ConIn`, `ConOut`, and `ErrOut`
UEFI global variables via `SetVariable`.

- Adds `EFI_GLOBAL_VARIABLE` GUID to `patina::guids`
- Adds `build_multi_instance_device_path()` helper for constructing
multi-instance device paths from protocol handles
- Updates `is_partial_device_path()` to recognize FV/FvFile paths as
non-partial
- Includes get_variable readback verification with device path display
logging

Depends on #1333. Closes #1230

- [x] Impacts functionality?
- [ ] Impacts security?
- [ ] Breaking change?
- [ ] Includes tests?
- [ ] Includes documentation?

## How This Was Tested

Verified on QEMU Q35 with VGA enabled. Console variables written and
read back successfully:
- ConIn: 24 bytes (SimpleTextInput)
- ConOut: 60 bytes (SimpleTextOutput + GOP)
- ErrOut: 30 bytes (SimpleTextOutput)

## Integration Instructions

N/A
kat-perez added a commit to kat-perez/patina that referenced this pull request Apr 1, 2026
…penDevicePartnership#1375)

## Description

Rewrite `discover_console_devices()` from a stub into a full
implementation that enumerates console protocol handles, builds
multi-instance device paths, and writes `ConIn`, `ConOut`, and `ErrOut`
UEFI global variables via `SetVariable`.

- Adds `EFI_GLOBAL_VARIABLE` GUID to `patina::guids`
- Adds `build_multi_instance_device_path()` helper for constructing
multi-instance device paths from protocol handles
- Updates `is_partial_device_path()` to recognize FV/FvFile paths as
non-partial
- Includes get_variable readback verification with device path display
logging

Depends on OpenDevicePartnership#1333. Closes OpenDevicePartnership#1230

- [x] Impacts functionality?
- [ ] Impacts security?
- [ ] Breaking change?
- [ ] Includes tests?
- [ ] Includes documentation?

## How This Was Tested

Verified on QEMU Q35 with VGA enabled. Console variables written and
read back successfully:
- ConIn: 24 bytes (SimpleTextInput)
- ConOut: 60 bytes (SimpleTextOutput + GOP)
- ErrOut: 30 bytes (SimpleTextOutput)

## Integration Instructions

N/A
kat-perez added a commit that referenced this pull request Apr 1, 2026
…1375)

## Description

Rewrite `discover_console_devices()` from a stub into a full
implementation that enumerates console protocol handles, builds
multi-instance device paths, and writes `ConIn`, `ConOut`, and `ErrOut`
UEFI global variables via `SetVariable`.

- Adds `EFI_GLOBAL_VARIABLE` GUID to `patina::guids`
- Adds `build_multi_instance_device_path()` helper for constructing
multi-instance device paths from protocol handles
- Updates `is_partial_device_path()` to recognize FV/FvFile paths as
non-partial
- Includes get_variable readback verification with device path display
logging

Depends on #1333. Closes #1230

- [x] Impacts functionality?
- [ ] Impacts security?
- [ ] Breaking change?
- [ ] Includes tests?
- [ ] Includes documentation?

## How This Was Tested

Verified on QEMU Q35 with VGA enabled. Console variables written and
read back successfully:
- ConIn: 24 bytes (SimpleTextInput)
- ConOut: 60 bytes (SimpleTextOutput + GOP)
- ErrOut: 30 bytes (SimpleTextOutput)

## Integration Instructions

N/A
kat-perez added a commit that referenced this pull request Apr 14, 2026
…1375)

## Description

Rewrite `discover_console_devices()` from a stub into a full
implementation that enumerates console protocol handles, builds
multi-instance device paths, and writes `ConIn`, `ConOut`, and `ErrOut`
UEFI global variables via `SetVariable`.

- Adds `EFI_GLOBAL_VARIABLE` GUID to `patina::guids`
- Adds `build_multi_instance_device_path()` helper for constructing
multi-instance device paths from protocol handles
- Updates `is_partial_device_path()` to recognize FV/FvFile paths as
non-partial
- Includes get_variable readback verification with device path display
logging

Depends on #1333. Closes #1230

- [x] Impacts functionality?
- [ ] Impacts security?
- [ ] Breaking change?
- [ ] Includes tests?
- [ ] Includes documentation?

## How This Was Tested

Verified on QEMU Q35 with VGA enabled. Console variables written and
read back successfully:
- ConIn: 24 bytes (SimpleTextInput)
- ConOut: 60 bytes (SimpleTextOutput + GOP)
- ErrOut: 30 bytes (SimpleTextOutput)

## Integration Instructions

N/A
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

3 participants