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:
David Wei
2015-01-12 09:37:20 +00:00
committed by zwei4
parent 6f785cfcc3
commit 3cbfba02fe
518 changed files with 118538 additions and 0 deletions

View File

@@ -0,0 +1,33 @@
/*++
Copyright (c) 1999 - 2014, Intel Corporation. All rights reserved
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:
PowerManagementAcpiTableStorage.h
Abstract:
GUID definition for the Power Management ACPI table storage file name
--*/
#ifndef _POWER_MANAGEMENT_ACPI_TABLE_STORAGE_H_
#define _POWER_MANAGEMENT_ACPI_TABLE_STORAGE_H_
#define POWER_MANAGEMENT_ACPI_TABLE_STORAGE_GUID \
{ 0x161be597, 0xe9c5, 0x49db, 0xae, 0x50, 0xc4, 0x62, 0xab, 0x54, 0xee, 0xda }
extern EFI_GUID gPowerManagementAcpiTableStorageGuid;
#endif

View File

@@ -0,0 +1,110 @@
/*++
Copyright (c) 2010 - 2014, Intel Corporation. All rights reserved
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:
VlvPolicy.h
Abstract:
Interface definition details between ValleyView MRC and platform drivers during PEI phase.
--*/
#ifndef _VLV_POLICY_PPI_H_
#define _VLV_POLICY_PPI_H_
//
// MRC Policy provided by platform for PEI phase {7D84B2C2-22A1-4372-B12C-EBB232D3A6A3}
//
#define VLV_POLICY_PPI_GUID \
{ \
0x7D84B2C2, 0x22A1, 0x4372, 0xB1, 0x2C, 0xEB, 0xB2, 0x32, 0xD3, 0xA6, 0xA3 \
}
//
// Extern the GUID for protocol users.
//
extern EFI_GUID gVlvPolicyPpiGuid;
//
// PPI revision number
// Any backwards compatible changes to this PPI will result in an update in the revision number
// Major changes will require publication of a new PPI
//
#define MRC_PLATFORM_POLICY_PPI_REVISION 1
#ifndef MAX_SOCKETS
#define MAX_SOCKETS 4
#endif
#define S3_TIMING_DATA_LEN 9
#define S3_READ_TRAINING_DATA_LEN 16
#define S3_WRITE_TRAINING_DATA_LEN 12
#ifndef S3_RESTORE_DATA_LEN
#define S3_RESTORE_DATA_LEN (S3_TIMING_DATA_LEN + S3_READ_TRAINING_DATA_LEN + S3_WRITE_TRAINING_DATA_LEN)
#endif // S3_RESTORE_DATA_LEN
#pragma pack(1)
//
// MRC Platform Data Structure
//
typedef struct {
UINT8 SpdAddressTable[MAX_SOCKETS];
UINT8 TSonDimmSmbusAddress[MAX_SOCKETS];
UINT16 SmbusBar;
UINT32 IchRcba;
UINT32 WdbBaseAddress; // Write Data Buffer area (WC caching mode)
UINT32 WdbRegionSize;
UINT32 SmBusAddress;
UINT8 UserBd;
UINT8 PlatformType;
UINT8 FastBoot;
UINT8 DynSR;
} VLV_PLATFORM_DATA;
typedef struct {
UINT16 MmioSize;
UINT16 GttSize;
UINT8 IgdDvmt50PreAlloc;
UINT8 PrimaryDisplay;
UINT8 PAVPMode;
UINT8 ApertureSize;
} GT_CONFIGURATION;
typedef struct {
UINT8 EccSupport;
UINT16 DdrFreqLimit;
UINT8 MaxTolud;
} MEMORY_CONFIGURATION;
//
// MRC Platform Policiy PPI
//
typedef struct _VLV_POLICY_PPI {
UINT8 Revision;
VLV_PLATFORM_DATA PlatformData;
GT_CONFIGURATION GtConfig;
MEMORY_CONFIGURATION MemConfig;
VOID *S3DataPtr; // was called MRC_PARAMS_SAVE_RESTORE
UINT8 ISPEn; //ISP (IUNIT) Device Enabled
UINT8 ISPPciDevConfig; //ISP (IUNIT) Device Config: 0->B0/D2/F0 for Window OS, 1->B0D3/F0 for Linux OS
} VLV_POLICY_PPI;
#pragma pack()
#endif // _VLV_POLICY_PPI_H_

View File

