CSS-BASED FIRMWARE LAYOUT(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ‘‘ CSS-based Firmware Layout(9) πŸ‘‘

okay so this is the Kernel API Manual entry for CSS-based Firmware Layout, and bestie, it's literally the blueprint for how a firmware blob is packed. let's get into it πŸ’–


🌸 DESCRIPTION 🌸

The CSS-based firmware structure is used for GuC releases on all platforms, and for HuC releases up to DG1. Starting from DG2/MTL, the HuC uses the GSC layout instead. no cap, that's the whole vibe shift right there.

The CSS firmware layout looks like this:

            +======================================================================+
            |  Firmware blob                                                       |
            +===============+===============+============+============+============+
            |  CSS header   |     uCode     |  RSA key   |  modulus   |  exponent  |
            +===============+===============+============+============+============+
             <-header size->                 <---header size continued ----------->
             <--- size ----------------------------------------------------------->
                                             <-key size->
                                                          <-mod size->
                                                                       <-exp size->

so the firmware may or may not have modulus key and exponent data β€” it's giving optional DLC energy. the header, uCode and RSA signature are must-have components that will be used by the driver. the length of each component (they're all in dwords btw) can be found in the header. and in the case that modulus and exponent are not present in the fw β€” a.k.a. a truncated image β€” the length value still appears in the header. it's still there, just chillin' πŸ™ˆ

the driver will do some basic fw size validation based on the following rules:

  1. Header, uCode and RSA are must-have components.
  2. All firmware components, if they present, are in the sequence illustrated in the layout table above.
  3. Length info of each component can be found in header, in dwords.
  4. Modulus and exponent key are not required by driver. They may not appear in fw. So driver will load a truncated firmware in this case.

lowkey iconic that the driver just rolls with a truncated image like that 🫢


πŸ”₯ SEE ALSO πŸ”₯

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

and that's the whole page, bestie ✨ this one lives at ./drivers/gpu/drm/xe/abi, dated October 2026, and it's titled CSS-based Firmware Layout(9) β€” go off, king πŸ‘‘πŸ’…πŸ’–

πŸ“¦ where this page comes from