2002-01-01 04:55:44

by Todor Todorov

[permalink] [raw]
Subject: APIC on laptop hangs the system @ powerstate change

Linux version 2.5.2-pre3-acpi (root@skrkg100) (gcc version 2.95.4 20011223 (Debian prerelease)) #2 Mon Dec 31 21:01:25 UTC 2001
BIOS-provided physical RAM map:
BIOS-e820: 0000000000000000 - 000000000009fc00 (usable)
BIOS-e820: 000000000009fc00 - 00000000000a0000 (reserved)
BIOS-e820: 0000000000100000 - 000000000ffea800 (usable)
BIOS-e820: 000000000ffea800 - 0000000010000000 (reserved)
BIOS-e820: 00000000feea0000 - 00000000fef00000 (reserved)
BIOS-e820: 00000000ffb80000 - 0000000100000000 (reserved)
ACPI: have wakeup address 0xc0001000
On node 0 totalpages: 65514
zone(0): 4096 pages.
zone(1): 61418 pages.
zone(2): 0 pages.
ACPI: RSD PTR (v0 DELL ) @ 0x000fde50
ACPI: RSDT (v1 DELL CPi R 10193.2324) @ 0x000fde64
ACPI: FACP (v1 DELL CPi R 10193.2324) @ 0x000fde90
Kernel command line: root=/dev/hda3 vga=5
Initializing CPU#0
Detected 797.360 MHz processor.
Console: colour VGA+ 80x34
Calibrating delay loop... 1592.52 BogoMIPS
Memory: 255572k/262056k available (1193k kernel code, 6096k reserved, 363k data, 196k init, 0k highmem)
Dentry-cache hash table entries: 32768 (order: 6, 262144 bytes)
Inode-cache hash table entries: 16384 (order: 5, 131072 bytes)
Mount-cache hash table entries: 4096 (order: 3, 32768 bytes)
Buffer-cache hash table entries: 16384 (order: 4, 65536 bytes)
Page-cache hash table entries: 65536 (order: 6, 262144 bytes)
CPU: Before vendor init, caps: 0383f9ff 00000000 00000000, vendor = 0
CPU: L1 I cache: 16K, L1 D cache: 16K
CPU: L2 cache: 256K
Intel machine check architecture supported.
Intel machine check reporting enabled on CPU#0.
CPU: After vendor init, caps: 0383f9ff 00000000 00000000 00000000
CPU: After generic, caps: 0383f9ff 00000000 00000000 00000000
CPU: Common caps: 0383f9ff 00000000 00000000 00000000
CPU: Intel Pentium III (Coppermine) stepping 0a
Enabling fast FPU save and restore... done.
Enabling unmasked SIMD FPU exception support... done.
Checking 'hlt' instruction... OK.
POSIX conformance testing by UNIFIX
mtrr: v1.40 (20010327) Richard Gooch ([email protected])
mtrr: detected mtrr type: Intel
PCI: PCI BIOS revision 2.10 entry at 0xfc06e, last bus=8
PCI: Using configuration type 1
tbxface-0099 [01] Acpi_load_tables : ACPI Tables successfully loaded
Parsing Methods:..........................................................................................................................................................
154 Control Methods found and parsed (363 nodes total)
ACPI Namespace successfully loaded at root c02ca5e8
ACPI: Core Subsystem version [20011205]
evxfevnt-0081 [02] Acpi_enable : Transition to ACPI mode successful
Executing device _INI methods:....................................................
52 Devices found: 52 _STA, 3 _INI
Completing Region and Field initialization:..
0/2 Regions, 2/10 Fields initialized (363 nodes total)
ACPI: Subsystem enabled
ACPI: Power Resource found
ACPI: System firmware supports S1 S3 S4 S5
ACPI: PCI Root Bridge (bus 00)
PCI: Probing PCI hardware (bus 00)
Unknown bridge resource 2: assuming transparent
Unknown bridge resource 2: assuming transparent
ACPI: PCI Routing Table (bus 00)
device=1f pin=00 irq=11
device=1f pin=01 irq=5
device=1f pin=02 irq=7
device=1f pin=03 irq=11
device=01 pin=00 irq=11
device=01 pin=01 irq=5
ACPI: PCI Routing Table (bus 01)
device=00 pin=00 irq=11
ACPI: PCI Routing Table (bus 02)
device=0f pin=00 irq=11
device=0f pin=01 irq=11
device=0f pin=02 irq=11
device=03 pin=00 irq=5
device=06 pin=00 irq=11
device=06 pin=01 irq=7
device=08 pin=00 irq=7
ACPI: PCI Routing Table (bus ff)
device=00 pin=00 irq=0
PCI: Using IRQ router PIIX [8086/244c] at 00:1f.0
PCI: Found IRQ 11 for device 02:0f.0
PCI: Sharing IRQ 11 with 00:1f.2
PCI: Sharing IRQ 11 with 02:0f.1
PCI: Sharing IRQ 11 with 02:0f.2
isapnp: Scanning for PnP cards...
isapnp: No Plug & Play device found
Linux NET4.0 for Linux 2.4
Based upon Swansea University Computer Society NET3.039
Starting kswapd
BIO: pool of 256 setup, 14Kb (56 bytes/bio)
biovec: init pool 0, 1 entries, 12 bytes
biovec: init pool 1, 4 entries, 48 bytes
biovec: init pool 2, 16 entries, 192 bytes
biovec: init pool 3, 64 entries, 768 bytes
biovec: init pool 4, 128 entries, 1536 bytes
biovec: init pool 5, 256 entries, 3072 bytes
Journalled Block Device driver loaded
udf: registering filesystem
ACPI: Processor[0]: C0 C1 C2
ACPI: Battery socket found, battery absent
ACPI: Battery socket found, battery present
ACPI: AC Adapter found
ACPI: Power Button (CM) found
ACPI: Sleep Button (CM) found
ACPI: Lid Switch (CM) found
ACPI: Thermal Zone found
pty: 256 Unix98 ptys configured
Inspiron 8000 SMM driver v1.1 02/11/2001 Massimo Dal Zotto ([email protected])
Serial driver version 5.05c (2001-07-08) with MANY_PORTS SHARE_IRQ SERIAL_PCI enabled
ttyS00 at 0x03f8 (irq = 4) is a 16550A
ttyS01 at 0x02f8 (irq = 3) is a 16550A
Real Time Clock Driver v1.10e
Non-volatile memory driver v1.1
block: 256 slots per queue, batch=32
Uniform Multi-Platform E-IDE driver Revision: 6.32
ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx
ICH2-M: IDE controller on PCI slot 00:1f.1
ICH2-M: chipset revision 3
ICH2-M: not 100% native mode: will probe irqs later
ide0: BM-DMA at 0xbfa0-0xbfa7, BIOS settings: hda:DMA, hdb:DMA
ide1: BM-DMA at 0xbfa8-0xbfaf, BIOS settings: hdc:pio, hdd:pio
hda: HITACHI_DK23BA-20, ATA DISK drive
hdb: LG DVD-ROM DRN-8080B, ATAPI CD/DVD-ROM drive
ide0 at 0x1f0-0x1f7,0x3f6 on irq 14
blk: queue c02e60a4, I/O limit 4095Mb (mask 0xffffffff)
hda: 39070080 sectors (20004 MB) w/2048KiB Cache, CHS=2432/255/63, UDMA(66)
hdb: ATAPI DVD-ROM drive, 512kB Cache, DMA
Uniform CD-ROM driver Revision: 3.12
Partition check:
hda: hda1 hda2 hda3 hda4 < hda5 hda6 >
Floppy drive(s): fd0 is 1.44M
FDC 0 is a post-1991 82077
NET4: Linux TCP/IP 1.0 for NET4.0
IP Protocols: ICMP, UDP, TCP, IGMP
IP: routing cache hash table of 2048 buckets, 16Kbytes
TCP: Hash tables configured (established 16384 bind 16384)
NET4: Unix domain sockets 1.0/SMP for Linux NET4.0.
kjournald starting. Commit interval 5 seconds
EXT3-fs: mounted filesystem with ordered data mode.
VFS: Mounted root (ext3 filesystem) readonly.
Freeing unused kernel memory: 196k freed
Adding Swap: 489940k swap-space (priority -1)
EXT3 FS 2.4-0.9.15, 06 Nov 2001 on ide0(3,3), internal journal
maestro3: version 1.22 built at 19:15:20 Dec 31 2001
PCI: Found IRQ 5 for device 02:03.0
maestro3: Configuring ESS Maestro3(i) found at IO 0xDC00 IRQ 5
maestro3: subvendor id: 0x00a41028
ac97_codec: AC97 Audio codec, id: 0x8384:0x7609 (SigmaTel STAC9721/23)
eepro100.c:v1.09j-t 9/29/99 Donald Becker http://cesdis.gsfc.nasa.gov/linux/drivers/eepro100.html
eepro100.c: $Revision: 1.36 $ 2000/11/17 Modified by Andrey V. Savochkin <[email protected]> and others
eth0: OEM i82557/i82558 10/100 Ethernet, 00:20:E0:69:12:4F, IRQ 11.
Receiver lock-up bug exists -- enabling work-around.
Board assembly 727095-002, Physical connectors present: RJ45
Primary interface chip i82555 PHY #1.
General self-test: passed.
Serial sub-system self-test: passed.
Internal registers self-test: passed.
ROM checksum self-test: passed (0x04f4518b).
Receiver lock-up workaround activated.
Linux agpgart interface v0.99 (c) Jeff Hartmann
agpgart: Maximum main memory to use for agp memory: 203M
agpgart: agpgart: Detected an Intel i815, but could not find the secondary device. Assuming a non-integrated video card.
agpgart: Detected Intel i815 chipset
agpgart: AGP aperture is 64M @ 0xe8000000
NVRM: loading NVIDIA NVdriver Kernel Module 1.0.2313 Tue Nov 27 12:01:24 PST 2001
MSDOS FS: Using codepage 850
Linux Kernel Card Services 3.1.22
options: [pci] [cardbus] [pm]
PCI: Enabling device 02:0f.0 (0000 -> 0002)
PCI: Found IRQ 11 for device 02:0f.0
PCI: Sharing IRQ 11 with 00:1f.2
PCI: Sharing IRQ 11 with 02:0f.1
PCI: Sharing IRQ 11 with 02:0f.2
PCI: Enabling device 02:0f.1 (0000 -> 0002)
PCI: Found IRQ 11 for device 02:0f.1
PCI: Sharing IRQ 11 with 00:1f.2
PCI: Sharing IRQ 11 with 02:0f.0
PCI: Sharing IRQ 11 with 02:0f.2
Yenta IRQ list 0498, PCI irq11
Socket status: 30000006
Yenta IRQ list 0498, PCI irq11
Socket status: 30000006
cs: IO port probe 0x0c00-0x0cff: clean.
cs: IO port probe 0x0100-0x04ff: excluding 0x170-0x177 0x280-0x287 0x370-0x37f 0x4d0-0x4d7
cs: IO port probe 0x0a00-0x0aff: clean.
irda_init()
ircc_init
ircc_init Try to open all known SMC chipsets
smc_superio_flat()
smc_probe()
smc_access()
smc_superio_paged()
smc_probe()
smc_access()
smc_superio_flat()
smc_probe()
smc_access()
smc_superio_paged()
smc_probe()
smc_access()
smc_superio_flat()
smc_probe()
smc_access()
smc_superio_paged()
smc_probe()
smc_access()
smc_superio_flat()
smc_probe()
smc_access()
smc_access()
smc_superio_paged()
smc_probe()
smc_access()
smc_access()
smc_access()
found SMC SuperIO Chip (devid=0x0e rev=01 base=0x002e): LPC47N252
ircc_open
SMC IrDA Controller found
IrCC version 2.0, firport 0x280, sirport 0x2f8 dma=3, irq=3
irport_open_R749eb1f5()
irport_open_R749eb1f5(), can't get iobase of 0x2f8
smc_superio_flat()
smc_probe()
smc_access()
smc_superio_paged()
smc_probe()
smc_access()
irport_close_R7fc631f0(), Releasing Region 2f8
usb.c: registered new driver usbfs
usb.c: registered new driver hub
uhci.c: USB Universal Host Controller Interface driver v1.1
PCI: Found IRQ 11 for device 00:1f.2
PCI: Sharing IRQ 11 with 02:0f.0
PCI: Sharing IRQ 11 with 02:0f.1
PCI: Sharing IRQ 11 with 02:0f.2
PCI: Setting latency timer of device 00:1f.2 to 64
uhci.c: USB UHCI at I/O 0xbce0, IRQ 11
usb.c: new USB bus registered, assigned bus number 1
hub.c: USB hub found
hub.c: 2 ports detected
parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE]
parport0: irq 7 detected
parport0: cpp_daisy: aa5500ff(38)
parport0: assign_addrs: aa5500ff(38)
parport0: cpp_daisy: aa5500ff(38)
parport0: assign_addrs: aa5500ff(38)
lp0: using parport0 (polling).
lp0: compatibility mode
lp0: compatibility mode
lp0: compatibility mode
NVRM: AGPGART: Intel i815 chipset
NVRM: AGPGART: aperture: 64M @ 0xe8000000
NVRM: AGPGART: aperture mapped from 0xe8000000 to 0xd59fa000
NVRM: AGPGART: mode 4x
NVRM: AGPGART: allocated 16 pages
VFS: Disk change detected on device ide0(3,64)


