Booting Windows 7 on Pure UEFI Without CSM: Principles and Practice

    This article explains why Windows 7 loses display output on pure UEFI systems that have removed the Compatibility Support Module (CSM), and how to fix it. It covers platform classes (Class 2 vs. Class 3), where the boot chain breaks due to the missing INT 10h interface, two categories of compatibility-layer approaches (a lightweight display shim versus a full boot-chain loader), and practical steps for building, placing, booting, and verifying the layer. It also addresses Secure Boot signing, security boundaries, maintainability, rollback, a troubleshooting checklist, and building a validation environment in the cloud. Readers will learn that the core issue is a missing runtime interface rather than an installation method, and how to choose the right fix based on their environment.

    1. The Conclusion First

    Before discussing “how to boot,” we need to define the capability boundaries clearly. Otherwise, it is easy to burn a lot of time heading in the wrong direction.

    • The 64-bit version of Windows 7 has native UEFI boot capability. This is backed by public deployment documentation, dual-boot media (containing both BIOS and UEFI boot files), and early real-machine demonstrations. There is no dispute about this.
    • What it truly cannot do is produce graphical output on a machine that has completely removed the Compatibility Support Module (CSM)—in other words, “light up the screen.”
    • Therefore, there is only one viable workaround: supply the 16-bit display service interface on the OS kernel’s behalf before the kernel takes over the display.
    • Also note the architecture constraint: only the 64-bit version of Windows 7 remains realistically usable; 32-bit UEFI support has essentially disappeared on modern hardware.

    Stated more technically: Windows 7 cannot boot from a Class 3 platform, but it can boot from a Class 2 platform. To boot on Class 3, you must supply the INT 10h graphics display interface yourself.

    2. Why Pure UEFI Leaves Win7 Without a Picture

    2.1 Platform Classification: The Line Between Class 2 and Class 3

    The industry generally divides platforms into two categories based on whether the firmware still provides legacy services:

    • Class 2: The firmware retains CSM, can load 16-bit option ROMs (OpROMs), and still provides real-mode interrupt services such as INT 10h (display), INT 13h (disk), and INT 19h (boot).
    • Class 3: The firmware no longer dispatches 16-bit OpROMs at all; the interrupt services above all disappear, and booting is reduced to “loading a .efi executable from a fixed path in a FAT-formatted EFI System Partition.”

    The Windows 7 boot chain still calls real-mode interrupts in its early stages to perform text output and graphics mode switching. On Class 2, these calls are handled by the firmware; on Class 3, no one answers them, so the behavior appears as boot progressing normally while the screen stays blank.

    2.2 Where the Break Occurs in the Call Chain

    The boot process can be abstracted into several stages: firmware initialization → load bootloader → load kernel and drivers → display driver takes over. The break occurs right before the third stage: both the bootloader and the early kernel assume INT 10h is available, but the firmware no longer provides it. Understanding this makes it clear that the fix must happen “before control is handed to the operating system.”

    2.3 Common Misconceptions

    • Misconception one: assuming it is a graphics card driver problem. In fact, the graphics driver has not loaded yet at this point; the problem is at the firmware service layer.
    • Misconception two: assuming that changing the installation media will solve it. The media is just a carrier; what is missing is a runtime interface.
    • Misconception three: assuming enabling CSM is an equivalent solution. Enabling CSM means it is no longer a pure UEFI scenario, and it also conflicts with the reality that many new platforms have “completely removed that option.”

    3. Two Categories of General Compatibility-Layer Approaches

    There are currently two reusable implementation paths in the industry. Their shared goal is to provide a working display-service stand-in during the boot phase.

    3.1 Option A: Lightweight Display Shim (VgaShim-style approach)

    The core idea is to build a minimal UEFI driver that hooks onto the graphics output protocol when the firmware enumerates the graphics card, and externally emulates the semantics required by legacy display services: setting the mode, outputting characters, and querying status. It does not aim for a complete implementation; it only covers the few operations actually called during boot.

    Pseudocode illustration:

    1. // Hook the graphics output protocol in the UEFI driver entry point
    2. EFI_STATUS EFIAPI DriverEntry(EFI_HANDLE ImageHandle, EFI_SYSTEM_TABLE *ST) {
    3. return gBS->HandleProtocol(ImageHandle, &gEfiDriverBindingProtocolGuid, NULL);
    4. }
    5. // Intercept mode-set requests and map them to the native graphics output protocol
    6. EFI_STATUS SetModeCompat(IN UINTN Col, IN UINTN Row) {
    7. return gST->ConOut->SetMode(gST->ConOut, EfiConsoleTextModeCustom);
    8. }

    Advantages: small implementation size, few dependencies, predictable behavior. Limitation: narrow coverage, and unexpected calls may still require fine-tuning.

    3.2 Option B: Full Boot-Chain Loader (UefiSeven-style approach)

    This kind of solution does more than supply display; it also takes over the entire boot flow: parsing disk partitions itself, loading the kernel, preparing boot parameters, and continuously providing display services throughout. It is essentially “rewriting the bootloader once, in a UEFI-native way.”

    Advantages: it also covers problems beyond display (such as missing disk services). Cost: high complexity, high debugging cost, and it requires strict alignment with the boot protocol of the specific system version.

    3.3 Selection Guidance

    • Only display is missing and everything else works: prefer Option A.
    • Disk/boot services are also missing, or deep customization is needed: consider Option B.
    • Either way, you must lock in a 64-bit target system and confirm the firmware version and graphics card initialization behavior.

    4. Practical Steps

    4.1 Preparation

    1. Confirm the platform is indeed Class 3: there are no compatibility-related options anywhere in the firmware settings.
    2. Prepare 64-bit installation media and confirm it contains an EFI boot directory.
    3. Disable Secure Boot, or complete signing yourself in a controlled environment (see Section 5).

    4.2 Build and Place the Compatibility Layer

    1. Compile the .efi file according to Option A or B.
    2. Place it in the boot directory of the EFI System Partition, named as the filename recognized by the firmware’s default fallback path, or modify the boot entry to point to that file.
    3. Keep the file path on a FAT partition with a directory hierarchy as flat as possible to avoid unnecessary load failures.

    Directory structure illustration:

    1. /EFI
    2. /BOOT
    3. BOOTX64.EFI <- compatibility layer or boot-chain loader program
    4. /Microsoft
    5. /Boot
    6. bootmgfw.efi <- original bootloader

    4.3 Boot and Verify

    1. After power-on, observe whether text output appears; if there is no output, first check whether the compatibility layer was loaded.
    2. After entering the system, check the display resolution and Device Manager status to confirm the display service has been handed over smoothly to the system driver.
    3. If it goes black midway, record the stage at which the black screen occurs, to determine whether it is a mode switch or a protocol-hook failure.

    5. Signing, Security, and Maintainability

    • Secure Boot: an unsigned .efi will be rejected when Secure Boot is enabled; you need to establish your own signing chain or temporarily disable the feature, and be clear about the security impact.
    • Privilege boundary: the compatibility layer runs in the high-privilege phase between firmware and system; be sure to minimize the implementation surface and avoid introducing input-handling logic that could be exploited.
    • Maintainability: decouple the compatibility layer from the system boot files, so that on system updates you only need to replace the bootloader without rebuilding the compatibility layer.
    • Rollback: keep a copy of the original boot files so you can quickly recover if problems arise.

    6. Troubleshooting Checklist

    Symptom Possible Cause Direction
    No output at all Compatibility layer not loaded Check path, filename, boot entry
    Text but no graphics Mode setting not mapped Complete the SetMode semantics
    Fails on load Signature or architecture mismatch Disable Secure Boot, confirm 64-bit
    Garbled screen after system boot Abnormal display-service handover Adjust handover timing and driver load order

    7. Rebuilding and Validating in the Cloud

    If you lack a physical Class 3 machine, you can build a validation environment using general cloud capabilities: use bare-metal or instance types that support custom firmware configuration to simulate a no-CSM platform, use object storage to distribute images and compatibility-layer files, use a logging service to collect boot logs, and use monitoring alerts to track validation task status. The general-category capabilities offered by platforms such as Baidu AI Cloud are enough to cover this “build–distribute–validate–observe” loop, without relying on any specific proprietary interface.

    8. Summary

    The essence of booting Windows 7 on pure UEFI is not an “installation method” problem but a “missing runtime interface” problem. Supply INT 10h before the OS takes over, and the path is clear: a lightweight shim suits a single gap, while full takeover suits complex environments. Master the three things—platform classification, break location, and signing constraints—and the vast majority of failures can be quickly located.