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