Home - FarelRA/CSMWrap GitHub Wiki

Welcome to the CSMWrap Wiki!

CSMWrap is a UEFI application designed to enable legacy BIOS booting on modern UEFI-only systems. It achieves this by leveraging the Compatibility Support Module (CSM) and VESA VBIOS components from the SeaBIOS project, effectively emulating a traditional PC BIOS environment.

This project aims to bridge the gap for users and developers who need to run operating systems or software that strictly require a legacy BIOS, on hardware that no longer provides one natively.

Features

  • Legacy BIOS Emulation: Provides INT 10h (video), INT 13h (disk), and other essential BIOS interrupts.
  • SeaBIOS CSM Integration: Utilizes a specially compiled SeaBIOS CSM (Csm16.bin) for core compatibility logic.
  • SeaVGABIOS for Video: Includes SeaVGABIOS for VESA VBE support, initialized using information from EFI GOP.
  • E820 Memory Mapping: Constructs an E820 memory map compatible with legacy OSes, derived from the UEFI memory map.
  • ACPI & SMBIOS Passthrough: Attempts to provide necessary ACPI tables (RSDP) and SMBIOS information to the legacy environment.
  • Coreboot Table Generation: Can generate a Coreboot table for payloads that might expect it.
  • Cross-Architecture Support: Builds for both IA32 (x86) and x86_64 UEFI systems.
  • Open Source: Based on Nyu-EFI, uACPI, and other open components.

Current Status

CSMWrap has been successfully tested to:

  • Boot FreeDOS.
  • Boot Windows XP and Windows 7 in QEMU (q35 and PIIX4 machine types).
  • Run on some real hardware (compatibility varies).

Navigation

Quick Start

  1. Get CSMWrap:
  2. Prepare your UEFI System:
    • Disable Secure Boot.
    • Disable Above 4G Decoding (and/or Resizable BAR/SAM). This is crucial for legacy VBIOS compatibility.
    • If your firmware has a "CSM Support" option, try disabling it first. If CSMWrap fails, you might need to enable it, but this can conflict.
  3. Boot:
    • Copy the appropriate csmwrapx64.efi or csmwrapia32.efi to your EFI System Partition (e.g., EFI/BOOT/BOOTX64.EFI or EFI/BOOT/BOOTIA32.EFI).
    • Boot from the EFI file.

For more detailed instructions, please refer to the Usage Guide and Partitioning and Boot Scenarios.


This project is a work-in-progress. While it aims to provide robust legacy support, hardware and firmware variations can impact its functionality.