debugfs_create_regset32(9)
π 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 isNULL, 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 astruct 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
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms