lace-platform: Implement filesystem support, BIOS, UEFI, ext4#30
Merged
julian-klode merged 2 commits intomainfrom Apr 1, 2026
Merged
lace-platform: Implement filesystem support, BIOS, UEFI, ext4#30julian-klode merged 2 commits intomainfrom
julian-klode merged 2 commits intomainfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a cross-platform storage/filesystem layer to lace-platform, enabling block-device discovery and filesystem mounting across BIOS, UEFI, and mock targets, with portable GPT/MBR parsing and ext4 support.
Changes:
- Introduce
lace-platform::fsmodule withBlockDevice/Filesystemabstractions and a shared probe layer. - Add portable GPT/MBR partition parsers and an ext4 filesystem implementation (feature-gated).
- Implement platform-specific storage discovery for BIOS (INT 13h), UEFI (SimpleFileSystem + DiskIO), and mock.
Reviewed changes
Copilot reviewed 15 out of 16 changed files in this pull request and generated 21 comments.
Show a summary per file
| File | Description |
|---|---|
| lace-platform/src/mock/mod.rs | Exposes mock fs module. |
| lace-platform/src/mock/fs.rs | Mock storage discovery stubs returning empty results. |
| lace-platform/src/lib.rs | Exposes unified fs module at top level. |
| lace-platform/src/fs/mod.rs | Defines fs module layout and re-exports probe API/types. |
| lace-platform/src/fs/base.rs | Adds BlockDevice + filesystem trait model and FsError. |
| lace-platform/src/fs/probe.rs | Implements partition probing and filesystem mounting orchestration. |
| lace-platform/src/fs/gpt.rs | Adds portable GPT parsing. |
| lace-platform/src/fs/mbr.rs | Adds portable MBR/EBR parsing. |
| lace-platform/src/fs/ext4.rs | Adds ext4 implementation backed by ext4-view. |
| lace-platform/src/efi/mod.rs | Wires in UEFI fs module and re-exports fs traits/types. |
| lace-platform/src/efi/fs.rs | Implements UEFI FAT access + DiskIO-backed block device discovery. |
| lace-platform/src/bios/mod.rs | Wires in BIOS fs module and extends BIOS error type for disk errors. |
| lace-platform/src/bios/fs.rs | Implements BIOS INT 13h disk I/O + discovery + block device adapter. |
| lace-platform/Cargo.toml | Adds zerocopy and optional ext4-view; adjusts feature set. |
| Cargo.toml | Adds workspace dependency on ext4-view. |
| Cargo.lock | Records new dependency resolution (e.g., ext4-view, crc). |
julian-klode
reviewed
Apr 1, 2026
julian-klode
reviewed
Apr 1, 2026
julian-klode
reviewed
Apr 1, 2026
e6a5083 to
e9c3e02
Compare
This is useful for writing endian dependent on-disk storage types such as GPT parsers, etc.
julian-klode
approved these changes
Apr 1, 2026
Contributor
julian-klode
left a comment
There was a problem hiding this comment.
This has gone through several iterations and design reviews in meetings; I am quite happy with the outcome so far.
We need to evaluate in a future step whether the boot logic should scan the current disk only and scan others only on explicit request, and we may want further changes for that.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add a layered storage stack with portable partition mappers and filesystem drivers shared across platforms.
The BlockDevice trait provides sector-level I/O with default byte-level methods. BIOS implements this via INT 13h with internal bounce buffering; UEFI overrides the byte-level methods to use firmware DiskIO directly.
Portable GPT and MBR partition table parsers (using zerocopy) operate on any BlockDevice. The probe layer discovers platform block devices, probes partitions, and mounts ext4 filesystems. UEFI SimpleFileSystem (FAT) is registered directly from firmware.
FsError carries platform-specific I/O errors: DiskError on BIOS, uefi Status on EFI. An Invalid variant covers parse/format errors in shared code. Boot-disk-only discovery is supported on both platforms for fast boot paths.