Attachments:
kconf (19.57 kB)
dmsg.out (9.97 kB)
Download all attachments

2002-01-01 12:11:09

by Mikael Pettersson

[permalink] [raw]
Subject: Re: APIC on laptop hangs the system @ powerstate change

On Tue, 01 Jan 2002 05:54:34 +0000, Todor Todorov wrote:
>I have a Dell Inspiron 8000 Laptop with PIII Mobile processor.
>... But I seem
>to have a problem with APIC and changes of the power state. APIC gets
>discovered and enabled when the kernel boots with no indication of any
>problem. ACPI works too. Now, if I detach the power cable when it's
>plugged in or vice versa, the system hangs without any chance for
>recovery than hard boot.
>...
>obeserved hang behavior allways reproducable with kernels 2.4.16,
>2.4.17-pre8, 2.4.17, 2.4.18-pre1, 2.5.1, 2.5.2-pre3 with APIC + either
>ACPI or APM, tried compiles with gcc-2.95.4, gcc-3.0.1, gcc-3.0.2, gcc-3.0.3
>This hangs occures allways when APIC support on uniprocessors is
>compiled in, no matter what power managemnet sheme is used. It never
>occures when APIC is not present, no matter of which kernel version
>you'd take. Besides this, with APIC compiled in, shutdown -h or even
>halt -f fails to pwer off the sistem (it goes down and halted but the
>power remains on).

