Re: [miniPATCH] about cr4 : SysRq Show Reg

Maciej W. Rozycki (macro@ds2.pg.gda.pl)
Thu, 15 Jul 1999 20:50:42 +0200 (MET DST)


On Thu, 15 Jul 1999, Masahiro Adegawa wrote:

> we get cr4 when `SysRq: Show Regs'.
> But I do not know the best effective judging conditions of CR4.

You should probably use a bit mask. It seems X86_FEATURE_VME is best for
Intel CPUs as all Intels that have CR4 implement this feature while there
exist Intel CPUs that do have CR4 but do not support X86_FEATURE_PSE. But
I am not sure about other vendors.

To be on the safe side I would test features that have their respective
CR4 bits and assume it's present whenever any of them is set. AFAIK, the
appropriate mask is: (X86_FEATURE_VME | X86_FEATURE_DE | X86_FEATURE_PSE |
X86_FEATURE_TSC | X86_FEATURE_PAE | X86_FEATURE_MCE | X86_FEATURE_PGE |
X86_FEATURE_FXSR | X86_FEATURE_25).

X86_FEATURE_25 will probably called X86_FEATURE_XMM one day.

-- 
+  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.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/