[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-111768":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":14,"stars7d":17,"stars30d":18,"stars90d":16,"forks30d":16,"starsTrendScore":19,"compositeScore":20,"rankGlobal":10,"rankLanguage":10,"license":21,"archived":22,"fork":22,"defaultBranch":23,"hasWiki":22,"hasPages":22,"topics":24,"createdAt":10,"pushedAt":33,"updatedAt":34,"readmeContent":35,"aiSummary":36,"trendingCount":16,"starSnapshotCount":16,"syncStatus":37,"lastSyncTime":38,"discoverSource":39},111768,"ReBIOS","ReBIOS-Project\u002FReBIOS","ReBIOS-Project","Get legacy BIOS back on UEFI only systems!","",null,"C",72,3,4,19,0,12,17,15,57.51,"GNU General Public License v2.0",false,"trunk",[25,26,27,28,29,30,31,32],"bios","csm","csmwrap","efi","legacy-bios","rebios","shim","uefi","2026-11-21 08:57:54","2026-11-23 12:14:28","\u003Ch1 align=\"center\">ReBIOS\u003C\u002Fh1>\n\n\u003Cp align=\"center\">\n    \u003Ca href=\"https:\u002F\u002Fgithub.com\u002FReBIOS-Project\u002FReBIOS\u002Factions\u002Fworkflows\u002Fcheck.yml\">\u003Cimg src=\"https:\u002F\u002Fgithub.com\u002FReBIOS-Project\u002FReBIOS\u002Factions\u002Fworkflows\u002Fcheck.yml\u002Fbadge.svg\" alt=\"Build Status\">\u003C\u002Fa>\n    \u003Ca href=\"https:\u002F\u002Fdiscord.gg\u002Ft5nn4GKTcx\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fdiscord\u002F1390940493873025074?color=5865F2&label=Discord&logo=discord&logoColor=white\" alt=\"Discord\">\u003C\u002Fa>\n    \u003Ca href=\"https:\u002F\u002Fmatrix.to\u002F#\u002F#ReBIOS:matrix.org\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fmatrix\u002FReBIOS:matrix.org?label=Matrix&logo=matrix\" alt=\"Matrix\">\u003C\u002Fa>\n\u003C\u002Fp>\n\n\u003Cp align=\"center\">\n    \u003Cimg src=\"logo.svg?raw=true\" alt=\"ReBIOS logo\" title=\"ReBIOS logo\"\n         width=\"400\">\n\u003C\u002Fp>\n\nReBIOS is an EFI application designed to be a drop-in solution to enable legacy\nBIOS booting on modern UEFI-only (class 3) systems, and a drop-in replacement\nfor [CSMWrap](https:\u002F\u002Fgithub.com\u002FCSMWrap\u002FCSMWrap). It runs a Compatibility\nSupport Module (CSM) build of the [SeaBIOS project](https:\u002F\u002Fwww.seabios.org\u002F),\nand the legacy OS SeaBIOS boots, under a minimal hypervisor using Intel VT-x or\nAMD-V. The hypervisor passes the real hardware through to them, and only\nemulates what modern PCs no longer have, effectively recreating a traditional\nPC BIOS environment.\n\nLogo art by [conkkerxd](https:\u002F\u002Fgithub.com\u002Fconkkerxd).\n\n> [!CAUTION]\n> **Ventoy is not supported, and we strongly advise against using it at all.**\n> Issues and pull requests about running ReBIOS, or booting legacy OSes under\n> it, through Ventoy will be closed without being addressed. Anyone who\n> reports an issue while withholding that they use Ventoy will be banned from\n> the ReBIOS-Project organisation.\n>\n> Ventoy is a stack of hacks, and does not boot a disk image as it is. Its own\n> GRUB-based boot manager passes the image file off as a disk or a CD, by\n> hooking the BIOS's INT 13h, or on UEFI by adding a Block I\u002FO device of its\n> own and patching the firmware's boot services. Then, for OSes with drivers\n> of their own, it patches their early boot on the fly, slipping its own\n> scripts, programs, and drivers into the initramfs or the Windows PE image,\n> so that the OS finds the file again once it stops using the firmware. Each\n> kind of OS needs a hack of its own, Ventoy carrying hooks for dozens of Linux\n> distributions alone, and whatever those hacks do not foresee breaks, which is\n> Ventoy's to fix, not ReBIOS's.\n>\n> Its record on security is no better:\n>\n> - Its Secure Boot support has each computer enroll Ventoy's key, and then,\n>   in its own words, \"Ventoy default policy is fully bypass secure boot which\n>   means all EFI files can be booted without any check\"\n>   ([Ventoy's Secure Boot page](https:\u002F\u002Fwww.ventoy.net\u002Fen\u002Fdoc_secure.html)).\n> - Its source tree carries prebuilt binaries, which its releases ship as they\n>   are rather than building them from source\n>   ([#2795](https:\u002F\u002Fgithub.com\u002Fventoy\u002FVentoy\u002Fissues\u002F2795),\n>   [#3224](https:\u002F\u002Fgithub.com\u002Fventoy\u002FVentoy\u002Fissues\u002F3224)).\n> - Until version 1.1.01, on Linux it loaded a prebuilt kernel module that\n>   patched the running kernel's device mapper\n>   ([#2234](https:\u002F\u002Fgithub.com\u002Fventoy\u002FVentoy\u002Fissues\u002F2234)).\n> - Its developer's iVentoy, a mostly closed-source PXE server, made the\n>   Windows PE it boots trust a self-signed root certificate, and loaded a\n>   kernel driver signed with it that the developer had found online, until\n>   version 1.0.21\n>   ([ventoy\u002FPXE#106](https:\u002F\u002Fgithub.com\u002Fventoy\u002FPXE\u002Fissues\u002F106)).\n>\n> Give each OS a medium of its own instead: a CD or DVD, in a drive (USB ones\n> work), or a USB stick prepared for that one image, e.g. with Rufus or\n> balenaEtcher. [The ReBIOS USB stick](#the-rebios-usb-stick) boots it from\n> there.\n\n## Executive Summary\n\nThe idea is to drop ReBIOS into a `\u002FEFI\u002FBOOT\u002F` directory on a FAT (12, 16,\nor 32) partition on the medium containing the legacy BIOS OS. UEFI firmware\nwill pick this up and show the medium as a bootable device. Ideally, that's all\nthat would be needed.\n\n1. **Download:** Get the latest `rebios.efi` from the\n   [Releases page](https:\u002F\u002Fgithub.com\u002FReBIOS-Project\u002FReBIOS\u002Freleases), or build\n   it as described in [Building](#building).\n2. **Deploy:** Copy `rebios.efi` to a FAT-formatted partition as\n   `\u002FEFI\u002FBOOT\u002FBOOTX64.EFI` (the hardcoded path is needed so that the firmware\n   picks it up automatically).\n3. **Boot:** Select the UEFI boot entry for the drive onto which ReBIOS was\n   deployed.\n\nSeaBIOS then boots the legacy OS from that same drive first. It is highly\nrecommended that the partition table used is MBR (MS-DOS partition table), as\nUEFI firmwares are perfectly capable of booting off of this format, and because\nit is the most compatible with most legacy OSes one may want to boot.\n\nReBIOS only exists for 64-bit (x86-64) UEFI firmware: there is no\n`BOOTIA32.EFI`.\n\n### The ReBIOS USB stick\n\nReBIOS can also run from a USB stick of its own, which leaves the legacy OS's\ndrives as they are: they need no FAT partition for ReBIOS, which matters for\nOSes installed on other file systems, such as NTFS. The stick takes up a USB\nport while the computer runs.\n\n1. **Download:** Get the latest `rebios-usb.img` from the\n   [Releases page](https:\u002F\u002Fgithub.com\u002FReBIOS-Project\u002FReBIOS\u002Freleases), or build\n   it with `make usb` (see [Building](#building)).\n2. **Write:** Write the image to a USB stick, raw, with e.g. `dd`\n   (`dd if=rebios-usb.img of=\u002Fdev\u002FsdX bs=4M`), Rufus, or balenaEtcher. Whatever\n   the stick held is lost.\n3. **Boot:** Select the UEFI boot entry for the stick.\n\nReBIOS then boots the computer's other drives, those with something to boot\nfirst: internal drives, then CDs and DVDs, then other USB drives. The\n`boot_drive` setting in the stick's `\u002FEFI\u002FBOOT\u002Frebios.ini` names a drive\ninstead (see [Options](#options)), and SeaBIOS's boot menu, on Esc, picks any\ndrive for one boot.\n\nThe stick's partition is an EFI system partition, which legacy OSes give no\ndrive letter, so that it moves none of theirs. Linux mounts it as it does any\nFAT partition, for editing the configuration; Windows gives it a drive letter\nonly when asked to, e.g. with `diskpart`'s `assign` command.\n\n## Additional Prerequisites\n\n### Hardware\n\nReBIOS requires:\n\n1. **Hardware virtualisation:** Intel VT-x with EPT and unrestricted guest\n   support, or AMD-V with nested paging.\n2. **An IOMMU:** Intel VT-d or AMD-Vi (AMD IOMMU). ReBIOS uses it to map device\n   DMA the way the legacy OS sees memory. Without one, ReBIOS says so and\n   returns to the firmware. It does the same where the machine's integrated\n   graphics malfunctions under VT-d: Intel's Broadwell, and Ironlake in\n   Arrandale processors, or in Clarkdale ones whose firmware sets up no shadow\n   GTT for VT-d.\n\n### Secure Boot\n\nSecure boot should be disabled unless one wants to manually sign the ReBIOS EFI\napplication, which is possible, but beyond the scope of this README.\n\n### Firmware Settings\n\nReBIOS is designed to be as drop-in as possible, but these settings, which most\nmodern firmware that ReBIOS targets exposes, and often enables by default, must\nbe enabled:\n\n1. **Virtualisation Technology** (Intel VT-x\u002FVMX, AMD-V\u002FSVM)\n2. **IOMMU** (Intel VT-d, AMD-Vi)\n\nUnlike with CSMWrap, there is no need to disable **X2APIC**: the legacy OS gets\nan xAPIC of its own, whatever mode the hardware's is in. There is also no need\nto disable **Above 4G Decoding** and there *should* be no need to disable\n**Resizable BAR** (please report an issue if your configuration only works with\n**Resizable BAR** disabled!).\n\n### Video Card Considerations\n\nIf a video card in a slot has a legacy Video BIOS, ReBIOS has SeaBIOS run it,\nproviding a pretty much native-like experience. Graphics in the processor or\nsoldered to the board only get that if they came out before 2018, are the Vega\ngraphics of AMD's processors from Raven Ridge to Barcelo, or with\n`vga_emulation = never`: ReBIOS knows them by lists of their PCI IDs.\n\nOtherwise, ReBIOS emulates a complete legacy VGA with its own Video BIOS, drawn\non the UEFI framebuffer and scaled to the screen. It is not SeaVGABIOS: text\nmodes (40 and 80 columns, 200, 350, and 400 lines, blinking, underline, the\ncursor, loadable fonts), CGA, EGA, and VGA graphics modes, and programs that\nprogram the VGA registers and video memory directly (e.g. pretty much all\nMS-DOS games, MS-DOS Editor, etc.) work as on a real VGA. On the tablets and\nhandhelds that Linux knows to have their screen mounted sideways, the picture\nis turned upright, as are ReBIOS's own messages.\n\nIts Video BIOS also offers the VESA BIOS Extensions (VBE 3.0): modes in 8, 15,\n16, 24, and 32 bits per pixel up to the screen's resolution, through a banked\nwindow or a linear framebuffer, and the display's EDID where the firmware has\nit. Operating systems still see the real video card as the only display\nadapter, which its own drivers can drive, while the linear framebuffer is in\nPCI memory that no device uses.\n\n## Configuration\n\nReBIOS supports an optional INI-style configuration file. Place a file named\n`rebios.ini` in the same directory as the ReBIOS EFI executable (e.g.\n`\u002FEFI\u002FBOOT\u002Frebios.ini`). Being a CSMWrap replacement, ReBIOS takes CSMWrap's\nconfiguration as well: it reads, and uses the first it finds of:\n\n1. `rebios.ini` next to the executable,\n2. `csmwrap.ini` next to the executable,\n3. the `ReBIOSConfig` NVRAM variable,\n4. the `CSMWrapConfig` NVRAM variable.\n\nIf none is present, sensible defaults are used.\n\n### Setting up NVRAM based config\n\nThe NVRAM variable holds the same content as `rebios.ini`, parsed identically:\nnewline-separated, one `key=value` per line.\n\nAuthoring via the UEFI Shell `setvar` command is **not supported**: its\nquoted-string argument cannot carry a literal newline. Write the variable from\nLinux via efivarfs instead, reusing the exact `rebios.ini` content. It must be\na single `printf` (efivarfs performs a complete variable set on every\n`write()`): the `\\x07\\x00\\x00\\x00` prefix is the `NV|BS|RT` attribute mask\nefivarfs expects, and the double-quoted `%s` argument is emitted verbatim, so\nthe file's newline separators and backslash paths survive unmangled (the double\nquotes are required; without them the shell would word-split the config):\n\n```sh\nprintf '\\x07\\x00\\x00\\x00%s' \"$(cat rebios.ini)\" > \u002Fsys\u002Ffirmware\u002Fefi\u002Fefivars\u002FReBIOSConfig-d559b78d-5494-4c9e-b7f7-e492b0946448\n```\n\n### Options\n\n| Key | Type | Default | Description |\n|-----|------|---------|-------------|\n| `serial` | bool | `false` | Enable serial debug output |\n| `serial_port` | `auto`\u002Fhex\u002Fint | `auto` | Serial I\u002FO port address (COM1=`0x3f8`, COM2=`0x2f8`, COM3=`0x3e8`, COM4=`0x2e8`). `auto`: the 16550 the firmware's SPCR table, or else its DBG2 table, describes, and none without one |\n| `serial_baud` | int | `115200` | Serial baud rate |\n| `verbose` | bool | `false` | Show debug output on screen while ReBIOS starts |\n| `boot_drive` | `self`\u002F`auto`\u002Fdrive | `self` | The drive SeaBIOS boots first, the others following in the `auto` order. `self`: the drive ReBIOS was started from, if it has a legacy boot sector (on a GPT drive, a hybrid MBR with code that marks an MBR partition active). `auto`: drives with something to boot (a legacy boot sector, or a bootable CD or DVD) before those without, internal drives before CDs and DVDs before external (USB) drives, and the drive ReBIOS was started from last; the [ReBIOS USB stick](#the-rebios-usb-stick)'s setting. Anything else names a drive by its UEFI device path (e.g. `PciRoot(0x0)\u002FPci(0x1F,0x2)\u002FSata(0x1,0xFFFF,0x0)`), or else by part of its model name (e.g. `Samsung SSD 860`), case aside, as ReBIOS lists them when `verbose` is on |\n| `vgabios` | string | *(empty)* | Path to a custom VBIOS file on the partition ReBIOS was started from (e.g. `\\EFI\\ReBIOS\\vgabios.bin`). When empty, the card's built-in OpROM is used, and, failing that, the emulated VGA. If vgabios is set to `cbfs`, vgabios.bin is loaded from coreboot's CBFS. If you set it to `cbfs:filename` you can use a custom CBFS filename |\n| `vga` | PCI address | *(empty)* | PCI address of the VGA card to use (e.g. `00:02.0`). Format: `BB:DD.F` (hex). When empty, the card the firmware displays on is used, or, if it displays on none, the first card with a VBIOS |\n| `vga_emulation` | `auto`\u002F`always`\u002F`never` | `auto` | When to emulate a VGA: when the graphics have no usable Video BIOS (or, without `vgabios`, when the firmware is Apple's, the screen is mounted sideways, or the graphics are in the processor or soldered to the board and came out from 2018 on, but for the Vega graphics of AMD's processors), always (even if they have one), or never (a Video BIOS then runs in those cases too, and graphics without one get none) |\n| `vga_scaling` | `stretch`\u002F`aspect`\u002F`integer`\u002F`center`\u002F`manual` | `stretch` | How the emulated VGA fills the screen: all of it; as much of it as 4:3 allows, as a VGA monitor shows every mode; the largest whole number of screen pixels per VGA pixel that fits; one screen pixel per VGA pixel; or `vga_scale` screen pixels per VGA pixel. All but `stretch` center the picture |\n| `vga_scale` | int | `1` | The scale factor for `vga_scaling = manual`, from 1 to 16 |\n| `vga_filter` | `nearest`\u002F`bilinear` | `bilinear` | How the emulated VGA's picture is scaled along an axis where its scale there is no whole number: each screen pixel from the nearest VGA pixel, sharp but uneven, or mixed from the nearest two by bilinear filtering, smooth. A whole-number scale, as `integer` and `center` give, stays pixel-exact either way |\n| `profile` | bool | `false` | Log, every 10 seconds, how often the OS made ReBIOS step in and why: VM exits per second and the time taken by reason, and the emulated I\u002FO ports and memory pages behind them. A debugging aid |\n| `save_log` | bool | `false` | Keep ReBIOS's log in EFI variables while the OS runs, for machines without a serial port: its start in `ReBIOSLog`, and its latest text in `ReBIOSLogEnd`, rewritten at most every 10 seconds while the log grows, 360 times a boot at most, and once more before a panic halts the machine or it resets or powers off. The next start of ReBIOS writes the log to `rebios-last.log`, beside `rebios.efi`, and deletes the variables. Each rewrite is a write of the firmware's flash, which may hold a processor for tens of milliseconds, so leave it off unless the log is needed |\n| `avic` | `auto`\u002F`always`\u002F`never` | `auto` | When to have AMD's AVIC run the OS's local APICs, which saves exits to ReBIOS: on Zen 4 and later processors with x2AVIC, as Linux's KVM does; on every processor with AVIC but those of family 17h, where AMD advises against it; or never |\n| `cpuid_limit` | bool | `false` | Start the OS with CPUID reporting no basic leaf past 2, as firmware setups' \"Limit CPUID Maxval\" option does, for OSes that fail on processors with more, such as Windows NT 4.0. On Intel processors that still have that option, the OS sees it set in IA32_MISC_ENABLE and may turn it off |\n| `igpu_stolen_remap` | bool | `true` | Give an Intel integrated GPU's stolen memory (the graphics memory the firmware sets aside) an address in the OS's own memory map, and move the firmware's graphics page table entries there, as the IOMMU translates what the GPU accesses. If the screen goes black on an Intel integrated GPU once the OS starts, try `false`: the stolen memory then stays at the firmware's address, as with ReBIOS 0.3.0 |\n| `legacy_usb` | bool | `true` | Drive the USB controllers until the OS takes them over, as a BIOS's legacy USB support does: USB keyboards and mice work as PS\u002F2 ones, and the BIOS boots from USB disks. With `false` they are the OS's from the start, and the BIOS has no USB |\n| `pci_high_windows` | bool | `false` | Give PCI BARs too large to go below 4 GiB (64-bit ones over 256 MiB that cannot be resized smaller) addresses above 4 GiB, and describe the windows there that hold them, with room after them, to the OS, as firmware setups' \"Above 4G Decoding\" option does. Off, those BARs stay unassigned, which ReBIOS logs, and the OS sees no window above 4 GiB, as OSes such as Windows XP need: XP fails to start when it sees one. On machines without such BARs, it changes nothing |\n| `cpu_allowlist` | int\u002Fhex list | *(unset)* | Comma-separated list of APIC IDs of logical CPUs that should be given to the OS. Each entry is either a single ID or an inclusive range `N-M` (e.g. `0,2-4,7`). An empty value (`cpu_allowlist =`) is itself a setting and means \"hide every AP\" (only the BSP stays visible). The BSP is always given to the OS regardless. Mutually exclusive with `cpu_blocklist` |\n| `cpu_blocklist` | int\u002Fhex list | *(unset)* | Comma-separated list of APIC IDs of logical CPUs that should be hidden from the OS. Each entry is either a single ID or an inclusive range `N-M` (e.g. `5-7`). An empty value (`cpu_blocklist =`) is a no-op for visibility but still claims the slot, so `cpu_allowlist` cannot also be set. The BSP is always given to the OS regardless. Mutually exclusive with `cpu_allowlist` |\n| `iommu_disable` | | | Obsolete CSMWrap setting, ignored with a warning: ReBIOS requires the IOMMU |\n| `nested` | | | Obsolete setting, ignored with a warning: the OS always gets the processor's virtualisation wherever ReBIOS can give it |\n| `system_thread` | | | Obsolete CSMWrap setting, ignored with a warning: ReBIOS keeps no CPU for itself |\n\nHidden CPUs are left out of the MADT and the MP table, and cannot be started by\nthe OS.\n\nBoolean values accept `true`\u002F`yes`\u002F`1` and `false`\u002F`no`\u002F`0` (case-insensitive).\nComments start with `;` or `#`.\n\n### Example\n\n```ini\n; ReBIOS configuration\nserial = true\nserial_port = 0x3f8\nserial_baud = 115200\nvgabios = \\EFI\\ReBIOS\\vgabios.bin\n\n; Show the emulated VGA as a 4:3 monitor would, and hide APIC IDs 4 through 6 from the OS.\nvga_scaling = aspect\ncpu_blocklist = 4-6\n\n; Boot the drive whose model name has \"WDC WD5000\" in it first.\nboot_drive = WDC WD5000\n```\n\n## Frequently Asked Questions\n\n### Is this an emulator?\n\nNo! At least not in the sense of it being a full-screened emulator window.\nReBIOS uses the CPU's hardware virtualisation to run the legacy OS *natively*\non the system: its code runs on the real CPU, and it drives the real disks, USB\ncontrollers, network cards, and so on. ReBIOS only steps in for what modern\nUEFI class 3 systems no longer have: the legacy interrupt controllers, the 8254\ntimer, the keyboard controller, a VGA when the video card has no legacy Video\nBIOS, and the like.\n\n### I booted a multi-core capable OS with CSMWrap and was missing a logical processor (thread), what about ReBIOS?\n\nReBIOS does not keep a logical processor for itself as CSMWrap does: every one\nof them is given to the OS (unless `cpu_allowlist` or `cpu_blocklist` say\notherwise), and systems with only one logical processor work too.\n\n### Can the OS run virtual machines of its own?\n\nYes: ReBIOS gives the OS the processor's VMX on Intel processors and its SVM on\nAMD processors, so that hypervisors such as Linux's KVM run in it.\n\n### Does ReBIOS have any advantages over native CSM?\n\nYes! Native CSM firmware is often riddled with issues and hardly tested against\nlegacy OSes anymore. ReBIOS ships a reliable, free, and open-source legacy BIOS\nimplementation - SeaBIOS - and it is tested against legacy OSes. Issues\naffecting modern, commonly shipped CSM implementations do not affect ReBIOS,\nlike for example:\n\n- ACPI tables legacy OSes cannot use. Native CSM hands the OS the firmware's\n  own tables, written for modern Windows: Windows 2000 and XP stop on their AML\n  (STOP 0xA5), and Windows 98 and ME end up installed without ACPI. ReBIOS\n  gives the OS ACPI tables of its own, in AML that even Windows 98 understands,\n  whose methods call into ReBIOS, which runs the firmware's AML itself.\n- Dirty control register values at handoff. (This is something that\n  [cregfix](https:\u002F\u002Fgithub.com\u002Fmintsuki\u002Fcregfix) was created to work around).\n  ReBIOS starts the legacy BIOS with the control registers in their reset\n  state.\n- Legacy BIOS routines failing to reliably run when called from Virtual 8086\n  Mode. EMM386, Windows 3.x under 386 enhanced mode, and more, are affected by\n  this issue and it results in crashes. ReBIOS is not affected.\n\nAnd when it comes to improvements that are not necessarily bugs in CSM\nimplementations, ReBIOS, amongst other things:\n\n- Generates MP tables for legacy OSes that support the legacy Intel\n  MultiProcessor Specification standard but not ACPI, and a PCI IRQ routing\n  table ($PIR).\n- Allows one to select a non-primary video card for VGA output which native CSM\n  implementations do not allow. This is useful for multi-booting modern and\n  legacy OSes.\n\n### Does ReBIOS have any advantages over CSMWrap?\n\nYes! CSMWrap starts SeaBIOS on the bare hardware as the UEFI firmware leaves\nit. ReBIOS runs it in a virtual machine that is the real machine, but for what\nit adds back of the legacy PC:\n\n- **ACPI for legacy OSes.** CSMWrap passes the firmware's ACPI tables on as\n  they are, and with them AML written for modern Windows, on which Windows 2000\n  and XP stop (STOP 0xA5) and without which Windows 98 and ME must be\n  installed. ReBIOS runs the firmware's ACPI itself and gives the OS ACPI\n  tables of its own, in AML that ACPI 1.0 interpreters such as Windows 98's\n  understand, whose methods call into ReBIOS to run the firmware's: the OS\n  still sees the machine's devices and gets their events, and the memory the\n  firmware keeps for its AML no longer breaks up the OS's. An OS without ACPI\n  gets what the firmware gives one outside ACPI mode: the power button powers\n  the machine off, and ReBIOS watches the thermal zones for it, powering the\n  machine off past their critical trip points, running their fans, and\n  slowing their processors down past their passive ones.\n- **A real VGA without a legacy Video BIOS.** Where CSMWrap has to fall back to\n  SeaVGABIOS, with which only text written through the BIOS shows, ReBIOS\n  emulates a complete VGA, with VBE modes up to the screen's resolution (see\n  [Video Card Considerations](#video-card-considerations)).\n- **Legacy interrupt controllers.** The 8259 PICs, the I\u002FO APICs, and the local\n  APICs the OS sees are virtual, so DOS-era software works on machines whose\n  chipset lacks the 8259s or locks x2APIC mode on, and ReBIOS itself routes PCI\n  interrupts to free ISA IRQs for PIC mode, whatever the firmware's PIC mode\n  wiring.\n- **The PC's legacy devices on any machine.** The 8254, the 8042, the RTC with\n  its CMOS RAM, the 8237 DMA controllers, the x87 error report on IRQ13 with\n  port F0h, and the reset control register at CF9h that the OS sees are\n  virtual, and its ACPI describes them, so it does not matter whether the\n  chipset has them, or has them working: real ones only back the speaker,\n  where the firmware's ACPI describes the 8254 and port 61h and the 8254\n  counts, the clock, where the machine's RTC reads sanely, and the PS\u002F2\n  devices actually plugged in. The machine's serial and parallel ports reach\n  the OS where the firmware's ACPI describes them, enabled or for the OS to\n  turn on, but for the one ReBIOS logs to; other legacy ports read as absent,\n  as on a board without those devices.\n- **USB as a BIOS's legacy support has it.** ReBIOS drives the USB controllers\n  itself, with [Tendril](https:\u002F\u002Fgithub.com\u002FMintsuki\u002FTendril), until the OS\n  asks for them, as a BIOS's legacy USB support does: USB keyboards and mice\n  reach legacy OSes as PS\u002F2 ones, and SeaBIOS boots from USB disks. An OS\n  without a USB driver keeps its keyboard, whichever USB controller it is on.\n- **One PCI host bridge.** On machines with several PCI host bridges or PCI\n  segments, the OS sees one host bridge, with the other root buses behind\n  ports on its bus 0, so OSes that know only one host bridge, or only segment\n  0, still find every device.\n- **A PC's memory map.** The OS gets memory from 1 MiB up to 4 GiB as\n  contiguous as the firmware's reserved ranges allow, wherever the machine's\n  memory actually is; its own copy of the SMBIOS tables; the option ROMs and\n  the BIOS write-protected, as a BIOS would leave them; and the upper memory\n  that no ROM uses free for memory managers to find (e.g. for JemmEx's UMBs and\n  EMS page frame).\n- **DMA from anywhere.** The IOMMU maps device DMA exactly as the OS sees\n  memory, so the BIOS's buffers in upper memory, and the buffers of legacy\n  drivers wherever they are, work.\n- **Virtual 8086 mode without a system thread.** SeaBIOS reaches its 32-bit\n  code from V86 mode through the hypervisor, and disk transfers into EMS pages\n  work.\n- **Every processor.** No logical processor is kept for ReBIOS itself.\n- **A boot drive of choice.** SeaBIOS boots first whichever drive the\n  configuration names, by model or device path, or picks one by itself, so\n  ReBIOS can also run from a USB stick of its own, sparing legacy OS\n  installations a FAT partition for it (see\n  [The ReBIOS USB stick](#the-rebios-usb-stick)).\n\n## Building\n\nBuilding requires `python3`, `git`, used to fetch the dependencies (see\n`get-deps`), and either GCC and GNU binutils or Clang, LLD, and LLVM's tools.\n`curl` is used to download the EDK2 OVMF firmware images for `make run`, which\nruns ReBIOS in [Nephrite](https:\u002F\u002Fgithub.com\u002FNephrite-Project\u002FNephrite), the\nfork of QEMU that ReBIOS is tested on (on Arch Linux, the `nephrite` package in\nthe AUR), as QEMU itself has bugs that ReBIOS runs into. Nephrite emulates for\nit an Intel processor with VMX behind VT-d or, with `QEMU_VIRT=svm`, an AMD one\nwith SVM behind AMD-Vi.\n\n```sh\n.\u002Fget-deps\nmake\n```\n\n`make usb` also builds `bin\u002Frebios-usb.img`, the image for\n[the ReBIOS USB stick](#the-rebios-usb-stick), which needs mtools.\n\nRelease tarballs (`rebios-\u003Cversion>.tar.gz` and `.tar.xz`) come with the\ndependencies, so they build without `.\u002Fget-deps`. `make dist` creates them from\nthe current commit. The source archives GitHub generates for each release lack\nthe dependencies, and do not build.\n\nAssembly files with the `*.S` extension are built using the same toolchain as\nthe C sources. Only `*.asm` files, of which ReBIOS ships none, require `nasm`.\n\nThe `TOOLCHAIN` and `TOOLCHAIN_PREFIX` make variables can be used to set the\ntoolchain. `TOOLCHAIN` can be set to `llvm` to use Clang, LLD, and LLVM's\ntools. For example:\n\n```sh\nmake TOOLCHAIN=llvm\n```\n\nor:\n\n```sh\nmake TOOLCHAIN_PREFIX=x86_64-elf-\n```\n\nThe program is linked through the compiler driver, using its default linker\nfor GCC and LLD for Clang. A different linker, such as gold, can be picked by\nadding a `-fuse-ld=` option to `LDFLAGS`, which goes for SeaBIOS too.\n\nLink-time optimisation can be enabled by adding `-flto` to `CFLAGS`:\n\n```sh\nmake CFLAGS='-g -O2 -pipe -flto'\n```\n\nSeaBIOS is built with the tools named by `SEABIOS_TOOLCHAIN_PREFIX`, which\nfollows `TOOLCHAIN_PREFIX`, or by `SEABIOS_CC`, `SEABIOS_LD`,\n`SEABIOS_OBJCOPY`, and `SEABIOS_STRIP` individually. `HOST_CC` builds its\nconfiguration tools.\n\n## Contributing\n\nContributions are welcome! Whether it's reporting bugs, suggesting features,\nimproving documentation, or submitting code changes, your help is appreciated.\n\nAdditionally, one can join our [Discord server](https:\u002F\u002Fdiscord.gg\u002Ft5nn4GKTcx)\nor our [Matrix room](https:\u002F\u002Fmatrix.to\u002F#\u002F#ReBIOS:matrix.org) for any\nproject-related discussion, or to otherwise chat with likeminded people.\n\n## Credits & Acknowledgements\n\n*   The **[SeaBIOS project](https:\u002F\u002Fwww.seabios.org\u002F)** for their CSM code.\n*   **[CSMWrap](https:\u002F\u002Fgithub.com\u002FCSMWrap\u002FCSMWrap)**, which ReBIOS replaces,\n    for its SeaBIOS changes and its knowledge of firmware and hardware quirks.\n*   **[PicoEFI](https:\u002F\u002Fgithub.com\u002FPicoEFI\u002FPicoEFI)** for the EFI C runtime,\n    build system, and headers.\n*   **[uACPI](https:\u002F\u002Fgithub.com\u002FuACPI\u002FuACPI)** for ACPI table handling and AML\n    evaluation.\n*   **[nanoprintf](https:\u002F\u002Fgithub.com\u002Fcharlesnicholson\u002Fnanoprintf)** for\n    formatted output.\n*   **[Flanterm](https:\u002F\u002Fgithub.com\u002FMintsuki\u002FFlanterm)** for the console ReBIOS\n    shows its output on.\n*   **[Tendril](https:\u002F\u002Fgithub.com\u002FMintsuki\u002FTendril)** for driving USB.\n*   **[QEMU](https:\u002F\u002Fwww.qemu.org\u002F)**, whose VGA BIOS the emulated VGA's fonts\n    (public domain fonts from Joseph Gil's fntcol16 collection) and mode\n    register values were taken from.\n*   **[EDK2 (TianoCore)](https:\u002F\u002Fgithub.com\u002Ftianocore\u002Fedk2)** for the OVMF\n    firmware ReBIOS is tested on.\n*   All contributors and testers from the community!\n\n## License\n\nReBIOS is free software: you can redistribute it and\u002For modify it under the\nterms of the GNU General Public License version 2 as published by the Free\nSoftware Foundation. See [LICENSE](LICENSE).\n\nReBIOS builds in software of others, under their own licenses:\n\n- [SeaBIOS](https:\u002F\u002Fwww.seabios.org\u002F), under the GNU LGPL, version 3: a\n  separate program, which ReBIOS carries and runs as the legacy BIOS of the\n  machine it virtualises.\n- [uACPI](https:\u002F\u002Fgithub.com\u002FuACPI\u002FuACPI), by Daniil Tatianin, under the MIT\n  license.\n- [PicoEFI](https:\u002F\u002Fgithub.com\u002FPicoEFI\u002FPicoEFI),\n  [freestanding-c-hdrs](https:\u002F\u002Fgithub.com\u002Fosdev0\u002Ffreestanding-c-hdrs), and\n  [freestanding-lgrt](https:\u002F\u002Fgithub.com\u002Fosdev0\u002Ffreestanding-lgrt), by Mintsuki\n  and contributors, under the 0BSD license.\n- [nanoprintf](https:\u002F\u002Fgithub.com\u002Fcharlesnicholson\u002Fnanoprintf), by Charles\n  Nicholson, under the Unlicense or the 0BSD license.\n- [Flanterm](https:\u002F\u002Fgithub.com\u002FMintsuki\u002FFlanterm), by Mintsuki and\n  contributors, under the BSD 2-Clause license.\n- [Tendril](https:\u002F\u002Fgithub.com\u002FMintsuki\u002FTendril), by Mintsuki and contributors,\n  under the BSD 2-Clause license, with the notices of what it draws on in its\n  `3RDPARTY.md`.\n","ReBIOS 是一个 EFI 应用程序，旨在让仅支持 UEFI 的现代计算机（Class 3 系统）重新启用传统 BIOS 启动能力。它通过在轻量级虚拟化层（基于 Intel VT-x 或 AMD-V）中运行 SeaBIOS 的 CSM 构建版本，完整透传真实硬件，并仅模拟已淘汰的旧式 PC 设备，从而重建兼容的 Legacy BIOS 运行环境。项目采用纯 C 实现，可作为 CSMWrap 的直接替代方案，适用于需在无 CSM 的新平台（如部分 Intel 12\u002F13\u002F14 代、AMD AM5 主板）上安装或启动 Windows 7、DOS、老版 Linux 等遗留操作系统的场景。",2,"2026-11-24 04:41:43","CREATED_QUERY"]