Page 1 of 1
APM-ACPI driver
Posted: Thu May 19, 2005 2:35 am
by Balroj
Hi,
I was playing with a PII and APM in my os. Now i tried my os on a sony notebook but it doen'st works ( the APM driver ).
How could i know what my notebook does to turn of the cumputer under windows? And see battery status?
thanks.
Re:APM-ACPI driver
Posted: Thu May 19, 2005 6:23 am
by Pype.Clicker
afaik, APM is a partially broken specs, not fully supported everywhere and people should rather use ACPI instead ...
Re:APM-ACPI driver
Posted: Thu May 19, 2005 7:02 am
by Balroj
Is it possible to "capture" the way windows shut down the notebook? or i should read about ACPI and try it?
Thanks.
Re:APM-ACPI driver
Posted: Thu May 19, 2005 8:36 am
by Brendan
Hi,
@Pype.Clicker
IMHO APM
isn't broken, it's just that it has 3 different interfaces (real mode, 16 bit and 32 bit) which are all optional, and often not supported.
@Balroj
IMHO ACPI
is broken - it suffers from a design error called overcomplexity
. Unlike most standards that stick to a well defined topic, ACPI tries to cover everything from power management and temperature control to hardware configuration for the entire computer, and is supposed to be platform independant too. To do this it has it's own interpretted OOP language called AML (ACPI Machine Language) which is compiled from ASL (ACPI Source Language).
Due to it's compexity, early ACPI hardware is very buggy and even new ACPI hardware has bugs. This means that regardless of how perfect your OS's code is it can still fail due to the bugs in AML code.
Even though the first version of the ACPI standard was released almost 10 years ago, and even though the Linux ACPI support is being done by experienced Intel developers, and even though they are only focusing on power management (and mostly ignoring the configuration part), it is still far from complete.
You might be interested in visiting the ACPI4Linux website:
http://acpi.sourceforge.net/
Notice they've split the project up into development and end-user support because of the bugs in firmware/AML...
I wouldn't be surprised if Microsoft intentionally made ACPI overcomplicated to make it hard for smaller OS developers (e.g. Linux) to implement it
.
Also, if you want to support older computers you'll need to do everything without ACPI (and due to firmware/AML bugs people like me tend to disable ACPI in the BIOS configuration at the first sign of trouble).
It's also very difficult to find any information on the internet (other than the ACPI standard) - the number of OS developers that have had anything to do with ACPI is very small (you won't find tutorials or anything).
For my own OS, I'm waiting to see how this all turns out and wondering if it's just easier to use hardware specific device drivers (e.g. a motherboard/chipset driver) to do it all without ACPI. I need to do more research into ACPI, and the direct hardware alternative (SMbus specification, smart battery specification, chipsets, etc) before I decide though.
Cheers,
Brendan
Re:APM-ACPI driver
Posted: Thu May 19, 2005 8:54 am
by Pype.Clicker
<rant>
do not overestimate MS's evilness that way ...
No, nowaday standards tends to be overcomplicated because everyone wants its bits included without thinking if it will/won't clobber the whole thing and because people write down the standard when they cannot find anything more to add (while good engineering would rather advocate to stop when there's nothing else to remove
)
</rant>
Re:APM-ACPI driver
Posted: Thu May 19, 2005 11:32 am
by balroj
hi,
Ok, i will no use acpi for the moment. But wich other ways there are to turn off the computer, see battery status, etc..?
And again, is there some way to see how windows turn off the system and see the battery status?
Thanks again
Re:APM-ACPI driver
Posted: Fri May 20, 2005 1:28 am
by Pype.Clicker
there's theorically a way to spy windows: make it execute in a virtual machine and log issued calls. Problem is that unless your virtual machine implements APM/ACPI support, you're unlikely to see anything happening (e.g. windows will simply issue the identification calls, but it'll display "you can now turn off your computer" message)
You could also hook the APM/ACPI Bios interrupts and see what is called, but you'll have trouble to "report" that to the user as you don't have control over the rest of the environment.
Re:APM-ACPI driver
Posted: Fri May 20, 2005 2:51 am
by Balroj
You mean something like bochs?
But it will show the true interrupt call? or the one bochs emule? My problem is my notebook is sony, and i found some sonys don't follow the standards, for ex some cd-r or dvd recorders.
I'm worried about that, but i think there isn't an "easy" solution to that. Or an "easy" way to determinate wich way ( smbus, apm apci..etc ) windows uses to turn off the notebook.
where can i find some info about: SMbus, smart battery, etc... I will try this.
Thanks for all.
Re:APM-ACPI driver
Posted: Fri May 20, 2005 4:52 am
by Pype.Clicker
i hit phoenix website yesterday and it seems to had stockpile of info about those subject ...
check here