K8 Errata #93: adjusting address to a fixup block
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 4 lines · Alexandre Oliva
While I investigated the problem of probing the touchpad on a Compaq Presario r3004, I'd sometimes get the K8 Errata #93 warning. One of my theories was that we might be missing some fix up because of the Errata, or adjusting an address that wasn't the current-instruction
It's more likely the BIOS is executing SMM code to handle the touch pad and that SMM code doesn't have the correct workaround for the erratum.
Quoted 3 lines
address, so I came up with this patch. It turned out to make no difference, but it still feels like an improvement to me, since some day we might be resuming from halt into a fix-up block. Thoughts?
The code is already ugly enough and handles most of the cases, I don't think it is worth it complicating it even more just to handle more corner cases of buggy BIOS.
The real fix is to fix your BIOS.
static int warned;
+ if ((error_code & 16) == 0)
+ return 0;
This is dubious because the I/D bit is undefined when NX is disabled in EFER (e.g. with noexec=off or when the CPU doesn't support NX)
-Andi
Quoted 7 lines · Andi Kleen
Quoted 3 lines
address, so I came up with this patch. It turned out to make no difference, but it still feels like an improvement to me, since some day we might be resuming from halt into a fix-up block. Thoughts?
The code is already ugly enough and handles most of the cases, I don't think it is worth it complicating it even more just to handle more corner cases of buggy BIOS.
Fair enough.
Quoted 8 lines
The real fix is to fix your BIOS.
(quoted diff) +2
-0static int warned; + if ((error_code & 16) == 0) + return 0;This is dubious because the I/D bit is undefined when NX is disabled in EFER (e.g. with noexec=off or when the CPU doesn't support NX)
Aah... I wasn't aware of that. Patch withdrawn for sure, then :-) Thanks for the feedback.
Signature · 3 lines
Alexandre Oliva http://www.ic.unicamp.br/~oliva/
Red Hat Compiler Engineer aoliva@{redhat.com, gcc.gnu.org}
Free Software Evangelist oliva@{lsd.ic.unicamp.br, gnu.org}