linux/drivers/gpu/drm/radeon/radeon_ucode.h

/*
 * Copyright 2012 Advanced Micro Devices, Inc.
 *
 * Permission is hereby granted, free of charge, to any person obtaining a
 * copy of this software and associated documentation files (the "Software"),
 * to deal in the Software without restriction, including without limitation
 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
 * and/or sell copies of the Software, and to permit persons to whom the
 * Software is furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in
 * all copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
 * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
 * OTHER DEALINGS IN THE SOFTWARE.
 *
 */
#ifndef __RADEON_UCODE_H__
#define __RADEON_UCODE_H__

/* CP */
#define R600_PFP_UCODE_SIZE
#define R600_PM4_UCODE_SIZE
#define R700_PFP_UCODE_SIZE
#define R700_PM4_UCODE_SIZE
#define EVERGREEN_PFP_UCODE_SIZE
#define EVERGREEN_PM4_UCODE_SIZE
#define CAYMAN_PFP_UCODE_SIZE
#define CAYMAN_PM4_UCODE_SIZE
#define SI_PFP_UCODE_SIZE
#define SI_PM4_UCODE_SIZE
#define SI_CE_UCODE_SIZE
#define CIK_PFP_UCODE_SIZE
#define CIK_ME_UCODE_SIZE
#define CIK_CE_UCODE_SIZE

/* MEC */
#define CIK_MEC_UCODE_SIZE

/* RLC */
#define R600_RLC_UCODE_SIZE
#define R700_RLC_UCODE_SIZE
#define EVERGREEN_RLC_UCODE_SIZE
#define CAYMAN_RLC_UCODE_SIZE
#define ARUBA_RLC_UCODE_SIZE
#define SI_RLC_UCODE_SIZE
#define BONAIRE_RLC_UCODE_SIZE
#define KB_RLC_UCODE_SIZE
#define KV_RLC_UCODE_SIZE
#define ML_RLC_UCODE_SIZE

/* MC */
#define BTC_MC_UCODE_SIZE
#define CAYMAN_MC_UCODE_SIZE
#define SI_MC_UCODE_SIZE
#define TAHITI_MC_UCODE_SIZE
#define PITCAIRN_MC_UCODE_SIZE
#define VERDE_MC_UCODE_SIZE
#define OLAND_MC_UCODE_SIZE
#define BONAIRE_MC_UCODE_SIZE
#define BONAIRE_MC2_UCODE_SIZE
#define HAWAII_MC_UCODE_SIZE
#define HAWAII_MC2_UCODE_SIZE

/* SDMA */
#define CIK_SDMA_UCODE_SIZE
#define CIK_SDMA_UCODE_VERSION

/* SMC */
#define RV770_SMC_UCODE_START
#define RV770_SMC_UCODE_SIZE
#define RV770_SMC_INT_VECTOR_START
#define RV770_SMC_INT_VECTOR_SIZE

#define RV730_SMC_UCODE_START
#define RV730_SMC_UCODE_SIZE
#define RV730_SMC_INT_VECTOR_START
#define RV730_SMC_INT_VECTOR_SIZE

#define RV710_SMC_UCODE_START
#define RV710_SMC_UCODE_SIZE
#define RV710_SMC_INT_VECTOR_START
#define RV710_SMC_INT_VECTOR_SIZE

#define RV740_SMC_UCODE_START
#define RV740_SMC_UCODE_SIZE
#define RV740_SMC_INT_VECTOR_START
#define RV740_SMC_INT_VECTOR_SIZE

#define CEDAR_SMC_UCODE_START
#define CEDAR_SMC_UCODE_SIZE
#define CEDAR_SMC_INT_VECTOR_START
#define CEDAR_SMC_INT_VECTOR_SIZE

#define REDWOOD_SMC_UCODE_START
#define REDWOOD_SMC_UCODE_SIZE
#define REDWOOD_SMC_INT_VECTOR_START
#define REDWOOD_SMC_INT_VECTOR_SIZE

#define JUNIPER_SMC_UCODE_START
#define JUNIPER_SMC_UCODE_SIZE
#define JUNIPER_SMC_INT_VECTOR_START
#define JUNIPER_SMC_INT_VECTOR_SIZE

#define CYPRESS_SMC_UCODE_START
#define CYPRESS_SMC_UCODE_SIZE
#define CYPRESS_SMC_INT_VECTOR_START
#define CYPRESS_SMC_INT_VECTOR_SIZE

#define BARTS_SMC_UCODE_START
#define BARTS_SMC_UCODE_SIZE
#define BARTS_SMC_INT_VECTOR_START
#define BARTS_SMC_INT_VECTOR_SIZE

#define TURKS_SMC_UCODE_START
#define TURKS_SMC_UCODE_SIZE
#define TURKS_SMC_INT_VECTOR_START
#define TURKS_SMC_INT_VECTOR_SIZE

#define CAICOS_SMC_UCODE_START
#define CAICOS_SMC_UCODE_SIZE
#define CAICOS_SMC_INT_VECTOR_START
#define CAICOS_SMC_INT_VECTOR_SIZE

#define CAYMAN_SMC_UCODE_START
#define CAYMAN_SMC_UCODE_SIZE
#define CAYMAN_SMC_INT_VECTOR_START
#define CAYMAN_SMC_INT_VECTOR_SIZE

#define TAHITI_SMC_UCODE_START
#define TAHITI_SMC_UCODE_SIZE

#define PITCAIRN_SMC_UCODE_START
#define PITCAIRN_SMC_UCODE_SIZE

#define VERDE_SMC_UCODE_START
#define VERDE_SMC_UCODE_SIZE

#define OLAND_SMC_UCODE_START
#define OLAND_SMC_UCODE_SIZE

#define HAINAN_SMC_UCODE_START
#define HAINAN_SMC_UCODE_SIZE

#define BONAIRE_SMC_UCODE_START
#define BONAIRE_SMC_UCODE_SIZE

#define HAWAII_SMC_UCODE_START
#define HAWAII_SMC_UCODE_SIZE

struct common_firmware_header {};

/* version_major=1, version_minor=0 */
struct mc_firmware_header_v1_0 {};

/* version_major=1, version_minor=0 */
struct smc_firmware_header_v1_0 {};

/* version_major=1, version_minor=0 */
struct gfx_firmware_header_v1_0 {};

/* version_major=1, version_minor=0 */
struct rlc_firmware_header_v1_0 {};

/* version_major=1, version_minor=0 */
struct sdma_firmware_header_v1_0 {};

/* header is fixed size */
radeon_firmware_header;

void radeon_ucode_print_mc_hdr(const struct common_firmware_header *hdr);
void radeon_ucode_print_smc_hdr(const struct common_firmware_header *hdr);
void radeon_ucode_print_gfx_hdr(const struct common_firmware_header *hdr);
void radeon_ucode_print_rlc_hdr(const struct common_firmware_header *hdr);
void radeon_ucode_print_sdma_hdr(const struct common_firmware_header *hdr);
int radeon_ucode_validate(const struct firmware *fw);

#endif