- Shell 55.6%
- C 27.1%
- Assembly 7.2%
- Makefile 6.6%
- M4 3.5%
Implement comprehensive UEFI boot protocol support for x86_64 architecture with GRUB-UEFI testing using OVMF firmware. ## Implementation Details ### Phase 1: UEFI Protocol Implementation - Added UEFI entry point (_start_uefi) in bootstrap.S - Implemented uefi_main() function for UEFI-specific initialization - Created standardized boot_info_t structure for protocol abstraction - Added comprehensive UEFI definitions in boot.h ### Phase 2: UEFI Boot Information Processing - Implemented parse_uefi_info() with placeholder memory map parsing - Added UEFI-specific data structures (system table, image handle) - Created memory region and command line processing infrastructure - Integrated with existing boot information framework ### Phase 3: Testing and Validation - Updated configure.ac with --enable-uefi and --enable-multiboot2 options - Fixed preprocessor definition ordering for proper conditional compilation - Implemented GRUB-UEFI testing with OVMF firmware in Makefile.am - Added comprehensive QEMU testing for both BIOS and UEFI boot paths ## Testing Results ✅ make qemu-test - BIOS boot via GRUB with Multiboot2 protocol ✅ make qemu-test-uefi - UEFI boot via GRUB-UEFI with OVMF firmware ✅ Both boot paths display correct protocol information ✅ Configure options work correctly for mixed protocol builds ## Technical Approach Uses GRUB in UEFI mode to load Multiboot2 kernel, providing: - Unified bootloader approach for both BIOS and UEFI - Simplified testing framework using existing ISO generation - Compatibility with OVMF firmware in QEMU - Consistent Multiboot2 protocol regardless of firmware type Task: bootstrap#4 |
||
|---|---|---|
| .kiro | ||
| arch/x86_64 | ||
| build-aux | ||
| include | ||
| kernel | ||
| lib | ||
| scripts | ||
| tests | ||
| .clang-format | ||
| .editorconfig | ||
| .gitignore | ||
| .gitmessage | ||
| .markdownlint.json | ||
| .pre-commit-config.yaml | ||
| configure.ac | ||
| grub.cfg | ||
| LICENSE.txt | ||
| Makefile.am | ||
| README.md | ||
FMI/OS - Microkernel Operating System
Overview
FMI/OS is a modern microkernel operating system designed with security, performance, and maintainability as core principles. The system implements a capabilities-based security model, spec-driven development methodology, and comprehensive testing framework to ensure reliable and secure operation.
Key Features
- Microkernel Architecture: Minimal kernel with services running in userspace
- Capabilities-Based Security: Fine-grained access control without traditional root privilege escalation
- Multi-Architecture Support: x86_64, ARM64, and RISC-V architectures
- Spec-Driven Development: Requirements-first development with property-based testing
- Git Workflow Integration: Topic branches with conventional commits and dual repository management
Building
FMI/OS uses an autoconf/automake-based build system with support for cross-compilation across multiple architectures.
Prerequisites
- GCC or Clang compiler with cross-compilation support
- GNU autotools (autoconf, automake, libtool)
- QEMU for testing (qemu-system-x86_64, qemu-system-aarch64, qemu-system-riscv64)
Build Instructions
- Configure the build system:
# For x86_64 target
./configure --target=x86_64-fmios
# For ARM64 target
./configure --target=aarch64-fmios
# For RISC-V target
./configure --target=riscv64-fmios
- Build the kernel:
make
- Run tests:
make check
- Test in QEMU:
# x86_64 testing
make qemu-test-x86_64
# ARM64 testing
make qemu-test-aarch64
# RISC-V testing
make qemu-test-riscv64
Build Configuration Options
--enable-debug- Enable debug builds with additional validation--enable-serial-console- Enable serial console support (default: yes)--enable-video-console- Enable VGA video console support (default: yes)--enable-qemu-testing- Enable QEMU smoke tests (default: yes)
Testing
FMI/OS follows a comprehensive Test-Driven Development (TDD) approach:
- Unit Tests: Test individual functions and components in isolation
- Property-Based Tests: Test universal properties across randomized inputs
- Integration Tests: Test interactions between components and subsystems
- QEMU Smoke Tests: Test kernel components in actual kernel environment
Run the complete test suite:
make check
Contributing
FMI/OS uses a spec-driven development process with Git workflow integration.
Development Workflow
- Setup Git Hooks: Install pre-commit hooks for automated validation
./scripts/setup-git-hooks.sh
- Spec-Driven Development: All features start with requirements and design specifications
- Topic Branches: Each task gets its own branch following
{spec-name}/{task-number}-{brief-description}format - Conventional Commits: All commits follow conventional commit format with task references
- Dual Repository Management: Changes are tracked in both implementation and specification repositories
Git Workflow
- Create a topic branch:
./scripts/create-topic-branch.sh <spec-name> <task-number> <description>
- Make changes with conventional commits:
git commit -m "feat(memory): implement slab allocator core functionality
Task: memory#2.1"
- Prepare for merge:
./scripts/prepare-merge.sh
- Create pull request with proper task references and acceptance criteria
Commit Message Format
All commits must follow conventional commit specification:
{type}({scope}): {description}
{optional body}
Task: {spec-name}#{task-number}
Commit Types:
feat: New feature implementationfix: Bug fixesdocs: Documentation changesstyle: Code style changes (formatting, etc.)refactor: Code refactoring without feature changestest: Adding or modifying testschore: Maintenance tasksbuild: Build system changesci: CI/CD configuration changes
Code Standards
- Security First: All code includes comprehensive security mitigations
- Standard Library Usage: Use compiler-provided functions, no custom string/memory implementations
- Thread Safety: All kernel data structures must be safe for concurrent access
- Property-Based Testing: Universal properties validated across all inputs
- Architecture Separation: Clean separation between generic and architecture-specific code
Quality Gates
All contributions must pass:
- Unit tests and property-based tests
- Code style and formatting checks
- Security vulnerability scans
- QEMU smoke tests across all architectures
- GPL v2 license header validation
- Conventional commit format validation
Architecture
FMI/OS follows a clean microkernel architecture:
- Kernel: Minimal kernel providing basic services (memory, scheduling, IPC)
- Drivers: Hardware-specific drivers in userspace
- Services: System services running as userspace processes
- Applications: User applications with restricted capabilities
Directory Structure
fmios/
├── include/ # Generic headers (architecture-neutral)
├── lib/ # Generic libraries and kernel C library
├── arch/ # Architecture-specific code
│ ├── x86_64/ # x86_64-specific implementation
│ ├── arm64/ # ARM64-specific implementation
│ └── riscv64/ # RISC-V-specific implementation
├── kernel/ # Generic kernel code
├── drivers/ # Generic driver interfaces
├── tests/ # Test suite
└── docs/ # Documentation
Documentation
- API Documentation: Generated from source code comments
- Architecture Guides: Located in
docs/directory - Development Guidelines: Located in
.kiro/steering/directory
License
This project is licensed under the GNU General Public License v2.0 - see LICENSE.txt for details.
Support
For questions, issues, or contributions:
- Follow the Git workflow for all contributions
- Ensure all quality gates pass before submitting pull requests
- Include proper task references in all commits and pull requests