Upload BSD-licensed Vlv2TbltDevicePkg and Vlv2DeviceRefCodePkg to
https://svn.code.sf.net/p/edk2/code/trunk/edk2/, which are for MinnowBoard MAX open source project. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: David Wei <david.wei@intel.com> Reviewed-by: Mike Wu <mike.wu@intel.com> Reviewed-by: Hot Tian <hot.tian@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16599 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
83
Vlv2TbltDevicePkg/PlatformDxe/ExI.c
Normal file
83
Vlv2TbltDevicePkg/PlatformDxe/ExI.c
Normal file
@@ -0,0 +1,83 @@
|
||||
/** @file
|
||||
|
||||
Copyright (c) 2004 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||
|
||||
|
||||
This program and the accompanying materials are licensed and made available under
|
||||
|
||||
the terms and conditions of the BSD License that accompanies this distribution.
|
||||
|
||||
The full text of the license may be found at
|
||||
|
||||
http://opensource.org/licenses/bsd-license.php.
|
||||
|
||||
|
||||
|
||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
|
||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
|
||||
|
||||
|
||||
|
||||
Module Name:
|
||||
|
||||
|
||||
ExI.c
|
||||
|
||||
Abstract:
|
||||
|
||||
ExI configuration based on setup option
|
||||
|
||||
|
||||
--*/
|
||||
|
||||
|
||||
#include "PlatformDxe.h"
|
||||
|
||||
#define PchLpcPciCfg32(Register) MmioRead32 (MmPciAddress (0, DEFAULT_PCI_BUS_NUMBER_PCH, PCI_DEVICE_NUMBER_PCH_LPC, 0, Register))
|
||||
|
||||
//
|
||||
// Procedure: GetPmcBase
|
||||
//
|
||||
// Description: This function read content of B:D:F 0:31:0, offset 44h (for
|
||||
// PmcBase)
|
||||
//
|
||||
// Input: None
|
||||
//
|
||||
// Output: 32 bit PmcBase
|
||||
//
|
||||
UINT32
|
||||
GetPmcBase (
|
||||
VOID
|
||||
)
|
||||
{
|
||||
return (PchLpcPciCfg32 (R_PCH_LPC_PMC_BASE) & B_PCH_LPC_PMC_BASE_BAR);
|
||||
}
|
||||
|
||||
/**
|
||||
Configure ExI.
|
||||
|
||||
@param ImageHandle Pointer to the loaded image protocol for this driver
|
||||
@param SystemTable Pointer to the EFI System Table
|
||||
|
||||
@retval EFI_SUCCESS The driver initializes correctly.
|
||||
**/
|
||||
VOID
|
||||
InitExI (
|
||||
)
|
||||
{
|
||||
EFI_STATUS Status;
|
||||
|
||||
SYSTEM_CONFIGURATION SystemConfiguration;
|
||||
UINTN VarSize;
|
||||
|
||||
VarSize = sizeof(SYSTEM_CONFIGURATION);
|
||||
|
||||
Status = gRT->GetVariable(
|
||||
L"Setup",
|
||||
&gEfiNormalSetupGuid,
|
||||
NULL,
|
||||
&VarSize,
|
||||
&SystemConfiguration
|
||||
);
|
Reference in New Issue
Block a user