Subversion Repositories Kolibri OS

Rev

Rev 6084 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 6084 Rev 6937
Line 120... Line 120...
120
#define	  GUC_LOG_VERBOSITY_MAX		3
120
#define	  GUC_LOG_VERBOSITY_MAX		3
121
#define GUC_CTL_RSRVD			9
121
#define GUC_CTL_RSRVD			9
Line 122... Line 122...
122
 
122
 
Line -... Line 123...
-
 
123
#define GUC_CTL_MAX_DWORDS		(GUC_CTL_RSRVD + 1)
-
 
124
 
-
 
125
/**
-
 
126
 * DOC: GuC Firmware Layout
-
 
127
 *
-
 
128
 * The GuC firmware layout looks like this:
-
 
129
 *
-
 
130
 *     +-------------------------------+
-
 
131
 *     |        guc_css_header         |
-
 
132
 *     | contains major/minor version  |
-
 
133
 *     +-------------------------------+
-
 
134
 *     |             uCode             |
-
 
135
 *     +-------------------------------+
-
 
136
 *     |         RSA signature         |
-
 
137
 *     +-------------------------------+
-
 
138
 *     |          modulus key          |
-
 
139
 *     +-------------------------------+
-
 
140
 *     |          exponent val         |
-
 
141
 *     +-------------------------------+
-
 
142
 *
-
 
143
 * The firmware may or may not have modulus key and exponent data. The header,
-
 
144
 * uCode and RSA signature are must-have components that will be used by driver.
-
 
145
 * Length of each components, which is all in dwords, can be found in header.
-
 
146
 * In the case that modulus and exponent are not present in fw, a.k.a truncated
-
 
147
 * image, the length value still appears in header.
-
 
148
 *
-
 
149
 * Driver will do some basic fw size validation based on the following rules:
-
 
150
 *
-
 
151
 * 1. Header, uCode and RSA are must-have components.
-
 
152
 * 2. All firmware components, if they present, are in the sequence illustrated
-
 
153
 * in the layout table above.
-
 
154
 * 3. Length info of each component can be found in header, in dwords.
-
 
155
 * 4. Modulus and exponent key are not required by driver. They may not appear
-
 
156
 * in fw. So driver will load a truncated firmware in this case.
-
 
157
 */
-
 
158
 
-
 
159
struct guc_css_header {
-
 
160
	uint32_t module_type;
-
 
161
	/* header_size includes all non-uCode bits, including css_header, rsa
-
 
162
	 * key, modulus key and exponent data. */
-
 
163
	uint32_t header_size_dw;
-
 
164
	uint32_t header_version;
-
 
165
	uint32_t module_id;
-
 
166
	uint32_t module_vendor;
-
 
167
	union {
-
 
168
		struct {
-
 
169
			uint8_t day;
-
 
170
			uint8_t month;
-
 
171
			uint16_t year;
-
 
172
		};
-
 
173
		uint32_t date;
-
 
174
	};
-
 
175
	uint32_t size_dw; /* uCode plus header_size_dw */
-
 
176
	uint32_t key_size_dw;
-
 
177
	uint32_t modulus_size_dw;
-
 
178
	uint32_t exponent_size_dw;
-
 
179
	union {
-
 
180
		struct {
-
 
181
			uint8_t hour;
-
 
182
			uint8_t min;
-
 
183
			uint16_t sec;
-
 
184
		};
-
 
185
		uint32_t time;
-
 
186
	};
-
 
187
 
-
 
188
	char username[8];
-
 
189
	char buildnumber[12];
-
 
190
	uint32_t device_id;
-
 
191
	uint32_t guc_sw_version;
-
 
192
	uint32_t prod_preprod_fw;
-
 
193
	uint32_t reserved[12];
-
 
194
	uint32_t header_info;
123
#define GUC_CTL_MAX_DWORDS		(GUC_CTL_RSRVD + 1)
195
} __packed;
124
 
196
 
125
struct guc_doorbell_info {
197
struct guc_doorbell_info {
126
	u32 db_status;
198
	u32 db_status;
127
	u32 cookie;
199
	u32 cookie;