Known problem. Dell's putting local APIC-capable Mobile P6s in their
recent laptops but haven't updated their BIOSen to handle enabled local
APICs. (Older Mobile P6s didn't have local APICs.) This results in
the problems you've described: hangs whenever the BIOS is activated,
i.e. at PM events and when accessing the BIOS setup screens.

The only known solution is to keep the local APIC disabled in Linux
when using a Dell laptop. The patch included below (for 2.4.17) will
do that automatically for you; alternatively you can reconfigure your
kernel with CONFIG_X86_UP_APIC=n (and CONFIG_SMP=n).

/Mikael

--- linux-2.4.17-init-order/arch/i386/kernel/apic.c.~1~ Fri Nov 23 22:40:14 2001
+++ linux-2.4.17-init-order/arch/i386/kernel/apic.c Sun Dec 23 18:51:40 2001
@@ -571,12 +571,17 @@
* Detect and enable local APICs on non-SMP boards.
* Original code written by Keir Fraser.
*/
+int dont_enable_local_apic __initdata = 0;

static int __init detect_init_APIC (void)
{
u32 h, l, features;
extern void get_cpu_vendor(struct cpuinfo_x86*);

+ /* Disabled by DMI scan or kernel option? */
+ if (dont_enable_local_apic)
+ return -1;
+
/* Workaround for us being called before identify_cpu(). */
get_cpu_vendor(&boot_cpu_data);

@@ -894,8 +899,14 @@

static unsigned int calibration_result;

+int dont_use_local_apic_timer __initdata = 0;
+
void __init setup_APIC_clocks (void)
{
+ /* Disabled by DMI scan or kernel option? */
+ if (dont_use_local_apic_timer)
+ return;
+
printk("Using local APIC timer interrupts.\n");
using_apic_timer = 1;

--- linux-2.4.17-init-order/arch/i386/kernel/dmi_scan.c.~1~ Fri Dec 21 23:19:54 2001
+++ linux-2.4.17-init-order/arch/i386/kernel/dmi_scan.c Mon Dec 24 11:38:21 2001
@@ -9,6 +9,7 @@
#include <linux/pm.h>
#include <asm/keyboard.h>
#include <asm/system.h>
+#include <linux/bootmem.h>

unsigned long dmi_broken;
int is_sony_vaio_laptop;
@@ -51,7 +52,7 @@
u8 *data;
int i=1;

- buf = ioremap(base, len);
+ buf = bt_ioremap(base, len);
if(buf==NULL)
return -1;

@@ -83,7 +84,7 @@
data+=2;
i++;
}
- iounmap(buf);
+ bt_iounmap(buf, len);
return 0;
}

@@ -155,7 +156,7 @@
return;
if (dmi_ident[slot])
return;
- dmi_ident[slot] = kmalloc(strlen(p)+1, GFP_KERNEL);
+ dmi_ident[slot] = alloc_bootmem(strlen(p)+1);
if(dmi_ident[slot])
strcpy(dmi_ident[slot], p);
else
@@ -414,6 +415,43 @@
return 0;
}

