Video BIOS Table (VBT)
文章目录
本文内容源于:
https://github.com/ZoranStojsavljevic/Video-BIOS-Table-parser-assembler/wiki/Video-BIOS-Table-(VBT) 并对相关内容做出补充。
1. Definition of 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.
2. EDID Structure
To understand better what is Video BIOS Table, reader should read the following document: Understanding EDID - Extended Display Identification Data.
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).
3. VBT OSes (Windows and Linux) Support
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” drm/i915 Intel GFX Driver. 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.
4. VBT Legacy BIOS mode support
As far as legacy BIOS concerned, the context is placed in the x86 Real Mode of operation. 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.
5. VBT UEFI mode support
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:
- 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.
- 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.
6. VBT location
1 | sudo hexdump -C /sys/kernel/debug/dri/0/i915_vbt |
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: intel_vbt_decode.
7. Intel GPU Tools
VBT is also documented by intel-gpu-tools. There’s intel_vbt_decode available, intel_vbt_decode.c will print all tables in human readable form.
After installation, typeman intel_vbt_decode
for more detailed information.
8. Extension
Intel Integrated Graphics Device OpRegion Specification
ACPI/Intel: Rework Opregion support
From patch vfio/pci: Add support for opregion v2.1+, we can know:
- Before OpRegion v2.0(version 2.0), VBT data is stored in OpRegion mailbox #4,
- For OpRegion v2.0 or v2.1+:
- When VBT size is less than 6KB, the VBT will be stored on OpRegion Mailbox 4
- when VBT size exceeds 6KB:
- For OpRegion v2.0, the OpRegion Mailbox 3 RVDA store the absolute address of raw VBT data from OpRegion base
- For OpRegion v2.1+, the OpRegion Mailbox 3 RVDA store the relative address of raw VBT data from OpRegion base
参考资料: