[PATCH v2 3/7] nova-core: docs: Document vbios layout

Bagas Sanjaya bagasdotme at gmail.com
Mon May 5 03:12:47 UTC 2025


On 5/5/25 10:00, Bagas Sanjaya wrote:
> On Sat, May 03, 2025 at 12:07:55AM -0400, Joel Fernandes wrote:
>> +Here is a block diagram of the VBIOS layout::
>> +
>> + ┌────────────────────────────────────────────────────────────────────────┐
>> + │ VBIOS (Starting at ROM_OFFSET: 0x300000)                               │
>> + ├────────────────────────────────────────────────────────────────────────┤
>> + │ ┌───────────────────────────────────────────────┐                      │
>> + │ │ PciAt Image (Type 0x00)                       │                      │
>> + │ ├───────────────────────────────────────────────┤                      │
>> + │ │ ┌───────────────────┐                         │                      │
>> + │ │ │ ROM Header        │                         │                      │
>> + │ │ │ (Signature 0xAA55)│                         │                      │
>> + │ │ └───────────────────┘                         │                      │
>> + │ │         │ rom header's pci_data_struct_offset │                      │
>> + │ │         │ points to the PCIR structure        │                      │
>> + │ │         V                                     │                      │
>> + │ │ ┌───────────────────┐                         │                      │
>> + │ │ │ PCIR Structure    │                         │                      │
>> + │ │ │ (Signature "PCIR")│                         │                      │
>> + │ │ │ last_image: 0x80  │                         │                      │
>> + │ │ │ image_len: size   │                         │                      │
>> + │ │ │ in 512-byte units │                         │                      │
>> + │ │ └───────────────────┘                         │                      │
>> + │ │         │                                     │                      │
>> + │ │         │ NPDE immediately follows PCIR       │                      │
>> + │ │         V                                     │                      │
>> + │ │ ┌───────────────────┐                         │                      │
>> + │ │ │ NPDE Structure    │                         │                      │
>> + │ │ │ (Signature "NPDE")│                         │                      │
>> + │ │ │ last_image: 0x00  │                         │                      │
>> + │ │ └───────────────────┘                         │                      │
>> + │ │                                               │                      │
>> + │ │ ┌───────────────────┐                         │                      │
>> + │ │ │ BIT Header        │ (Signature scanning     │                      │
>> + │ │ │ (Signature "BIT") │  provides the location  │                      │
>> + │ │ └───────────────────┘  of the BIT table)      │                      │
>> + │ │         │ header is                           │                      │
>> + │ │         | followed by a table of tokens       │                      │
>> + │ │         V one of which is for falcon data.    │                      │
>> + │ │ ┌───────────────────┐                         │                      │
>> + │ │ │ BIT Tokens        │                         │                      │
>> + │ | |  ______________   |                         |                      |
>> + │ │ │ │ Falcon Data │   │                         │                      │
>> + │ │ │ │ Token (0x70)│---+------------>------------┼──+                   │
>> + │ │ │ └─────────────┘   │  falcon_data_ptr()      │  │                   │
>> + │ │ └───────────────────┘                         │  V                   │
>> + │ └───────────────────────────────────────────────┘  │                   │
>> + │              (no gap between images)               │                   │
>> + │ ┌───────────────────────────────────────────────┐  │                   │
>> + │ │ EFI Image (Type 0x03)                         │  │                   │
>> + │ ├───────────────────────────────────────────────┤  │                   │
>> + │ | Contains the UEFI GOP driver (Graphics Output)|  |                   |
>> + │ │ ┌───────────────────┐                         │  │                   │
>> + │ │ │ ROM Header        │                         │  │                   │
>> + │ │ +───────────────────+                         │  │                   │
>> + │ │ │ PCIR Structure    │                         │  │                   │
>> + │ │ +───────────────────+                         │  │                   │
>> + │ │ │ NPDE Structure    │                         │  │                   │
>> + │ │ └───────────────────┘                         │  │                   │
>> + │ │ │ Image data        │                         │  │                   │
>> + │ │ └───────────────────┘                         │  │                   │
>> + │ └───────────────────────────────────────────────┘  │                   │
>> + │              (no gap between images)               │                   │
>> + │ ┌───────────────────────────────────────────────┐  │                   │
>> + │ │ First FwSec Image (Type 0xE0)                 │  │                   │
>> + │ ├───────────────────────────────────────────────┤  │                   │
>> + │ │ ┌───────────────────┐                         │  │                   │
>> + │ │ │ ROM Header        │                         │  │                   │
>> + │ │ +───────────────────+                         │  │                   │
>> + │ │ │ PCIR Structure    │                         │  │                   │
>> + │ │ +───────────────────+                         │  │                   │
>> + │ │ │ NPDE Structure    │                         │  │                   │
>> + │ │ └───────────────────┘                         │  │                   │
>> + │ │ │ Image data        │                         │  │                   │
>> + │ │ └───────────────────┘                         │  │                   │
>> + │ └───────────────────────────────────────────────┘  │                   │
>> + │              (no gap between images)               │                   │
>> + │ ┌───────────────────────────────────────────────┐  │                   │
>> + │ │ Second FwSec Image (Type 0xE0)                │  │                   │
>> + │ ├───────────────────────────────────────────────┤  │                   │
>> + │ │ ┌───────────────────┐                         │  │                   │
>> + │ │ │ ROM Header        │                         │  │                   │
>> + │ │ +───────────────────+                         │  │                   │
>> + │ │ │ PCIR Structure    │                         │  │                   │
>> + │ │ +───────────────────+                         │  │                   │
>> + │ │ │ NPDE Structure    │                         │  │                   │
>> + │ │ └───────────────────┘                         │  │                   │
>> + │ │                                               │  │                   │
>> + │ │ ┌───────────────────┐                         │  │                   │
>> + │ │ │ PMU Lookup Table  │ <- falcon_data_offset   │<─┘                   │
>> + │ │ │ ┌─────────────┐   │    pmu_lookup_table     │                      │
>> + │ │ │ │ Entry 0x85  │   │                         │                      │
>> + │ │ │ │ FWSEC_PROD  │   │                         │                      │
>> + │ │ │ └─────────────┘   │                         │                      │
>> + │ │ └───────────────────┘                         │                      │
>> + │ │         │                                     │                      │
>> + │ │         │ points to                           │                      │
>> + │ │         V                                     │                      │
>> + │ │ ┌───────────────────┐                         │                      │
>> + │ │ │ FalconUCodeDescV3 │ <- falcon_ucode_offset  │                      │
>> + │ │ │ (FWSEC Firmware)  │    fwsec_header()       │                      │
>> + │ │ └───────────────────┘                         │                      │
>> + │ │         │   immediately followed  by...       │                      │
>> + │ │         V                                     │                      │
>> + │ │ ┌────────────────────────────┐                │                      │
>> + │ │ │ Signatures + FWSEC Ucode   │                │                      │
>> + │ │ │ fwsec_sigs(), fwsec_ucode()│                │                      │
>> + │ │ └────────────────────────────┘                │                      │
>> + │ └───────────────────────────────────────────────┘______________________│
> 
> Diagram borders look messy in htmldocs output (due to Unicode characters
> ─ and │), so I use ASCII dash and vertical bar instead:
> 
> ---- >8 ----
> diff --git a/Documentation/gpu/nova/core/vbios.rst b/Documentation/gpu/nova/core/vbios.rst
> index dd6ac891e5f1d0..c68ef0e7b70124 100644
> --- a/Documentation/gpu/nova/core/vbios.rst
> +++ b/Documentation/gpu/nova/core/vbios.rst
> @@ -56,112 +56,113 @@ The VBIOS layout is roughly a series of concatenated images as follows:
>   
>   Here is a block diagram of the VBIOS layout::
>   
> - ┌────────────────────────────────────────────────────────────────────────┐
> - │ VBIOS (Starting at ROM_OFFSET: 0x300000)                               │
> - ├────────────────────────────────────────────────────────────────────────┤
> - │ ┌───────────────────────────────────────────────┐                      │
> - │ │ PciAt Image (Type 0x00)                       │                      │
> - │ ├───────────────────────────────────────────────┤                      │
> - │ │ ┌───────────────────┐                         │                      │
> - │ │ │ ROM Header        │                         │                      │
> - │ │ │ (Signature 0xAA55)│                         │                      │
> - │ │ └───────────────────┘                         │                      │
> - │ │         │ rom header's pci_data_struct_offset │                      │
> - │ │         │ points to the PCIR structure        │                      │
> - │ │         V                                     │                      │
> - │ │ ┌───────────────────┐                         │                      │
> - │ │ │ PCIR Structure    │                         │                      │
> - │ │ │ (Signature "PCIR")│                         │                      │
> - │ │ │ last_image: 0x80  │                         │                      │
> - │ │ │ image_len: size   │                         │                      │
> - │ │ │ in 512-byte units │                         │                      │
> - │ │ └───────────────────┘                         │                      │
> - │ │         │                                     │                      │
> - │ │         │ NPDE immediately follows PCIR       │                      │
> - │ │         V                                     │                      │
> - │ │ ┌───────────────────┐                         │                      │
> - │ │ │ NPDE Structure    │                         │                      │
> - │ │ │ (Signature "NPDE")│                         │                      │
> - │ │ │ last_image: 0x00  │                         │                      │
> - │ │ └───────────────────┘                         │                      │
> - │ │                                               │                      │
> - │ │ ┌───────────────────┐                         │                      │
> - │ │ │ BIT Header        │ (Signature scanning     │                      │
> - │ │ │ (Signature "BIT") │  provides the location  │                      │
> - │ │ └───────────────────┘  of the BIT table)      │                      │
> - │ │         │ header is                           │                      │
> - │ │         | followed by a table of tokens       │                      │
> - │ │         V one of which is for falcon data.    │                      │
> - │ │ ┌───────────────────┐                         │                      │
> - │ │ │ BIT Tokens        │                         │                      │
> - │ | |  ______________   |                         |                      |
> - │ │ │ │ Falcon Data │   │                         │                      │
> - │ │ │ │ Token (0x70)│---+------------>------------┼──+                   │
> - │ │ │ └─────────────┘   │  falcon_data_ptr()      │  │                   │
> - │ │ └───────────────────┘                         │  V                   │
> - │ └───────────────────────────────────────────────┘  │                   │
> - │              (no gap between images)               │                   │
> - │ ┌───────────────────────────────────────────────┐  │                   │
> - │ │ EFI Image (Type 0x03)                         │  │                   │
> - │ ├───────────────────────────────────────────────┤  │                   │
> - │ | Contains the UEFI GOP driver (Graphics Output)|  |                   |
> - │ │ ┌───────────────────┐                         │  │                   │
> - │ │ │ ROM Header        │                         │  │                   │
> - │ │ +───────────────────+                         │  │                   │
> - │ │ │ PCIR Structure    │                         │  │                   │
> - │ │ +───────────────────+                         │  │                   │
> - │ │ │ NPDE Structure    │                         │  │                   │
> - │ │ └───────────────────┘                         │  │                   │
> - │ │ │ Image data        │                         │  │                   │
> - │ │ └───────────────────┘                         │  │                   │
> - │ └───────────────────────────────────────────────┘  │                   │
> - │              (no gap between images)               │                   │
> - │ ┌───────────────────────────────────────────────┐  │                   │
> - │ │ First FwSec Image (Type 0xE0)                 │  │                   │
> - │ ├───────────────────────────────────────────────┤  │                   │
> - │ │ ┌───────────────────┐                         │  │                   │
> - │ │ │ ROM Header        │                         │  │                   │
> - │ │ +───────────────────+                         │  │                   │
> - │ │ │ PCIR Structure    │                         │  │                   │
> - │ │ +───────────────────+                         │  │                   │
> - │ │ │ NPDE Structure    │                         │  │                   │
> - │ │ └───────────────────┘                         │  │                   │
> - │ │ │ Image data        │                         │  │                   │
> - │ │ └───────────────────┘                         │  │                   │
> - │ └───────────────────────────────────────────────┘  │                   │
> - │              (no gap between images)               │                   │
> - │ ┌───────────────────────────────────────────────┐  │                   │
> - │ │ Second FwSec Image (Type 0xE0)                │  │                   │
> - │ ├───────────────────────────────────────────────┤  │                   │
> - │ │ ┌───────────────────┐                         │  │                   │
> - │ │ │ ROM Header        │                         │  │                   │
> - │ │ +───────────────────+                         │  │                   │
> - │ │ │ PCIR Structure    │                         │  │                   │
> - │ │ +───────────────────+                         │  │                   │
> - │ │ │ NPDE Structure    │                         │  │                   │
> - │ │ └───────────────────┘                         │  │                   │
> - │ │                                               │  │                   │
> - │ │ ┌───────────────────┐                         │  │                   │
> - │ │ │ PMU Lookup Table  │ <- falcon_data_offset   │<─┘                   │
> - │ │ │ ┌─────────────┐   │    pmu_lookup_table     │                      │
> - │ │ │ │ Entry 0x85  │   │                         │                      │
> - │ │ │ │ FWSEC_PROD  │   │                         │                      │
> - │ │ │ └─────────────┘   │                         │                      │
> - │ │ └───────────────────┘                         │                      │
> - │ │         │                                     │                      │
> - │ │         │ points to                           │                      │
> - │ │         V                                     │                      │
> - │ │ ┌───────────────────┐                         │                      │
> - │ │ │ FalconUCodeDescV3 │ <- falcon_ucode_offset  │                      │
> - │ │ │ (FWSEC Firmware)  │    fwsec_header()       │                      │
> - │ │ └───────────────────┘                         │                      │
> - │ │         │   immediately followed  by...       │                      │
> - │ │         V                                     │                      │
> - │ │ ┌────────────────────────────┐                │                      │
> - │ │ │ Signatures + FWSEC Ucode   │                │                      │
> - │ │ │ fwsec_sigs(), fwsec_ucode()│                │                      │
> - │ │ └────────────────────────────┘                │                      │
> - │ └───────────────────────────────────────────────┘______________________│
> + ┌------------------------------------------------------------------------┐
> + | VBIOS (Starting at ROM_OFFSET: 0x300000)                               |
> + ├------------------------------------------------------------------------┤
> + | ┌-----------------------------------------------┐                      |
> + | | PciAt Image (Type 0x00)                       |                      |
> + | ├-----------------------------------------------┤                      |
> + | | ┌-------------------┐                         |                      |
> + | | | ROM Header        |                         |                      |
> + | | | (Signature 0xAA55)|                         |                      |
> + | | └-------------------┘                         |                      |
> + | |         | rom header's pci_data_struct_offset |                      |
> + | |         | points to the PCIR structure        |                      |
> + | |         V                                     |                      |
> + | | ┌-------------------┐                         |                      |
> + | | | PCIR Structure    |                         |                      |
> + | | | (Signature "PCIR")|                         |                      |
> + | | | last_image: 0x80  |                         |                      |
> + | | | image_len: size   |                         |                      |
> + | | | in 512-byte units |                         |                      |
> + | | └-------------------┘                         |                      |
> + | |         |                                     |                      |
> + | |         | NPDE immediately follows PCIR       |                      |
> + | |         V                                     |                      |
> + | | ┌-------------------┐                         |                      |
> + | | | NPDE Structure    |                         |                      |
> + | | | (Signature "NPDE")|                         |                      |
> + | | | last_image: 0x00  |                         |                      |
> + | | └-------------------┘                         |                      |
> + | |                                               |                      |
> + | | ┌-------------------┐                         |                      |
> + | | | BIT Header        | (Signature scanning     |                      |
> + | | | (Signature "BIT") |  provides the location  |                      |
> + | | └-------------------┘  of the BIT table)      |                      |
> + | |         | header is                           |                      |
> + | |         | followed by a table of tokens       |                      |
> + | |         V one of which is for falcon data.    |                      |
> + | | ┌-------------------┐                         |                      |
> + | | | BIT Tokens        |                         |                      |
> + | | | ┌-------------┐   |                         |                      |
> + | | | | Falcon Data |   |                         |                      |
> + | | | | Token (0x70)|---+------------>------------┼--+                   |
> + | | | └-------------┘   |  falcon_data_ptr()      |  |                   |
> + | | └-------------------┘                         |  V                   |
> + | └-----------------------------------------------┘  |                   |
> + |              (no gap between images)               |                   |
> + | ┌-----------------------------------------------┐  |                   |
> + | | EFI Image (Type 0x03)                         |  |                   |
> + | ├-----------------------------------------------┤  |                   |
> + | | Contains the UEFI GOP driver (Graphics Output)|  |                   |
> + | | ┌-------------------┐                         |  |                   |
> + | | | ROM Header        |                         |  |                   |
> + | | +-------------------+                         |  |                   |
> + | | | PCIR Structure    |                         |  |                   |
> + | | +-------------------+                         |  |                   |
> + | | | NPDE Structure    |                         |  |                   |
> + | | └-------------------┘                         |  |                   |
> + | | | Image data        |                         |  |                   |
> + | | └-------------------┘                         |  |                   |
> + | └-----------------------------------------------┘  |                   |
> + |              (no gap between images)               |                   |
> + | ┌-----------------------------------------------┐  |                   |
> + | | First FwSec Image (Type 0xE0)                 |  |                   |
> + | ├-----------------------------------------------┤  |                   |
> + | | ┌-------------------┐                         |  |                   |
> + | | | ROM Header        |                         |  |                   |
> + | | +-------------------+                         |  |                   |
> + | | | PCIR Structure    |                         |  |                   |
> + | | +-------------------+                         |  |                   |
> + | | | NPDE Structure    |                         |  |                   |
> + | | └-------------------┘                         |  |                   |
> + | | | Image data        |                         |  |                   |
> + | | └-------------------┘                         |  |                   |
> + | └-----------------------------------------------┘  |                   |
> + |              (no gap between images)               |                   |
> + | ┌-----------------------------------------------┐  |                   |
> + | | Second FwSec Image (Type 0xE0)                |  |                   |
> + | ├-----------------------------------------------┤  |                   |
> + | | ┌-------------------┐                         |  |                   |
> + | | | ROM Header        |                         |  |                   |
> + | | +-------------------+                         |  |                   |
> + | | | PCIR Structure    |                         |  |                   |
> + | | +-------------------+                         |  |                   |
> + | | | NPDE Structure    |                         |  |                   |
> + | | └-------------------┘                         |  |                   |
> + | |                                               |  |                   |
> + | | ┌-------------------┐                         |  |                   |
> + | | | PMU Lookup Table  | <- falcon_data_offset   |<-┘                   |
> + | | | ┌-------------┐   |    pmu_lookup_table     |                      |
> + | | | | Entry 0x85  |   |                         |                      |
> + | | | | FWSEC_PROD  |   |                         |                      |
> + | | | └-------------┘   |                         |                      |
> + | | └-------------------┘                         |                      |
> + | |         |                                     |                      |
> + | |         | points to                           |                      |
> + | |         V                                     |                      |
> + | | ┌-------------------┐                         |                      |
> + | | | FalconUCodeDescV3 | <- falcon_ucode_offset  |                      |
> + | | | (FWSEC Firmware)  |    fwsec_header()       |                      |
> + | | └-------------------┘                         |                      |
> + | |         |   immediately followed  by...       |                      |
> + | |         V                                     |                      |
> + | | ┌----------------------------┐                |                      |
> + | | | Signatures + FWSEC Ucode   |                |                      |
> + | | | fwsec_sigs(), fwsec_ucode()|                |                      |
> + | | └----------------------------┘                |                      |
> + | └-----------------------------------------------┘                      |
> + └------------------------------------------------------------------------┘
>   

Addendum: I'm using Roboto Mono on my htmldocs build (using custom style 
sheet). The diagram looks fine with default Alabaster font stack 
(Consolas). If you disagree you can ignore above diff.

Thanks.

-- 
An old man doll... just what I always wanted! - Clara


More information about the dri-devel mailing list