+/*
+ * Some machines, usually laptops, can't handle an enabled local APIC.
+ * The symptoms include hangs or reboots when suspending or resuming,
+ * attaching or detaching the power cord, or entering BIOS setup screens
+ * through magic key sequences.
+ */
+static int __init local_apic_kills_bios(struct dmi_blacklist *d)
+{
+#ifdef CONFIG_X86_LOCAL_APIC
+ extern int dont_enable_local_apic;
+ if (!dont_enable_local_apic) {
+ dont_enable_local_apic = 1;
+ printk(KERN_WARNING "%s with broken BIOS detected. "
+ "Refusing to enable the local APIC.\n",
+ d->ident);
+ }
+#endif
+ return 0;
+}
+
+/*
+ * The Intel AL440LX mainboard will hang randomly if the local APIC
+ * timer is running and the APM BIOS hasn't been disabled.
+ */
+static int __init apm_kills_local_apic_timer(struct dmi_blacklist *d)
+{
+#ifdef CONFIG_X86_LOCAL_APIC
+ extern int dont_use_local_apic_timer;
+ if (apm_info.bios.version && !dont_use_local_apic_timer) {
+ dont_use_local_apic_timer = 1;
+ printk(KERN_WARNING "%s with broken BIOS detected. "
+ "The local APIC timer will not be used.\n",
+ d->ident);
+ }
+#endif
+ return 0;
+}

