fpga_mgr_buf_load_sg(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ¦‹ fpga_mgr_buf_load_sg β€” the Kernel API Manual, bestie edition ✨

Okay so real talk, this is a page straight out of the Kernel API Manual and it's about fpga_mgr_buf_load_sg(9) β€” yes the whole thing, all nine args of it. Buckle up, it's honestly not that deep πŸŽ€


✨ NAME ✨

fpga_mgr_buf_load_sg β€” load an fpga from an image in a buffer that lives in a scatter list πŸ’…


🌸 SYNOPSIS 🌸

int fpga_mgr_buf_load_sg (struct fpga_manager *mgr , struct fpga_image_info *info , struct sg_table *sgt );

🫢 ARGUMENTS 🫢

  • mgr β€” the fpga manager. your main character struct, fr.
  • info β€” the fpga image specific information. all the deets about what we're loading ✨
  • sgt β€” the scatterlist table. it's giving "the buffer, but scattered" πŸ¦‹

πŸ’œ DESCRIPTION πŸ’œ

So what this does is it steps the low level fpga manager through the device-specific steps of, in order:

  1. getting an FPGA ready to be configured,
  2. writing the image to it,
  3. then doing whatever post-configuration steps are necessary.

Periodt. That's the whole glow-up sequence πŸ”₯

Lowkey important: this code assumes the caller got the mgr pointer from of_fpga_mgr_get or fpga_mgr_get β€” and checked that it is not an error code. Like, please check it. Do not skip the check. πŸ™ˆ

And bestie, here's the slay: this is the preferred entry point for FPGA programming. It does not require any contiguous kernel memory. No cap, that's why it's iconic πŸ‘‘


🌈 RETURN 🌈

  • 0 on success πŸŽ‰
  • a negative error code otherwise 😭

⭐ SEE ALSO ⭐

Kernel file ./drivers/fpga/fpga-mgr.c β€” go read it, iykyk 🧚


k bye bestie, mwah πŸ’– this lil gem lives in ./drivers/fpga, stamped October 2026, and it answers to fpga_mgr_buf_load_sg(9) β€” okurrr πŸ“βœ¨

πŸ“¦ where this page comes from