@@ -0,0 +1,138 @@
/**
Copyright (c) 2009 - 2013, 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
which 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:
PpmPlatformPolicy.h
Abstract:
Interface definition details between PPM and platform drivers during DXE phase.
--*/
#ifndef _PPM_PLATFORM_POLICY_H_
#define _PPM_PLATFORM_POLICY_H_
//
// PPM policy provided by platform for DXE phase {DDABFEAC-EF63-452c-8F39-ED7FAED8265E}
//
#define PPM_PLATFORM_POLICY_PROTOCOL_GUID \
{0xddabfeac, 0xef63, 0x452c, 0x8f, 0x39, 0xed, 0x7f, 0xae, 0xd8, 0x26, 0x5e}
//
// Extern the GUID for protocol users.
//
extern EFI_GUID gPpmPlatformPolicyProtocolGuid;
//
// Forward reference for ANSI C compatibility
//
typedef struct _PPM_PLATFORM_POLICY_PROTOCOL PPM_PLATFORM_POLICY_PROTOCOL;
//
// Protocol revision number
// Any backwards compatible changes to this protocol will result in an update in the revision number
// Major changes will require publication of a new protocol
//
// Revision 1: Original version
// Revision 2: Added T-states field to the PPM_FUNCTION_ENABLES structure, Renamed unused fields - CxPopUpEnable, CxPopDownEnable, FastC4ExitEnable
// Revision 3: Extended VidCpuid to 32 bits for extended CPUID support (Penryn)
// Revision 4: Added support for extended C6 residency enabling
//
#define PPM_PLATFORM_POLICY_PROTOCOL_REVISION 1
#define PPM_PLATFORM_POLICY_PROTOCOL_REVISION_2 2
#define PPM_PLATFORM_POLICY_PROTOCOL_REVISION_3 3
#define PPM_PLATFORM_POLICY_PROTOCOL_REVISION_4 4
//
// Define maximum number of custom VID states supported
//
#ifndef MAX_CUSTOM_VID_TABLE_STATES
#define MAX_CUSTOM_VID_TABLE_STATES 6
#endif
//
// Custom VID table
//
typedef struct {
UINT8 VidNumber;
UINT32 VidCpuid;
UINT16 VidMaxRatio;
UINT16 VidMaxVid;
UINT16 StateRatio[MAX_CUSTOM_VID_TABLE_STATES];
UINT16 StateVid[MAX_CUSTOM_VID_TABLE_STATES];
} PPM_CUSTOM_VID_TABLE;
//
// PPM functional enables
//
typedef struct {
UINT8 EnableGv :1; // 0: Disabled; 1: Enabled
UINT8 EnableCx :1;
UINT8 EnableCxe :1;
UINT8 EnableC4 :1;
UINT8 EnableC6 :1;
UINT8 EnableC7 :1;
UINT8 EnableTm :1;
UINT8 Reserve00 :1;
UINT8 Reserve01 :1;
UINT8 EnableTurboMode :1;
UINT8 PowerLimit2 :1;
UINT8 EnableProcHot :1;
UINT8 Reserve02 :1;
UINT8 EnableCMP :1;
UINT8 TStatesEnable :1;
UINT8 Reserve03 :1;
UINT8 Reserve04 ;
} PPM_FUNCTION_ENABLES;
//
// PPM Turbo settings
//
typedef struct _PPM_TURBO_SETTINGS {
UINT16 PowerLimit1;
UINT32 PowerLimit1Time;
UINT16 PowerLimit2;
UINT8 TurboPowerLimitLock;
} PPM_TURBO_SETTINGS;
//
// Platform Policy
//
typedef struct _PPM_PLATFORM_POLICY_PROTOCOL {
UINT8 Revision;
PPM_FUNCTION_ENABLES FunctionEnables;
PPM_CUSTOM_VID_TABLE CustomVidTable;
PPM_TURBO_SETTINGS TurboSettings;
UINT8 Reserve00;
UINT8 Reserve01;
UINT8 Reserve02;
UINT8 Reserve03;
UINT8 Reserve04;
UINT8 Reserve05;
UINT8 Reserve06;
UINT8 S3RestoreMsrSwSmiNumber;
UINT8 Reserve07;
UINT32 Reserve08;
UINT8 Reserve09;
//
// Primary and Secondary Plane Current Limits
//
UINT16 Reserve10;
UINT8 Reserve11;
} PPM_PLATFORM_POLICY_PROTOCOL;
#endif

View File

@@ -0,0 +1,61 @@
/*++
Copyright (c) 1999 - 2014, Intel Corporation. All rights reserved
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:
Types.h
Abstract:
This file include all the external data types.
--*/
#ifndef _TYPES_H_
#define _TYPES_H_
//
// Modifiers to abstract standard types to aid in debug of problems
//
#define CONST const
#define STATIC static
#define VOID void
#define VOLATILE volatile
//
// Constants. They may exist in other build structures, so #ifndef them.
//
#ifndef TRUE
#define TRUE ((BOOLEAN) 1 == 1)
#endif
#ifndef FALSE
#define FALSE ((BOOLEAN) 0 == 1)
#endif
#ifndef NULL
#define NULL ((VOID *) 0)
#endif
typedef UINT32 STATUS;
#define SUCCESS 0
#define FAILURE 0xFFFFFFFF
#ifndef MRC_DEADLOOP
#define MRC_DEADLOOP() while (TRUE)
#endif
#endif