efi_capsule_write(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

efi_capsule_write(9) πŸ’–βœ¨

Okay so bestie, welcome to the Kernel API Manual corner where today’s main character is efi_capsule_write. She’s here to store the capsule binary and hand it off to the efi_capsule_update() API. Slay.


✨ NAME ✨

efi_capsule_write β€” store the capsule binary and pass it to efi_capsule_update() API


🌸 SYNOPSIS 🌸

ssize_t efi_capsule_write (struct file *file , const char __user *buff ,
size_t count , loff_t *offp );

πŸŽ€ ARGUMENTS πŸŽ€

  • file β€” file pointer. literally the file pointer, bestie.
  • buff β€” buffer pointer. the buffer in question.
  • count β€” number of bytes in buff.
  • offp β€” not used. iconic β€œnot invited to the function” energy πŸ’…

πŸ’… DESCRIPTION πŸ’…

Expectation:

  • A user space tool should start at the beginning of capsule binary and pass data in sequentially.
  • Users should close and re-open this file note in order to upload more capsules.
  • After an error returned, user should close the file and restart the operation for the next try otherwise -EIO will be returned until the file is closed.
  • An EFI capsule header must be located at the beginning of capsule binary file and passed in as first block data of write operation.
lowkey important: that -EIO situation stays until the file is closed, so don’t just keep retrying into the void, okay? 🫢

πŸ¦‹ SEE ALSO πŸ¦‹


Source/version vibes: ./drivers/firmware/efi Β· date: October 2026. bye bestie, go write that capsule correctly πŸ’œπŸŽ€

πŸ“¦ where this page comes from