cpuid.cc (7811:a8fc35183c10) cpuid.cc (9124:3476c436d248)
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;

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

130 result = CpuidResult(0x80000018, 0x68747541,
131 0x69746e65, 0x444d4163);
132 break;
133/* case LongModeAddressSize:
134 case SVMInfo:
135 case TLB1GBPageInfo:
136 case PerformanceInfo:*/
137 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;

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

130 result = CpuidResult(0x80000018, 0x68747541,
131 0x69746e65, 0x444d4163);
132 break;
133/* case LongModeAddressSize:
134 case SVMInfo:
135 case TLB1GBPageInfo:
136 case PerformanceInfo:*/
137 default:
138 warn("x86 cpuid: unimplemented function %u", funcNum);
138 return false;
139 }
140 } else if(family == 0x0000) {
141 // The standard functions
142 switch (funcNum) {
143 case VendorAndLargestStdFunc:
144 assert(vendorStringSize >= 12);
145 result = CpuidResult(
146 NumStandardCpuidFuncs - 1,
147 stringToRegister(vendorString),
148 stringToRegister(vendorString + 4),
149 stringToRegister(vendorString + 8));
150 break;
151 case FamilyModelStepping:
152 result = CpuidResult(0x00020f51, 0000000405,
153 0xe7d3fbff, 0x00000001);
154 break;
155 default:
139 return false;
140 }
141 } else if(family == 0x0000) {
142 // The standard functions
143 switch (funcNum) {
144 case VendorAndLargestStdFunc:
145 assert(vendorStringSize >= 12);
146 result = CpuidResult(
147 NumStandardCpuidFuncs - 1,
148 stringToRegister(vendorString),
149 stringToRegister(vendorString + 4),
150 stringToRegister(vendorString + 8));
151 break;
152 case FamilyModelStepping:
153 result = CpuidResult(0x00020f51, 0000000405,
154 0xe7d3fbff, 0x00000001);
155 break;
156 default:
157 warn("x86 cpuid: unimplemented function %u", funcNum);
156 return false;
157 }
158 return false;
159 }
160 } else {
161 warn("x86 cpuid: unknown family %#x", family);
162 return false;
158 }
163 }
164
159 return true;
160 }
161} // namespace X86ISA
165 return true;
166 }
167} // namespace X86ISA