Re: PCI memory allocation bug with CONFIG_HIGHMEM

From: Linus Torvalds
Date: Tue Jan 06 2004 - 23:08:15 EST




On Tue, 6 Jan 2004, Adam Belay wrote:
>
> 5.) Look into other ways of finding out if the PnPBIOS might be buggy,
> currently we only have DMI.
>
> Any others?

We could use the exception mechanism, and try to fix up any BIOS errors.
That would require:

- make the BIOS calls save all important registers just before entry (esp
in particular, and the "after-call EIP") and set a flag saying "fix me
up". Do this per-CPU. Clear the flags after exit.

- add magic knowledge to "fixup_exception()" path that looks at the
per-cpu fix-me-up flag, and if it is set, restore all the segments
(which the BIOS may have crapped on), %esp and %eip to the magic fixup
values.

- test it with a bogus trap (on purpose) which has reset all the x86
registers, including an offset %esp.

This could make us recover from some (most?) BIOS bugs and at least
dynamically notice when the BIOS does bad bad things.

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