cachepc-linux

Fork of AMDESE/linux with modifications for CachePC side-channel attack
git clone https://git.sinitax.com/sinitax/cachepc-linux
Log | Files | Refs | README | LICENSE | sfeed.txt

flcn.h (1927B)


      1/* SPDX-License-Identifier: MIT */
      2#ifndef __NVFW_FLCN_H__
      3#define __NVFW_FLCN_H__
      4#include <core/os.h>
      5struct nvkm_subdev;
      6
      7struct loader_config {
      8	u32 dma_idx;
      9	u32 code_dma_base;
     10	u32 code_size_total;
     11	u32 code_size_to_load;
     12	u32 code_entry_point;
     13	u32 data_dma_base;
     14	u32 data_size;
     15	u32 overlay_dma_base;
     16	u32 argc;
     17	u32 argv;
     18	u32 code_dma_base1;
     19	u32 data_dma_base1;
     20	u32 overlay_dma_base1;
     21};
     22
     23void
     24loader_config_dump(struct nvkm_subdev *, const struct loader_config *);
     25
     26struct loader_config_v1 {
     27	u32 reserved;
     28	u32 dma_idx;
     29	u64 code_dma_base;
     30	u32 code_size_total;
     31	u32 code_size_to_load;
     32	u32 code_entry_point;
     33	u64 data_dma_base;
     34	u32 data_size;
     35	u64 overlay_dma_base;
     36	u32 argc;
     37	u32 argv;
     38} __packed;
     39
     40void
     41loader_config_v1_dump(struct nvkm_subdev *, const struct loader_config_v1 *);
     42
     43struct flcn_bl_dmem_desc {
     44	u32 reserved[4];
     45	u32 signature[4];
     46	u32 ctx_dma;
     47	u32 code_dma_base;
     48	u32 non_sec_code_off;
     49	u32 non_sec_code_size;
     50	u32 sec_code_off;
     51	u32 sec_code_size;
     52	u32 code_entry_point;
     53	u32 data_dma_base;
     54	u32 data_size;
     55	u32 code_dma_base1;
     56	u32 data_dma_base1;
     57};
     58
     59void
     60flcn_bl_dmem_desc_dump(struct nvkm_subdev *, const struct flcn_bl_dmem_desc *);
     61
     62struct flcn_bl_dmem_desc_v1 {
     63	u32 reserved[4];
     64	u32 signature[4];
     65	u32 ctx_dma;
     66	u64 code_dma_base;
     67	u32 non_sec_code_off;
     68	u32 non_sec_code_size;
     69	u32 sec_code_off;
     70	u32 sec_code_size;
     71	u32 code_entry_point;
     72	u64 data_dma_base;
     73	u32 data_size;
     74} __packed;
     75
     76void flcn_bl_dmem_desc_v1_dump(struct nvkm_subdev *,
     77			       const struct flcn_bl_dmem_desc_v1 *);
     78
     79struct flcn_bl_dmem_desc_v2 {
     80	u32 reserved[4];
     81	u32 signature[4];
     82	u32 ctx_dma;
     83	u64 code_dma_base;
     84	u32 non_sec_code_off;
     85	u32 non_sec_code_size;
     86	u32 sec_code_off;
     87	u32 sec_code_size;
     88	u32 code_entry_point;
     89	u64 data_dma_base;
     90	u32 data_size;
     91	u32 argc;
     92	u32 argv;
     93} __packed;
     94
     95void flcn_bl_dmem_desc_v2_dump(struct nvkm_subdev *,
     96			       const struct flcn_bl_dmem_desc_v2 *);
     97#endif