acpi_parse_entries_array(9)
π 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 if0) πprocβ an array ofacpi_subtable_procstruct 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
- 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