Re: Laptops (APM) & 0040 crashes

Pavel Machek (pavel@elf.ucw.cz)
Sun, 8 Feb 1998 22:11:15 +0100


Hi, Stephen!

> OK, I wouldn't want to leave you stranded on FreeBSD :-) Can you try
> the following patch for me. It is against 2.0.33. I can only say that
> it doesn't stop my APM enabled desktop from running - I don't have a
> machine with an APM BIOS with the 0x40 access bug.

Did you make sure that GDT is not overfilled? (I.e. 12+NUM_TASKS being
more than you can fit in GDT?)

> What I should have said is that M$ and Intel have made up another
> standard for power management. APM is still used by everyone,
> but ACPI(?) is on the horizon.

ACPI is not as broken as names of its creators would suggest.

> +
> + /*
> + * Set up a segment that references the real mode segment 0x40
> + * that extends up to the end of page zero (that we have reserved).
> + * This is for buggy BIOS's that refer to (real mode) segment 0x40
> + * even though they are called in protected mode.
> + */
> + set_base(gdt[APM_40 >> 3],
> + 0xc0000000 + ((unsigned long)0x40 << 4));
> + set_limit(gdt[APM_40 >> 3], 4096 - (0x40 << 4));

NIce. It might be nice to do this only iff certain config option
(CONFIG_I_PROMISE_I_WILL_NOT_BUY_NOTEBUG_WITH_BROKEN_BIOS_AGAIN), so
that users are aware of problem and so there is still light pressure
to manufacturers to fix their code.

Also, 2.1.X patch might be nice: this is not likely to be adopted in
2.0.X, but IMO it could well go into 2.1.86 [Well- if it works. Did it
actually help somebody so far?]

Pavel

-- 
I'm really pavel@atrey.karlin.mff.cuni.cz. 	   Pavel
Look at http://atrey.karlin.mff.cuni.cz/~pavel/ ;-).
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu