[PATCH v2 3/7] nova-core: docs: Document vbios layout
Bagas Sanjaya
bagasdotme at gmail.com
Mon May 5 03:00:53 UTC 2025
On Sat, May 03, 2025 at 12:07:55AM -0400, Joel Fernandes wrote:
> +.. SPDX-License-Identifier: (GPL-2.0+ OR MIT)
> +==========
> +VBIOS
> +==========
Separate SPDX line and title heading.
> +- PciAt Image (Type 0x00) - This is the standard PCI BIOS image who's naming likely
> + comes from the "IBM PC/AT" architecture.
Combine these two lines on the same bullet list item.
> +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()| | |
+ | | └----------------------------┘ | |
+ | └-----------------------------------------------┘ |
+ └------------------------------------------------------------------------┘
Falcon data Lookup
------------------
Thanks.
--
An old man doll... just what I always wanted! - Clara
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/nouveau/attachments/20250505/56a7297f/attachment-0001.sig>
More information about the Nouveau
mailing list