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:
@@ -0,0 +1,219 @@
|
||||
|
||||
/*++
|
||||
|
||||
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:
|
||||
|
||||
IgdOpRegion.h
|
||||
|
||||
Abstract:
|
||||
|
||||
This file is part of the IGD OpRegion Implementation. The IGD OpRegion is
|
||||
an interface between system BIOS, ASL code, and Graphics drivers.
|
||||
|
||||
Supporting Specifiction: IGD OpRegion/Software SCI SPEC
|
||||
|
||||
Note: Data structures defined in this protocol are packed not naturally
|
||||
aligned.
|
||||
|
||||
GUID forms:
|
||||
{CDC5DDDF-E79D-41ec-A9B0-6565490DB9D3}
|
||||
(0xcdc5dddf, 0xe79d, 0x41ec, 0xa9, 0xb0, 0x65, 0x65, 0x49, 0xd, 0xb9, 0xd3);
|
||||
|
||||
Acronyms:
|
||||
NVS: ACPI Non Volatile Storage
|
||||
OpRegion: ACPI Operational Region
|
||||
VBT: Video BIOS Table (OEM customizable data)
|
||||
|
||||
--*/
|
||||
|
||||
#ifndef _IGD_OPREGION_PROTOCOL_H_
|
||||
#define _IGD_OPREGION_PROTOCOL_H_
|
||||
|
||||
//
|
||||
// OpRegion / Software SCI protocol GUID
|
||||
//
|
||||
#define IGD_OPREGION_PROTOCOL_GUID \
|
||||
{ \
|
||||
0xcdc5dddf, 0xe79d, 0x41ec, 0xa9, 0xb0, 0x65, 0x65, 0x49, 0xd, 0xb9, 0xd3 \
|
||||
}
|
||||
|
||||
//
|
||||
// Extern the GUID for protocol users.
|
||||
//
|
||||
extern EFI_GUID gIgdOpRegionProtocolGuid;
|
||||
|
||||
//
|
||||
// Forward reference for pure ANSI compatability
|
||||
//
|
||||
typedef struct _IGD_OPREGION_PROTOCOL IGD_OPREGION_PROTOCOL;
|
||||
|
||||
//
|
||||
// Protocol data definitions
|
||||
//
|
||||
|
||||
//
|
||||
// OpRegion structures:
|
||||
// Sub-structures define the different parts of the OpRegion followed by the
|
||||
// main structure representing the entire OpRegion.
|
||||
//
|
||||
// Note: These structures are packed to 1 byte offsets because the exact
|
||||
// data location is requred by the supporting design specification due to
|
||||
// the fact that the data is used by ASL and Graphics driver code compiled
|
||||
// separatly.
|
||||
//
|
||||
|
||||
//
|
||||
// OpRegion header (mailbox 0) structure and #defines.
|
||||
//
|
||||
#pragma pack (1)
|
||||
typedef struct {
|
||||
CHAR8 SIGN[0x10]; // 0 OpRegion signature
|
||||
UINT32 SIZE; // 0x10 OpRegion size
|
||||
UINT32 OVER; // 0x14 OpRegion structure version
|
||||
UINT8 SVER[0x20]; // 0x18 System BIOS build version
|
||||
UINT8 VVER[0x10]; // 0x38 Video BIOS build version
|
||||
UINT8 GVER[0x10]; // 0x48 Graphic driver build version
|
||||
UINT32 MBOX; // 0x58 Mailboxes supported
|
||||
UINT32 DMOD; // 0x5C Driver Model
|
||||
UINT32 PCON; // 0x60 Platform Configuration Info
|
||||
CHAR8 GOPV[0x20]; // 0X64 GOP build version
|
||||
UINT8 RSV[0x7C]; // Reserved
|
||||
} OPREGION_HEADER;
|
||||
#pragma pack ()
|
||||
|
||||
//
|
||||
// OpRegion mailbox 1 (public ACPI Methods).
|
||||
//
|
||||
#pragma pack (1)
|
||||
typedef struct {
|
||||
UINT32 DRDY; // 0 Driver readiness
|
||||
UINT32 CSTS; // 4 Status
|
||||
UINT32 CEVT; // 8 Current event
|
||||
UINT8 RM11[0x14]; // 12 Reserved
|
||||
UINT32 DIDL; // 32 Supported display devices list
|
||||
UINT32 DDL2; // 8 Devices.
|
||||
UINT32 DDL3;
|
||||
UINT32 DDL4;
|
||||
UINT32 DDL5;
|
||||
UINT32 DDL6;
|
||||
UINT32 DDL7;
|
||||
UINT32 DDL8;
|
||||
UINT32 CPDL; // 64 Currently present display devices list
|
||||
UINT32 CPL2; // 8 Devices.
|
||||
UINT32 CPL3;
|
||||
UINT32 CPL4;
|
||||
UINT32 CPL5;
|
||||
UINT32 CPL6;
|
||||
UINT32 CPL7;
|
||||
UINT32 CPL8;
|
||||
UINT32 CADL; // 96 Currently active display devices list
|
||||
UINT32 CAL2; // 8 Devices.
|
||||
UINT32 CAL3;
|
||||
UINT32 CAL4;
|
||||
UINT32 CAL5;
|
||||
UINT32 CAL6;
|
||||
UINT32 CAL7;
|
||||
UINT32 CAL8;
|
||||
UINT32 NADL; // 128 Next active device list
|
||||
UINT32 NDL2; // 8 Devices.
|
||||
UINT32 NDL3;
|
||||
UINT32 NDL4;
|
||||
UINT32 NDL5;
|
||||
UINT32 NDL6;
|
||||
UINT32 NDL7;
|
||||
UINT32 NDL8;
|
||||
UINT32 ASLP; // 160 ASL sleep timeout
|
||||
UINT32 TIDX; // 164 Toggle table index
|
||||
UINT32 CHPD; // 168 Current hot plug enable indicator
|
||||
UINT32 CLID; // 172 Current lid state indicator
|
||||
UINT32 CDCK; // 176 Current docking state indicator
|
||||
UINT32 SXSW; // 180 Display Switch notification on Sx State resume
|
||||
UINT32 EVTS; // 184 Events supported by ASL
|
||||
UINT32 CNOT; // 188 Current OS Notification
|
||||
UINT32 NRDY; // 192 Reasons for DRDY = 0
|
||||
UINT8 RM12[0x3C]; // 196 Reserved
|
||||
} OPREGION_MBOX1;
|
||||
#pragma pack ()
|
||||
|
||||
//
|
||||
// OpRegion mailbox 2 (Software SCI Interface).
|
||||
//
|
||||
#pragma pack (1)
|
||||
typedef struct {
|
||||
UINT32 SCIC; // 0 Software SCI function number parameters
|
||||
UINT32 PARM; // 4 Software SCI additional parameters
|
||||
UINT32 DSLP; // 8 Driver sleep timeout
|
||||
UINT8 RM21[0xF4]; // 12 Reserved
|
||||
} OPREGION_MBOX2;
|
||||
#pragma pack ()
|
||||
|
||||
//
|
||||
// OpRegion mailbox 3 (Power Conservation).
|
||||
//
|
||||
#pragma pack (1)
|
||||
typedef struct {
|
||||
UINT32 ARDY; // 0 Driver readiness
|
||||
UINT32 ASLC; // 4 ASLE interrupt command / status
|
||||
UINT32 TCHE; // 8 Technology enabled indicator
|
||||
UINT32 ALSI; // 12 Current ALS illuminance reading
|
||||
UINT32 BCLP; // 16 Backlight britness to set
|
||||
UINT32 PFIT; // 20 Panel fitting Current State or Request
|
||||
UINT32 CBLV; // 24 Brightness Current State
|
||||
UINT16 BCLM[0x14]; // 28 Backlight Brightness Level Duty Cycle Mapping Table
|
||||
UINT32 CPFM; // 68 Panel Fitting Current Mode
|
||||
UINT32 EPFM; // 72 Enabled Panel Fitting Mode
|
||||
UINT8 PLUT[0x4A]; // 76 Panel Look Up Table
|
||||
UINT32 PFMB; // 150 PWM Frequency and Minimum Brightness
|
||||
UINT32 CCDV; // 154 Color Correction Default Values
|
||||
UINT32 PCFT; // 158 Power Conservation Features
|
||||
UINT8 RM31[0x5E]; // 162 Reserved
|
||||
} OPREGION_MBOX3;
|
||||
#pragma pack ()
|
||||
|
||||
//
|
||||
// OpRegion mailbox 4 (VBT).
|
||||
//
|
||||
#pragma pack (1)
|
||||
typedef struct {
|
||||
UINT8 GVD1[0x1800]; // 6K Reserved
|
||||
} OPREGION_VBT;
|
||||
#pragma pack ()
|
||||
|
||||
#pragma pack (1)
|
||||
typedef struct {
|
||||
UINT8 EDIDOVRD[0x400]; // 6K Edid overriding data
|
||||
} OPREGION_MBOX5;
|
||||
#pragma pack ()
|
||||
//
|
||||
// Entire OpRegion
|
||||
//
|
||||
#pragma pack (1)
|
||||
typedef struct {
|
||||
OPREGION_HEADER Header; // OpRegion header
|
||||
OPREGION_MBOX1 MBox1; // Mailbox 1: Public ACPI Methods
|
||||
OPREGION_MBOX2 MBox2; // Mailbox 2: Software SCI Inteface
|
||||
OPREGION_MBOX3 MBox3; // Mailbox 3: Power Conservation
|
||||
OPREGION_VBT VBT; // VBT: Video BIOS Table (OEM customizable data)
|
||||
OPREGION_MBOX5 MBox5;
|
||||
} IGD_OPREGION_STRUC;
|
||||
#pragma pack ()
|
||||
|
||||
//
|
||||
// Protocol data structure definition
|
||||
//
|
||||
struct _IGD_OPREGION_PROTOCOL {
|
||||
IGD_OPREGION_STRUC *OpRegion;
|
||||
};
|
||||
|
||||
#endif
|
@@ -0,0 +1,89 @@
|
||||
|
||||
/*++
|
||||
|
||||
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:
|
||||
|
||||
MemInfo.h
|
||||
|
||||
Abstract:
|
||||
|
||||
This protocol provides the memory information data, such as
|
||||
total physical memory size, memory frequency, memory size
|
||||
of each dimm and rank.
|
||||
|
||||
This protocol is EFI compatible.
|
||||
|
||||
--*/
|
||||
|
||||
#ifndef _MEM_INFO_PROTOCOL_H_
|
||||
#define _MEM_INFO_PROTOCOL_H_
|
||||
|
||||
//
|
||||
// Define the protocol GUID
|
||||
//
|
||||
#define MEM_INFO_PROTOCOL_GUID \
|
||||
{ \
|
||||
0x6f20f7c8, 0xe5ef, 0x4f21, 0x8d, 0x19, 0xed, 0xc5, 0xf0, 0xc4, 0x96, 0xae \
|
||||
}
|
||||
|
||||
//
|
||||
// Extern the GUID for protocol users.
|
||||
//
|
||||
extern EFI_GUID gMemInfoProtocolGuid;
|
||||
|
||||
//
|
||||
// Forward reference for ANSI C compatibility
|
||||
//
|
||||
typedef struct _MEM_INFO_PROTOCOL MEM_INFO_PROTOCOL;
|
||||
|
||||
//
|
||||
// Protocol definitions
|
||||
//
|
||||
|
||||
#define CH_NUM 2
|
||||
#define DIMM_NUM 1
|
||||
#define RANK_NUM 2
|
||||
|
||||
#pragma pack(1)
|
||||
typedef struct {
|
||||
UINT32 memSize;
|
||||
UINT8 ddrFreq;
|
||||
UINT8 ddrType;
|
||||
BOOLEAN EccSupport;
|
||||
UINT16 dimmSize[CH_NUM * DIMM_NUM];
|
||||
UINT8 reserved;
|
||||
UINT16 reserved2;
|
||||
} MEMORY_INFO_DATA;
|
||||
#pragma pack()
|
||||
|
||||
/*++
|
||||
Data definition:
|
||||
|
||||
memSize Total physical memory size
|
||||
ddrFreq DDR Frequency
|
||||
EccSupport ECC Support
|
||||
dimmSize Dimm Size
|
||||
DimmExist Dimm Present or not
|
||||
RankInDimm No. of ranks in a dimm
|
||||
|
||||
--*/
|
||||
|
||||
//
|
||||
// Protocol definition
|
||||
//
|
||||
struct _MEM_INFO_PROTOCOL {
|
||||
MEMORY_INFO_DATA MemInfoData;
|
||||
};
|
||||
|
||||
#endif
|
@@ -0,0 +1,73 @@
|
||||
/*++
|
||||
|
||||
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.
|
||||
|
||||
|
||||
--*/
|
||||
|
||||
/** @file
|
||||
**/
|
||||
|
||||
#ifndef _PLATFORM_GOP_POLICY_PROTOCOL_H_
|
||||
#define _PLATFORM_GOP_POLICY_PROTOCOL_H_
|
||||
|
||||
#define EFI_PLATFORM_GOP_POLICY_PROTOCOL_GUID \
|
||||
{ 0xec2e931b, 0x3281, 0x48a5, 0x81, 0x7, 0xdf, 0x8a, 0x8b, 0xed, 0x3c, 0x5d }
|
||||
|
||||
#define EFI_BMP_IMAGE_GUID \
|
||||
{ 0x878AC2CC, 0x5343, 0x46F2, 0xB5, 0x63, 0x51, 0xF8, 0x9D, 0xAF, 0x56, 0xBA }
|
||||
|
||||
#define PLATFORM_GOP_POLICY_PROTOCOL_REVISION_01 0x01
|
||||
#define PLATFORM_GOP_POLICY_PROTOCOL_REVISION_02 x0222
|
||||
|
||||
#pragma pack(1)
|
||||
|
||||
typedef enum {
|
||||
LidClosed,
|
||||
LidOpen,
|
||||
LidStatusMax
|
||||
} LID_STATUS;
|
||||
|
||||
typedef enum {
|
||||
Docked,
|
||||
UnDocked,
|
||||
DockStatusMax
|
||||
} DOCK_STATUS;
|
||||
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *GET_PLATFORM_LID_STATUS) (
|
||||
OUT LID_STATUS *CurrentLidStatus
|
||||
);
|
||||
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *GET_VBT_DATA) (
|
||||
OUT EFI_PHYSICAL_ADDRESS *VbtAddress,
|
||||
OUT UINT32 *VbtSize
|
||||
);
|
||||
|
||||
#pragma pack()
|
||||
|
||||
typedef struct _PLATFORM_GOP_POLICY_PROTOCOL {
|
||||
UINT32 Revision;
|
||||
GET_PLATFORM_LID_STATUS GetPlatformLidStatus;
|
||||
GET_VBT_DATA GetVbtData;
|
||||
} PLATFORM_GOP_POLICY_PROTOCOL;
|
||||
|
||||
//
|
||||
// Extern the GUID for protocol users.
|
||||
//
|
||||
extern EFI_GUID gPlatformGOPPolicyGuid;
|
||||
|
||||
extern EFI_GUID gBmpImageGuid;
|
||||
|
||||
#endif
|
@@ -0,0 +1,111 @@
|
||||
|
||||
/*++
|
||||
|
||||
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:
|
||||
|
||||
VlvPlatformPolicy.h
|
||||
|
||||
Abstract:
|
||||
|
||||
Interface definition details between MCH and platform drivers during DXE phase.
|
||||
|
||||
--*/
|
||||
|
||||
#ifndef _VLV_PLATFORM_POLICY_H_
|
||||
#define _VLV_PLATFORM_POLICY_H_
|
||||
|
||||
//
|
||||
// VLV Policy provided by platform for DXE phase {5BAB88BA-E0E2-4674-B6AD-B812F6881CD6}
|
||||
//
|
||||
#define DXE_VLV_PLATFORM_POLICY_GUID \
|
||||
{0x5bab88ba, 0xe0e2, 0x4674, 0xb6, 0xad, 0xb8, 0x12, 0xf6, 0x88, 0x1c, 0xd6}
|
||||
|
||||
//
|
||||
// Extern the GUID for protocol users.
|
||||
//
|
||||
extern EFI_GUID gDxeVlvPlatformPolicyGuid;
|
||||
|
||||
//
|
||||
// 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
|
||||
//
|
||||
#define DXE_VLV_PLATFORM_POLICY_PROTOCOL_REVISION 0
|
||||
|
||||
|
||||
typedef struct {
|
||||
UINT8 PFITStatus;
|
||||
UINT8 IgdTheramlSupport;
|
||||
UINT8 ALSEnabled;
|
||||
UINT8 LidStatus;
|
||||
} IGD_PANEL_FEATURES;
|
||||
|
||||
typedef struct {
|
||||
UINT8 Reserved00;
|
||||
UINT8 Reserved01;
|
||||
UINT16 Reserved02;
|
||||
UINT16 Reserved03;
|
||||
UINT16 Reserved04;
|
||||
UINT16 Reserved05;
|
||||
UINT16 Reserved06;
|
||||
UINT16 Reserved07;
|
||||
UINT16 Reserved08;
|
||||
UINT16 Reserved09;
|
||||
UINT16 Reserved0A;
|
||||
UINT16 Reserved0B;
|
||||
UINT16 Reserved0C;
|
||||
UINT16 Reserved0D;
|
||||
UINT8 Reserved0E;
|
||||
UINT8 Reserved0F;
|
||||
UINT32 Reserved10;
|
||||
UINT32 Reserved11;
|
||||
UINT32 Reserved12;
|
||||
UINT32 Reserved13;
|
||||
UINT32 Reserved14;
|
||||
UINT8 Reserved15;
|
||||
UINT8 Reserved16;
|
||||
} DPTF_SETTINGS;
|
||||
|
||||
//
|
||||
// MCH DXE Platform Policiy ==================================================
|
||||
//
|
||||
|
||||
#define NO_AUDIO 0
|
||||
#define HD_AUDIO 1
|
||||
#define LPE_AUDIO 2
|
||||
|
||||
typedef struct _DXE_VLV_PLATFORM_POLICY_PROTOCOL {
|
||||
UINT8 Revision;
|
||||
IGD_PANEL_FEATURES IgdPanelFeatures;
|
||||
DPTF_SETTINGS Reserved;
|
||||
UINT8 GraphicReserve00;
|
||||
UINT8 GraphicsPerfAnalyzers;
|
||||
UINT8 PwmReserved00;
|
||||
UINT8 PwmReserved01;
|
||||
UINT8 PmSupport;
|
||||
UINT8 GraphicReserve01;
|
||||
UINT8 GfxPause;
|
||||
UINT8 GraphicsFreqReq;
|
||||
UINT8 GraphicReserve03;
|
||||
UINT8 GraphicReserve02;
|
||||
UINT8 GraphicReserve04;
|
||||
UINT8 PavpMode;
|
||||
UINT8 GraphicReserve05;
|
||||
UINT8 UlClockGating;
|
||||
UINT8 IdleReserve;
|
||||
UINT8 AudioTypeSupport;
|
||||
UINT8 GraphicReserve06;
|
||||
} DXE_VLV_PLATFORM_POLICY_PROTOCOL;
|
||||
|
||||
#endif
|
Reference in New Issue
Block a user