|
ACPI Interface
ACPI stands for "Advanced Configuration and Power Interface". It replaces old IBM APM, Plug'n'Play and OS2APIC.PSD.
ACPI is a part of every modern computer. ACPI stores full detailed info
about computer in one place, thus simplifies the development of OS and drivers.

ACPI influenced on eComStation very much
ACPI Toolkit
|
ACPI Toolkit -- library, headers, examples and instructions
|
|
acpi-toolkit-20080425.zip
acpi-toolkit-20080307.zip
|
Additional API
ACPI brings additional kernel API for drivers developers:
- AcpiExecSMPFunction() -- Execute a subprogram on all CPUs simultaneously
- InitACPICall() -- Find PSD and get pointer to ACPI function
FindPCIDevice() -- Filling ACPI info about given PCI device
Links
FAQ
Q1: I am developing a driver. How to create ACPI compatible driver?
A1: Main rules:
* don't set own restrictions to high IRQs > IRQ15
* read information about IRQ from PCI Config Space or from acpi.psd
How to create driver ready for SMP and APIC mode?
* Use DevEOI helper only (DevHlp_EOI), DON'T USE OUT 20h,20h
More suggestions:
* If you are going use IRQ before INIT_COMPLETE then
use PIC IRQ before, APIC IRQ after.
Query the information using FindPCIDevice()
APM:
* when you init the adapter, look at D-state in PCI,
if the adapter is in D-state (i.e. D-state != 0) then enable it.
Else the devices don't work if computer was suspended by Windows.
Q2: There is old device driver. How to make it work in APIC?
A2: Patch it. It's necessary patch DevHlp_SetIRQ and set shared.
(This will help if DevHlp_EOI are used)
If you have asm source code with headers from DDK then
makefile should contain SMP=1
Q3: How to create driver ready for SMP?
A3: SMP Considerations for OS/2 Device Drivers
http://www.edm2.com/0701/driver.html
(by Scott E. Garfinkle)
Q4: How to run my R3 program on CPU 2?
A4: Use DosSetThreadAffinity function
Q5: ACPI replaces OEMHLP$ driver. Is this new OEMHLP$ documented?
A5: The interface is not changed. DDK contains description of OEMHLP.
|