1 /*
2  * Copyright 2021 Advanced Micro Devices, Inc.
3  *
4  * Permission is hereby granted, free of charge, to any person obtaining a
5  * copy of this software and associated documentation files (the "Software"),
6  * to deal in the Software without restriction, including without limitation
7  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8  * and/or sell copies of the Software, and to permit persons to whom the
9  * Software is furnished to do so, subject to the following conditions:
10  *
11  * The above copyright notice and this permission notice shall be included in
12  * all copies or substantial portions of the Software.
13  *
14  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
17  * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
18  * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
19  * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
20  * OTHER DEALINGS IN THE SOFTWARE.
21  *
22  */
23 
24 #ifndef SMU_11_8_0_PPSMC_H
25 #define SMU_11_8_0_PPSMC_H
26 
27 // SMU Response Codes:
28 #define PPSMC_Result_OK                    0x1
29 #define PPSMC_Result_Failed                0xFF
30 #define PPSMC_Result_UnknownCmd            0xFE
31 #define PPSMC_Result_CmdRejectedPrereq     0xFD
32 #define PPSMC_Result_CmdRejectedBusy       0xFC
33 
34 // Message Definitions:
35 #define PPSMC_MSG_TestMessage                           0x1
36 #define PPSMC_MSG_GetSmuVersion                         0x2
37 #define PPSMC_MSG_GetDriverIfVersion                    0x3
38 #define PPSMC_MSG_SetDriverTableDramAddrHigh            0x4
39 #define PPSMC_MSG_SetDriverTableDramAddrLow             0x5
40 #define PPSMC_MSG_TransferTableSmu2Dram                 0x6
41 #define PPSMC_MSG_TransferTableDram2Smu                 0x7
42 #define PPSMC_MSG_Rsvd1                                 0xA
43 #define PPSMC_MSG_RequestCorePstate                     0xB
44 #define PPSMC_MSG_QueryCorePstate                       0xC
45 #define PPSMC_MSG_Rsvd2                                 0xD
46 #define PPSMC_MSG_RequestGfxclk                         0xE
47 #define PPSMC_MSG_QueryGfxclk                           0xF
48 #define PPSMC_MSG_QueryVddcrSocClock                    0x11
49 #define PPSMC_MSG_QueryDfPstate                         0x13
50 #define PPSMC_MSG_Rsvd3                                 0x14
51 #define PPSMC_MSG_ConfigureS3PwrOffRegisterAddressHigh  0x16
52 #define PPSMC_MSG_ConfigureS3PwrOffRegisterAddressLow   0x17
53 #define PPSMC_MSG_RequestActiveWgp                      0x18
54 #define PPSMC_MSG_SetMinDeepSleepGfxclkFreq             0x19
55 #define PPSMC_MSG_SetMaxDeepSleepDfllGfxDiv             0x1A
56 #define PPSMC_MSG_StartTelemetryReporting               0x1B
57 #define PPSMC_MSG_StopTelemetryReporting                0x1C
58 #define PPSMC_MSG_ClearTelemetryMax                     0x1D
59 #define PPSMC_MSG_QueryActiveWgp                        0x1E
60 #define PPSMC_MSG_SetCoreEnableMask                     0x2C
61 #define PPSMC_MSG_InitiateGcRsmuSoftReset               0x2E
62 #define PPSMC_MSG_GfxCacWeightOperation                 0x2F
63 #define PPSMC_MSG_L3CacWeightOperation                  0x30
64 #define PPSMC_MSG_PackCoreCacWeight                     0x31
65 #define PPSMC_MSG_SetDriverTableVMID                    0x34
66 #define PPSMC_MSG_SetSoftMinCclk                        0x35
67 #define PPSMC_MSG_SetSoftMaxCclk                        0x36
68 #define PPSMC_MSG_GetGfxFrequency                       0x37
69 #define PPSMC_MSG_GetGfxVid                             0x38
70 #define PPSMC_MSG_ForceGfxFreq                          0x39
71 #define PPSMC_MSG_UnForceGfxFreq                        0x3A
72 #define PPSMC_MSG_ForceGfxVid                           0x3B
73 #define PPSMC_MSG_UnforceGfxVid                         0x3C
74 #define PPSMC_MSG_GetEnabledSmuFeatures                 0x3D
75 #define PPSMC_Message_Count                             0x3E
76 
77 #endif
78