设置 | 登录 | 注册

作者共发了1篇帖子。

@窄口牛_山西太原 這個軟件很不錯啊,支持UEFI引導XP系統了

1楼 巨大八爪鱼 2025-5-21 16:28
窄口牛_山西太原♂ 6:13:44
https://github.com/FlyGoat/csmwrap

窄口牛_山西太原♂ 6:15:48
CSMWrap

CSMWrap is a cool little hack that brings back the good old PC BIOS on those fancy-pants UEFI-only systems. It utilises the CSM (Compatibility Support Module) and VESA VBIOS from SeaBIOS Project to emulate a legacy BIOS environment.
CSMWrap 是一個很酷的小技巧,它可以在那些花哨的純 UEFI 系統上恢復了舊的 PC BIOS。它利用 SeaBIOS Project 的 CSM(兼容性支持模塊)和 VESA VBIOS 來模擬傳統的 BIOS 環境。
Current Status

Right now, CSMWrap can: 現在,CSMWrap 可以:

    Boot FreeDOS, Windows XP, and Windows 7 in QEMU (both q35 and piix4 machines)
    在 QEMU 中啟動 FreeDOS、Windows XP 和 Windows 7(q35 和 piix4 機器)
    Run on some real hardware too! (Your mileage may vary)
    也可以在一些真實的硬件上運行!(您的里程可能會有所不同)

Implementation Details 實現細節

CSMWrap works by: CSMWrap 的工作原理是:

    Unlocking the legacy BIOS memory region (0xC0000-0xFFFFF)
    解鎖傳統 BIOS 內存區域 (0xC0000-0xFFFFF)
    Loading the SeaBIOS CSM module into memory
    將 SeaBIOS CSM 模塊加載到內存中
    Configuring memory mapping for legacy applications
    為傳統應用程式配置內存映射
    Setting up VGA BIOS with information from EFI GOP
    使用 EFI GOP 提供的信息設置 VGA BIOS
    Building an E820 memory map based on EFI memory map
    基於 EFI 內存映射構建 E820 內存映射
    Providing essential compatibility tables (ACPI, SMBIOS)
    提供基本兼容性表 (ACPI、SMBIOS)
    Initializing the CSM module and legacy services
    初始化 CSM 模塊和傳統服務
    Transferring control to the legacy boot process
    將控制權轉移到傳統引導進程

How to Use 如何使用

Simply use csmwarp.efi as your bootloader, you can place it in your EFI partition and boot from it. Remember to disable Secure Boot, and Above 4G Decoding in your BIOS/UEFI settings.
只需使用 csmwarp.efi 作為 bootloader,您就可以將其放在 EFI 分區中並從中啟動。請記住在 BIOS/UEFI 設置中禁用安全啟動和 4G 以上解碼。
Limitations
Above 4G Decoding 4G 解碼以上

It is almost required to run CSMWrap with above 4G decoding disabled in your BIOS/UEFI. As UEFI firmwares are likely to place GPU's VRAM BAR above 4G, and legacy BIOS are 32bit which means it can only access the first 4G of memory.
在 BIOS/UEFI 中禁用上述 4G 解碼的情況下運行 CSMWrap 幾乎是必需的。由於 UEFI 固件可能會將 GPU 的 VRAM BAR 置於 4G 以上,而舊版 BIOS 是 32 位的,這意味着它只能訪問前 4G 內存。
Legacy Region Unlocking 舊版區域解鎖

Currently csmwrap relies on EFI_LEGACY_REGION2_PROTOCOL to enable writing to the legacy region. This is not available on all systems. For system that do not support this protocol, csmwrap will attempt to use PAM registers in chipset to perform decoding, which is not guaranteed to work.
目前,csmwrap 依賴 EFI_LEGACY_REGION2_PROTOCOL 來啟用對舊版區域的寫入。這並非在所有系統上都可用。對於不支持此協議的系統,csmwrap 將嘗試使用晶片組中的 PAM 寄存器進行解碼,但不能保證有效。
Windows Video Modesetting Issues Windows 視頻模式設置問題

Windows XP/7's video modesetting logic is a bit mysterious. It may try to set a incompatible mode using int10h, which will cause flickering or even black screen after transferring control to the legacy OS.
Windows XP/7 的視頻模式設置邏輯有點神秘。它可能會嘗試使用 int10h 設置不兼容模式,這將導致控制權轉移到舊版作系統後閃爍甚至黑屏。

This is a known issue and may be fixed in the future.
這是一個已知問題,將來可能會修復。

Meanwhile you can try to inject the GPU driver to OS image to avoid using the VESA BIOS.
同時,您可以嘗試將 GPU 驅動程序注入作系統鏡像,以避免使用 VESA BIOS。
Credits

    SeaBIOS for the CSM module and VESA VBIOS
    用於 CSM 模塊和 VESA VBIOS 的 SeaBIOS
    Nyu-EFI for EFI C runtime, build system, and headers
    Nyu-EFI 用於 EFI C 運行時、構建系統和頭文件
    EDK2 for code snippets
    EDK2 用於代碼片段
    @CanonKong for test feedback and general knowledge
    測試反饋和常識@CanonKong

内容转换:

回复帖子
内容:
用户名: 您目前是匿名发表。
验证码:
看不清?换一张
©2010-2025 Purasbar Ver3.0 [手机版] [桌面版]
除非另有声明,本站采用知识共享署名-相同方式共享 3.0 Unported许可协议进行许可。