-
Notifications
You must be signed in to change notification settings - Fork 2
Video BIOS Table (VBT)
The Video BIOS Table, or VBT, provides platform and board specific configuration information to the driver that is not discoverable or available through other means. By other means the most used method here is to read EDID table from the attached monitor, over Display Data Channel (DDC) using two pin I2C serial interface.
The VBT configuration is related to display hardware. The VBT is available via the ACPI OpRegion or, on older systems, in the PCI ROM (Option ROM).
The VBT consists of a VBT Header, a BIOS Data Block (BDB) Header, and a number of BIOS Data Blocks (BDBs) that contain the actual configuration information (supposed to replace the absence of EDID structure with the older monitors). The VBT Header, and thus the VBT, begins with “$VBT” signature. The VBT Header contains the offset of the BDB Header. The BDB header starts with the "BIOS_DATA_BLOCK" signature. The data blocks are concatenated after the BDB Header (not always in exact order, and certain BDBs might be missing, not implemented for such type of HW platforms). The data blocks have a 1-byte Block ID, 2-byte Block Size, and Block Size bytes of data (Block 53, the MIPI Sequence Block is an exception).
The GFX driver parses the VBT during load. The relevant information is stored in GFX driver private data for ease of use, and the actual VBT is not read after that.
To understand better what is Video BIOS Table, reader should read the following document: Understanding EDID - Extended Display Identification Data.<ref name="Extended Display Identification Data"></ref>
Please, do note that EDID is implemented for DVI, HDMI, and DisplayPort (Present Time). Some very cheap monitors still (for cost saving) do not implement EDID standard (in which case VBT entries for such monitors are required).
As stated previously, VBT means Video BIOS Table. It's a 100% Intel specific table of configuration options for Intel's Video BIOS and Intel's graphics drivers. Since VBT is not related to the concept of a Video BIOS or any standard, it cannot be replaced by something (GOP) that continues standards story.
There is no detailed public documentation, but as it's used by the Linux driver, at least the structure and some of the values are publicly "documented"<ref name="drm/i915 Intel GFX Driver"></ref> Developers of the i915 Linux driver stated that they are not willing to support systems without a VBT. Most features of the i915 driver work without a VBT by chance. But anything board specific, like integrated panels in laptops, will likely not work. Windows won't even try to get things running without VBT.
As far as legacy BIOS concerned, the context is placed in the x86 20bit Real Mode (8086 16bit CPU limitation, inherited from PC XT DOS design) of operation (below/up to first 1MB (20bit) address space). VBT is used with the legacy Video BIOS (vBIOS), which is placed as Option ROM at the address 0xC0000 (till maximal address 0xCFFFF), thus maximum size of 64KB. vBIOS is using legacy INT 10H for GFX low level operations.
VBT [https://en.wikipedia.org/wiki/Unified_Extensible_Firmware_Interface Unified Extensible Firmware Interface] (BIOS) mode support
[http://www.uefi.org/sites/default/files/resources/UPFS11_P4_UEFI_GOP_AMD.pdf The GOP driver] is a replacement for legacy video BIOS and enables the use of UEFI pre-boot firmware without CSM. The GOP driver can be 32-bit, 64-bit, or IA-64 with no binary compatibility. UEFI pre-boot firmware architecture (32-/64-bit) must match the GOP driver architecture (32-/64-bit). The Intel Embedded Graphics Drivers' GOP driver can either be fast boot (speed optimized and platform specific) or generic (platform agnostic for selective platforms).
Here is a quick comparison between GOP and video BIOS:
- GOP: No 64 KB limit. 32-bit protected mode. No need for CSM. Speed optimized (fast boot). The UEFI pre-boot firmware architecture (32-/64-bit) must match the GOP driver.
- Video BIOS: 64 KB limit. 16-bit execution. CSM is needed with UEFI system firmware. Performance inferior to GOP CSM. The VBIOS works with both 32- and 64-bit architectures.
With UEFI as BSP, in the case of Intel hardware, the Linux graphics driver does a super-set of the things the VBIOS does. Actually, its default case is to ignore what the VBIOS did and start all over again (one technical detail: one still has to put the Video BIOS Table, VBT, into UEFI).
VBT table is easily locatable. It is located in the /sys directory: /sys/kernel/debug/dri/0/i915_vbt (since kernel version 4.5).
Please, read the following web page for more information: [https://manpages.debian.org/experimental/intel-gpu-tools/intel_vbt_decode.1.en.html manpages.debian.org, section intel-gpu-tools].
VBT is also documented by intel-gpu-tools. There's intel_vbt_decode (former intel_bios_decode) available [https://cgit.freedesktop.org/xorg/app/intel-gpu-tools/tree/tools/intel_vbt_decode.c intel_vbt_decode.c] that will print all tables in human readable form.
Here is the self-sufficient/standalone context in one single directory (done on Fedora 25 latest upgrades - author himself tested the tool in given context below), extracted from the following [https://cgit.freedesktop.org/xorg/app/intel-gpu-tools/tree/ web site]: <pre><nowiki>
[user@localhost intel-gpu-tools]$ gcc intel_vbt_decode.c intel_device_info.c -o vbt
[user@localhost intel-gpu-tools]$ ls -al
total 352
drwxrwxr-x. 2 user user 4096 Apr 8 07:33 .
drwxrwxr-x. 4 user user 4096 Apr 8 07:32 ..
-rw-rw-r--. 1 user user 4123 Apr 6 20:18 drmtest.h
-rw-rw-r--. 1 user user 12889 Apr 6 21:07 i915_pciids.h
-rw-rw-r--. 1 user user 27736 Apr 6 20:46 igt_core.h
-rw-rw-r--. 1 user user 9816 Apr 6 20:44 intel_batchbuffer.h
-rw-rw-r--. 1 user user 28814 Apr 6 20:03 intel_bios.h
-rw-rw-r--. 1 user user 6236 Apr 6 20:15 intel_chipset.h
-rw-rw-r--. 1 user user 6796 Apr 6 21:05 intel_device_info.c
-rw-rw-r--. 1 user user 3310 Apr 6 20:14 intel_io.h
-rw-rw-r--. 1 user user 116344 Apr 6 20:47 intel_reg.h
-rw-rw-r--. 1 user user 54812 Apr 6 19:58 intel_vbt_decode.c
-rwxrwxr-x. 1 user user 54928 Apr 8 07:33 vbt
[user@localhost intel-gpu-tools]$
With this Human Readable Interface dumper the following should be possible:
- Make a "decompiler" that would convert VBT from the option ROM into a human/machine readable text format
- Make a "compiler" that would take that text format and create a binary VBT from it
- Put the binary VBT into the ACPI IGD OpRegion table <ref name="Intel Integrated Graphics Device OpRegion Specification Driver Programmer’s Reference Manual"></ref><ref name="ACPI/Intel: Rework Opregion support"></ref>(or wherever the graphics driver can find it).
The project is already started on GitHub: https://github.com/ZoranStojsavljevic/Video-BIOS-Table-parser-assembler under GPL2 licence:
- To make VBT decompiler (to read VBT.dat binary format and convert into human readable form - already done),
- To make VBT compiler (to read human readable form and convert into VBT.dat binary format - TBD/TODO).
When the VBT was invented, it might have been named after Intel's Video BIOS because that was its first consumer. However the name is or has become unrelated to its function. If somebody would come up with a name for the VBT, looking at what it is today, somebody might call it '''''Intel Graphics Driver Configuration Table (IGDCT)'''''. The acronym IGDCT looks much different from VBE, no temptation to see them related. Also, why should GOP replace IGDCT and reinvent how Intel develops its graphics drivers? GOP is just about pre-OS environments (cross-vendor), while IGDCT is common to all of Intel's graphics drivers.
From another perspective: IGDCT contains proprietary settings for Intel silicon, close to register level. VBE is, at its core, about high-level framebuffer (data in RAM) formats.
- [https://en.wikipedia.org/wiki/Video_BIOS Video BIOS]
- [https://en.wikipedia.org/wiki/Real_mode Real Mode]
- [https://en.wikipedia.org/wiki/Unified_Extensible_Firmware_Interface Unified Extensible Firmware Interface] (UEFI)
- [https://en.wikipedia.org/wiki/Advanced_Configuration_and_Power_Interface Advanced Configuration and Power Interface] (ACPI)
- [https://en.wikipedia.org/wiki/Open_Firmware Open Firmware]
- [https://en.wikipedia.org/wiki/OpenBIOS OpenBIOS]
- [https://en.wikipedia.org/wiki/Platform_Initialization_Specification Platform Initialization Specification]
- [https://en.wikipedia.org/wiki/System_Management_BIOS] (SMBIOS)
- [https://en.wikipedia.org/wiki/System_Management_Mode System Management Mode] (SMM)
- [https://en.wikipedia.org/wiki/Coreboot Coreboot]
[https://en.wikipedia.org/wiki/Category:Graphics_software Category:Graphics software]
All the material here is published under the [https://www.gnu.org/licenses/gpl-3.0.en.html GNU General Public License Version 3].
Please, do note that! It is very important... You'll understand why!
Thank you, Zoran Stojsavljevic