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.
26 IN OUT UINT16
*FamilyId
, OPTIONAL
27 IN OUT UINT8
*Model
, OPTIONAL
28 IN OUT UINT8
*SteppingId
, OPTIONAL
29 IN OUT UINT8
*Processor OPTIONAL
34 Extract CPU detail version infomation
37 FamilyId - FamilyId, including ExtendedFamilyId
38 Model - Model, including ExtendedModel
39 SteppingId - SteppingId
44 EFI_CPUID_REGISTER Register
;
47 EfiCpuid (EFI_CPUID_VERSION_INFO
, &Register
);
49 if (SteppingId
!= NULL
) {
50 *SteppingId
= (UINT8
) (Register
.RegEax
& 0xF);
53 if (Processor
!= NULL
) {
54 *Processor
= (UINT8
) ((Register
.RegEax
>> 12) & 0x3);
57 if (Model
!= NULL
|| FamilyId
!= NULL
) {
58 TempFamilyId
= (UINT8
) ((Register
.RegEax
>> 8) & 0xF);
61 *Model
= (UINT8
) ((Register
.RegEax
>> 4) & 0xF);
62 if (TempFamilyId
== 0x6 || TempFamilyId
== 0xF) {
63 *Model
= (UINT8
) (*Model
| ((Register
.RegEax
>> 12) & 0xF0));
67 if (FamilyId
!= NULL
) {
68 *FamilyId
= TempFamilyId
;
69 if (TempFamilyId
== 0xF) {
70 *FamilyId
= (UINT8
) (*FamilyId
+ (UINT16
) ((Register
.RegEax
>> 20) & 0xFF));