lkml.org 
[lkml]   [2000]   [Jul]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [patch] 2.4.0-test2: %cr4 in a register dump
Date
Followup to:  <Pine.LNX.4.10.10007051307000.831-100000@penguin.transmeta.com>
By author: Linus Torvalds <torvalds@transmeta.com>
In newsgroup: linux.dev.kernel
> >
> > this is aesthetically bogus. i think you should always print CR4,
> > no matter whether it's 0 or not.
>
> If I remember correctly, there are CPU's out there that will bomb out
> horribly when you access %cr4 if the register doesn't exist.
>

They will #GP, yes. If you want to read %cr4 unconditionally you have
to be prepared to trap the #GP.

>
> Do I remember wrong?
>
> I'd certainly agree with printing out cr4 even if it would be zero, I just
> disagree very much with adding a register read to the dump output that may
> cause an infinite regression of traps..
>

Indeed. %cr4 was introduced in the P5; I believe it is probably a
valid assumption that if the CPU has CPUID it also has %cr4 (the later
486's which had CPUID also had VME, so they must have supported %cr4.)

-hpa


--
<hpa@transmeta.com> at work, <hpa@zytor.com> in private!
"Unix gives you enough rope to shoot yourself in the foot."
http://www.zytor.com/~hpa/puzzle.txt

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

\
 
 \ /
  Last update: 2005-03-22 13:57    [W:0.077 / U:3.884 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site