VBIOS
The Video BIOS is a read-only memory of some kind (sometimes flash memory or EEPROM) on Nvidia cards (at least up to the Turing architecture and possibly later, although it was mostly only used for legacy compatibility reasons by then) that initialises the GPU, runs basic POST tests, and most critically, provides compatibility with the minimum expected range of graphics modes that all operating systems are known to support - typically this is the VBE 3.0 specification and its range of unaccelerated graphics modes, as well as legacy IBM Color Graphics Adapter (CGA), Enhanced Graphics Adapter (EGA) and Video Graphics Array (VGA) modes. This is typically coupled with a parallel on-die graphics core (designed by Weitek) that implements legacy compatibility, so that the main design does not have to be burdened by the constraints of legacy compatibility. It can also be emulated partially or entirely (as in NV1) but this is not as ideal. The Video BIOS may be partially customised (most likely, it was delivered in the form of a mix of assembler and object files) by the OEM.
History
The IBM PC was initially released in 1981 with two mediocre-at-best graphics options - the Monochrome Display Adapter (720*350 80-column by 25 text mode, with undocumented colour text support that was removed in later revisions) and the Color/Graphics Adapter, which, while it had a variety of modes, supporting both 40 and 80-column text, 16-colour 160*100 graphics (composite monitor only), 4-colour 320*200 and two-colour 640*200 modes, was incredibly slow and suffered from "snow" whenever anything was written to the screen due to a lack of dual-ported RAM. Both of these were built around the commodity and quite flexible Motorola 6845 CRT controller - due to this, many clones were made that attempted to combine these two and/or improve on them, such as the Plantronics Colorplus, Tandy (actually a clone of the PCjr "Video Graphics Array"), and most famously, the Hercules line, which combined high resolution monochrome graphics with a good text mode. CGA and MDA did not use ROMs (and neither did any of these clones); the only ROM on board any of these was a character ROM with a non-redefinable character set - in most cases, support code was provided via drivers that ran under MS-DOS. Selection of a monitor type was achieved via DIP switches on the motherboard of the IBM PC.
IBM too recognised this issue and eventually decided to create a new graphics standard for their new 286-based PC/AT. This ended up with the creation of the Enhanced Graphics Adapter in 1984, which with enough VRAM could achieve 16-colour graphics at 640*350. However, IBM experienced a serious problem while developing it - IBM had not anticipated the IBM PC becoming the standard that it had and had not made many design decisions with a focus on future extension of the architecture. This led to the DIP switch setup on the IBM PC and XT for selecting the type of graphics hardware used by the device only allowed two graphics cards - the BIOS was hardcoded to boot an MDA if an MDA was found, and a CGA if a CGA card was found. BIOS setup utilities in ROM were not common yet and, if they existed at all, were not particularly powerful and effectively only existed on clones rather than true blue IBM hardware. While IBM could have simply added another form of configuration for the EGA on the IBM PC/AT, such as more DIP switches, software methods or configuration in the BIOS or via the CMOS setup disks IBM provided, one of the goals of the EGA was to be compatible with CGA and MDA, due to the huge installed base of both of those cards and doing this would simply make EGA unusable on the vast majority of PCs then in existence. Therefore, a solution had to be devised that could allow the EGA to work on older PCs.
IBM had a trick up their sleeve. A 1982 IBM PC BIOS revision had introduced the concept of an Option ROM; when IBM PC or compatible BIOSes are loading, they will iterate through areas of the address space at 2 Kilobyte increments between 0xC0000
(x86 segment address C000
) and 0xF4000
(x86 segment address F400
). If a ROM is found at these locations (indicated by the 55 AA
magic being detected at the end of a ROM and a valid size being found), the IBM PC will jump to an address indicated right after the magic value. This effectively allows the IBM PC to load arbitrary expansion ROMs at bootup; additionally, there was a "no video" DIP switch option which would prevent the BIOS from looking for an MDA or a CGA card, so IBM added a ROM to the EGA design that could initialise the card when loaded as an Option ROM, and told those users with older machines who wished to upgrade to an EGA-based card to switch the video type DIP switch to "None". Since there was (presumably) large amounts of free space available in whatever ROM they chose to use, they also decided to add support code for applications to be able to use the EGA's features without having to write extensive support code and install it via an interrupt handler (int 10h
, although this was only available in real-mode). This became the first serious use of a Video BIOS; the VBIOS continued to be used and have its size (typically limited to 32 KB to prevent clashes with other option ROMs) and feature set expanded the VGA era, although as accelerated graphics became common starting in the late 1980s and early 1990s, drivers running on operating systems such as Windows 3.x and Windows 9x displaced the purpose of video BIOSes (although early attempts, such as the IBM Professional Graphics Controller designed by Curtis Priem, the later NV1 designer, were made, they tended to use ROMs internal to them and have the PC talk to that ROM to perform tasks), and the Video BIOS was generally only used for allowing compatibility with EGA, VGA, and later VESA VBE standards, which was still required to boot into DOS.
NVIDIA implementation
NV3
The NV3 VBIOS is largely intended to implement VESA graphics modes, although it will also initialise the card by setting up the RAMDAC (using the Real Mode Access functionality to talk to the MMIO space of the GPU without mapping it) and ensuring a safe VPLL and MPLL value by reading the clock divider registers in PRAMDAC, determining the amount of memory on the card and the overall card configuration by reading the straps, PFB_BOOT_0
and PMC_BOOT_0
, before flashing the screen several colours and printing a sign-on message - the ext will vary based on the vendor, version and variant of the card, but the vast majority[1]
of cards use a similar format. Some examples are provided below:
NV3 sign-on text example
STB Velocity 128 (RIVA 128) Ver.1.82 Copyright (C) 1997 STB Systems, Inc. Memory Size: 4MB
NV3T sign-on text example
RIVA 128ZX BIOS - V1.72B (C) 1996-98 NVidia Corporation SGRAM Size: 8.00MB
The NV3 also mirrors its VBIOS into BAR0 at 0x110000
, but does not appear to actually use it for anything.
Notes
^ ELSA cards, due to ELSA having an internal driver development team with much more expertise than the average OEM, use a custom sign-on screen shared with all of their cards, regardless of the chip vendor. Later, this team was sold to nVIDIA, and parts of their code ended up in NVIDIA's drivers.