]> git.proxmox.com Git - mirror_edk2.git/blame - Vlv2DeviceRefCodePkg/ValleyView2Soc/CPU/Include/Protocol/PpmPlatformPolicy.h
Vlv2DeviceRefCodePkg: Replace BSD License with BSD+Patent License
[mirror_edk2.git] / Vlv2DeviceRefCodePkg / ValleyView2Soc / CPU / Include / Protocol / PpmPlatformPolicy.h
CommitLineData
3cbfba02
DW
1/** \r
2 Copyright (c) 2009 - 2013, Intel Corporation. All rights reserved.<BR>\r
7ede8060 3 SPDX-License-Identifier: BSD-2-Clause-Patent\r
3cbfba02
DW
4\r
5**/\r
6/*++\r
7\r
8Module Name:\r
9\r
10 PpmPlatformPolicy.h\r
11\r
12Abstract:\r
13\r
14 Interface definition details between PPM and platform drivers during DXE phase.\r
15\r
16--*/\r
17#ifndef _PPM_PLATFORM_POLICY_H_\r
18#define _PPM_PLATFORM_POLICY_H_\r
19\r
20//\r
21// PPM policy provided by platform for DXE phase {DDABFEAC-EF63-452c-8F39-ED7FAED8265E}\r
22//\r
23#define PPM_PLATFORM_POLICY_PROTOCOL_GUID \\r
24 {0xddabfeac, 0xef63, 0x452c, 0x8f, 0x39, 0xed, 0x7f, 0xae, 0xd8, 0x26, 0x5e}\r
25\r
26//\r
27// Extern the GUID for protocol users.\r
28//\r
29extern EFI_GUID gPpmPlatformPolicyProtocolGuid;\r
30\r
31//\r
32// Forward reference for ANSI C compatibility\r
33//\r
34typedef struct _PPM_PLATFORM_POLICY_PROTOCOL PPM_PLATFORM_POLICY_PROTOCOL;\r
35\r
36//\r
37// Protocol revision number\r
38// Any backwards compatible changes to this protocol will result in an update in the revision number\r
39// Major changes will require publication of a new protocol\r
40//\r
41// Revision 1: Original version\r
42// Revision 2: Added T-states field to the PPM_FUNCTION_ENABLES structure, Renamed unused fields - CxPopUpEnable, CxPopDownEnable, FastC4ExitEnable\r
43// Revision 3: Extended VidCpuid to 32 bits for extended CPUID support (Penryn)\r
44// Revision 4: Added support for extended C6 residency enabling\r
45//\r
46#define PPM_PLATFORM_POLICY_PROTOCOL_REVISION 1\r
47#define PPM_PLATFORM_POLICY_PROTOCOL_REVISION_2 2\r
48#define PPM_PLATFORM_POLICY_PROTOCOL_REVISION_3 3\r
49#define PPM_PLATFORM_POLICY_PROTOCOL_REVISION_4 4\r
50\r
51//\r
52// Define maximum number of custom VID states supported\r
53//\r
54#ifndef MAX_CUSTOM_VID_TABLE_STATES\r
55#define MAX_CUSTOM_VID_TABLE_STATES 6\r
56#endif\r
57//\r
58// Custom VID table\r
59//\r
60typedef struct {\r
61 UINT8 VidNumber;\r
62 UINT32 VidCpuid;\r
63 UINT16 VidMaxRatio;\r
64 UINT16 VidMaxVid;\r
65 UINT16 StateRatio[MAX_CUSTOM_VID_TABLE_STATES];\r
66 UINT16 StateVid[MAX_CUSTOM_VID_TABLE_STATES];\r
67} PPM_CUSTOM_VID_TABLE;\r
68\r
69//\r
70// PPM functional enables\r
71//\r
72typedef struct {\r
73 UINT8 EnableGv :1; // 0: Disabled; 1: Enabled\r
74 UINT8 EnableCx :1;\r
75 UINT8 EnableCxe :1;\r
76 UINT8 EnableC4 :1;\r
77 UINT8 EnableC6 :1;\r
78 UINT8 EnableC7 :1;\r
79 UINT8 EnableTm :1;\r
80 UINT8 Reserve00 :1;\r
81 UINT8 Reserve01 :1;\r
82 UINT8 EnableTurboMode :1;\r
83 UINT8 PowerLimit2 :1;\r
84 UINT8 EnableProcHot :1;\r
85 UINT8 Reserve02 :1;\r
86 UINT8 EnableCMP :1;\r
87 UINT8 TStatesEnable :1;\r
88 UINT8 Reserve03 :1;\r
89 UINT8 Reserve04 ;\r
90\r
91} PPM_FUNCTION_ENABLES;\r
92\r
93\r
94//\r
95// PPM Turbo settings\r
96//\r
97typedef struct _PPM_TURBO_SETTINGS {\r
98 UINT16 PowerLimit1;\r
99 UINT32 PowerLimit1Time;\r
100 UINT16 PowerLimit2;\r
101 UINT8 TurboPowerLimitLock;\r
102} PPM_TURBO_SETTINGS;\r
103\r
104//\r
105// Platform Policy\r
106//\r
52a99493 107struct _PPM_PLATFORM_POLICY_PROTOCOL {\r
3cbfba02
DW
108 UINT8 Revision;\r
109 PPM_FUNCTION_ENABLES FunctionEnables;\r
110 PPM_CUSTOM_VID_TABLE CustomVidTable;\r
111 PPM_TURBO_SETTINGS TurboSettings;\r
112\r
113 UINT8 Reserve00;\r
114 UINT8 Reserve01;\r
115 UINT8 Reserve02;\r
116 UINT8 Reserve03;\r
117 UINT8 Reserve04;\r
118 UINT8 Reserve05;\r
119 UINT8 Reserve06;\r
120\r
121 UINT8 S3RestoreMsrSwSmiNumber;\r
122 UINT8 Reserve07;\r
123 UINT32 Reserve08;\r
124 UINT8 Reserve09;\r
125 //\r
126 // Primary and Secondary Plane Current Limits\r
127 //\r
128 UINT16 Reserve10;\r
129 UINT8 Reserve11;\r
52a99493 130};\r
3cbfba02
DW
131\r
132#endif\r