2 Platform Initialization Driver.
4 Copyright (c) 2013-2015 Intel Corporation.
6 This program and the accompanying materials
7 are licensed and made available under the terms and conditions of the BSD License
8 which accompanies this distribution. The full text of the license may be found at
9 http://opensource.org/licenses/bsd-license.php
11 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
12 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
16 #include "CommonHeader.h"
18 #include "SetupPlatform.h"
19 #include <Library/HobLib.h>
21 EFI_HANDLE mImageHandle
= NULL
;
23 EFI_HII_DATABASE_PROTOCOL
*mHiiDataBase
= NULL
;
24 EFI_HII_CONFIG_ROUTING_PROTOCOL
*mHiiConfigRouting
= NULL
;
26 UINT8 mSmbusRsvdAddresses
[PLATFORM_NUM_SMBUS_RSVD_ADDRESSES
] = {
29 SMBUS_ADDR_THERMAL_SENSOR1
,
30 SMBUS_ADDR_THERMAL_SENSOR2
33 EFI_PLATFORM_POLICY_PROTOCOL mPlatformPolicyData
= {
34 PLATFORM_NUM_SMBUS_RSVD_ADDRESSES
,
39 DxePlatformDriverEntry (
40 IN EFI_HANDLE ImageHandle
,
41 IN EFI_SYSTEM_TABLE
*SystemTable
46 This is the standard EFI driver point for the D845GRgPlatform Driver. This
47 driver is responsible for setting up any platform specific policy or
48 initialization information.
51 ImageHandle - Handle for the image of this driver
52 SystemTable - Pointer to the EFI System Table
55 EFI_SUCCESS - Policy decisions set
62 S3BootScriptSaveInformationAsciiString (
66 mImageHandle
= ImageHandle
;
68 Status
= gBS
->LocateProtocol (&gEfiHiiDatabaseProtocolGuid
, NULL
, (VOID
**)&mHiiDataBase
);
69 ASSERT_EFI_ERROR (Status
);
71 Status
= gBS
->LocateProtocol (&gEfiHiiConfigRoutingProtocolGuid
, NULL
, (VOID
**)&mHiiConfigRouting
);
72 ASSERT_EFI_ERROR (Status
);
75 // Initialize keyboard layout
77 Status
= InitKeyboardLayout ();
80 // Initialize ICH registers
82 PlatformInitQNCRegs();
84 ProducePlatformCpuData ();
87 // Install protocol to to allow access to this Policy.
90 Status
= gBS
->InstallMultipleProtocolInterfaces (
92 &gEfiPlatformPolicyProtocolGuid
, &mPlatformPolicyData
,
95 ASSERT_EFI_ERROR(Status
);
97 S3BootScriptSaveInformationAsciiString (