/*
* Simple "print if true" callback
@@ -558,6 +596,25 @@
MATCH(DMI_BIOS_DATE, "09/12/00"), NO_MATCH
} },

+ /* Machines which have problems handling enabled local APICs */
+
+ { local_apic_kills_bios, "Dell Inspiron", {
+ MATCH(DMI_SYS_VENDOR, "Dell Computer Corporation"),
+ MATCH(DMI_PRODUCT_NAME, "Inspiron"),
+ NO_MATCH, NO_MATCH
+ } },
+
+ { local_apic_kills_bios, "Dell Latitude", {
+ MATCH(DMI_SYS_VENDOR, "Dell Computer Corporation"),
+ MATCH(DMI_PRODUCT_NAME, "Latitude"),
+ NO_MATCH, NO_MATCH
+ } },
+
+ { apm_kills_local_apic_timer, "Intel AL440LX", {
+ MATCH(DMI_BOARD_VENDOR, "Intel Corporation"),
+ MATCH(DMI_BOARD_NAME, "AL440LX"),
+ NO_MATCH, NO_MATCH } },
+
/* Problem Intel 440GX bioses */

{ broken_pirq, "SABR1 Bios", { /* Bad $PIR */
@@ -726,12 +783,10 @@
}
}

-static int __init dmi_scan_machine(void)
+int __init dmi_scan_machine(void)
{
int err = dmi_iterate(dmi_decode);
if(err == 0)
dmi_check_blacklist();
return err;
}
-
-module_init(dmi_scan_machine);
--- linux-2.4.17-init-order/arch/i386/kernel/setup.c.~1~ Fri Dec 21 23:19:54 2001
+++ linux-2.4.17-init-order/arch/i386/kernel/setup.c Sun Dec 23 18:51:40 2001
@@ -992,7 +992,6 @@
*/
if (smp_found_config)
get_smp_config();
- init_apic_mappings();
#endif


