acpi_parse_entries_array(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… acpi_parse_entries_array(9)

Okay bestie, so this is a page from the Kernel API Manual and it's about acpi_parse_entries_array β€” literally, for each proc_num find a suitable subtable πŸŽ€


✨ SYNOPSIS ✨

int __init_or_fwtbl_lib acpi_parse_entries_array (char *id , unsigned
long table_size , union fw_table_header *table_header , unsigned long
max_length , struct acpi_subtable_proc *proc , int proc_num , unsigned
int max_entries );

🫢 ARGUMENTS 🫢

  • id β€” the table id. It's for debugging purposes, so it's giving "name tag at a party" energy 🏷️
  • table_size β€” the size of the root table.
  • table_header β€” where does the table start? πŸ‘€ Like. where does it begin. that's the question.
  • max_length β€” maximum size of the table (ignore if 0) πŸ™ˆ
  • proc β€” an array of acpi_subtable_proc struct containing entry id and associated handler with it πŸ’–
  • proc_num β€” how big proc is? (yes the manpage really asks this, it's a genuine question, answer it)
  • max_entries β€” how many entries can we process? πŸ”₯

🌸 DESCRIPTION 🌸

So for each proc_num, find a subtable with proc->id and run proc->handler on it. The assumption here is that there's only single handler for particular entry id β€” one handler per id, that's the vibe, no cap ✨

Now this next bit is the part where you gotta pay attention, bestie, because it's lowkey the whole plot twist πŸ‘‘

The table_size is not the size of the complete ACPI table (the length field in the header struct), but only the size of the root table; i.e., the offset from the very first byte of the complete ACPI table, to the first byte of the very first subtable. Read that twice. It's an offset, not a length. It's giving "distance from the door to the first table" not "how big the whole room is" 🌈

On success returns sum of all matching entries for all proc handlers πŸ’€ Otherwise, -ENODEV or -EINVAL is returned 😭


πŸ¦‹ SEE ALSO πŸ¦‹

  • Kernel file ./lib/fw_table.c β€” go read it, iykyk πŸ“–

fr fr do not pass the full table length as table_size, that's the one thing this page is yelling at you about 🫢

and that's the whole page, you ate it up πŸ’œ This icon of a manpage came out of ./lib in October 2026 β€” mwah, periodt πŸ§šβ€β™€οΈπŸ’…

πŸ“¦ where this page comes from