drivers/accel/amdxdna/aie.h
Source file repositories/reference/linux-study-clean/drivers/accel/amdxdna/aie.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/accel/amdxdna/aie.h- Extension
.h- Size
- 3409 bytes
- Lines
- 121
- Domain
- Driver Families
- Bucket
- drivers/accel
- Inferred role
- Driver Families: implementation source
- Status
- source implementation candidate
Why This File Exists
Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
drm/amdxdna_accel.hamdxdna_pci_drv.hamdxdna_mailbox.h
Detected Declarations
struct psp_devicestruct smu_devicestruct aie_devicestruct aie_bar_off_pairstruct smu_configstruct psp_configstruct amdxdna_rev_vbnvenum smu_reg_idxenum psp_reg_idx
Annotated Snippet
struct aie_device {
struct amdxdna_dev *xdna;
struct mailbox_channel *mgmt_chann;
struct xdna_mailbox_chann_res mgmt_x2i;
struct xdna_mailbox_chann_res mgmt_i2x;
u32 mgmt_chan_idx;
u32 mgmt_prot_major;
u32 mgmt_prot_minor;
unsigned long feature_mask;
struct psp_device *psp_hdl;
struct smu_device *smu_hdl;
struct amdxdna_drm_query_aie_metadata metadata;
};
#define DECLARE_AIE_MSG(name, op) \
DECLARE_XDNA_MSG_COMMON(name, op, -1)
#define AIE_FEATURE_ON(aie, feature) test_bit(feature, &(aie)->feature_mask)
#define PSP_REG_BAR(ndev, idx) ((ndev)->priv->psp_regs_off[(idx)].bar_idx)
#define PSP_REG_OFF(ndev, idx) ((ndev)->priv->psp_regs_off[(idx)].offset)
#define SMU_REG_BAR(ndev, idx) ((ndev)->priv->smu_regs_off[(idx)].bar_idx)
#define SMU_REG_OFF(ndev, idx) ((ndev)->priv->smu_regs_off[(idx)].offset)
#define DEFINE_BAR_OFFSET(reg_name, bar, reg_addr) \
[reg_name] = {bar##_BAR_INDEX, (reg_addr) - bar##_BAR_BASE}
enum smu_reg_idx {
SMU_CMD_REG = 0,
SMU_ARG_REG,
SMU_INTR_REG,
SMU_RESP_REG,
SMU_OUT_REG,
SMU_MAX_REGS /* Keep this at the end */
};
enum psp_reg_idx {
PSP_CMD_REG = 0,
PSP_ARG0_REG,
PSP_ARG1_REG,
PSP_ARG2_REG,
PSP_NUM_IN_REGS, /* number of input registers */
PSP_INTR_REG = PSP_NUM_IN_REGS,
PSP_STATUS_REG,
PSP_RESP_REG,
PSP_PWAITMODE_REG,
PSP_MAX_REGS /* Keep this at the end */
};
struct aie_bar_off_pair {
int bar_idx;
u32 offset;
};
struct smu_config {
void __iomem *smu_regs[SMU_MAX_REGS];
};
struct psp_config {
const void *fw_buf;
u32 fw_size;
const void *certfw_buf;
u32 certfw_size;
void __iomem *psp_regs[PSP_MAX_REGS];
u32 arg2_mask;
u32 notify_val;
};
/* Device revision to VBNV string mapping table entry */
struct amdxdna_rev_vbnv {
u32 revision;
const char *vbnv;
};
/* aie.c */
void aie_dump_mgmt_chann_debug(struct aie_device *aie);
void aie_destroy_chann(struct aie_device *aie, struct mailbox_channel **chann);
int aie_send_mgmt_msg_wait(struct aie_device *aie, struct xdna_mailbox_msg *msg);
int aie_check_protocol(struct aie_device *aie, u32 fw_major, u32 fw_minor);
void amdxdna_vbnv_init(struct amdxdna_dev *xdna);
int amdxdna_get_metadata(struct aie_device *aie, struct amdxdna_client *client,
struct amdxdna_drm_get_info *args);
void *amdxdna_alloc_msg_buffer(struct amdxdna_dev *xdna, u32 *size,
dma_addr_t *dma_addr);
void amdxdna_free_msg_buffer(struct amdxdna_dev *xdna, size_t size,
void *cpu_addr, dma_addr_t dma_addr);
/* aie_psp.c */
Annotation
- Immediate include surface: `drm/amdxdna_accel.h`, `amdxdna_pci_drv.h`, `amdxdna_mailbox.h`.
- Detected declarations: `struct psp_device`, `struct smu_device`, `struct aie_device`, `struct aie_bar_off_pair`, `struct smu_config`, `struct psp_config`, `struct amdxdna_rev_vbnv`, `enum smu_reg_idx`, `enum psp_reg_idx`.
- Atlas domain: Driver Families / drivers/accel.
- Implementation status: source implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.