Linux-kernel mailing list archive 1999-36,: [patch] ACPI groundbreaking stuff

# [patch] ACPI groundbreaking stuff

Simon Richter (geier@phobos.fachschaften.tu-muenchen.de)
Mon, 6 Sep 1999 19:18:46 +0200 (CEST)

- Messages sorted by: [ date ][ thread ][ subject ][ author ]
- Next message: Jamie Lokier: "Re: iput: Aieee, semaphore in use inode 00:00/XXX, count=2"
- Previous message: Benjamin C.R. LaHaise: "Re: Problem allocating DMA memory"

Hi,

Since the ACPI4Linux project has restarted their repository (the direction
the code went into was a dead end that made testing basically impossible),
we start from a clean kernel now.

This very first patch makes memory init more verbose and adds the
configuration options for ACPI (also known as the big red switch), so we
can play. :-)

Also, it adds the possibility to free ACPI tables that are not required by
the BIOS anymore instantly (for those who do not want ACPI support) and
adds the ACPI4Linux project to the maintainers list. It should apply
cleanly to 2.3.16.

Index: acpi/linux/MAINTAINERS
diff -u acpi/linux/MAINTAINERS:1.1.1.1 acpi/linux/MAINTAINERS:1.2
--- acpi/linux/MAINTAINERS:1.1.1.1 Sun Sep 5 13:19:19 1999
+++ acpi/linux/MAINTAINERS Mon Sep 6 17:17:58 1999
@@ -93,6 +93,15 @@
L: linux-net@vger.rutgers.edu
S: Maintained
+ACPI POWER MANAGEMENT
+P: Max Berger
+P: Simon Richter
+M: acpi-project@phobos.fs.tum.de
+M: Max.Berger@phobos.fs.tum.de
+M: Simon.Richter@phobos.fs.tum.de
+L: acpi@phobos.fs.tum.de
+S: Maintained
+
AD1816 SOUND DRIVER
P: Thorsten Knabe
M: Thorsten Knabe <tek@rbg.informatik.tu-darmstadt.de>
Index: acpi/linux/Documentation/Configure.help
diff -u acpi/linux/Documentation/Configure.help:1.1.1.1 acpi/linux/Documentation/Configure.help:1.2
--- acpi/linux/Documentation/Configure.help:1.1.1.1 Sun Sep 5 13:22:50 1999
+++ acpi/linux/Documentation/Configure.help Mon Sep 6 17:18:32 1999
@@ -9136,6 +9136,30 @@
If unsure, say N.
+Advanced Configuration and Power Interface
+CONFIG_ACPI
+ ACPI is a new specification designed as a replacement for APM. It
+ allows a much finer grained power management that APM did, plus it
+ provides temperature management control (when to turn on fans, that
+ is) and configuration management (docking/undocking devices, ...).
+ It can not only make coffee but the entire breakfast.
+
+ ACPI is available on some Pentium and almost all PentiumII and
+ PentiumIII motherboards. The best thing is to look into your
+ mainboard documentation. 386 and 486 owners should say N here.
+
+Free ACPI tables on boot
+CONFIG_ACPI_NOTATALL
+ If you choose not to enable ACPI but your system has ACPI support,
+ your BIOS will mark some areas as being "reserved for ACPI". If you
+ enable this, these areas will be freed. On systems without ACPI
+ support, this option has no effect.
+
+ Say Y only if you know that you will not need ACPI. If you enable
+ this, you will not be able to build the initializer module unless
+ you boot with a new kernel without this option. On the other hand,
+ this will free some more memory if you don't want ACPI.
+
Advanced Power Management
CONFIG_APM
APM is a BIOS specification for saving power using several different
Index: acpi/linux/arch/i386/config.in
diff -u acpi/linux/arch/i386/config.in:1.1.1.1 acpi/linux/arch/i386/config.in:1.3
--- acpi/linux/arch/i386/config.in:1.1.1.1 Sun Sep 5 13:22:09 1999
+++ acpi/linux/arch/i386/config.in Mon Sep 6 18:52:59 1999
@@ -92,17 +92,29 @@
source drivers/parport/Config.in
-tristate 'Advanced Power Management BIOS support' CONFIG_APM
-if [ "$CONFIG_APM" != "n" ]; then
- bool ' Ignore USER SUSPEND' CONFIG_APM_IGNORE_USER_SUSPEND
- bool ' Enable PM at boot time' CONFIG_APM_DO_ENABLE
- bool ' Make CPU Idle calls when idle' CONFIG_APM_CPU_IDLE
- bool ' Enable console blanking using APM' CONFIG_APM_DISPLAY_BLANK
- bool ' Power off on shutdown' CONFIG_APM_POWER_OFF
- bool ' Ignore multiple suspend' CONFIG_APM_IGNORE_MULTIPLE_SUSPEND
- bool ' Ignore multiple suspend/resume cycles' CONFIG_APM_IGNORE_SUSPEND_BOUNCE
- bool ' RTC stores time in GMT' CONFIG_APM_RTC_IS_GMT
- bool ' Allow interrupts during APM BIOS calls' CONFIG_APM_ALLOW_INTS
+if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
+ bool 'Advanced Configuration and Power Interface support (EXPERIMENTAL)' CONFIG_ACPI
+else
+ define_bool CONFIG_ACPI n
+fi
+
+if [ "$CONFIG_ACPI" = "n" ]; then
+ if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
+ bool ' Free ACPI tables on boot (EXPERIMENTAL)' CONFIG_ACPI_NOTATALL
+ fi
+
+ tristate 'Advanced Power Management BIOS support' CONFIG_APM
+ if [ "$CONFIG_APM" != "n" ]; then
+ bool ' Ignore USER SUSPEND' CONFIG_APM_IGNORE_USER_SUSPEND
+ bool ' Enable PM at boot time' CONFIG_APM_DO_ENABLE
+ bool ' Make CPU Idle calls when idle' CONFIG_APM_CPU_IDLE
+ bool ' Enable console blanking using APM' CONFIG_APM_DISPLAY_BLANK
+ bool ' Power off on shutdown' CONFIG_APM_POWER_OFF
+ bool ' Ignore multiple suspend' CONFIG_APM_IGNORE_MULTIPLE_SUSPEND
+ bool ' Ignore multiple suspend/resume cycles' CONFIG_APM_IGNORE_SUSPEND_BOUNCE
+ bool ' RTC stores time in GMT' CONFIG_APM_RTC_IS_GMT
+ bool ' Allow interrupts during APM BIOS calls' CONFIG_APM_ALLOW_INTS
+ fi
fi
endmenu
Index: acpi/linux/arch/i386/mm/init.c
diff -u acpi/linux/arch/i386/mm/init.c:1.1.1.1 acpi/linux/arch/i386/mm/init.c:1.2
--- acpi/linux/arch/i386/mm/init.c:1.1.1.1 Sun Sep 5 13:22:10 1999
+++ acpi/linux/arch/i386/mm/init.c Mon Sep 6 17:20:00 1999
@@ -413,11 +413,34 @@
/* walk the whitelist, unreserving good memory
*/
for (avail = i = 0; i < e820.nr_map; i++) {
- if (e820.map[i].type != 1) /* not usable memory */
- continue;
- printk("memory region: %luk @ %08lx\n",
+ printk("memory region: %luk @ %08lx ",
((long)(e820.map[i].size)) / 1024,
(long)(e820.map[i].addr) );
+ switch(e820.map[i].type) {
+ case 1:
+ printk("(system memory)");
+ break;
+ case 2:
+ printk("(reserved)");
+ break;
+ case 3:
+#ifdef CONFIG_ACPI_NOTATALL
+ printk("(system memory [ACPI reclaim])");
+ e820.map[i].type = 1;
+#else
+ printk("(ACPI reclaim memory)");
+#endif
+ break;
+ case 4:
+ printk("(ACPI NVS memory)");
+ break;
+ default:
+ printk("(unknown memory type, unusable)");
+ }
+ printk("\n");
+
+ if (e820.map[i].type != 1) /* not usable memory */
+ continue;
for (addr=PAGE_ALIGN(((long)(e820.map[i].addr)))+PAGE_OFFSET,
tmp = 0;
tmp < (unsigned long)(e820.map[i].size);

Is the patch acceptable this way?

Simon

PGP public key available from ftp://phobos.fs.tum.de/pub/pgp/geier.asc
Fingerprint: 10 62 F6 F5 C0 5D 9E D8 47 05 1B 8A 22 E5 4E C1

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

- Next message: Jamie Lokier: "Re: iput: Aieee, semaphore in use inode 00:00/XXX, count=2"
- Previous message: Benjamin C.R. LaHaise: "Re: Problem allocating DMA memory"