3 Copyright (c) 2004 - 2006, Intel Corporation. All rights reserved.<BR>
4 This program and the accompanying materials
5 are licensed and made available under the terms and conditions of the BSD License
6 which accompanies this distribution. The full text of the license may be found at
7 http://opensource.org/licenses/bsd-license.php
9 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
18 Provide cpu version extract considering extended family & model ID.
25 IN OUT UINT16
*FamilyId
, OPTIONAL
26 IN OUT UINT8
*Model
, OPTIONAL
27 IN OUT UINT8
*SteppingId
, OPTIONAL
28 IN OUT UINT8
*Processor OPTIONAL
33 Extract CPU detail version infomation
36 FamilyId - FamilyId, including ExtendedFamilyId
37 Model - Model, including ExtendedModel
38 SteppingId - SteppingId
43 EFI_CPUID_REGISTER Register
;
46 EfiCpuid (EFI_CPUID_VERSION_INFO
, &Register
);
48 if (SteppingId
!= NULL
) {
49 *SteppingId
= (UINT8
) (Register
.RegEax
& 0xF);
52 if (Processor
!= NULL
) {
53 *Processor
= (UINT8
) ((Register
.RegEax
>> 12) & 0x3);
56 if (Model
!= NULL
|| FamilyId
!= NULL
) {
57 TempFamilyId
= (UINT8
) ((Register
.RegEax
>> 8) & 0xF);
60 *Model
= (UINT8
) ((Register
.RegEax
>> 4) & 0xF);
61 if (TempFamilyId
== 0x6 || TempFamilyId
== 0xF) {
62 *Model
= (UINT8
) (*Model
| ((Register
.RegEax
>> 12) & 0xF0));
66 if (FamilyId
!= NULL
) {
67 *FamilyId
= TempFamilyId
;
68 if (TempFamilyId
== 0xF) {
69 *FamilyId
= (UINT8
) (*FamilyId
+ (UINT16
) ((Register
.RegEax
>> 20) & 0xFF));