debugfs_create_regset32(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… debugfs_create_regset32(9) β€” bestie's guide to spilling register values into debugfs ✨

okay so this is from the Kernel API Manual, and it's genuinely iconic for anyone who's ever wanted to peek at 32-bit registers without writing a whole thing. no cap, it's giving "tiny window into the silicon." πŸ¦‹


🌸 NAME 🌸

debugfs_create_regset32 β€” create a debugfs file that returns register values πŸ’–


✨ SYNOPSIS ✨

void debugfs_create_regset32 (const char *name , umode_t mode , struct
dentry *parent , struct debugfs_regset32 *regset );

πŸŽ€ ARGUMENTS πŸŽ€

  • name β€” a pointer to a string containing the name of the file to create. yes bestie, that's the filename, you get to pick it 🫢
  • mode β€” the permission that the file should have. this is the vibe check for who gets to read it πŸ‘‘
  • parent β€” a pointer to the parent dentry for this file. This should be a directory dentry if set. If this parameter is NULL, then the file will be created in the root of the debugfs filesystem. so like, no parent? it goes straight to the top, main character energy πŸ’…
  • regset β€” a pointer to a struct debugfs_regset32, which contains a pointer to an array of register definitions, the array size and the base address where the register bank is to be found. literally the whole map of where the registers live πŸ—ΊοΈβœ¨

πŸ’œ DESCRIPTION πŸ’œ

This function creates a file in debugfs with the given name that reports the names and values of a set of 32-bit registers. If the mode variable is so set it can be read from. Writing is not supported. nope, read-only, look but don't touch, we respect boundaries here πŸ™ˆπŸ’€


πŸ”₯ SEE ALSO πŸ”₯

Kernel file ./fs/debugfs/file.c β€” and honestly the whole friend group:

debugfs_file_get(9), debugfs_file_put(9), debugfs_enter_cancellation(9), debugfs_leave_cancellation(9), debugfs_create_u8(9), debugfs_create_u16(9), debugfs_create_u32(9), debugfs_create_u64(9), debugfs_create_ulong(9), debugfs_create_x8(9), debugfs_create_x16(9), debugfs_create_x32(9), debugfs_create_x64(9), debugfs_create_size_t(9), debugfs_create_atomic_t(9), debugfs_create_bool(9), debugfs_create_str(9), debugfs_create_blob(9), debugfs_create_u32_array(9), debugfs_print_regs32(9), debugfs_create_devm_seqfile(9)

go read them all, iykyk πŸ“šπŸŒˆ


reminder bestie: writing to this file is not supported. don't try it. periodt. πŸ›‘

and that's the tea β˜• from ./fs/debugfs, dated October 2026 β€” catch you in the next debugfs_create_regset32(9) πŸ’–βœ¨πŸŽ€

πŸ“¦ where this page comes from