STRUCT ETM_CONFIG(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– struct etm_config(9) β€” the Kernel API Manual, but make it a group chat πŸ’–

okay so bestie, buckle up, because today we're talking about struct etm_config β€” the literal MAIN CHARACTER of the ETM world. It's a struct that holds all the configuration info related to an ETM, and yes, it's giving "backstage pass to the whole tracing operation." 🌸

This one lives in the Kernel API Manual, section 9, and it's gonna be a whole journey. Grab a strawberry drink πŸ“ and let's go.


✨ SYNOPSIS ✨

Lowkey the biggest vibe reveal of the whole page. Here's the whole struct, verbatim, no cuts, no skips, no "you get the idea":

struct etm_config {
    u32 mode;
    u32 ctrl;
    u32 trigger_event;
    u32 startstop_ctrl;
    u32 enable_event;
    u32 enable_ctrl1;
    u32 enable_ctrl2;
    u32 fifofull_level;
    u8 addr_idx;
    u32 addr_val[ETM_MAX_ADDR_CMP];
    u32 addr_acctype[ETM_MAX_ADDR_CMP];
    u32 addr_type[ETM_MAX_ADDR_CMP];
    u8 cntr_idx;
    u32 cntr_rld_val[ETM_MAX_CNTR];
    u32 cntr_event[ETM_MAX_CNTR];
    u32 cntr_rld_event[ETM_MAX_CNTR];
    u32 cntr_val[ETM_MAX_CNTR];
    u32 seq_12_event;
    u32 seq_21_event;
    u32 seq_23_event;
    u32 seq_31_event;
    u32 seq_32_event;
    u32 seq_13_event;
    u32 seq_curr_state;
    u8 ctxid_idx;
    u32 ctxid_pid[ETM_MAX_CTXID_CMP];
    u32 ctxid_mask;
    u32 sync_freq;
    u32 timestamp_event;
 };

like, that's the whole cast. every single one of them matters. πŸ‘‘


πŸŽ€ Members πŸŽ€

okay now let's meet the members one by one, because they all have lore.

  • mode β€” controls the various modes supported by this ETM/PTM. it's the vibe-setter fr fr.
  • ctrl β€” used in conjunction with mode. they're a duo, you can't separate them, it's giving iconic partnership.
  • trigger_event β€” setting for register ETMTRIGGER.
  • startstop_ctrl β€” setting for register ETMTSSCR.
  • enable_event β€” setting for register ETMTEEVR.
  • enable_ctrl1 β€” setting for register ETMTECR1.
  • enable_ctrl2 β€” setting for register ETMTECR2.
  • fifofull_level β€” setting for register ETMFFLR.
  • addr_idx β€” index for the address comparator selection.
  • addr_val β€” value for address comparator register.
  • addr_acctype β€” access type for address comparator register.
  • addr_type β€” current status of the comparator register. not the past, not the future, the current status. periodt.
  • cntr_idx β€” index for the counter register selection.
  • cntr_rld_val β€” reload value of a counter register.
  • cntr_event β€” control for counter enable register.
  • cntr_rld_event β€” value for counter reload event register.
  • cntr_val β€” counter value register.
  • seq_12_event β€” event causing the transition from 1 to 2.
  • seq_21_event β€” event causing the transition from 2 to 1.
  • seq_23_event β€” event causing the transition from 2 to 3.
  • seq_31_event β€” event causing the transition from 3 to 1.
  • seq_32_event β€” event causing the transition from 3 to 2.
  • seq_13_event β€” event causing the transition from 1 to 3.
  • seq_curr_state β€” current value of the sequencer register.
  • ctxid_idx β€” index for the context ID registers.
  • ctxid_pid β€” value for the context ID to trigger on.
  • ctxid_mask β€” mask applicable to all the context IDs. all of them. every last one. πŸ’…
  • sync_freq β€” Synchronisation frequency.
  • timestamp_event β€” Defines an event that requests the insertion of a timestamp into the trace stream. time-stamping? we love to see it. ⭐

πŸ¦‹ SEE ALSO πŸ¦‹

go touch some other docs, bestie, they're right here:

  • Kernel file ./drivers/hwtracing/coresight/coresight-etm.h struct etm_drvdata(9)

ngl the sequencer transitions (1β†’2, 2β†’1, 2β†’3, 3β†’1, 3β†’2, 1β†’3) are lowkey the most dramatic part of this whole page. six events, all iconic, no cap. πŸ”₯

and that's the whole page, bestie!! 🫢 this little beauty comes to you from ./drivers/hwtracing/coresight, dated October 2026, and it's filed under struct etm_config(9). mwah, go forth and configure your ETM responsibly πŸ’œβœ¨πŸŽ€

πŸ“¦ where this page comes from