1*837d542aSEvan Quan /* 2*837d542aSEvan Quan * Copyright 2014 Advanced Micro Devices, Inc. 3*837d542aSEvan Quan * 4*837d542aSEvan Quan * Permission is hereby granted, free of charge, to any person obtaining a 5*837d542aSEvan Quan * copy of this software and associated documentation files (the "Software"), 6*837d542aSEvan Quan * to deal in the Software without restriction, including without limitation 7*837d542aSEvan Quan * the rights to use, copy, modify, merge, publish, distribute, sublicense, 8*837d542aSEvan Quan * and/or sell copies of the Software, and to permit persons to whom the 9*837d542aSEvan Quan * Software is furnished to do so, subject to the following conditions: 10*837d542aSEvan Quan * 11*837d542aSEvan Quan * The above copyright notice and this permission notice shall be included in 12*837d542aSEvan Quan * all copies or substantial portions of the Software. 13*837d542aSEvan Quan * 14*837d542aSEvan Quan * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15*837d542aSEvan Quan * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16*837d542aSEvan Quan * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 17*837d542aSEvan Quan * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR 18*837d542aSEvan Quan * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 19*837d542aSEvan Quan * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 20*837d542aSEvan Quan * OTHER DEALINGS IN THE SOFTWARE. 21*837d542aSEvan Quan * 22*837d542aSEvan Quan */ 23*837d542aSEvan Quan 24*837d542aSEvan Quan #ifndef SMU8_H 25*837d542aSEvan Quan #define SMU8_H 26*837d542aSEvan Quan 27*837d542aSEvan Quan #pragma pack(push, 1) 28*837d542aSEvan Quan 29*837d542aSEvan Quan #define ENABLE_DEBUG_FEATURES 30*837d542aSEvan Quan 31*837d542aSEvan Quan struct SMU8_Firmware_Header { 32*837d542aSEvan Quan uint32_t Version; 33*837d542aSEvan Quan uint32_t ImageSize; 34*837d542aSEvan Quan uint32_t CodeSize; 35*837d542aSEvan Quan uint32_t HeaderSize; 36*837d542aSEvan Quan uint32_t EntryPoint; 37*837d542aSEvan Quan uint32_t Rtos; 38*837d542aSEvan Quan uint32_t UcodeLoadStatus; 39*837d542aSEvan Quan uint32_t DpmTable; 40*837d542aSEvan Quan uint32_t FanTable; 41*837d542aSEvan Quan uint32_t PmFuseTable; 42*837d542aSEvan Quan uint32_t Globals; 43*837d542aSEvan Quan uint32_t Reserved[20]; 44*837d542aSEvan Quan uint32_t Signature; 45*837d542aSEvan Quan }; 46*837d542aSEvan Quan 47*837d542aSEvan Quan struct SMU8_MultimediaPowerLogData { 48*837d542aSEvan Quan uint32_t avgTotalPower; 49*837d542aSEvan Quan uint32_t avgGpuPower; 50*837d542aSEvan Quan uint32_t avgUvdPower; 51*837d542aSEvan Quan uint32_t avgVcePower; 52*837d542aSEvan Quan 53*837d542aSEvan Quan uint32_t avgSclk; 54*837d542aSEvan Quan uint32_t avgDclk; 55*837d542aSEvan Quan uint32_t avgVclk; 56*837d542aSEvan Quan uint32_t avgEclk; 57*837d542aSEvan Quan 58*837d542aSEvan Quan uint32_t startTimeHi; 59*837d542aSEvan Quan uint32_t startTimeLo; 60*837d542aSEvan Quan 61*837d542aSEvan Quan uint32_t endTimeHi; 62*837d542aSEvan Quan uint32_t endTimeLo; 63*837d542aSEvan Quan }; 64*837d542aSEvan Quan 65*837d542aSEvan Quan #define SMU8_FIRMWARE_HEADER_LOCATION 0x1FF80 66*837d542aSEvan Quan #define SMU8_UNBCSR_START_ADDR 0xC0100000 67*837d542aSEvan Quan 68*837d542aSEvan Quan #define SMN_MP1_SRAM_START_ADDR 0x10000000 69*837d542aSEvan Quan 70*837d542aSEvan Quan #pragma pack(pop) 71*837d542aSEvan Quan 72*837d542aSEvan Quan #endif 73