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
,
88 return PchSteppingMax
;
95 Determine if PCH is supported
99 @retval TRUE PCH is supported
100 @retval FALSE PCH is not supported
112 Identifiers
= MmioRead32 (
114 DEFAULT_PCI_BUS_NUMBER_PCH
,
115 PCI_DEVICE_NUMBER_PCH_LPC
,
116 PCI_FUNCTION_NUMBER_PCH_LPC
,
120 PcuDeviceId
= (UINT16
) ((Identifiers
& B_PCH_LPC_DEVICE_ID
) >> 16);
121 PcuVendorId
= (UINT16
) (Identifiers
& B_PCH_LPC_VENDOR_ID
);
124 // Verify that this is a supported chipset
126 if (PcuVendorId
!= (UINT16
) V_PCH_LPC_VENDOR_ID
|| !IS_PCH_VLV_LPC_DEVICE_ID (PcuDeviceId
)) {
127 DEBUG ((EFI_D_ERROR
, "VLV SC code doesn't support the PcuDeviceId: 0x%04x!\n", PcuDeviceId
));