Page 1 of 1
How to compile ACPICA to use only table functions
Posted: Thu Oct 08, 2020 5:01 am
by mrjbom
Hi.
I am trying to add ACPICA to my system, I have implemented the OSL functions described in the wiki, I have functions from the section "
Environmental and ACPI Tables" and "
Memory Management" and as far as I understand, the scheduler and synchronization functions are only needed for the full operation of ACPICA and I can already use the ACPICA table functions.
However, when compiling ACPICA refers to functions that I can't implement yet, can I use, for example, "#define" to make ACPICA compile only table functions?
Re: How to compile ACPICA to use only table functions
Posted: Thu Oct 08, 2020 12:26 pm
by nexos
I'm no ACPICA expert (I haven't ported it yet
), but create a stub for those functions that returns AE_ERROR.
Re: How to compile ACPICA to use only table functions
Posted: Fri Oct 09, 2020 8:58 am
by bzt
You don't need ACPICA to parse the tables.
Here's an example (it does a little bit more than parsing the tables, it also searches AML bytecode to detect the IO ports for shutdown, but'll get the idea). Reading the ACPI tables is just a matter of defining some struct and casting memory.
Another great example how to use the ACPI tables without ACPICA is in
OpenBSD. But that's a fully blown implementation, meaning also includes a minimal AML bytecode interpreter. I mean only check how it parses the tables, and don't mind the rest of the code.
Cheers,
bzt
Re: How to compile ACPICA to use only table functions
Posted: Sat Oct 10, 2020 8:17 am
by mrjbom
bzt wrote:You don't need ACPICA to parse the tables.
Here's an example (it does a little bit more than parsing the tables, it also searches AML bytecode to detect the IO ports for shutdown, but'll get the idea). Reading the ACPI tables is just a matter of defining some struct and casting memory.
Another great example how to use the ACPI tables without ACPICA is in
OpenBSD. But that's a fully blown implementation, meaning also includes a minimal AML bytecode interpreter. I mean only check how it parses the tables, and don't mind the rest of the code.
Cheers,
bzt
As far as I understand, they only deal with tables, but I want to use other things in the future that only ACPICA provides.
In addition, I solved the question, ACPICA has a special #define that forces ACPICA not to compile unnecessary functions.
Thanks for answer!