Page 1 of 1
Write your own ACPI driver or using ACPICA?
Posted: Fri Jul 26, 2013 12:59 am
by Congdm
Hi everybody,
I am playing with ACPI and SMP now. According to the wiki, there are 2 ways to implement ACPI: do-it-yourself and using ACPICA. But it didn't say about disadvantages and advantages of each method. Could anyone give me some advices?
Re: Write your own ACPI driver or using ACPICA?
Posted: Fri Jul 26, 2013 1:31 am
by dozniak
Advantages of ACPICA:
* The AML interpreter is already done for you.
* You only need to write a thin adaptation layer between ACPICA and your OS.
Disadvantages of ACPICA:
* You need to write the glue layer.
* You need to figure out the ACPICA APIs.
* ACPICA is implemented in C, which makes it slightly harder to interface with say Assembly or Haskell OS.
Advantages of writing it yourself:
* You get to learn a lot of intricacies of parsing ACPI tables and running AML scripts.
* Whatever you learn applies directly to ACPI and not the ACPICA APIs.
Disadvantages of doing it yourself:
* You get to learn a lot of intricacies of parsing ACPI tables and running AML scripts. Maybe more than you ever want.
If you want it to get working fast, then ACPICA or very minimal implementation of a subset of ACPI might work.
If you want it to get fully working then ACPICA or very thorough implementation of ACPI is required.
All in all, ACPICA just saves you a bunch of time.