3 Copyright (c) 2012 - 2014, Intel Corporation. All rights reserved
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.
18 PCH Platform Lib implementation.
22 #include "PchPlatformLibrary.h"
28 Return Pch stepping type
32 @retval PCH_STEPPING Pch stepping type
45 DEFAULT_PCI_BUS_NUMBER_PCH
,
46 PCI_DEVICE_NUMBER_PCH_LPC
,
47 PCI_FUNCTION_NUMBER_PCH_LPC
,
93 return PchSteppingMax
;
100 Determine if PCH is supported
104 @retval TRUE PCH is supported
105 @retval FALSE PCH is not supported
117 Identifiers
= MmioRead32 (
119 DEFAULT_PCI_BUS_NUMBER_PCH
,
120 PCI_DEVICE_NUMBER_PCH_LPC
,
121 PCI_FUNCTION_NUMBER_PCH_LPC
,
125 PcuDeviceId
= (UINT16
) ((Identifiers
& B_PCH_LPC_DEVICE_ID
) >> 16);
126 PcuVendorId
= (UINT16
) (Identifiers
& B_PCH_LPC_VENDOR_ID
);
129 // Verify that this is a supported chipset
131 if (PcuVendorId
!= (UINT16
) V_PCH_LPC_VENDOR_ID
|| !IS_PCH_VLV_LPC_DEVICE_ID (PcuDeviceId
)) {
132 DEBUG ((EFI_D_ERROR
, "VLV SC code doesn't support the PcuDeviceId: 0x%04x!\n", PcuDeviceId
));