@@ -1044,6 +1043,7 @@
conswitchp = &dummy_con;
#endif
#endif
+ dmi_scan_machine();
}

static int cachesize_override __initdata = -1;
--- linux-2.4.17-init-order/arch/i386/kernel/traps.c.~1~ Thu Oct 11 13:34:39 2001
+++ linux-2.4.17-init-order/arch/i386/kernel/traps.c Sun Dec 23 18:51:40 2001
@@ -920,6 +920,10 @@
EISA_bus = 1;
#endif

+#ifdef CONFIG_X86_LOCAL_APIC
+ init_apic_mappings();
+#endif
+
set_trap_gate(0,&divide_error);
set_trap_gate(1,&debug);
set_intr_gate(2,&nmi);
--- linux-2.4.17-init-order/arch/i386/mm/init.c.~1~ Fri Dec 21 23:19:54 2001
+++ linux-2.4.17-init-order/arch/i386/mm/init.c Sun Dec 23 18:51:40 2001
@@ -128,7 +128,6 @@
static inline void set_pte_phys (unsigned long vaddr,
unsigned long phys, pgprot_t flags)
{
- pgprot_t prot;
pgd_t *pgd;
pmd_t *pmd;
pte_t *pte;
@@ -144,10 +143,8 @@
return;
}
pte = pte_offset(pmd, vaddr);
- if (pte_val(*pte))
- pte_ERROR(*pte);
- pgprot_val(prot) = pgprot_val(PAGE_KERNEL) | pgprot_val(flags);
- set_pte(pte, mk_pte_phys(phys, prot));
+ /* <phys,flags> stored as-is, to permit clearing entries */
+ set_pte(pte, mk_pte_phys(phys, flags));

/*
* It's enough to flush this one mapping.
--- linux-2.4.17-init-order/arch/i386/mm/ioremap.c.~1~ Fri Mar 30 19:05:04 2001
+++ linux-2.4.17-init-order/arch/i386/mm/ioremap.c Mon Dec 24 11:42:12 2001
@@ -161,3 +161,69 @@
if (addr > high_memory)
return vfree((void *) (PAGE_MASK & (unsigned long) addr));
}
+
+#include <asm/fixmap.h>
+void __init *bt_ioremap(unsigned long phys_addr, unsigned long size)
+{
+ unsigned long offset, last_addr;
+ unsigned int nrpages;
+ enum fixed_addresses idx;
+
+ /* Don't allow wraparound or zero size */
+ last_addr = phys_addr + size - 1;
+ if (!size || last_addr < phys_addr)
+ return NULL;
+
+ /*
+ * Don't remap the low PCI/ISA area, it's always mapped..
+ */
+ if (phys_addr >= 0xA0000 && last_addr < 0x100000)
+ return phys_to_virt(phys_addr);
+
+ /*
+ * Mappings have to be page-aligned
+ */
+ offset = phys_addr & ~PAGE_MASK;
+ phys_addr &= PAGE_MASK;
+ size = PAGE_ALIGN(last_addr) - phys_addr;
+
+ /*
+ * Mappings have to fit in the FIX_BTMAP area.
+ */
+ nrpages = size >> PAGE_SHIFT;
+ if (nrpages > NR_FIX_BTMAPS)
+ return NULL;
+
+ /*
+ * Ok, go for it..
+ */
+ idx = FIX_BTMAP_BEGIN;
+ while (nrpages > 0) {
+ set_fixmap(idx, phys_addr);
+ phys_addr += PAGE_SIZE;
+ --idx;
+ --nrpages;
+ }
+ return (void*) (offset + fix_to_virt(FIX_BTMAP_BEGIN));
+}
+
+void __init bt_iounmap(void *addr, unsigned long size)
+{
+ unsigned long virt_addr;
+ unsigned long offset;
+ unsigned int nrpages;
+ enum fixed_addresses idx;
+
+ virt_addr = (unsigned long)addr;
+ if (virt_addr < fix_to_virt(FIX_BTMAP_BEGIN))
+ return;
+ offset = virt_addr & ~PAGE_MASK;
+ nrpages = PAGE_ALIGN(offset + size - 1) >> PAGE_SHIFT;
+
+ idx = FIX_BTMAP_BEGIN;
+ while (nrpages > 0) {
+ __set_fixmap(idx, 0, __pgprot(0));
+ --idx;
+ --nrpages;
+ }
+}
--- linux-2.4.17-init-order/include/asm-i386/fixmap.h.~1~ Sun Aug 12 11:35:53 2001
+++ linux-2.4.17-init-order/include/asm-i386/fixmap.h Sun Dec 23 18:51:41 2001
@@ -65,6 +65,11 @@
FIX_KMAP_BEGIN, /* reserved pte's for temporary kernel mappings */
FIX_KMAP_END = FIX_KMAP_BEGIN+(KM_TYPE_NR*NR_CPUS)-1,
#endif
+ __end_of_permanent_fixed_addresses,
+ /* temporary boot-time mappings, used before ioremap() is functional */
+#define NR_FIX_BTMAPS 16
+ FIX_BTMAP_END = __end_of_permanent_fixed_addresses,
+ FIX_BTMAP_BEGIN = FIX_BTMAP_END + NR_FIX_BTMAPS - 1,
__end_of_fixed_addresses
};

