@@ -80,6 +80,7 @@ int intel_gsc_fw_get_binary_info(struct intel_uc_fw *gsc_fw, const void *data, s
8080 const struct intel_gsc_cpd_header_v2 *cpd_header = NULL;
8181 const struct intel_gsc_cpd_entry *cpd_entry = NULL;
8282 const struct intel_gsc_manifest_header *manifest;
83+ struct intel_uc_fw_ver min_ver = { 0 };
8384 size_t min_size = sizeof(*layout);
8485 int i;
8586
@@ -212,33 +213,46 @@ int intel_gsc_fw_get_binary_info(struct intel_uc_fw *gsc_fw, const void *data, s
212213 }
213214 }
214215
215- if (IS_ARROWLAKE(gt->i915)) {
216+ /*
217+ * ARL SKUs require newer firmwares, but the blob is actually common
218+ * across all MTL and ARL SKUs, so we need to do an explicit version check
219+ * here rather than using a separate table entry. If a too old version
220+ * is found, then just don't use GSC rather than aborting the driver load.
221+ * Note that the major number in the GSC FW version is used to indicate
222+ * the platform, so we expect it to always be 102 for MTL/ARL binaries.
223+ */
224+ if (IS_ARROWLAKE_S(gt->i915))
225+ min_ver = (struct intel_uc_fw_ver){ 102, 0, 10, 1878 };
226+ else if (IS_ARROWLAKE_H(gt->i915) || IS_ARROWLAKE_U(gt->i915))
227+ min_ver = (struct intel_uc_fw_ver){ 102, 1, 15, 1926 };
228+
229+ if (IS_METEORLAKE(gt->i915) && gsc->release.major != 102) {
230+ gt_info(gt, "Invalid GSC firmware for MTL/ARL, got %d.%d.%d.%d but need 102.x.x.x",
231+ gsc->release.major, gsc->release.minor,
232+ gsc->release.patch, gsc->release.build);
233+ return -EINVAL;
234+ }
235+
236+ if (min_ver.major) {
216237 bool too_old = false;
217238
218- /*
219- * ARL requires a newer firmware than MTL did (102.0.10.1878) but the
220- * firmware is actually common. So, need to do an explicit version check
221- * here rather than using a separate table entry. And if the older
222- * MTL-only version is found, then just don't use GSC rather than aborting
223- * the driver load.
224- */
225- if (gsc->release.major < 102) {
239+ if (gsc->release.minor < min_ver.minor) {
226240 too_old = true;
227- } else if (gsc->release.major == 102) {
228- if (gsc->release.minor == 0) {
229- if (gsc->release.patch < 10) {
241+ } else if (gsc->release.minor == min_ver.minor) {
242+ if (gsc->release.patch < min_ver.patch) {
243+ too_old = true;
244+ } else if (gsc->release.patch == min_ver.patch) {
245+ if (gsc->release.build < min_ver.build)
230246 too_old = true;
231- } else if (gsc->release.patch == 10) {
232- if (gsc->release.build < 1878)
233- too_old = true;
234- }
235247 }
236248 }
237249
238250 if (too_old) {
239- gt_info(gt, "GSC firmware too old for ARL, got %d.%d.%d.%d but need at least 102.0.10.1878 ",
251+ gt_info(gt, "GSC firmware too old for ARL, got %d.%d.%d.%d but need at least %d.%d.%d.%d ",
240252 gsc->release.major, gsc->release.minor,
241- gsc->release.patch, gsc->release.build);
253+ gsc->release.patch, gsc->release.build,
254+ min_ver.major, min_ver.minor,
255+ min_ver.patch, min_ver.build);
242256 return -EINVAL;
243257 }
244258 }
0 commit comments