GSC-BASED FIRMWARE LAYOUT(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… GSC-based Firmware Layout

okay bestie, so this is the whole lore on the GSC-based firmware layout and honestly it's giving "directory structure but make it iconic" ✨

So here's the tea: the GSC-based firmware structure is what gets used for GSC releases on all platforms, and for HuC releases starting from DG2/MTL. Older HuC releases? They use the CSS-based layout instead, no cap. 🫢

And the way it's different from the CSS headers is that the GSC headers use a directory + entries structure β€” like, there's an array of addresses pointing to specific header extensions identified by a name. Very "contacts list energy" ngl. πŸ’… The header structures themselves are literally the same, but some of the entries are specific to GSC while others are specific to HuC. The manifest header entry (which includes the basic info about the binary, like the version) is always present β€” but it's named differently depending on the binary type. iykyk 🌸


πŸŽ€ The HuC binary situation

The HuC binary starts with a Code Partition Directory (CPD) header. The entries we actually care about for the driver are:

  1. "HUCP.man" β€” points to the manifest header for the HuC. πŸ‘‘
  2. "huc_fw" β€” points to the FW code. On platforms that support load via DMA and 2-step HuC authentication (i.e. MTL+), this is a full CSS-based binary. But if the GSC is the one doing the load (which only happens on DG2), this section only contains the uCode. πŸ’€

πŸ¦‹ The GSC-based HuC firmware layout, visualized

The GSC-based HuC firmware layout looks like this:

      +================================================+
      |  CPD Header                                    |
      +================================================+
      |  CPD entries[]                                 |
      |      entry1                                    |
      |      ...                                       |
      |      entryX                                    |
      |          "HUCP.man"                            |
      |           ...                                  |
      |           offset  >----------------------------|------o
      |      ...                                       |      |
      |      entryY                                    |      |
      |          "huc_fw"                              |      |
      |           ...                                  |      |
      |           offset  >----------------------------|----------o
      +================================================+      |   |
                                                              |   |
      +================================================+      |   |
      |  Manifest Header                               |<-----o   |
      |      ...                                       |          |
      |      FW version                                |          |
      |      ...                                       |          |
      +================================================+          |
                                                                  |
      +================================================+          |
      |  FW binary                                     |<---------o
      |      CSS (MTL+ only)                           |
      |      uCode                                     |
      |      RSA Key (MTL+ only)                       |
      |      ...                                       |
      +================================================+

πŸ’œ And now the GSC binary itself

The GSC binary starts instead with a layout header, which contains the locations of the various partitions of the binary. The one we're interested in is the boot1 partition, where we can find a BPDT header followed by entries β€” and one of those points to the RBE sub-section of the partition, which contains the CPD. 🧚

The GSC blob does not contain a CSS-based binary, so we only need to look for the manifest, which is under the "RBEP.man" CPD entry. πŸ“

And note β€” we have no need to find where the actual FW code is inside the image, because the GSC ROM will itself parse the headers to find it and load it. main character energy fr fr πŸ”₯

The GSC firmware header layout looks like this:

      +================================================+
      |  Layout Pointers                               |
      |      ...                                       |
      |      Boot1 offset  >---------------------------|------o
      |      ...                                       |      |
      +================================================+      |
                                                              |
      +================================================+      |
      |  BPDT header                                   |<-----o
      +================================================+
      |  BPDT entries[]                                |
      |      entry1                                    |
      |      ...                                       |
      |      entryX                                    |
      |          type == GSC_RBE                       |
      |          offset  >-----------------------------|------o
      |      ...                                       |      |
      +================================================+      |
                                                              |
      +================================================+      |
      |  CPD Header                                    |<-----o
      +================================================+
      |  CPD entries[]                                 |
      |      entry1                                    |
      |      ...                                       |
      |      entryX                                    |
      |          "RBEP.man"                            |
      |           ...                                  |
      |           offset  >----------------------------|------o
      |      ...                                       |      |
      +================================================+      |
                                                              |
      +================================================+      |
      | Manifest Header                                |<-----o
      |  ...                                           |
      |  FW version                                    |
      |  ...                                           |
      |  Security version                              |
      |  ...                                           |
      +================================================+

✨ SEE ALSO

Kernel file ./drivers/gpu/drm/xe/abi/uc_fw_abi.h, CSS-based Firmware Layout(9), Late binding Firmware Layout(9) 🌈


πŸ’– okay that's the whole page, bestie β€” go forth and parse some headers ✨

this little masterpiece lives at ./drivers/gpu/drm/xe/abi, dated October 2026, and it's literally titled GSC-based Firmware Layout(9) β€” slay πŸ’…πŸŽ€

πŸ“¦ where this page comes from