Re: [patch] vm86: Clear AC on INT

From: Maciej W. Rozycki (macro@ds2.pg.gda.pl)
Date: Thu Aug 01 2002 - 11:33:40 EST


On Thu, 1 Aug 2002, Kasper Dupont wrote:

> This sounds a little strange to me. AC is in the upper 16 bit
> of the EFLAGS register, so it is not saved on an interrupt
> where only lower 16 bits is saved. This means that when we
> clear it on the interrupt, the value will be lost for good.

 Indeed.

> I can see the spec says it, so we'd better do that. But does
> the spec make any sense? And does the CPU really loose the
> AC flag on every interrupt in real mode?

 The flag is cleared as on every interrupt regardless of the processor's
mode. It's unfortunate it gets stored nowhere in the real mode, indeed.
It leads the Intel's official CPU determination code to fail if interrupts
are enabled and one arrives at a wrong time. I discovered it in mid-90's
and have some diagnostic code somewhere in my archive -- basically raising
the 8254 timer interrupt rate (actually any IRQ suffices, but that's the
easiest to reconfigure) much enough assures any i486+ processor will get
misidentified as an i386 with high enough probability you may actually see
incorrect reports from programs.

 The discussion may be available from a Usenet archive; I think there is a
statement on the problem somewhere at the www.x86.org site as well.

-- 
+  Maciej W. Rozycki, Technical University of Gdansk, Poland   +
+--------------------------------------------------------------+
+        e-mail: macro@ds2.pg.gda.pl, PGP key available        +

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



This archive was generated by hypermail 2b29 : Wed Aug 07 2002 - 22:00:16 EST