Subversion Repositories HelenOS-historic

Rev

Rev 534 | Rev 1187 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 534 Rev 1019
Line 90... Line 90...
90
 
90
 
91
 
91
 
92
 
92
 
93
void cpu_arch_init(void)
93
void cpu_arch_init(void)
94
{
94
{
-
 
95
    __u32 help=0;
-
 
96
   
95
    CPU->arch.tss = tss_p;
97
    CPU->arch.tss = tss_p;
96
    CPU->fpu_owner=NULL;
98
    CPU->fpu_owner=NULL;
-
 
99
 
-
 
100
    cpuid_feature_info fi;
-
 
101
    cpuid_extended_feature_info efi;
-
 
102
 
-
 
103
    cpu_info_t info;
-
 
104
    cpuid(1, &info);
-
 
105
 
-
 
106
    fi.word=info.cpuid_edx;
-
 
107
    efi.word=info.cpuid_ecx;
-
 
108
   
-
 
109
    if(fi.bits.fxsr)    fpu_fxsr();
-
 
110
    else fpu_fsr();
-
 
111
   
-
 
112
    if(fi.bits.sse) asm volatile (
-
 
113
        "mov %%cr4,%0;\n"
-
 
114
        "or %1,%0;\n"
-
 
115
        "mov %0,%%cr4;\n"
-
 
116
        :"+r"(help)
-
 
117
        :"i"(CR4_OSFXSR_MASK|(1<<10))
-
 
118
    );
-
 
119
   
97
}
120
}
98
 
121
 
99
 
122
 
100
void cpu_identify(void)
123
void cpu_identify(void)
101
{
124
{