cpuid.cc (10638:5d119a460f15) cpuid.cc (11217:b29d5816936f)
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;

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

133 case LongModeAddressSize:
134 result = CpuidResult(0x00003030, 0x00000000,
135 0x00000000, 0x00000000);
136 break;
137/* case SVMInfo:
138 case TLB1GBPageInfo:
139 case PerformanceInfo:*/
140 default:
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;

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

133 case LongModeAddressSize:
134 result = CpuidResult(0x00003030, 0x00000000,
135 0x00000000, 0x00000000);
136 break;
137/* case SVMInfo:
138 case TLB1GBPageInfo:
139 case PerformanceInfo:*/
140 default:
141 warn("x86 cpuid: unimplemented function %u", funcNum);
141 warn("x86 cpuid family 0x8000: unimplemented function %u",
142 funcNum);
142 return false;
143 }
144 } else if(family == 0x0000) {
145 // The standard functions
146 switch (funcNum) {
147 case VendorAndLargestStdFunc:
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:
156 result = CpuidResult(0x00020f51, 0x00000805,
157 0xe7dbfbff, 0x04000209);
158 break;
159 default:
143 return false;
144 }
145 } else if(family == 0x0000) {
146 // The standard functions
147 switch (funcNum) {
148 case VendorAndLargestStdFunc:
149 assert(vendorStringSize >= 12);
150 result = CpuidResult(
151 NumStandardCpuidFuncs - 1,
152 stringToRegister(vendorString),
153 stringToRegister(vendorString + 4),
154 stringToRegister(vendorString + 8));
155 break;
156 case FamilyModelStepping:
157 result = CpuidResult(0x00020f51, 0x00000805,
158 0xe7dbfbff, 0x04000209);
159 break;
160 default:
160 warn("x86 cpuid: unimplemented function %u", funcNum);
161 warn("x86 cpuid family 0x0000: unimplemented function %u",
162 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
163 return false;
164 }
165 } else {
166 warn("x86 cpuid: unknown family %#x", family);
167 return false;
168 }
169
170 return true;
171 }
172} // namespace X86ISA