feat(boot): reconnect only storage for filesystem drivers (#130)

Add a provides field to drivers, either any or filesystems. When every
driver only provides filesystems, only disk and partition controllers
are reconnected.
This commit is contained in:
alex authored and GitHub committed 2026-10-16 12:33:35 -07:00
1 parent fe068c5f00
commit 86b7a6e5a5
3 files changed
+79 -18

No files matched your search

+17
View File
@@ -10,4 +10,21 @@ pub struct DriverDeclaration {
/// The filesystem path to the driver.
/// This file should be an EFI executable that can be located and executed.
pub path: String,
/// What the driver provides.
/// This decides which controllers are reconnected after the drivers are loaded.
#[serde(default)]
pub provides: DriverProvides,
}
/// What a driver provides to the firmware.
#[derive(Serialize, Deserialize, Debug, Default, Clone, Copy, PartialEq, Eq)]
pub enum DriverProvides {
/// The driver can provide anything, so every controller is reconnected.
#[default]
#[serde(rename = "any")]
Any,
/// The driver only provides filesystem or disk support,
/// so only the controllers that are disks or partitions are reconnected.
#[serde(rename = "filesystems")]
Filesystems,
}