build_registry(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– NAME πŸ’–

okay so real talk β€” this page is build_registry(9), straight from the Kernel API Manual (section 9, so it's kernel-dev territory, not something you type in a shell, iykyk 🫢).

build_registry β€” create the registry RPC data. that's the whole gig. one job. iconic behavior honestly ✨


πŸŽ€ SYNOPSIS πŸŽ€

void build_registry (struct nvkm_gsp *gsp , PACKED_REGISTRY_TABLE
*registry );

no cap, that's the entire signature. go off πŸ’…


🌸 ARGUMENTS 🌸

  • gsp β€” gsp pointer. bestie that is the entire description and i'm not gonna invent lore about it πŸ™ˆ
  • registry β€” pointer to the RPC payload to fill. this is the lil container you're stuffing full of registry goodness πŸŽ€

πŸ¦‹ DESCRIPTION πŸ¦‹

so here's the vibe: once you've already added all your registry key/value pairs, you call this function to build the RPC. that's the moment. the main character moment πŸ”₯

the registry RPC looks like this:

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ NvU32 size;                              β”‚
β”‚ NvU32 numEntries;                        β”‚
β”‚ PACKED_REGISTRY_ENTRY                    β”‚
β”‚ Null-terminated key (string) for entry 0 β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
|Binary/string data value for entry 0    | (only if necessary)

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ PACKED_REGISTRY_ENTRY                    β”‚
β”‚ Null-terminated key (string) for entry 1 β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
|Binary/string data value for entry 1    | (only if necessary) ... (and
so on, one copy for each entry)

like… one copy for each entry. every single one. no skipping πŸ’€

and the data field of an entry? it's either a 32-bit integer (for type DWORD) or an offset into the PACKED_REGISTRY_TABLE (for types BINARY and STRING). two paths, pick your fighter ⭐

also important, don't sleep on this: all memory allocated by add_registry is released. every byte. it's giving cleanup era 🧹✨

fr fr do not go poking at that memory afterwards, it is gone πŸ’€

πŸ’œ SEE ALSO πŸ’œ

the whole friend group, in order:


mwah πŸ’‹ that's the page. sourced from ./drivers/gpu/drm/nouveau/nvkm... and dated October 2026 β€” go forth and build that registry, bestie, you're gonna slay πŸ‘‘πŸŒˆ

πŸ“¦ where this page comes from