Hi all, I am proud to announce a double-update: http://www.coli.uni-sb.de/~eric/stuff/soft/pcisleep-03feb2005.zip
and http://www.coli.uni-sb.de/~eric/stuff/soft/fdapm-04feb2005.zip Features: PCISLEEP - scans your PCI bus and shows device information like: bus.device(.function) [vendor:model] classcode(/iface) vendor class [details] BusDevF vend:type class vendor description... ... 00.0b [10ec:8139] 0200 Realtek LAN / Ethernet ... ... in the LIST mode (also shows some ACPI port base guess, please let me know if it is correct for your system). There are also two other modes: SLEEP mode, which puts all devices which support that into "idle" or "halted" mode, and VGASLEEP mode, which also activates a DPMS screen saver and puts your VGA into "suspend" mode, if it supports that (PCI and AGP work, even dual-VGA should work). To wake up, press a key. After VGASLEEP, waking up involves re-running the VGA BIOS (looks like rebooting). Let me know if it works for you. You may want to try without EMM386 if you get VGA wakeup problems. FDAPM - collection of energy saving related DOS functions, a big time superset of MS POWER functionality. New feature since the 18jan2005 "clock update after suspend" (and standby) update: ACPI support! Actually, the ACPI support is very basic, but still very cool... Plus there is a new ZAPSTATS option which resets the busy / idle time statistics, as suggested by Alain. The statistics are now updated more often, hopefully improving accuracy. Supported ACPI functions are: - CPU freeze: Use SPEED0 to stop your CPU clock as in ACPI S1 standby mode, press the power button to continue. This is also used if you tried to use STANDBY / SUSPEND but no BIOS APM support is found. - CPU speed control: Use SPEED1 ... SPEED8 to make your system run on 1/8 ... 8/8 of the maximum speed (some mainboards support steps of 1/16, but FDAPM does not use this). While FDAPM used the ACPI tables of the BIOS, and the assumption that P_BLK base port is at PM1a_EVT plus 10h, the THROTTLE tool ( http://www.oldskool.org/pc/throttle/ , open source) uses PCI bus scan and a list of known chipsets instead of asking the BIOS. Let me know if either of them fails for you. Throttle also triggers C2 CPU state to enter throttled state, which FDAPM does not do (because ACPI specs do not seem to suggest it). - System power off: The POWEROFF function can now use the ACPI tables to turn off your computer, if no BIOS APM support is present :-). You can use the ACPIOFF function to explicitly test the ACPI style even if your BIOS does support APM. Let me know if it works. Note that those FDAPM functions are not meant to be used in DOS boxes. THROTTLE can be used with a driver which enables it to run in DOS boxes of several Windows versions, so you may want to try that. FDAPM ACPI support is working for me, but if it sets YOUR computer on fire, then I cannot help you with it, sorry. Technical information: ACPI tables are memory structures at the end of your main RAM, linked by a pointer in BIOS or EBDA. The FDAPM way to access them is to use int 15.87 memory copy - works in plain DOS, even with HIMEM / EMM386 present, as we are accessing normal RAM. If we would access a framebuffer, you would need MEMCHECK option for the EMM386 case, or alternatively a 32bit C library for FDAPM ;-). FDAPM is about 3200 lines of Assembly code at the moment... The ACPI tables contain information about the right port to use for power off / freeze, and about the right values to use for speed / duty cycle encoding. But (yuck) you have to parse a complex data stream, the DSDT, to know the right VALUES to use for power off / freeze, or the right PORT to use for speed setting. I ignore the second problem, as the port is (for all chipsets known by THROTTLE, except one exotic old one) always at a fixed offset from another known port. For the first problem, however, I scan the DSDT to find some byte constants for the power off / freeze values, and ignore everything else (fully analyzing DSDT would involve building a tree of named entities and even running some functions stored in a virtual machine which processes specific byte code - Intel tells that a normal full ACPI driver implementation will be around 70 kB big, uncompressed...). So of course I am very interested in hearing from you whether FDAPM "just pick the name and the constant" works for you, as I ignore the whole "name tree" and "functions" stuff, including "prepare to sleep". Enjoy the updates - learning about ACPI kept me quite busy during the last several weeks. Feedback is welcome :-). PS: compressed binary sizes are 4k for PCISLEEP and 6k for FDAPM. This is possible because PCISLEEP only knows 15 widespread vendor names ;-). Eric [Would be nice if somebody could think of a nice SHORT summary of the above for a news item...] ------------------------------------------------------- This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting Tool for open source databases. Create drag-&-drop reports. Save time by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc. Download a FREE copy at http://www.intelliview.com/go/osdn_nl _______________________________________________ Freedos-user mailing list Freedos-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freedos-user