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.
21 ExI configuration based on setup option
27 #include "PlatformDxe.h"
29 #define PchLpcPciCfg32(Register) MmioRead32 (MmPciAddress (0, DEFAULT_PCI_BUS_NUMBER_PCH, PCI_DEVICE_NUMBER_PCH_LPC, 0, Register))
32 // Procedure: GetPmcBase
34 // Description: This function read content of B:D:F 0:31:0, offset 44h (for
39 // Output: 32 bit PmcBase
46 return (PchLpcPciCfg32 (R_PCH_LPC_PMC_BASE
) & B_PCH_LPC_PMC_BASE_BAR
);
52 @param ImageHandle Pointer to the loaded image protocol for this driver
53 @param SystemTable Pointer to the EFI System Table
55 @retval EFI_SUCCESS The driver initializes correctly.
63 SYSTEM_CONFIGURATION SystemConfiguration
;
66 VarSize
= sizeof(SYSTEM_CONFIGURATION
);
68 Status
= gRT
->GetVariable(
76 ASSERT_EFI_ERROR(Status
);
78 if (SystemConfiguration
.ExISupport
== 1) {
79 MmioOr32 ((UINTN
) (GetPmcBase() + R_PCH_PMC_MTPMC1
), (UINT32
) BIT0
+BIT1
+BIT2
);
80 } else if (SystemConfiguration
.ExISupport
== 0) {
81 MmioAnd32 ((UINTN
) (GetPmcBase() + R_PCH_PMC_MTPMC1
), ~((UINT32
) BIT0
+BIT1
+BIT2
)); //clear bit 0,1,2