STRUCT XE_GSC(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… struct xe_gsc β€” GSC

okay so bestie, welcome to struct xe_gsc from the kernel API manual β€” this is the GSC struct and it's honestly kind of a big deal. it's got firmware management, a whole workqueue situation, and a proxy sub-struct that is very much doing the most. let's get into it 🫢


✨ SYNOPSIS ✨

here's the whole vibe, character for character, no cap:

struct xe_gsc {
    struct xe_uc_fw fw;
    u32 security_version;
    struct xe_bo *private;
    struct xe_exec_queue *q;
    struct workqueue_struct *wq;
    struct work_struct work;
    spinlock_t lock;
    u32 work_actions;
  #define GSC_ACTION_FW_LOAD BIT(0);
  #define GSC_ACTION_SW_PROXY BIT(1);
  #define GSC_ACTION_ER_COMPLETE BIT(2);
    struct {
      struct i915_gsc_proxy_component *component;
      struct mutex mutex;
      bool component_added;
      bool started;
      struct xe_bo *bo;
      struct iosys_map to_gsc;
      struct iosys_map from_gsc;
      void *to_csme;
      void *from_csme;
    } proxy;
 };

like, look at her. three #defined actions living right inside the struct body. iconic behavior honestly πŸ’…


🌸 Members 🌸

okay so now the member-by-member tour, and yes we're doing all of them, every single one, because they all matter:

  • fw β€” the generic uC firmware management. your girl's whole firmware situation lives here ✨
  • security_version β€” the SVN found in the fetched blob. that's the security version number, straight out of the blob πŸŽ€
  • private β€” private data for use by the GSC FW. not for you. for the firmware. respect the privacy πŸ™ˆ
  • q β€” the default queue used for submissions to GSC FW πŸ”₯
  • wq β€” the workqueue that handles jobs for delayed load and proxy handling. busy busy 🐝
  • work β€” the delayed load and proxy handling work itself
  • lock β€” protects access to the work_actions mask. do NOT touch work_actions without her, fr fr πŸ”’
  • work_actions β€” a mask of the actions to be performed in the work. lowkey the to-do list
  • proxy β€” the sub-structure containing all the SW proxy-related variables. she has her own little world going on in there πŸ¦‹
    • proxy.component β€” struct for communication with the mei component
    • proxy.mutex β€” protects the component binding and usage
    • proxy.component_added β€” whether the component has been added
    • proxy.started β€” whether the proxy has been started
    • proxy.bo β€” object to store messages to and from the GSC
    • proxy.to_gsc β€” map of the memory used to send messages to the GSC
    • proxy.from_gsc β€” map of the memory used to recv messages from the GSC
    • proxy.to_csme β€” pointer to the memory used to send messages to CSME
    • proxy.from_csme β€” pointer to the memory used to recv messages from CSME

and yes, to_gsc / from_gsc are the maps while to_csme / from_csme are the pointers β€” they are different things and we do not conflate them, bestie 😭

heads up: work_actions is guarded by lock, and proxy's stuff is guarded by proxy.mutex. two locks, two jobs, don't mix 'em up 🫢

πŸ‘‘ SEE ALSO πŸ‘‘

  • Kernel file ./drivers/gpu/drm/xe/xe_gsc_types.h β€” go read the source, iykyk

and that's the whole page, periodt πŸ’– this was struct xe_gsc(9) from the Kernel API Manual, living in ./drivers/gpu/drm/xe, dated October 2026. slay, go read your headers, ily, bye πŸŽ€πŸŒˆ

πŸ“¦ where this page comes from