3 Copyright (c) 2004 - 2014, Intel Corporation. All rights reserved.<BR>
5 SPDX-License-Identifier: BSD-2-Clause-Patent
16 ExI configuration based on setup option
22 #include "PlatformDxe.h"
24 #define PchLpcPciCfg32(Register) MmioRead32 (MmPciAddress (0, DEFAULT_PCI_BUS_NUMBER_PCH, PCI_DEVICE_NUMBER_PCH_LPC, 0, Register))
27 // Procedure: GetPmcBase
29 // Description: This function read content of B:D:F 0:31:0, offset 44h (for
34 // Output: 32 bit PmcBase
41 return (PchLpcPciCfg32 (R_PCH_LPC_PMC_BASE
) & B_PCH_LPC_PMC_BASE_BAR
);
47 @param ImageHandle Pointer to the loaded image protocol for this driver
48 @param SystemTable Pointer to the EFI System Table
50 @retval EFI_SUCCESS The driver initializes correctly.
58 SYSTEM_CONFIGURATION SystemConfiguration
;
61 VarSize
= sizeof(SYSTEM_CONFIGURATION
);
63 Status
= gRT
->GetVariable(
71 if (EFI_ERROR (Status
) || VarSize
!= sizeof(SYSTEM_CONFIGURATION
)) {
72 //The setup variable is corrupted
73 VarSize
= sizeof(SYSTEM_CONFIGURATION
);
74 Status
= gRT
->GetVariable(
81 ASSERT_EFI_ERROR (Status
);
84 if (SystemConfiguration
.ExISupport
== 1) {
85 MmioOr32 ((UINTN
) (GetPmcBase() + R_PCH_PMC_MTPMC1
), (UINT32
) BIT0
+BIT1
+BIT2
);
86 } else if (SystemConfiguration
.ExISupport
== 0) {
87 MmioAnd32 ((UINTN
) (GetPmcBase() + R_PCH_PMC_MTPMC1
), ~((UINT32
) BIT0
+BIT1
+BIT2
)); //clear bit 0,1,2