ACPICA - pressure to use it ? or not ?

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
JulienDarc
Member
Member
Posts: 97
Joined: Tue Mar 10, 2015 10:08 am

ACPICA - pressure to use it ? or not ?

Post by JulienDarc »

Hello,

Currently, I am setting up acpi.

I plan to let the scheduler manage the power efficiency by setting the values for my cpu in assembly, directly, according to the Intel doc.

Only one platform will be needed for that OS -> x86.

Is there a pressure on me to use the acpica layer(s) or not ? is there something I will miss later in this constant context ?

Thanks
User avatar
Combuster
Member
Member
Posts: 9301
Joined: Wed Oct 18, 2006 3:45 am
Libera.chat IRC: [com]buster
Location: On the balcony, where I can actually keep 1½m distance
Contact:

Re: ACPICA - pressure to use it ? or not ?

Post by Combuster »

If you wish to limit yourself to using MSRs for a specific processor variant, and not support others, that's power to you. You don't particularly need ACPI support for that in the first place, though it may decide to interfere and reset your settings.

ACPI is to support power management independent of chipset and processor. Using ACPI means you won't be writing any code to write power settings directly to a CPU, but instead you reuse the firmware's code to do that.


For starters, pick one of the two options above, and don't mix and match as you seem to be doing right now. If you do decide that using ACPI is the proper way, then you can make the choice of either using ACPICA or writing a custom replacement for that library.
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
JulienDarc
Member
Member
Posts: 97
Joined: Tue Mar 10, 2015 10:08 am

Re: ACPICA - pressure to use it ? or not ?

Post by JulienDarc »

Thanks Combuster,

I will implement acpica then. It will be more consistent in the end I think.

Bye
rdos
Member
Member
Posts: 3303
Joined: Wed Oct 01, 2008 1:55 pm

Re: ACPICA - pressure to use it ? or not ?

Post by rdos »

For most OSes, power management is not an issue, so that is typically not the main reason to use ACPICA or not. Instead the main reason is to be able to figure out PCI interrupt routings. This can be handled for most devices with detecting IRQs, or by using MSI.
nbdd0121
Member
Member
Posts: 60
Joined: Thu Jul 25, 2013 8:10 am

Re: ACPICA - pressure to use it ? or not ?

Post by nbdd0121 »

You hardly need ACPI in a hobby OS except softly turn off your machine. For the shutting down, http://forum.osdev.org/viewtopic.php?t=16990 is a good reference. I also write a simple AML Interpreter in C++, if you want to roll your own, this is simpler than source code of ACPICA and can probably be easier to understand https://github.com/nbdd0121/AMLInterpreter/ (note that many instruction are not supported by this, this is only used by me to shutdown the machine. It is only tested to work in bochs, qemu, VMware and my own dell laptop).
JulienDarc
Member
Member
Posts: 97
Joined: Tue Mar 10, 2015 10:08 am

Re: ACPICA - pressure to use it ? or not ?

Post by JulienDarc »

Thanks a lot, will definitely have a look !
Post Reply