firmware_ma...ntry_in_list(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ firmware_map_find_entry_in_list β€” Kernel API Manual ✨

ok so bestie, welcome to the Kernel API Manual πŸ’– this little page is all about firmware_map_find_entry_in_list(9) β€” yes the name is a whole mouthful, the header truncates it to firmware_ma...ntry_in_list(9) and honestly? relatable, she's long. anyway. it's a search function, it's tiny, it's iconic, let's go πŸŽ€


🌸 NAME 🌸

firmware_map_find_entry_in_list β€” search a memmap entry in a given list. that's it. that's the whole job. finding a thing in a list. slay πŸ’…


✨ SYNOPSIS ✨

struct firmware_map_entry * firmware_map_find_entry_in_list (u64 start ,
u64 end , const char *type , struct list_head *list );

look at her. returns a pointer to struct firmware_map_entry. takes four things. no cap, that's the whole signature 🫢


πŸ’œ ARGUMENTS πŸ’œ

  • start β€” the start of the memory range. where the vibe begins ✨
  • end β€” the end of the memory range. and bestie, it's exclusive β€” do not forget the exclusive part, it's giving "off by one" trap energy 😭
  • type β€” the type of the memory range. gotta know what kind of range we're dealing with πŸ¦‹
  • list β€” the list in which to find the entry. the search zone. the main character list πŸ‘‘

πŸ”₯ DESCRIPTION πŸ”₯

so what does she actually do? this function finds the memmap entry of a given memory range, inside a given list. literally that. find entry, in list. the name was not lying to you πŸ’€

but here's the part you actually cannot skip, and I mean it, ngl this is the whole plot:

The caller must hold map_entries_lock, and must not release that lock until the processing of the returned entry has completed. πŸ”’

like, do not drop the lock early. do not pass go. hold map_entries_lock the entire time you're touching the returned entry. this is not a suggestion, this is the rules, periodt 🧚


⭐ RETURN ⭐

  • pointer to the entry to be found on success πŸŽ‰
  • NULL on failure πŸ’€

that's the whole return contract. found it β†’ you get the pointer. didn't find it β†’ NULL, no drama, no error code, just vibes and NULL 🌈


πŸ¦‹ SEE ALSO πŸ¦‹

kernel file ./drivers/firmware/memmap.c, plus the whole friend group:

go read them, iykyk πŸ“šπŸ’–


and that's the page!! mwah πŸ’‹ this one lives under ./drivers/firmware, dated October 2026, and it's firmware_ma...ntry_in_list(9) all over again in the footer β€” we love a full circle moment πŸ‘‘πŸŒΈ stay locked, stay hydrated, and hold that map_entries_lock 🫢✨

πŸ“¦ where this page comes from