cpuid.cc (10552:41ebfed1dc89) cpuid.cc (10637:e9bc4cde5d8e)
1/*
2 * Copyright (c) 2008 The Regents of The University of Michigan
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are
7 * met: redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer;

--- 82 unchanged lines hidden (view full) ---

91 assert(vendorStringSize >= 12);
92 result = CpuidResult(
93 0x80000000 + NumExtendedCpuidFuncs - 1,
94 stringToRegister(vendorString),
95 stringToRegister(vendorString + 4),
96 stringToRegister(vendorString + 8));
97 break;
98 case FamilyModelSteppingBrandFeatures:
1/*
2 * Copyright (c) 2008 The Regents of The University of Michigan
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are
7 * met: redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer;

--- 82 unchanged lines hidden (view full) ---

91 assert(vendorStringSize >= 12);
92 result = CpuidResult(
93 0x80000000 + NumExtendedCpuidFuncs - 1,
94 stringToRegister(vendorString),
95 stringToRegister(vendorString + 4),
96 stringToRegister(vendorString + 8));
97 break;
98 case FamilyModelSteppingBrandFeatures:
99 /** Features Enabling
100 * rdx, enabling most of the features except:
101 * FXSR, FFXSR, Page1GB in EDX
102 *
103 * rcx, disabling most of the features except:
104 * SSE4A, XOP, FMA4 in ECX
105 */
106 result = CpuidResult(0x00020f51, 0x00000405,
99 result = CpuidResult(0x00020f51, 0x00000405,
107 0xe3d3fbff, 0x00010840);
100 0xe3d3fbff, 0x00000001);
108 break;
109 case NameString1:
110 case NameString2:
111 case NameString3:
112 {
113 // Zero fill anything beyond the end of the string. This
114 // should go away once the string is a vetted parameter.
115 char cleanName[nameStringSize];

--- 39 unchanged lines hidden (view full) ---

155 assert(vendorStringSize >= 12);
156 result = CpuidResult(
157 NumStandardCpuidFuncs - 1,
158 stringToRegister(vendorString),
159 stringToRegister(vendorString + 4),
160 stringToRegister(vendorString + 8));
161 break;
162 case FamilyModelStepping:
101 break;
102 case NameString1:
103 case NameString2:
104 case NameString3:
105 {
106 // Zero fill anything beyond the end of the string. This
107 // should go away once the string is a vetted parameter.
108 char cleanName[nameStringSize];

--- 39 unchanged lines hidden (view full) ---

148 assert(vendorStringSize >= 12);
149 result = CpuidResult(
150 NumStandardCpuidFuncs - 1,
151 stringToRegister(vendorString),
152 stringToRegister(vendorString + 4),
153 stringToRegister(vendorString + 8));
154 break;
155 case FamilyModelStepping:
163 /** Features Enabling
164 * rdx, enabling most of the features except:
165 * HTT in EDX
166 *
167 * rcx, disabling most of the features except:
168 * SSE3, SSSE3, FMA, SSE41, XSAVE, AVX in ECX
169 */
170 result = CpuidResult(0x00020f51, 0x00000805,
156 result = CpuidResult(0x00020f51, 0x00000805,
171 0xe7dbfbff, 0x14081201);
157 0xe7dbfbff, 0x00000001);
172 break;
173 default:
174 warn("x86 cpuid: unimplemented function %u", funcNum);
175 return false;
176 }
177 } else {
178 warn("x86 cpuid: unknown family %#x", family);
179 return false;
180 }
181
182 return true;
183 }
184} // namespace X86ISA
158 break;
159 default:
160 warn("x86 cpuid: unimplemented function %u", funcNum);
161 return false;
162 }
163 } else {
164 warn("x86 cpuid: unknown family %#x", family);
165 return false;
166 }
167
168 return true;
169 }
170} // namespace X86ISA