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