Home | History | Annotate | Line # | Download | only in radeon
pptable.h revision 1.1
      1  1.1  riastrad /*
      2  1.1  riastrad  * Copyright 2013 Advanced Micro Devices, Inc.
      3  1.1  riastrad  *
      4  1.1  riastrad  * Permission is hereby granted, free of charge, to any person obtaining a
      5  1.1  riastrad  * copy of this software and associated documentation files (the "Software"),
      6  1.1  riastrad  * to deal in the Software without restriction, including without limitation
      7  1.1  riastrad  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
      8  1.1  riastrad  * and/or sell copies of the Software, and to permit persons to whom the
      9  1.1  riastrad  * Software is furnished to do so, subject to the following conditions:
     10  1.1  riastrad  *
     11  1.1  riastrad  * The above copyright notice and this permission notice shall be included in
     12  1.1  riastrad  * all copies or substantial portions of the Software.
     13  1.1  riastrad  *
     14  1.1  riastrad  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
     15  1.1  riastrad  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
     16  1.1  riastrad  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
     17  1.1  riastrad  * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
     18  1.1  riastrad  * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
     19  1.1  riastrad  * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
     20  1.1  riastrad  * OTHER DEALINGS IN THE SOFTWARE.
     21  1.1  riastrad  */
     22  1.1  riastrad 
     23  1.1  riastrad #ifndef _PPTABLE_H
     24  1.1  riastrad #define _PPTABLE_H
     25  1.1  riastrad 
     26  1.1  riastrad #pragma pack(1)
     27  1.1  riastrad 
     28  1.1  riastrad typedef struct _ATOM_PPLIB_THERMALCONTROLLER
     29  1.1  riastrad 
     30  1.1  riastrad {
     31  1.1  riastrad     UCHAR ucType;           // one of ATOM_PP_THERMALCONTROLLER_*
     32  1.1  riastrad     UCHAR ucI2cLine;        // as interpreted by DAL I2C
     33  1.1  riastrad     UCHAR ucI2cAddress;
     34  1.1  riastrad     UCHAR ucFanParameters;  // Fan Control Parameters.
     35  1.1  riastrad     UCHAR ucFanMinRPM;      // Fan Minimum RPM (hundreds) -- for display purposes only.
     36  1.1  riastrad     UCHAR ucFanMaxRPM;      // Fan Maximum RPM (hundreds) -- for display purposes only.
     37  1.1  riastrad     UCHAR ucReserved;       // ----
     38  1.1  riastrad     UCHAR ucFlags;          // to be defined
     39  1.1  riastrad } ATOM_PPLIB_THERMALCONTROLLER;
     40  1.1  riastrad 
     41  1.1  riastrad #define ATOM_PP_FANPARAMETERS_TACHOMETER_PULSES_PER_REVOLUTION_MASK 0x0f
     42  1.1  riastrad #define ATOM_PP_FANPARAMETERS_NOFAN                                 0x80    // No fan is connected to this controller.
     43  1.1  riastrad 
     44  1.1  riastrad #define ATOM_PP_THERMALCONTROLLER_NONE      0
     45  1.1  riastrad #define ATOM_PP_THERMALCONTROLLER_LM63      1  // Not used by PPLib
     46  1.1  riastrad #define ATOM_PP_THERMALCONTROLLER_ADM1032   2  // Not used by PPLib
     47  1.1  riastrad #define ATOM_PP_THERMALCONTROLLER_ADM1030   3  // Not used by PPLib
     48  1.1  riastrad #define ATOM_PP_THERMALCONTROLLER_MUA6649   4  // Not used by PPLib
     49  1.1  riastrad #define ATOM_PP_THERMALCONTROLLER_LM64      5
     50  1.1  riastrad #define ATOM_PP_THERMALCONTROLLER_F75375    6  // Not used by PPLib
     51  1.1  riastrad #define ATOM_PP_THERMALCONTROLLER_RV6xx     7
     52  1.1  riastrad #define ATOM_PP_THERMALCONTROLLER_RV770     8
     53  1.1  riastrad #define ATOM_PP_THERMALCONTROLLER_ADT7473   9
     54  1.1  riastrad #define ATOM_PP_THERMALCONTROLLER_KONG      10
     55  1.1  riastrad #define ATOM_PP_THERMALCONTROLLER_EXTERNAL_GPIO     11
     56  1.1  riastrad #define ATOM_PP_THERMALCONTROLLER_EVERGREEN 12
     57  1.1  riastrad #define ATOM_PP_THERMALCONTROLLER_EMC2103   13  /* 0x0D */ // Only fan control will be implemented, do NOT show this in PPGen.
     58  1.1  riastrad #define ATOM_PP_THERMALCONTROLLER_SUMO      14  /* 0x0E */ // Sumo type, used internally
     59  1.1  riastrad #define ATOM_PP_THERMALCONTROLLER_NISLANDS  15
     60  1.1  riastrad #define ATOM_PP_THERMALCONTROLLER_SISLANDS  16
     61  1.1  riastrad #define ATOM_PP_THERMALCONTROLLER_LM96163   17
     62  1.1  riastrad #define ATOM_PP_THERMALCONTROLLER_CISLANDS  18
     63  1.1  riastrad #define ATOM_PP_THERMALCONTROLLER_KAVERI    19
     64  1.1  riastrad 
     65  1.1  riastrad 
     66  1.1  riastrad // Thermal controller 'combo type' to use an external controller for Fan control and an internal controller for thermal.
     67  1.1  riastrad // We probably should reserve the bit 0x80 for this use.
     68  1.1  riastrad // To keep the number of these types low we should also use the same code for all ASICs (i.e. do not distinguish RV6xx and RV7xx Internal here).
     69  1.1  riastrad // The driver can pick the correct internal controller based on the ASIC.
     70  1.1  riastrad 
     71  1.1  riastrad #define ATOM_PP_THERMALCONTROLLER_ADT7473_WITH_INTERNAL   0x89    // ADT7473 Fan Control + Internal Thermal Controller
     72  1.1  riastrad #define ATOM_PP_THERMALCONTROLLER_EMC2103_WITH_INTERNAL   0x8D    // EMC2103 Fan Control + Internal Thermal Controller
     73  1.1  riastrad 
     74  1.1  riastrad typedef struct _ATOM_PPLIB_STATE
     75  1.1  riastrad {
     76  1.1  riastrad     UCHAR ucNonClockStateIndex;
     77  1.1  riastrad     UCHAR ucClockStateIndices[1]; // variable-sized
     78  1.1  riastrad } ATOM_PPLIB_STATE;
     79  1.1  riastrad 
     80  1.1  riastrad 
     81  1.1  riastrad typedef struct _ATOM_PPLIB_FANTABLE
     82  1.1  riastrad {
     83  1.1  riastrad     UCHAR   ucFanTableFormat;                // Change this if the table format changes or version changes so that the other fields are not the same.
     84  1.1  riastrad     UCHAR   ucTHyst;                         // Temperature hysteresis. Integer.
     85  1.1  riastrad     USHORT  usTMin;                          // The temperature, in 0.01 centigrades, below which we just run at a minimal PWM.
     86  1.1  riastrad     USHORT  usTMed;                          // The middle temperature where we change slopes.
     87  1.1  riastrad     USHORT  usTHigh;                         // The high point above TMed for adjusting the second slope.
     88  1.1  riastrad     USHORT  usPWMMin;                        // The minimum PWM value in percent (0.01% increments).
     89  1.1  riastrad     USHORT  usPWMMed;                        // The PWM value (in percent) at TMed.
     90  1.1  riastrad     USHORT  usPWMHigh;                       // The PWM value at THigh.
     91  1.1  riastrad } ATOM_PPLIB_FANTABLE;
     92  1.1  riastrad 
     93  1.1  riastrad typedef struct _ATOM_PPLIB_FANTABLE2
     94  1.1  riastrad {
     95  1.1  riastrad     ATOM_PPLIB_FANTABLE basicTable;
     96  1.1  riastrad     USHORT  usTMax;                          // The max temperature
     97  1.1  riastrad } ATOM_PPLIB_FANTABLE2;
     98  1.1  riastrad 
     99  1.1  riastrad typedef struct _ATOM_PPLIB_EXTENDEDHEADER
    100  1.1  riastrad {
    101  1.1  riastrad     USHORT  usSize;
    102  1.1  riastrad     ULONG   ulMaxEngineClock;   // For Overdrive.
    103  1.1  riastrad     ULONG   ulMaxMemoryClock;   // For Overdrive.
    104  1.1  riastrad     // Add extra system parameters here, always adjust size to include all fields.
    105  1.1  riastrad     USHORT  usVCETableOffset; //points to ATOM_PPLIB_VCE_Table
    106  1.1  riastrad     USHORT  usUVDTableOffset;   //points to ATOM_PPLIB_UVD_Table
    107  1.1  riastrad     USHORT  usSAMUTableOffset;  //points to ATOM_PPLIB_SAMU_Table
    108  1.1  riastrad     USHORT  usPPMTableOffset;   //points to ATOM_PPLIB_PPM_Table
    109  1.1  riastrad     USHORT  usACPTableOffset;  //points to ATOM_PPLIB_ACP_Table
    110  1.1  riastrad     USHORT  usPowerTuneTableOffset; //points to ATOM_PPLIB_POWERTUNE_Table
    111  1.1  riastrad } ATOM_PPLIB_EXTENDEDHEADER;
    112  1.1  riastrad 
    113  1.1  riastrad //// ATOM_PPLIB_POWERPLAYTABLE::ulPlatformCaps
    114  1.1  riastrad #define ATOM_PP_PLATFORM_CAP_BACKBIAS 1
    115  1.1  riastrad #define ATOM_PP_PLATFORM_CAP_POWERPLAY 2
    116  1.1  riastrad #define ATOM_PP_PLATFORM_CAP_SBIOSPOWERSOURCE 4
    117  1.1  riastrad #define ATOM_PP_PLATFORM_CAP_ASPM_L0s 8
    118  1.1  riastrad #define ATOM_PP_PLATFORM_CAP_ASPM_L1 16
    119  1.1  riastrad #define ATOM_PP_PLATFORM_CAP_HARDWAREDC 32
    120  1.1  riastrad #define ATOM_PP_PLATFORM_CAP_GEMINIPRIMARY 64
    121  1.1  riastrad #define ATOM_PP_PLATFORM_CAP_STEPVDDC 128
    122  1.1  riastrad #define ATOM_PP_PLATFORM_CAP_VOLTAGECONTROL 256
    123  1.1  riastrad #define ATOM_PP_PLATFORM_CAP_SIDEPORTCONTROL 512
    124  1.1  riastrad #define ATOM_PP_PLATFORM_CAP_TURNOFFPLL_ASPML1 1024
    125  1.1  riastrad #define ATOM_PP_PLATFORM_CAP_HTLINKCONTROL 2048
    126  1.1  riastrad #define ATOM_PP_PLATFORM_CAP_MVDDCONTROL 4096
    127  1.1  riastrad #define ATOM_PP_PLATFORM_CAP_GOTO_BOOT_ON_ALERT 0x2000              // Go to boot state on alerts, e.g. on an AC->DC transition.
    128  1.1  riastrad #define ATOM_PP_PLATFORM_CAP_DONT_WAIT_FOR_VBLANK_ON_ALERT 0x4000   // Do NOT wait for VBLANK during an alert (e.g. AC->DC transition).
    129  1.1  riastrad #define ATOM_PP_PLATFORM_CAP_VDDCI_CONTROL 0x8000                   // Does the driver control VDDCI independently from VDDC.
    130  1.1  riastrad #define ATOM_PP_PLATFORM_CAP_REGULATOR_HOT 0x00010000               // Enable the 'regulator hot' feature.
    131  1.1  riastrad #define ATOM_PP_PLATFORM_CAP_BACO          0x00020000               // Does the driver supports BACO state.
    132  1.1  riastrad #define ATOM_PP_PLATFORM_CAP_NEW_CAC_VOLTAGE   0x00040000           // Does the driver supports new CAC voltage table.
    133  1.1  riastrad #define ATOM_PP_PLATFORM_CAP_REVERT_GPIO5_POLARITY   0x00080000     // Does the driver supports revert GPIO5 polarity.
    134  1.1  riastrad #define ATOM_PP_PLATFORM_CAP_OUTPUT_THERMAL2GPIO17   0x00100000     // Does the driver supports thermal2GPIO17.
    135  1.1  riastrad #define ATOM_PP_PLATFORM_CAP_VRHOT_GPIO_CONFIGURABLE   0x00200000   // Does the driver supports VR HOT GPIO Configurable.
    136  1.1  riastrad #define ATOM_PP_PLATFORM_CAP_TEMP_INVERSION   0x00400000            // Does the driver supports Temp Inversion feature.
    137  1.1  riastrad #define ATOM_PP_PLATFORM_CAP_EVV    0x00800000
    138  1.1  riastrad 
    139  1.1  riastrad typedef struct _ATOM_PPLIB_POWERPLAYTABLE
    140  1.1  riastrad {
    141  1.1  riastrad       ATOM_COMMON_TABLE_HEADER sHeader;
    142  1.1  riastrad 
    143  1.1  riastrad       UCHAR ucDataRevision;
    144  1.1  riastrad 
    145  1.1  riastrad       UCHAR ucNumStates;
    146  1.1  riastrad       UCHAR ucStateEntrySize;
    147  1.1  riastrad       UCHAR ucClockInfoSize;
    148  1.1  riastrad       UCHAR ucNonClockSize;
    149  1.1  riastrad 
    150  1.1  riastrad       // offset from start of this table to array of ucNumStates ATOM_PPLIB_STATE structures
    151  1.1  riastrad       USHORT usStateArrayOffset;
    152  1.1  riastrad 
    153  1.1  riastrad       // offset from start of this table to array of ASIC-specific structures,
    154  1.1  riastrad       // currently ATOM_PPLIB_CLOCK_INFO.
    155  1.1  riastrad       USHORT usClockInfoArrayOffset;
    156  1.1  riastrad 
    157  1.1  riastrad       // offset from start of this table to array of ATOM_PPLIB_NONCLOCK_INFO
    158  1.1  riastrad       USHORT usNonClockInfoArrayOffset;
    159  1.1  riastrad 
    160  1.1  riastrad       USHORT usBackbiasTime;    // in microseconds
    161  1.1  riastrad       USHORT usVoltageTime;     // in microseconds
    162  1.1  riastrad       USHORT usTableSize;       //the size of this structure, or the extended structure
    163  1.1  riastrad 
    164  1.1  riastrad       ULONG ulPlatformCaps;            // See ATOM_PPLIB_CAPS_*
    165  1.1  riastrad 
    166  1.1  riastrad       ATOM_PPLIB_THERMALCONTROLLER    sThermalController;
    167  1.1  riastrad 
    168  1.1  riastrad       USHORT usBootClockInfoOffset;
    169  1.1  riastrad       USHORT usBootNonClockInfoOffset;
    170  1.1  riastrad 
    171  1.1  riastrad } ATOM_PPLIB_POWERPLAYTABLE;
    172  1.1  riastrad 
    173  1.1  riastrad typedef struct _ATOM_PPLIB_POWERPLAYTABLE2
    174  1.1  riastrad {
    175  1.1  riastrad     ATOM_PPLIB_POWERPLAYTABLE basicTable;
    176  1.1  riastrad     UCHAR   ucNumCustomThermalPolicy;
    177  1.1  riastrad     USHORT  usCustomThermalPolicyArrayOffset;
    178  1.1  riastrad }ATOM_PPLIB_POWERPLAYTABLE2, *LPATOM_PPLIB_POWERPLAYTABLE2;
    179  1.1  riastrad 
    180  1.1  riastrad typedef struct _ATOM_PPLIB_POWERPLAYTABLE3
    181  1.1  riastrad {
    182  1.1  riastrad     ATOM_PPLIB_POWERPLAYTABLE2 basicTable2;
    183  1.1  riastrad     USHORT                     usFormatID;                      // To be used ONLY by PPGen.
    184  1.1  riastrad     USHORT                     usFanTableOffset;
    185  1.1  riastrad     USHORT                     usExtendendedHeaderOffset;
    186  1.1  riastrad } ATOM_PPLIB_POWERPLAYTABLE3, *LPATOM_PPLIB_POWERPLAYTABLE3;
    187  1.1  riastrad 
    188  1.1  riastrad typedef struct _ATOM_PPLIB_POWERPLAYTABLE4
    189  1.1  riastrad {
    190  1.1  riastrad     ATOM_PPLIB_POWERPLAYTABLE3 basicTable3;
    191  1.1  riastrad     ULONG                      ulGoldenPPID;                    // PPGen use only
    192  1.1  riastrad     ULONG                      ulGoldenRevision;                // PPGen use only
    193  1.1  riastrad     USHORT                     usVddcDependencyOnSCLKOffset;
    194  1.1  riastrad     USHORT                     usVddciDependencyOnMCLKOffset;
    195  1.1  riastrad     USHORT                     usVddcDependencyOnMCLKOffset;
    196  1.1  riastrad     USHORT                     usMaxClockVoltageOnDCOffset;
    197  1.1  riastrad     USHORT                     usVddcPhaseShedLimitsTableOffset;    // Points to ATOM_PPLIB_PhaseSheddingLimits_Table
    198  1.1  riastrad     USHORT                     usMvddDependencyOnMCLKOffset;
    199  1.1  riastrad } ATOM_PPLIB_POWERPLAYTABLE4, *LPATOM_PPLIB_POWERPLAYTABLE4;
    200  1.1  riastrad 
    201  1.1  riastrad typedef struct _ATOM_PPLIB_POWERPLAYTABLE5
    202  1.1  riastrad {
    203  1.1  riastrad     ATOM_PPLIB_POWERPLAYTABLE4 basicTable4;
    204  1.1  riastrad     ULONG                      ulTDPLimit;
    205  1.1  riastrad     ULONG                      ulNearTDPLimit;
    206  1.1  riastrad     ULONG                      ulSQRampingThreshold;
    207  1.1  riastrad     USHORT                     usCACLeakageTableOffset;         // Points to ATOM_PPLIB_CAC_Leakage_Table
    208  1.1  riastrad     ULONG                      ulCACLeakage;                    // The iLeakage for driver calculated CAC leakage table
    209  1.1  riastrad     USHORT                     usTDPODLimit;
    210  1.1  riastrad     USHORT                     usLoadLineSlope;                 // in milliOhms * 100
    211  1.1  riastrad } ATOM_PPLIB_POWERPLAYTABLE5, *LPATOM_PPLIB_POWERPLAYTABLE5;
    212  1.1  riastrad 
    213  1.1  riastrad //// ATOM_PPLIB_NONCLOCK_INFO::usClassification
    214  1.1  riastrad #define ATOM_PPLIB_CLASSIFICATION_UI_MASK          0x0007
    215  1.1  riastrad #define ATOM_PPLIB_CLASSIFICATION_UI_SHIFT         0
    216  1.1  riastrad #define ATOM_PPLIB_CLASSIFICATION_UI_NONE          0
    217  1.1  riastrad #define ATOM_PPLIB_CLASSIFICATION_UI_BATTERY       1
    218  1.1  riastrad #define ATOM_PPLIB_CLASSIFICATION_UI_BALANCED      3
    219  1.1  riastrad #define ATOM_PPLIB_CLASSIFICATION_UI_PERFORMANCE   5
    220  1.1  riastrad // 2, 4, 6, 7 are reserved
    221  1.1  riastrad 
    222  1.1  riastrad #define ATOM_PPLIB_CLASSIFICATION_BOOT                   0x0008
    223  1.1  riastrad #define ATOM_PPLIB_CLASSIFICATION_THERMAL                0x0010
    224  1.1  riastrad #define ATOM_PPLIB_CLASSIFICATION_LIMITEDPOWERSOURCE     0x0020
    225  1.1  riastrad #define ATOM_PPLIB_CLASSIFICATION_REST                   0x0040
    226  1.1  riastrad #define ATOM_PPLIB_CLASSIFICATION_FORCED                 0x0080
    227  1.1  riastrad #define ATOM_PPLIB_CLASSIFICATION_3DPERFORMANCE          0x0100
    228  1.1  riastrad #define ATOM_PPLIB_CLASSIFICATION_OVERDRIVETEMPLATE      0x0200
    229  1.1  riastrad #define ATOM_PPLIB_CLASSIFICATION_UVDSTATE               0x0400
    230  1.1  riastrad #define ATOM_PPLIB_CLASSIFICATION_3DLOW                  0x0800
    231  1.1  riastrad #define ATOM_PPLIB_CLASSIFICATION_ACPI                   0x1000
    232  1.1  riastrad #define ATOM_PPLIB_CLASSIFICATION_HD2STATE               0x2000
    233  1.1  riastrad #define ATOM_PPLIB_CLASSIFICATION_HDSTATE                0x4000
    234  1.1  riastrad #define ATOM_PPLIB_CLASSIFICATION_SDSTATE                0x8000
    235  1.1  riastrad 
    236  1.1  riastrad //// ATOM_PPLIB_NONCLOCK_INFO::usClassification2
    237  1.1  riastrad #define ATOM_PPLIB_CLASSIFICATION2_LIMITEDPOWERSOURCE_2     0x0001
    238  1.1  riastrad #define ATOM_PPLIB_CLASSIFICATION2_ULV                      0x0002
    239  1.1  riastrad #define ATOM_PPLIB_CLASSIFICATION2_MVC                      0x0004   //Multi-View Codec (BD-3D)
    240  1.1  riastrad 
    241  1.1  riastrad //// ATOM_PPLIB_NONCLOCK_INFO::ulCapsAndSettings
    242  1.1  riastrad #define ATOM_PPLIB_SINGLE_DISPLAY_ONLY           0x00000001
    243  1.1  riastrad #define ATOM_PPLIB_SUPPORTS_VIDEO_PLAYBACK         0x00000002
    244  1.1  riastrad 
    245  1.1  riastrad // 0 is 2.5Gb/s, 1 is 5Gb/s
    246  1.1  riastrad #define ATOM_PPLIB_PCIE_LINK_SPEED_MASK            0x00000004
    247  1.1  riastrad #define ATOM_PPLIB_PCIE_LINK_SPEED_SHIFT           2
    248  1.1  riastrad 
    249  1.1  riastrad // lanes - 1: 1, 2, 4, 8, 12, 16 permitted by PCIE spec
    250  1.1  riastrad #define ATOM_PPLIB_PCIE_LINK_WIDTH_MASK            0x000000F8
    251  1.1  riastrad #define ATOM_PPLIB_PCIE_LINK_WIDTH_SHIFT           3
    252  1.1  riastrad 
    253  1.1  riastrad // lookup into reduced refresh-rate table
    254  1.1  riastrad #define ATOM_PPLIB_LIMITED_REFRESHRATE_VALUE_MASK  0x00000F00
    255  1.1  riastrad #define ATOM_PPLIB_LIMITED_REFRESHRATE_VALUE_SHIFT 8
    256  1.1  riastrad 
    257  1.1  riastrad #define ATOM_PPLIB_LIMITED_REFRESHRATE_UNLIMITED    0
    258  1.1  riastrad #define ATOM_PPLIB_LIMITED_REFRESHRATE_50HZ         1
    259  1.1  riastrad // 2-15 TBD as needed.
    260  1.1  riastrad 
    261  1.1  riastrad #define ATOM_PPLIB_SOFTWARE_DISABLE_LOADBALANCING        0x00001000
    262  1.1  riastrad #define ATOM_PPLIB_SOFTWARE_ENABLE_SLEEP_FOR_TIMESTAMPS  0x00002000
    263  1.1  riastrad 
    264  1.1  riastrad #define ATOM_PPLIB_DISALLOW_ON_DC                       0x00004000
    265  1.1  riastrad 
    266  1.1  riastrad #define ATOM_PPLIB_ENABLE_VARIBRIGHT                     0x00008000
    267  1.1  riastrad 
    268  1.1  riastrad //memory related flags
    269  1.1  riastrad #define ATOM_PPLIB_SWSTATE_MEMORY_DLL_OFF               0x000010000
    270  1.1  riastrad 
    271  1.1  riastrad //M3 Arb    //2bits, current 3 sets of parameters in total
    272  1.1  riastrad #define ATOM_PPLIB_M3ARB_MASK                       0x00060000
    273  1.1  riastrad #define ATOM_PPLIB_M3ARB_SHIFT                      17
    274  1.1  riastrad 
    275  1.1  riastrad #define ATOM_PPLIB_ENABLE_DRR                       0x00080000
    276  1.1  riastrad 
    277  1.1  riastrad // remaining 16 bits are reserved
    278  1.1  riastrad typedef struct _ATOM_PPLIB_THERMAL_STATE
    279  1.1  riastrad {
    280  1.1  riastrad     UCHAR   ucMinTemperature;
    281  1.1  riastrad     UCHAR   ucMaxTemperature;
    282  1.1  riastrad     UCHAR   ucThermalAction;
    283  1.1  riastrad }ATOM_PPLIB_THERMAL_STATE, *LPATOM_PPLIB_THERMAL_STATE;
    284  1.1  riastrad 
    285  1.1  riastrad // Contained in an array starting at the offset
    286  1.1  riastrad // in ATOM_PPLIB_POWERPLAYTABLE::usNonClockInfoArrayOffset.
    287  1.1  riastrad // referenced from ATOM_PPLIB_STATE_INFO::ucNonClockStateIndex
    288  1.1  riastrad #define ATOM_PPLIB_NONCLOCKINFO_VER1      12
    289  1.1  riastrad #define ATOM_PPLIB_NONCLOCKINFO_VER2      24
    290  1.1  riastrad typedef struct _ATOM_PPLIB_NONCLOCK_INFO
    291  1.1  riastrad {
    292  1.1  riastrad       USHORT usClassification;
    293  1.1  riastrad       UCHAR  ucMinTemperature;
    294  1.1  riastrad       UCHAR  ucMaxTemperature;
    295  1.1  riastrad       ULONG  ulCapsAndSettings;
    296  1.1  riastrad       UCHAR  ucRequiredPower;
    297  1.1  riastrad       USHORT usClassification2;
    298  1.1  riastrad       ULONG  ulVCLK;
    299  1.1  riastrad       ULONG  ulDCLK;
    300  1.1  riastrad       UCHAR  ucUnused[5];
    301  1.1  riastrad } ATOM_PPLIB_NONCLOCK_INFO;
    302  1.1  riastrad 
    303  1.1  riastrad // Contained in an array starting at the offset
    304  1.1  riastrad // in ATOM_PPLIB_POWERPLAYTABLE::usClockInfoArrayOffset.
    305  1.1  riastrad // referenced from ATOM_PPLIB_STATE::ucClockStateIndices
    306  1.1  riastrad typedef struct _ATOM_PPLIB_R600_CLOCK_INFO
    307  1.1  riastrad {
    308  1.1  riastrad       USHORT usEngineClockLow;
    309  1.1  riastrad       UCHAR ucEngineClockHigh;
    310  1.1  riastrad 
    311  1.1  riastrad       USHORT usMemoryClockLow;
    312  1.1  riastrad       UCHAR ucMemoryClockHigh;
    313  1.1  riastrad 
    314  1.1  riastrad       USHORT usVDDC;
    315  1.1  riastrad       USHORT usUnused1;
    316  1.1  riastrad       USHORT usUnused2;
    317  1.1  riastrad 
    318  1.1  riastrad       ULONG ulFlags; // ATOM_PPLIB_R600_FLAGS_*
    319  1.1  riastrad 
    320  1.1  riastrad } ATOM_PPLIB_R600_CLOCK_INFO;
    321  1.1  riastrad 
    322  1.1  riastrad // ulFlags in ATOM_PPLIB_R600_CLOCK_INFO
    323  1.1  riastrad #define ATOM_PPLIB_R600_FLAGS_PCIEGEN2          1
    324  1.1  riastrad #define ATOM_PPLIB_R600_FLAGS_UVDSAFE           2
    325  1.1  riastrad #define ATOM_PPLIB_R600_FLAGS_BACKBIASENABLE    4
    326  1.1  riastrad #define ATOM_PPLIB_R600_FLAGS_MEMORY_ODT_OFF    8
    327  1.1  riastrad #define ATOM_PPLIB_R600_FLAGS_MEMORY_DLL_OFF   16
    328  1.1  riastrad #define ATOM_PPLIB_R600_FLAGS_LOWPOWER         32   // On the RV770 use 'low power' setting (sequencer S0).
    329  1.1  riastrad 
    330  1.1  riastrad typedef struct _ATOM_PPLIB_RS780_CLOCK_INFO
    331  1.1  riastrad 
    332  1.1  riastrad {
    333  1.1  riastrad       USHORT usLowEngineClockLow;         // Low Engine clock in MHz (the same way as on the R600).
    334  1.1  riastrad       UCHAR  ucLowEngineClockHigh;
    335  1.1  riastrad       USHORT usHighEngineClockLow;        // High Engine clock in MHz.
    336  1.1  riastrad       UCHAR  ucHighEngineClockHigh;
    337  1.1  riastrad       USHORT usMemoryClockLow;            // For now one of the ATOM_PPLIB_RS780_SPMCLK_XXXX constants.
    338  1.1  riastrad       UCHAR  ucMemoryClockHigh;           // Currentyl unused.
    339  1.1  riastrad       UCHAR  ucPadding;                   // For proper alignment and size.
    340  1.1  riastrad       USHORT usVDDC;                      // For the 780, use: None, Low, High, Variable
    341  1.1  riastrad       UCHAR  ucMaxHTLinkWidth;            // From SBIOS - {2, 4, 8, 16}
    342  1.1  riastrad       UCHAR  ucMinHTLinkWidth;            // From SBIOS - {2, 4, 8, 16}. Effective only if CDLW enabled. Minimum down stream width could
    343  1.1  riastrad       USHORT usHTLinkFreq;                // See definition ATOM_PPLIB_RS780_HTLINKFREQ_xxx or in MHz(>=200).
    344  1.1  riastrad       ULONG  ulFlags;
    345  1.1  riastrad } ATOM_PPLIB_RS780_CLOCK_INFO;
    346  1.1  riastrad 
    347  1.1  riastrad #define ATOM_PPLIB_RS780_VOLTAGE_NONE       0
    348  1.1  riastrad #define ATOM_PPLIB_RS780_VOLTAGE_LOW        1
    349  1.1  riastrad #define ATOM_PPLIB_RS780_VOLTAGE_HIGH       2
    350  1.1  riastrad #define ATOM_PPLIB_RS780_VOLTAGE_VARIABLE   3
    351  1.1  riastrad 
    352  1.1  riastrad #define ATOM_PPLIB_RS780_SPMCLK_NONE        0   // We cannot change the side port memory clock, leave it as it is.
    353  1.1  riastrad #define ATOM_PPLIB_RS780_SPMCLK_LOW         1
    354  1.1  riastrad #define ATOM_PPLIB_RS780_SPMCLK_HIGH        2
    355  1.1  riastrad 
    356  1.1  riastrad #define ATOM_PPLIB_RS780_HTLINKFREQ_NONE       0
    357  1.1  riastrad #define ATOM_PPLIB_RS780_HTLINKFREQ_LOW        1
    358  1.1  riastrad #define ATOM_PPLIB_RS780_HTLINKFREQ_HIGH       2
    359  1.1  riastrad 
    360  1.1  riastrad typedef struct _ATOM_PPLIB_EVERGREEN_CLOCK_INFO
    361  1.1  riastrad {
    362  1.1  riastrad       USHORT usEngineClockLow;
    363  1.1  riastrad       UCHAR  ucEngineClockHigh;
    364  1.1  riastrad 
    365  1.1  riastrad       USHORT usMemoryClockLow;
    366  1.1  riastrad       UCHAR  ucMemoryClockHigh;
    367  1.1  riastrad 
    368  1.1  riastrad       USHORT usVDDC;
    369  1.1  riastrad       USHORT usVDDCI;
    370  1.1  riastrad       USHORT usUnused;
    371  1.1  riastrad 
    372  1.1  riastrad       ULONG ulFlags; // ATOM_PPLIB_R600_FLAGS_*
    373  1.1  riastrad 
    374  1.1  riastrad } ATOM_PPLIB_EVERGREEN_CLOCK_INFO;
    375  1.1  riastrad 
    376  1.1  riastrad typedef struct _ATOM_PPLIB_SI_CLOCK_INFO
    377  1.1  riastrad {
    378  1.1  riastrad       USHORT usEngineClockLow;
    379  1.1  riastrad       UCHAR  ucEngineClockHigh;
    380  1.1  riastrad 
    381  1.1  riastrad       USHORT usMemoryClockLow;
    382  1.1  riastrad       UCHAR  ucMemoryClockHigh;
    383  1.1  riastrad 
    384  1.1  riastrad       USHORT usVDDC;
    385  1.1  riastrad       USHORT usVDDCI;
    386  1.1  riastrad       UCHAR  ucPCIEGen;
    387  1.1  riastrad       UCHAR  ucUnused1;
    388  1.1  riastrad 
    389  1.1  riastrad       ULONG ulFlags; // ATOM_PPLIB_SI_FLAGS_*, no flag is necessary for now
    390  1.1  riastrad 
    391  1.1  riastrad } ATOM_PPLIB_SI_CLOCK_INFO;
    392  1.1  riastrad 
    393  1.1  riastrad typedef struct _ATOM_PPLIB_CI_CLOCK_INFO
    394  1.1  riastrad {
    395  1.1  riastrad       USHORT usEngineClockLow;
    396  1.1  riastrad       UCHAR  ucEngineClockHigh;
    397  1.1  riastrad 
    398  1.1  riastrad       USHORT usMemoryClockLow;
    399  1.1  riastrad       UCHAR  ucMemoryClockHigh;
    400  1.1  riastrad 
    401  1.1  riastrad       UCHAR  ucPCIEGen;
    402  1.1  riastrad       USHORT usPCIELane;
    403  1.1  riastrad } ATOM_PPLIB_CI_CLOCK_INFO;
    404  1.1  riastrad 
    405  1.1  riastrad typedef struct _ATOM_PPLIB_SUMO_CLOCK_INFO{
    406  1.1  riastrad       USHORT usEngineClockLow;  //clockfrequency & 0xFFFF. The unit is in 10khz
    407  1.1  riastrad       UCHAR  ucEngineClockHigh; //clockfrequency >> 16.
    408  1.1  riastrad       UCHAR  vddcIndex;         //2-bit vddc index;
    409  1.1  riastrad       USHORT tdpLimit;
    410  1.1  riastrad       //please initalize to 0
    411  1.1  riastrad       USHORT rsv1;
    412  1.1  riastrad       //please initialize to 0s
    413  1.1  riastrad       ULONG rsv2[2];
    414  1.1  riastrad }ATOM_PPLIB_SUMO_CLOCK_INFO;
    415  1.1  riastrad 
    416  1.1  riastrad typedef struct _ATOM_PPLIB_STATE_V2
    417  1.1  riastrad {
    418  1.1  riastrad       //number of valid dpm levels in this state; Driver uses it to calculate the whole
    419  1.1  riastrad       //size of the state: sizeof(ATOM_PPLIB_STATE_V2) + (ucNumDPMLevels - 1) * sizeof(UCHAR)
    420  1.1  riastrad       UCHAR ucNumDPMLevels;
    421  1.1  riastrad 
    422  1.1  riastrad       //a index to the array of nonClockInfos
    423  1.1  riastrad       UCHAR nonClockInfoIndex;
    424  1.1  riastrad       /**
    425  1.1  riastrad       * Driver will read the first ucNumDPMLevels in this array
    426  1.1  riastrad       */
    427  1.1  riastrad       UCHAR clockInfoIndex[1];
    428  1.1  riastrad } ATOM_PPLIB_STATE_V2;
    429  1.1  riastrad 
    430  1.1  riastrad typedef struct _StateArray{
    431  1.1  riastrad     //how many states we have
    432  1.1  riastrad     UCHAR ucNumEntries;
    433  1.1  riastrad 
    434  1.1  riastrad     ATOM_PPLIB_STATE_V2 states[1];
    435  1.1  riastrad }StateArray;
    436  1.1  riastrad 
    437  1.1  riastrad 
    438  1.1  riastrad typedef struct _ClockInfoArray{
    439  1.1  riastrad     //how many clock levels we have
    440  1.1  riastrad     UCHAR ucNumEntries;
    441  1.1  riastrad 
    442  1.1  riastrad     //sizeof(ATOM_PPLIB_CLOCK_INFO)
    443  1.1  riastrad     UCHAR ucEntrySize;
    444  1.1  riastrad 
    445  1.1  riastrad     UCHAR clockInfo[1];
    446  1.1  riastrad }ClockInfoArray;
    447  1.1  riastrad 
    448  1.1  riastrad typedef struct _NonClockInfoArray{
    449  1.1  riastrad 
    450  1.1  riastrad     //how many non-clock levels we have. normally should be same as number of states
    451  1.1  riastrad     UCHAR ucNumEntries;
    452  1.1  riastrad     //sizeof(ATOM_PPLIB_NONCLOCK_INFO)
    453  1.1  riastrad     UCHAR ucEntrySize;
    454  1.1  riastrad 
    455  1.1  riastrad     ATOM_PPLIB_NONCLOCK_INFO nonClockInfo[1];
    456  1.1  riastrad }NonClockInfoArray;
    457  1.1  riastrad 
    458  1.1  riastrad typedef struct _ATOM_PPLIB_Clock_Voltage_Dependency_Record
    459  1.1  riastrad {
    460  1.1  riastrad     USHORT usClockLow;
    461  1.1  riastrad     UCHAR  ucClockHigh;
    462  1.1  riastrad     USHORT usVoltage;
    463  1.1  riastrad }ATOM_PPLIB_Clock_Voltage_Dependency_Record;
    464  1.1  riastrad 
    465  1.1  riastrad typedef struct _ATOM_PPLIB_Clock_Voltage_Dependency_Table
    466  1.1  riastrad {
    467  1.1  riastrad     UCHAR ucNumEntries;                                                // Number of entries.
    468  1.1  riastrad     ATOM_PPLIB_Clock_Voltage_Dependency_Record entries[1];             // Dynamically allocate entries.
    469  1.1  riastrad }ATOM_PPLIB_Clock_Voltage_Dependency_Table;
    470  1.1  riastrad 
    471  1.1  riastrad typedef struct _ATOM_PPLIB_Clock_Voltage_Limit_Record
    472  1.1  riastrad {
    473  1.1  riastrad     USHORT usSclkLow;
    474  1.1  riastrad     UCHAR  ucSclkHigh;
    475  1.1  riastrad     USHORT usMclkLow;
    476  1.1  riastrad     UCHAR  ucMclkHigh;
    477  1.1  riastrad     USHORT usVddc;
    478  1.1  riastrad     USHORT usVddci;
    479  1.1  riastrad }ATOM_PPLIB_Clock_Voltage_Limit_Record;
    480  1.1  riastrad 
    481  1.1  riastrad typedef struct _ATOM_PPLIB_Clock_Voltage_Limit_Table
    482  1.1  riastrad {
    483  1.1  riastrad     UCHAR ucNumEntries;                                                // Number of entries.
    484  1.1  riastrad     ATOM_PPLIB_Clock_Voltage_Limit_Record entries[1];                  // Dynamically allocate entries.
    485  1.1  riastrad }ATOM_PPLIB_Clock_Voltage_Limit_Table;
    486  1.1  riastrad 
    487  1.1  riastrad union _ATOM_PPLIB_CAC_Leakage_Record
    488  1.1  riastrad {
    489  1.1  riastrad     struct
    490  1.1  riastrad     {
    491  1.1  riastrad         USHORT usVddc;          // We use this field for the "fake" standardized VDDC for power calculations; For CI and newer, we use this as the real VDDC value. in CI we read it as StdVoltageHiSidd
    492  1.1  riastrad         ULONG  ulLeakageValue;  // For CI and newer we use this as the "fake" standar VDDC value. in CI we read it as StdVoltageLoSidd
    493  1.1  riastrad 
    494  1.1  riastrad     };
    495  1.1  riastrad     struct
    496  1.1  riastrad      {
    497  1.1  riastrad         USHORT usVddc1;
    498  1.1  riastrad         USHORT usVddc2;
    499  1.1  riastrad         USHORT usVddc3;
    500  1.1  riastrad      };
    501  1.1  riastrad };
    502  1.1  riastrad 
    503  1.1  riastrad typedef union _ATOM_PPLIB_CAC_Leakage_Record ATOM_PPLIB_CAC_Leakage_Record;
    504  1.1  riastrad 
    505  1.1  riastrad typedef struct _ATOM_PPLIB_CAC_Leakage_Table
    506  1.1  riastrad {
    507  1.1  riastrad     UCHAR ucNumEntries;                                                 // Number of entries.
    508  1.1  riastrad     ATOM_PPLIB_CAC_Leakage_Record entries[1];                           // Dynamically allocate entries.
    509  1.1  riastrad }ATOM_PPLIB_CAC_Leakage_Table;
    510  1.1  riastrad 
    511  1.1  riastrad typedef struct _ATOM_PPLIB_PhaseSheddingLimits_Record
    512  1.1  riastrad {
    513  1.1  riastrad     USHORT usVoltage;
    514  1.1  riastrad     USHORT usSclkLow;
    515  1.1  riastrad     UCHAR  ucSclkHigh;
    516  1.1  riastrad     USHORT usMclkLow;
    517  1.1  riastrad     UCHAR  ucMclkHigh;
    518  1.1  riastrad }ATOM_PPLIB_PhaseSheddingLimits_Record;
    519  1.1  riastrad 
    520  1.1  riastrad typedef struct _ATOM_PPLIB_PhaseSheddingLimits_Table
    521  1.1  riastrad {
    522  1.1  riastrad     UCHAR ucNumEntries;                                                 // Number of entries.
    523  1.1  riastrad     ATOM_PPLIB_PhaseSheddingLimits_Record entries[1];                   // Dynamically allocate entries.
    524  1.1  riastrad }ATOM_PPLIB_PhaseSheddingLimits_Table;
    525  1.1  riastrad 
    526  1.1  riastrad typedef struct _VCEClockInfo{
    527  1.1  riastrad     USHORT usEVClkLow;
    528  1.1  riastrad     UCHAR  ucEVClkHigh;
    529  1.1  riastrad     USHORT usECClkLow;
    530  1.1  riastrad     UCHAR  ucECClkHigh;
    531  1.1  riastrad }VCEClockInfo;
    532  1.1  riastrad 
    533  1.1  riastrad typedef struct _VCEClockInfoArray{
    534  1.1  riastrad     UCHAR ucNumEntries;
    535  1.1  riastrad     VCEClockInfo entries[1];
    536  1.1  riastrad }VCEClockInfoArray;
    537  1.1  riastrad 
    538  1.1  riastrad typedef struct _ATOM_PPLIB_VCE_Clock_Voltage_Limit_Record
    539  1.1  riastrad {
    540  1.1  riastrad     USHORT usVoltage;
    541  1.1  riastrad     UCHAR  ucVCEClockInfoIndex;
    542  1.1  riastrad }ATOM_PPLIB_VCE_Clock_Voltage_Limit_Record;
    543  1.1  riastrad 
    544  1.1  riastrad typedef struct _ATOM_PPLIB_VCE_Clock_Voltage_Limit_Table
    545  1.1  riastrad {
    546  1.1  riastrad     UCHAR numEntries;
    547  1.1  riastrad     ATOM_PPLIB_VCE_Clock_Voltage_Limit_Record entries[1];
    548  1.1  riastrad }ATOM_PPLIB_VCE_Clock_Voltage_Limit_Table;
    549  1.1  riastrad 
    550  1.1  riastrad typedef struct _ATOM_PPLIB_VCE_State_Record
    551  1.1  riastrad {
    552  1.1  riastrad     UCHAR  ucVCEClockInfoIndex;
    553  1.1  riastrad     UCHAR  ucClockInfoIndex; //highest 2 bits indicates memory p-states, lower 6bits indicates index to ClockInfoArrary
    554  1.1  riastrad }ATOM_PPLIB_VCE_State_Record;
    555  1.1  riastrad 
    556  1.1  riastrad typedef struct _ATOM_PPLIB_VCE_State_Table
    557  1.1  riastrad {
    558  1.1  riastrad     UCHAR numEntries;
    559  1.1  riastrad     ATOM_PPLIB_VCE_State_Record entries[1];
    560  1.1  riastrad }ATOM_PPLIB_VCE_State_Table;
    561  1.1  riastrad 
    562  1.1  riastrad 
    563  1.1  riastrad typedef struct _ATOM_PPLIB_VCE_Table
    564  1.1  riastrad {
    565  1.1  riastrad       UCHAR revid;
    566  1.1  riastrad //    VCEClockInfoArray array;
    567  1.1  riastrad //    ATOM_PPLIB_VCE_Clock_Voltage_Limit_Table limits;
    568  1.1  riastrad //    ATOM_PPLIB_VCE_State_Table states;
    569  1.1  riastrad }ATOM_PPLIB_VCE_Table;
    570  1.1  riastrad 
    571  1.1  riastrad 
    572  1.1  riastrad typedef struct _UVDClockInfo{
    573  1.1  riastrad     USHORT usVClkLow;
    574  1.1  riastrad     UCHAR  ucVClkHigh;
    575  1.1  riastrad     USHORT usDClkLow;
    576  1.1  riastrad     UCHAR  ucDClkHigh;
    577  1.1  riastrad }UVDClockInfo;
    578  1.1  riastrad 
    579  1.1  riastrad typedef struct _UVDClockInfoArray{
    580  1.1  riastrad     UCHAR ucNumEntries;
    581  1.1  riastrad     UVDClockInfo entries[1];
    582  1.1  riastrad }UVDClockInfoArray;
    583  1.1  riastrad 
    584  1.1  riastrad typedef struct _ATOM_PPLIB_UVD_Clock_Voltage_Limit_Record
    585  1.1  riastrad {
    586  1.1  riastrad     USHORT usVoltage;
    587  1.1  riastrad     UCHAR  ucUVDClockInfoIndex;
    588  1.1  riastrad }ATOM_PPLIB_UVD_Clock_Voltage_Limit_Record;
    589  1.1  riastrad 
    590  1.1  riastrad typedef struct _ATOM_PPLIB_UVD_Clock_Voltage_Limit_Table
    591  1.1  riastrad {
    592  1.1  riastrad     UCHAR numEntries;
    593  1.1  riastrad     ATOM_PPLIB_UVD_Clock_Voltage_Limit_Record entries[1];
    594  1.1  riastrad }ATOM_PPLIB_UVD_Clock_Voltage_Limit_Table;
    595  1.1  riastrad 
    596  1.1  riastrad typedef struct _ATOM_PPLIB_UVD_Table
    597  1.1  riastrad {
    598  1.1  riastrad       UCHAR revid;
    599  1.1  riastrad //    UVDClockInfoArray array;
    600  1.1  riastrad //    ATOM_PPLIB_UVD_Clock_Voltage_Limit_Table limits;
    601  1.1  riastrad }ATOM_PPLIB_UVD_Table;
    602  1.1  riastrad 
    603  1.1  riastrad typedef struct _ATOM_PPLIB_SAMClk_Voltage_Limit_Record
    604  1.1  riastrad {
    605  1.1  riastrad       USHORT usVoltage;
    606  1.1  riastrad       USHORT usSAMClockLow;
    607  1.1  riastrad       UCHAR  ucSAMClockHigh;
    608  1.1  riastrad }ATOM_PPLIB_SAMClk_Voltage_Limit_Record;
    609  1.1  riastrad 
    610  1.1  riastrad typedef struct _ATOM_PPLIB_SAMClk_Voltage_Limit_Table{
    611  1.1  riastrad     UCHAR numEntries;
    612  1.1  riastrad     ATOM_PPLIB_SAMClk_Voltage_Limit_Record entries[1];
    613  1.1  riastrad }ATOM_PPLIB_SAMClk_Voltage_Limit_Table;
    614  1.1  riastrad 
    615  1.1  riastrad typedef struct _ATOM_PPLIB_SAMU_Table
    616  1.1  riastrad {
    617  1.1  riastrad       UCHAR revid;
    618  1.1  riastrad       ATOM_PPLIB_SAMClk_Voltage_Limit_Table limits;
    619  1.1  riastrad }ATOM_PPLIB_SAMU_Table;
    620  1.1  riastrad 
    621  1.1  riastrad typedef struct _ATOM_PPLIB_ACPClk_Voltage_Limit_Record
    622  1.1  riastrad {
    623  1.1  riastrad       USHORT usVoltage;
    624  1.1  riastrad       USHORT usACPClockLow;
    625  1.1  riastrad       UCHAR  ucACPClockHigh;
    626  1.1  riastrad }ATOM_PPLIB_ACPClk_Voltage_Limit_Record;
    627  1.1  riastrad 
    628  1.1  riastrad typedef struct _ATOM_PPLIB_ACPClk_Voltage_Limit_Table{
    629  1.1  riastrad     UCHAR numEntries;
    630  1.1  riastrad     ATOM_PPLIB_ACPClk_Voltage_Limit_Record entries[1];
    631  1.1  riastrad }ATOM_PPLIB_ACPClk_Voltage_Limit_Table;
    632  1.1  riastrad 
    633  1.1  riastrad typedef struct _ATOM_PPLIB_ACP_Table
    634  1.1  riastrad {
    635  1.1  riastrad       UCHAR revid;
    636  1.1  riastrad       ATOM_PPLIB_ACPClk_Voltage_Limit_Table limits;
    637  1.1  riastrad }ATOM_PPLIB_ACP_Table;
    638  1.1  riastrad 
    639  1.1  riastrad typedef struct _ATOM_PowerTune_Table{
    640  1.1  riastrad     USHORT usTDP;
    641  1.1  riastrad     USHORT usConfigurableTDP;
    642  1.1  riastrad     USHORT usTDC;
    643  1.1  riastrad     USHORT usBatteryPowerLimit;
    644  1.1  riastrad     USHORT usSmallPowerLimit;
    645  1.1  riastrad     USHORT usLowCACLeakage;
    646  1.1  riastrad     USHORT usHighCACLeakage;
    647  1.1  riastrad }ATOM_PowerTune_Table;
    648  1.1  riastrad 
    649  1.1  riastrad typedef struct _ATOM_PPLIB_POWERTUNE_Table
    650  1.1  riastrad {
    651  1.1  riastrad       UCHAR revid;
    652  1.1  riastrad       ATOM_PowerTune_Table power_tune_table;
    653  1.1  riastrad }ATOM_PPLIB_POWERTUNE_Table;
    654  1.1  riastrad 
    655  1.1  riastrad typedef struct _ATOM_PPLIB_POWERTUNE_Table_V1
    656  1.1  riastrad {
    657  1.1  riastrad       UCHAR revid;
    658  1.1  riastrad       ATOM_PowerTune_Table power_tune_table;
    659  1.1  riastrad       USHORT usMaximumPowerDeliveryLimit;
    660  1.1  riastrad       USHORT usReserve[7];
    661  1.1  riastrad } ATOM_PPLIB_POWERTUNE_Table_V1;
    662  1.1  riastrad 
    663  1.1  riastrad #define ATOM_PPM_A_A    1
    664  1.1  riastrad #define ATOM_PPM_A_I    2
    665  1.1  riastrad typedef struct _ATOM_PPLIB_PPM_Table
    666  1.1  riastrad {
    667  1.1  riastrad       UCHAR  ucRevId;
    668  1.1  riastrad       UCHAR  ucPpmDesign;          //A+I or A+A
    669  1.1  riastrad       USHORT usCpuCoreNumber;
    670  1.1  riastrad       ULONG  ulPlatformTDP;
    671  1.1  riastrad       ULONG  ulSmallACPlatformTDP;
    672  1.1  riastrad       ULONG  ulPlatformTDC;
    673  1.1  riastrad       ULONG  ulSmallACPlatformTDC;
    674  1.1  riastrad       ULONG  ulApuTDP;
    675  1.1  riastrad       ULONG  ulDGpuTDP;
    676  1.1  riastrad       ULONG  ulDGpuUlvPower;
    677  1.1  riastrad       ULONG  ulTjmax;
    678  1.1  riastrad } ATOM_PPLIB_PPM_Table;
    679  1.1  riastrad 
    680  1.1  riastrad #pragma pack()
    681  1.1  riastrad 
    682  1.1  riastrad #endif
    683