firmware_ma...ntry_in_list(9)
β¨ 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 π
NULLon 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:
firmware_map_add_entry(9)firmware_map_remove_entry(9)firmware_map_find_entry(9)firmware_map_find_entry_bootmem(9)firmware_map_add_hotplug(9)firmware_map_add_early(9)firmware_map_remove(9)
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
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms