1144 |
jmp _take_trap /* treat as a trap */ |
jmp _take_trap /* treat as a trap */ |
1145 |
|
|
1146 |
|
|
|
#if 0 |
|
1147 |
/* Discover what kind of cpu we have; return the family number |
/* Discover what kind of cpu we have; return the family number |
1148 |
(3, 4, 5, 6, for 386, 486, 586, 686 respectively). */ |
(3, 4, 5, 6, for 386, 486, 586, 686 respectively). */ |
1149 |
ENTRY(discover_x86_cpu_type) |
ENTRY(discover_x86_cpu_type) |
1150 |
movl %esp,%edx /* Save stack pointer */ |
pushl %ebp /* Save frame pointer */ |
1151 |
|
movl %esp,%ebp /* Save stack pointer */ |
1152 |
and $~0x3,%esp /* Align stack pointer */ |
and $~0x3,%esp /* Align stack pointer */ |
1153 |
|
|
1154 |
|
inb $0xe8,%al /* Enable ID flag for Cyrix CPU ... */ |
1155 |
|
andb $0x80,%al /* ... in CCR4 reg bit7 */ |
1156 |
|
outb %al,$0xe8 |
1157 |
pushfl /* Fetch flags ... */ |
pushfl /* Fetch flags ... */ |
1158 |
popl %eax /* ... into eax */ |
popl %eax /* ... into eax */ |
1159 |
movl %eax,%ecx /* Save original flags for return */ |
movl %eax,%ecx /* Save original flags for return */ |
1162 |
popfl /* ... In EFLAGS */ |
popfl /* ... In EFLAGS */ |
1163 |
pushfl /* Fetch flags back ... */ |
pushfl /* Fetch flags back ... */ |
1164 |
popl %eax /* ... into eax */ |
popl %eax /* ... into eax */ |
1165 |
|
pushl %ecx /* From ecx... */ |
1166 |
|
popfl /* ... restore original flags */ |
1167 |
|
|
1168 |
xorl %ecx,%eax /* See if any bits didn't change */ |
xorl %ecx,%eax /* See if any bits didn't change */ |
1169 |
testl $EFL_AC,%eax /* Test AC bit */ |
testl $EFL_AC,%eax /* Test AC bit */ |
1183 |
shrl $8,%eax /* Slide family bits down */ |
shrl $8,%eax /* Slide family bits down */ |
1184 |
andl $15,%eax /* And select them */ |
andl $15,%eax /* And select them */ |
1185 |
|
|
1186 |
9: pushl %ecx /* From ecx... */ |
9: movl %ebp,%esp /* Restore stack pointer */ |
1187 |
popfl /* ... restore original flags */ |
popl %ebp /* Restore frame pointer */ |
|
movl %edx,%esp /* Restore stack pointer */ |
|
1188 |
ret /* And return */ |
ret /* And return */ |
|
#endif |
|
1189 |
|
|
1190 |
|
|
1191 |
/**/ |
/**/ |