Skip to content

lace-platform: Implement filesystem support, BIOS, UEFI, ext4#30

Merged
julian-klode merged 2 commits intomainfrom
filesystem
Apr 1, 2026
Merged

lace-platform: Implement filesystem support, BIOS, UEFI, ext4#30
julian-klode merged 2 commits intomainfrom
filesystem

Conversation

@kukrimate
Copy link
Copy Markdown
Member

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.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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::fs module with BlockDevice/Filesystem abstractions 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).

@kukrimate kukrimate force-pushed the filesystem branch 3 times, most recently from e6a5083 to e9c3e02 Compare April 1, 2026 15:49
@kukrimate kukrimate requested a review from Copilot April 1, 2026 15:49
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 16 out of 17 changed files in this pull request and generated 6 comments.

This is useful for writing endian dependent on-disk storage types such
as GPT parsers, etc.
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 17 out of 18 changed files in this pull request and generated 5 comments.

Copy link
Copy Markdown
Contributor

@julian-klode julian-klode left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@julian-klode julian-klode merged commit 3d79411 into main Apr 1, 2026
19 checks passed
@julian-klode julian-klode deleted the filesystem branch April 1, 2026 16:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants