efi_crc32(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… efi_crc32(9) β€” the EFI-flavoured crc32, bestie

okay so this is a page from the Kernel API Manual, and honestly? it's a little baddie of a function. let's get into it ✨


🌸 NAME 🌸

efi_crc32 β€” it's giving "EFI version of crc32 function", and that's literally the whole vibe πŸŽ€


πŸ¦‹ SYNOPSIS πŸ¦‹

u32 efi_crc32 (const void *buf , unsigned long len );

no cap, that's the whole signature. she's short, she's sweet, she takes two things and gives you back a u32. periodt πŸ’…


✨ ARGUMENTS ✨

  • buf β€” the buffer you want the crc32 of, like that's the whole thing she's chewing on 🫢
  • len β€” the length of buf. yes bestie, you do have to tell her how long it is, she's not psychic 😭

πŸ’– DESCRIPTION πŸ’–

so the tea is: this one returns the EFI-style CRC32 value for buf 🧚 and the way it does it is honestly so specific:

  • it uses the little endian Ethernet polynomial (iconic, classic, we love her)
  • but it seeds the function with ~0
  • and then xor's with ~0 at the end

that's the whole recipe. seed with ~0, cook, xor with ~0. slay πŸ”₯

πŸ“ now listen, bestie, here's a fun historical lil' detail: the EFI Specification, v1.02, has a reference to Dr. Dobbs Journal, May 1994 β€” except actually it's in May 1992. yeah. the spec got the date wrong. not me clocking that πŸ’€πŸ™ˆ

πŸ‘‘ SEE ALSO πŸ‘‘

go check out the kernel file ./block/partitions/efi.c, plus all her besties in the group chat 🌈:

and also the directory ./block/partitions, because that's where all of this lives πŸ¦‹


⭐ and that's the page!! one last lil' sign-off, mwah πŸ’œ: this one comes from ./block/partitions, dated October 2026, and it's living its best life inside the Kernel API Manual as efi_crc32(9). go forth and checksum, queen πŸ‘‘βœ¨

πŸ“¦ where this page comes from