@@ -86,8 +91,8 @@
* at the top of mem..
*/
#define FIXADDR_TOP (0xffffe000UL)
-#define FIXADDR_SIZE (__end_of_fixed_addresses << PAGE_SHIFT)
-#define FIXADDR_START (FIXADDR_TOP - FIXADDR_SIZE)
+#define __FIXADDR_SIZE (__end_of_permanent_fixed_addresses << PAGE_SHIFT)
+#define FIXADDR_START (FIXADDR_TOP - __FIXADDR_SIZE)

#define __fix_to_virt(x) (FIXADDR_TOP - ((x) << PAGE_SHIFT))

--- linux-2.4.17-init-order/include/asm-i386/io.h.~1~ Tue Nov 6 12:12:07 2001
+++ linux-2.4.17-init-order/include/asm-i386/io.h Mon Dec 24 11:36:35 2001
@@ -98,6 +98,14 @@
extern void iounmap(void *addr);

/*
+ * bt_ioremap() and bt_iounmap() are for temporary early boot-time
+ * mappings, before the real ioremap() is functional.
+ * A boot-time mapping is currently limited to at most 16 pages.
+ */
+extern void *bt_ioremap(unsigned long offset, unsigned long size);
+extern void bt_iounmap(void *addr, unsigned long size);
+
+/*
* IO bus memory addresses are also 1:1 with the physical address
*/
#define virt_to_bus virt_to_phys

2002-01-01 17:17:13

by Todor Todorov

[permalink] [raw]
Subject: Re: APIC on laptop hangs the system @ powerstate change

Robert Cope wrote:

>FWIW, I have the same APIC problem with my 8100. To make things even
>more fun, if you have the GeForce2 video, APM support won't work -- the
>GeForce2 drivers from nVidia block all APM events. The commends in
>their code imply that ACPI is the only system they support. Hrm, the
>reason escapes me now, but ACPI was not much of an option for me,
>either. Oh, right, I think with ACPI enabled my PCMCIA cards were not
>discovered. Sigh
>
Hey Robert,

AFAIK, even in the newest release the nvidia closed driver doesn't
support PM events - ACPI included, but eventually they will. Now for
your cpmcia cards: You need the lates acpi patch form the intel's
developers site - don't remember the www address though so you might
want to go to acpi4linux.org and see it there. With it, the pcmcia
discovery and irq assignment work properly, you have to compile pcmcia
allways as modules though (I remember a message on their mailing lists
stating that it wouldn't work if compiled if pcmcia stuf is compiled
into the kernel). From the ACPI options xou have to check everything
with <y> (nothing as module). The patch is called acpi-20011205.diff.gz
and is made for the vanilla 2.4.16 source, but it applies cleanly to
2.4.17 too. I use it now with 2.5.2-pre3 thoug I had problems with one
file when applying - had to manually c'n'p a few lines of code. But it's
easy and it works.
That's the onyl chance to make acpi work with a newer kernel and pcmcia
- even on my *older* Inspiron 8000. And you will need the latest acpid
daemon too.
What you will get is proper ACPI events and status reading for battery
and ac power and stuff, and you can define/customize the actions which
acpid will attend on any event you want. So you might want to give it a
try.... The only thing is..... I still don't know how far the most
drivers are in converting from APM to ACPI management scheme....

Regards,
Todor