create_sg_table(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ create_sg_table(9) ✨

okay bestie, welcome to the Kernel API Manual, section 9 β€” this one's a lil function that lives in the DRM/AMD world and she's honestly so real for what she does πŸŽ€


πŸ’– NAME πŸ’–

create_sg_table β€” literally makes you an sg_table for a contiguous DMA addr range πŸ¦‹


🌸 SYNOPSIS 🌸

struct sg_table * create_sg_table (uint64_t addr , uint32_t size );

✨ ARGUMENTS ✨

  • addr β€” the starting address you want it to point at, like the main character of this whole operation πŸ‘‘
  • size β€” how big the memory area is, in bytes, and yes it's exactly the area being pointed to πŸ“

πŸ’… DESCRIPTION πŸ’…

so what she does is: allocates an instance of sg_table and initializes it so it points to the memory area you specified with the input params, no cap. the address that gets used to build this is assumed to be DMA mapped β€” if that's needed, that is πŸ™ˆ

and here's the tea: DOORBELL or MMIO BOs only use one single scatterlist node</> in their sg_table, because they're physically contiguous. one node. iconic behavior, honestly πŸ’€


🌈 RETURN 🌈

an initialized instance of the SG Table β€” or NULL 😭


🫢 SEE ALSO 🫢

the kernel file lives right here, bestie: ./drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c

and the whole friend group:


okay that's the whole page, mwah πŸ’‹ β€” brought to you by ./drivers/gpu/drm/amd/amdgpu, dated October 2026, and yeah she's still create_sg_table(9) through and through. slay, go read the rest of the manpages bestie πŸ§šβ€β™€οΈπŸ’œ

πŸ“¦ where this page comes from