smu_ucode_xfer_vi.h 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. /*
  2. * Copyright 2014 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. #ifndef SMU_UCODE_XFER_VI_H
  24. #define SMU_UCODE_XFER_VI_H
  25. #define SMU_DRAMData_TOC_VERSION 1
  26. #define MAX_IH_REGISTER_COUNT 65535
  27. #define SMU_DIGEST_SIZE_BYTES 20
  28. #define SMU_FB_SIZE_BYTES 1048576
  29. #define SMU_MAX_ENTRIES 12
  30. #define UCODE_ID_SMU 0
  31. #define UCODE_ID_SDMA0 1
  32. #define UCODE_ID_SDMA1 2
  33. #define UCODE_ID_CP_CE 3
  34. #define UCODE_ID_CP_PFP 4
  35. #define UCODE_ID_CP_ME 5
  36. #define UCODE_ID_CP_MEC 6
  37. #define UCODE_ID_CP_MEC_JT1 7
  38. #define UCODE_ID_CP_MEC_JT2 8
  39. #define UCODE_ID_GMCON_RENG 9
  40. #define UCODE_ID_RLC_G 10
  41. #define UCODE_ID_IH_REG_RESTORE 11
  42. #define UCODE_ID_VBIOS 12
  43. #define UCODE_ID_MISC_METADATA 13
  44. #define UCODE_ID_RLC_SCRATCH 32
  45. #define UCODE_ID_RLC_SRM_ARAM 33
  46. #define UCODE_ID_RLC_SRM_DRAM 34
  47. #define UCODE_ID_MEC_STORAGE 35
  48. #define UCODE_ID_VBIOS_PARAMETERS 36
  49. #define UCODE_META_DATA 0xFF
  50. #define UCODE_ID_SMU_MASK 0x00000001
  51. #define UCODE_ID_SDMA0_MASK 0x00000002
  52. #define UCODE_ID_SDMA1_MASK 0x00000004
  53. #define UCODE_ID_CP_CE_MASK 0x00000008
  54. #define UCODE_ID_CP_PFP_MASK 0x00000010
  55. #define UCODE_ID_CP_ME_MASK 0x00000020
  56. #define UCODE_ID_CP_MEC_MASK 0x00000040
  57. #define UCODE_ID_CP_MEC_JT1_MASK 0x00000080
  58. #define UCODE_ID_CP_MEC_JT2_MASK 0x00000100
  59. #define UCODE_ID_GMCON_RENG_MASK 0x00000200
  60. #define UCODE_ID_RLC_G_MASK 0x00000400
  61. #define UCODE_ID_IH_REG_RESTORE_MASK 0x00000800
  62. #define UCODE_ID_VBIOS_MASK 0x00001000
  63. #define UCODE_FLAG_UNHALT_MASK 0x1
  64. struct SMU_Entry {
  65. #ifndef __BIG_ENDIAN
  66. uint16_t id;
  67. uint16_t version;
  68. uint32_t image_addr_high;
  69. uint32_t image_addr_low;
  70. uint32_t meta_data_addr_high;
  71. uint32_t meta_data_addr_low;
  72. uint32_t data_size_byte;
  73. uint16_t flags;
  74. uint16_t num_register_entries;
  75. #else
  76. uint16_t version;
  77. uint16_t id;
  78. uint32_t image_addr_high;
  79. uint32_t image_addr_low;
  80. uint32_t meta_data_addr_high;
  81. uint32_t meta_data_addr_low;
  82. uint32_t data_size_byte;
  83. uint16_t num_register_entries;
  84. uint16_t flags;
  85. #endif
  86. };
  87. struct SMU_DRAMData_TOC {
  88. uint32_t structure_version;
  89. uint32_t num_entries;
  90. struct SMU_Entry entry[SMU_MAX_ENTRIES];
  91. };
  92. #endif