Messages in this thread | | | Date | Fri, 16 Jul 1999 16:47:00 +0900 | From | Masahiro Adegawa <> | Subject | Re: [miniPATCH] about cr4 : SysRq Show Reg |
| |
hi,
<Pine.GSO.3.96.990715192448.18675E-100000@delta.private.ds2.pg.gda.pl> "Maciej W. Rozycki" <macro@ds2.pg.gda.pl> wrote:
> 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:
Your idea,
if (boot_cpu_data.x86_capability & X86_FEATURE_VME) { __asm__("movl %%cr4, %0": "=r" (cr4));
The safe side,
#define X86_FEATURE_CR4 (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) ..... if (boot_cpu_data.x86_capability & X86_FEATURE_CR4) { __asm__("movl %%cr4, %0": "=r" (cr4));
I choose the safe side. Thanks.
- Masahiro
- 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/
| |