Skip to content

Wire static boot-partition + main-OS device paths via PeiPatinaConfigLib HOB #96

@kat-perez

Description

@kat-perez

Follow-up to #83. The orchestration integration is complete and boots Windows end-to-end on Maa hardware via runtime helpers::discover_boot_options, but #83 step 2 originally specified static device paths flowing through platform PCDs / config HOBs via MsSurfaceCorePkg/Library/PeiPatinaConfigLib. That's still ahead.

Why this matters

  • Boot partition path must be static + known at platform-init time so patina_sre::SreBootManager can write-lock the correct NVMe Boot Partition (currently a log::warn! stub pending Add partition write-lock helper to patina-boot #61's patina_boot::partition::lock_partition_write).
  • Main OS path could rely on discover_boot_options indefinitely, but a hardcoded fallback ensures recovery flows when EFI Boot#### variables are corrupted / missing / cleared.

Scope

  1. Define a PATINA_SRE_CONFIG_HOB struct (C side) in MsSurfaceCorePkg/Include/Guid/PatinaSreConfig.h with: GUID + two EFI_DEVICE_PATH_PROTOCOL slots (boot_partition_path, main_os_path).
  2. Extend MsSurfaceCorePkg/Library/PeiPatinaConfigLib/PeiPatinaConfigLib.c with PublishPatinaSreConfigHob().
  3. Add a matching Rust HOB struct + parser in patina_sre (or a new platform-config submodule). Pattern follows PATINA_PERFORMANCE_CONFIG_HOB / PerformanceConfigurationProvider.
  4. Add a Patina component in patina_sre that consumes the HOB at boot, constructs SreBootManager with the static paths, and registers it via BootDispatcher.
  5. Update surface_patina_intel/patina_bin/bin/patina_x64.rs to register the new HOB-consuming component (replaces today's hardcoded EndEntire placeholders).

Open design questions

  • Boot-partition path syntax — NVMe BPs are a controller-level concept (not a namespace partition). The EFI device-path encoding for an NVMe BP target isn't standard. Options: a Surface-vendor-specific path node, or pass the NVMe controller path + a separate "bank ID" PCD.
  • Path source — hardcoded byte literal in C, OR build from PCDs at runtime (PCI bus/dev/fn + GPT GUID + file-path components)? The latter is more flexible across SKUs.

Out of scope

Refs

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions