#ifndef __AMDGPU_UCODE_H__
#define __AMDGPU_UCODE_H__
#include "amdgpu_socbb.h"
struct common_firmware_header { … };
struct mc_firmware_header_v1_0 { … };
struct smc_firmware_header_v1_0 { … };
struct smc_firmware_header_v2_0 { … };
struct smc_soft_pptable_entry { … };
struct smc_firmware_header_v2_1 { … };
struct psp_fw_legacy_bin_desc { … };
struct psp_firmware_header_v1_0 { … };
struct psp_firmware_header_v1_1 { … };
struct psp_firmware_header_v1_2 { … };
struct psp_firmware_header_v1_3 { … };
struct psp_fw_bin_desc { … };
enum psp_fw_type { … };
struct psp_firmware_header_v2_0 { … };
struct ta_firmware_header_v1_0 { … };
enum ta_fw_type { … };
struct ta_firmware_header_v2_0 { … };
struct gfx_firmware_header_v1_0 { … };
struct gfx_firmware_header_v2_0 { … };
struct mes_firmware_header_v1_0 { … };
struct rlc_firmware_header_v1_0 { … };
struct rlc_firmware_header_v2_0 { … };
struct rlc_firmware_header_v2_1 { … };
struct rlc_firmware_header_v2_2 { … };
struct rlc_firmware_header_v2_3 { … };
struct rlc_firmware_header_v2_4 { … };
struct sdma_firmware_header_v1_0 { … };
struct sdma_firmware_header_v1_1 { … };
struct sdma_firmware_header_v2_0 { … };
struct vpe_firmware_header_v1_0 { … };
struct umsch_mm_firmware_header_v1_0 { … };
struct sdma_firmware_header_v3_0 { … };
struct gpu_info_firmware_v1_0 { … };
struct gpu_info_firmware_v1_1 { … };
struct gpu_info_firmware_v1_2 { … };
struct gpu_info_firmware_header_v1_0 { … };
struct dmcu_firmware_header_v1_0 { … };
struct dmcub_firmware_header_v1_0 { … };
struct imu_firmware_header_v1_0 { … };
amdgpu_firmware_header;
#define UCODE_MAX_PSP_PACKAGING …
enum AMDGPU_UCODE_ID { … };
enum AMDGPU_UCODE_STATUS { … };
enum amdgpu_firmware_load_type { … };
#define AMDGPU_SDMA0_UCODE_LOADED …
#define AMDGPU_SDMA1_UCODE_LOADED …
#define AMDGPU_CPCE_UCODE_LOADED …
#define AMDGPU_CPPFP_UCODE_LOADED …
#define AMDGPU_CPME_UCODE_LOADED …
#define AMDGPU_CPMEC1_UCODE_LOADED …
#define AMDGPU_CPMEC2_UCODE_LOADED …
#define AMDGPU_CPRLC_UCODE_LOADED …
struct amdgpu_firmware_info { … };
struct amdgpu_firmware { … };
void amdgpu_ucode_print_mc_hdr(const struct common_firmware_header *hdr);
void amdgpu_ucode_print_smc_hdr(const struct common_firmware_header *hdr);
void amdgpu_ucode_print_imu_hdr(const struct common_firmware_header *hdr);
void amdgpu_ucode_print_gfx_hdr(const struct common_firmware_header *hdr);
void amdgpu_ucode_print_rlc_hdr(const struct common_firmware_header *hdr);
void amdgpu_ucode_print_sdma_hdr(const struct common_firmware_header *hdr);
void amdgpu_ucode_print_psp_hdr(const struct common_firmware_header *hdr);
void amdgpu_ucode_print_gpu_info_hdr(const struct common_firmware_header *hdr);
__printf(3, 4)
int amdgpu_ucode_request(struct amdgpu_device *adev, const struct firmware **fw,
const char *fmt, ...);
void amdgpu_ucode_release(const struct firmware **fw);
bool amdgpu_ucode_hdr_version(union amdgpu_firmware_header *hdr,
uint16_t hdr_major, uint16_t hdr_minor);
int amdgpu_ucode_init_bo(struct amdgpu_device *adev);
int amdgpu_ucode_create_bo(struct amdgpu_device *adev);
int amdgpu_ucode_sysfs_init(struct amdgpu_device *adev);
void amdgpu_ucode_free_bo(struct amdgpu_device *adev);
void amdgpu_ucode_sysfs_fini(struct amdgpu_device *adev);
enum amdgpu_firmware_load_type
amdgpu_ucode_get_load_type(struct amdgpu_device *adev, int load_type);
const char *amdgpu_ucode_name(enum AMDGPU_UCODE_ID ucode_id);
void amdgpu_ucode_ip_version_decode(struct amdgpu_device *adev, int block_type, char *ucode_prefix, int len);
#endif