diff options
author | Mahantesh Kumbar <mkumbar@nvidia.com> | 2017-02-14 12:17:29 -0500 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2017-02-23 04:04:48 -0500 |
commit | 9c68af58a9d2542e33ced54bdabc35b18f589475 (patch) | |
tree | 321bb98244543612f88314d83ec60570f176a008 /drivers/gpu/nvgpu/include/nvgpu/acr/acr_flcnbl.h | |
parent | 8cdb91c527ce19ce67ddc0e231e8c93a552a93a4 (diff) |
gpu: nvgpu: ACR interface headers reorganization
-Moved ACR interface headers from acr_gm20b.h/acr_gp106.h to
Its specific header files under drivers/gpu/nvgpu/include/nvgpu/acr/
Folder.
- nvgpu_acr.h - Top-level header-file which include ACR interfaces
headers & defines required to communicate with ACR, including this
header file is good to get access into ACR interface & made changes
accordingly,
-Deleted acr.h & acr_t18x.h as not required anymore
& removed its include from dependent files.
Jira NVGPU-19
Change-Id: Ie404043cfe1ab32404eb63a43831f470d8436324
Signed-off-by: Mahantesh Kumbar <mkumbar@nvidia.com>
Reviewed-on: http://git-master/r/1304748
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/include/nvgpu/acr/acr_flcnbl.h')
-rw-r--r-- | drivers/gpu/nvgpu/include/nvgpu/acr/acr_flcnbl.h | 135 |
1 files changed, 135 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/include/nvgpu/acr/acr_flcnbl.h b/drivers/gpu/nvgpu/include/nvgpu/acr/acr_flcnbl.h new file mode 100644 index 00000000..00b72d3e --- /dev/null +++ b/drivers/gpu/nvgpu/include/nvgpu/acr/acr_flcnbl.h | |||
@@ -0,0 +1,135 @@ | |||
1 | /* | ||
2 | * Copyright (c) 2017, NVIDIA CORPORATION. All rights reserved. | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or modify it | ||
5 | * under the terms and conditions of the GNU General Public License, | ||
6 | * version 2, as published by the Free Software Foundation. | ||
7 | * | ||
8 | * This program is distributed in the hope it will be useful, but WITHOUT | ||
9 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
10 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | ||
11 | * more details. | ||
12 | */ | ||
13 | #ifndef __ACR_FLCNBL_H__ | ||
14 | #define __ACR_FLCNBL_H__ | ||
15 | |||
16 | #include <nvgpu/flcnif_cmn.h> | ||
17 | |||
18 | #ifndef __NVGPU_ACR_H__ | ||
19 | #warning "acr_flcnbl.h not included from nvgpu_acr.h!" \ | ||
20 | "Include nvgpu_acr.h instead of acr_xxx.h to get access to ACR interfaces" | ||
21 | #endif | ||
22 | |||
23 | /* | ||
24 | * Structure used by the boot-loader to load the rest of the code. This has | ||
25 | * to be filled by NVGPU and copied into DMEM at offset provided in the | ||
26 | * hsflcn_bl_desc.bl_desc_dmem_load_off. | ||
27 | */ | ||
28 | struct flcn_bl_dmem_desc { | ||
29 | u32 reserved[4]; /*Should be the first element..*/ | ||
30 | u32 signature[4]; /*Should be the first element..*/ | ||
31 | u32 ctx_dma; | ||
32 | u32 code_dma_base; | ||
33 | u32 non_sec_code_off; | ||
34 | u32 non_sec_code_size; | ||
35 | u32 sec_code_off; | ||
36 | u32 sec_code_size; | ||
37 | u32 code_entry_point; | ||
38 | u32 data_dma_base; | ||
39 | u32 data_size; | ||
40 | u32 code_dma_base1; | ||
41 | u32 data_dma_base1; | ||
42 | }; | ||
43 | |||
44 | struct flcn_bl_dmem_desc_v1 { | ||
45 | u32 reserved[4]; /*Should be the first element..*/ | ||
46 | u32 signature[4]; /*Should be the first element..*/ | ||
47 | u32 ctx_dma; | ||
48 | struct falc_u64 code_dma_base; | ||
49 | u32 non_sec_code_off; | ||
50 | u32 non_sec_code_size; | ||
51 | u32 sec_code_off; | ||
52 | u32 sec_code_size; | ||
53 | u32 code_entry_point; | ||
54 | struct falc_u64 data_dma_base; | ||
55 | u32 data_size; | ||
56 | u32 argc; | ||
57 | u32 argv; | ||
58 | }; | ||
59 | |||
60 | /* | ||
61 | * The header used by NVGPU to figure out code and data sections of bootloader | ||
62 | * | ||
63 | * bl_code_off - Offset of code section in the image | ||
64 | * bl_code_size - Size of code section in the image | ||
65 | * bl_data_off - Offset of data section in the image | ||
66 | * bl_data_size - Size of data section in the image | ||
67 | */ | ||
68 | struct flcn_bl_img_hdr { | ||
69 | u32 bl_code_off; | ||
70 | u32 bl_code_size; | ||
71 | u32 bl_data_off; | ||
72 | u32 bl_data_size; | ||
73 | }; | ||
74 | |||
75 | /* | ||
76 | * The descriptor used by NVGPU to figure out the requirements of bootloader | ||
77 | * | ||
78 | * bl_start_tag - Starting tag of bootloader | ||
79 | * bl_desc_dmem_load_off - Dmem offset where _def_rm_flcn_bl_dmem_desc | ||
80 | * to be loaded | ||
81 | * bl_img_hdr - Description of the image | ||
82 | */ | ||
83 | struct hsflcn_bl_desc { | ||
84 | u32 bl_start_tag; | ||
85 | u32 bl_desc_dmem_load_off; | ||
86 | struct flcn_bl_img_hdr bl_img_hdr; | ||
87 | }; | ||
88 | |||
89 | /* | ||
90 | * Legacy structure used by the current PMU/DPU bootloader. | ||
91 | */ | ||
92 | struct loader_config { | ||
93 | u32 dma_idx; | ||
94 | u32 code_dma_base; /* upper 32-bits of 40-bit dma address */ | ||
95 | u32 code_size_total; | ||
96 | u32 code_size_to_load; | ||
97 | u32 code_entry_point; | ||
98 | u32 data_dma_base; /* upper 32-bits of 40-bit dma address */ | ||
99 | u32 data_size; /* initialized data of the application */ | ||
100 | u32 overlay_dma_base; /* upper 32-bits of the 40-bit dma address */ | ||
101 | u32 argc; | ||
102 | u32 argv; | ||
103 | u16 code_dma_base1; /* upper 7 bits of 47-bit dma address */ | ||
104 | u16 data_dma_base1; /* upper 7 bits of 47-bit dma address */ | ||
105 | u16 overlay_dma_base1; /* upper 7 bits of the 47-bit dma address */ | ||
106 | }; | ||
107 | |||
108 | struct loader_config_v1 { | ||
109 | u32 reserved; | ||
110 | u32 dma_idx; | ||
111 | struct falc_u64 code_dma_base; | ||
112 | u32 code_size_total; | ||
113 | u32 code_size_to_load; | ||
114 | u32 code_entry_point; | ||
115 | struct falc_u64 data_dma_base; | ||
116 | u32 data_size; | ||
117 | struct falc_u64 overlay_dma_base; | ||
118 | u32 argc; | ||
119 | u32 argv; | ||
120 | }; | ||
121 | |||
122 | /* | ||
123 | * Union of all supported structures used by bootloaders. | ||
124 | */ | ||
125 | union flcn_bl_generic_desc { | ||
126 | struct flcn_bl_dmem_desc bl_dmem_desc; | ||
127 | struct loader_config loader_cfg; | ||
128 | }; | ||
129 | |||
130 | union flcn_bl_generic_desc_v1 { | ||
131 | struct flcn_bl_dmem_desc_v1 bl_dmem_desc_v1; | ||
132 | struct loader_config_v1 loader_cfg_v1; | ||
133 | }; | ||
134 | |||
135 | #endif /* __ACR_FLCNBL_H__ */ | ||