Skip to content

Conversation

@iamvirul
Copy link
Owner

Summary

  • Implement UEFI bootloader entry point with boot services initialization
  • Add memory map retrieval and parsing from UEFI firmware
  • Detect ACPI tables (RSDP) and GOP framebuffer information
  • Create BootInfo structure for kernel handoff
  • Add QEMU run script with OVMF support
  • Add GitHub Actions CI workflow for bootloader builds

Changes

Bootloader (boot/)

  • main.rs: UEFI entry point (efi_main) with initialization flow
  • memory.rs: Memory map parsing and region classification
  • boot_info.rs: BootInfo structure for kernel handoff
  • console.rs: Console output support for boot messages
  • .cargo/config.toml: Build configuration for x86_64-unknown-uefi target

CI/CD

  • bootloader.yml: New workflow for building and testing bootloader
  • ci.yml: Updated to include bootloader in workspace checks

Scripts

  • run-qemu.sh: QEMU runner with OVMF support for testing

Tests

  • boot_tests.rs: Unit tests for bootloader components

Test plan

  • Bootloader compiles for x86_64-unknown-uefi target
  • CI workflow validates build
  • Manual testing in QEMU with OVMF (requires local setup)

Closes #2

Implement UEFI bootloader support for Ferrous Kernel (Issue #2):

- Add UEFI entry point (efi_main) with boot services initialization
- Implement memory map retrieval and parsing from UEFI
- Add console output support for boot messages
- Detect ACPI tables (RSDP) location
- Detect GOP framebuffer information
- Create BootInfo structure for kernel handoff
- Add QEMU run script with OVMF support

The bootloader initializes UEFI services, retrieves system information
(memory map, ACPI, framebuffer), and prepares for kernel handoff.
Kernel loading will be implemented in a subsequent phase.

Closes #2
- Fix uefi crate API to use callback functions (with_stdout, with_config_table)
- Add global_allocator feature for memory allocation support
- Import MemoryMap trait for memory map iteration
- Update console, memory, and main modules for new API
- Reorder imports alphabetically (uefi::boot before uefi::prelude)
- Break long writeln! calls to meet line length requirements
@iamvirul iamvirul merged commit 006a437 into main Jan 26, 2026
20 checks passed
@iamvirul iamvirul self-assigned this Jan 26, 2026
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.

[TASK] UEFI Bootloader Integration

2 participants