3 Copyright (c) 2004 - 2014, Intel Corporation. All rights reserved.<BR>
5 This program and the accompanying materials are licensed and made available under
6 the terms and conditions of the BSD License that accompanies this distribution.
7 The full text of the license may be found at
8 http://opensource.org/licenses/bsd-license.php.
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
19 Platform Cpu Info driver to public platform related HOB data
23 #include "PlatformCpuInfoDxe.h"
25 CHAR16 EfiPlatformCpuInfoVariable
[] = L
"PlatformCpuInfo";
30 IN EFI_HANDLE ImageHandle
,
31 IN EFI_SYSTEM_TABLE
*SystemTable
35 EFI_PLATFORM_CPU_INFO
*PlatformCpuInfoPtr
;
36 EFI_PEI_HOB_POINTERS GuidHob
;
39 // Get Platform Cpu Info HOB
41 GuidHob
.Raw
= GetHobList ();
42 while ((GuidHob
.Raw
= GetNextGuidHob (&gEfiPlatformCpuInfoGuid
, GuidHob
.Raw
)) != NULL
) {
43 PlatformCpuInfoPtr
= GET_GUID_HOB_DATA (GuidHob
.Guid
);
44 GuidHob
.Raw
= GET_NEXT_HOB (GuidHob
);
47 // Write the Platform CPU Info to volatile memory for runtime purposes.
48 // This must be done in its own driver because SetVariable protocol is dependent on chipset,
49 // which is dependent on CpuIo, PlatformInfo, and Metronome.
51 Status
= gRT
->SetVariable(
52 EfiPlatformCpuInfoVariable
,
53 &gEfiVlv2VariableGuid
,
54 EFI_VARIABLE_BOOTSERVICE_ACCESS
| EFI_VARIABLE_RUNTIME_ACCESS
,
55 sizeof(EFI_PLATFORM_CPU_INFO
),
58 if (EFI_ERROR(Status
)) {