Lines Matching refs:fdet
211 static void dispose_one_firmware(struct firmware_details *fdet);
213 struct firmware_details *fdet);
408 struct firmware_details *fdet) in obtain_one_firmware() argument
413 memset(fdet, 0, sizeof(*fdet)); in obtain_one_firmware()
415 ret = request_firmware(&fdet->fw, name, &dd->pcidev->dev); in obtain_one_firmware()
423 if (fdet->fw->size < sizeof(struct css_header)) { in obtain_one_firmware()
428 css = (struct css_header *)fdet->fw->data; in obtain_one_firmware()
431 hfi1_cdbg(FIRMWARE, "file size: 0x%lx bytes", fdet->fw->size); in obtain_one_firmware()
449 fdet->fw->size - sizeof(struct firmware_file)); in obtain_one_firmware()
464 } else if ((css->size * 4) == fdet->fw->size) { in obtain_one_firmware()
467 fdet->fw->data; in obtain_one_firmware()
470 ret = payload_check(dd, name, fdet->fw->size, in obtain_one_firmware()
473 fdet->css_header = css; in obtain_one_firmware()
474 fdet->modulus = ff->modulus; in obtain_one_firmware()
475 fdet->exponent = ff->exponent; in obtain_one_firmware()
476 fdet->signature = ff->signature; in obtain_one_firmware()
477 fdet->r2 = fdet->dummy_header.r2; /* use dummy space */ in obtain_one_firmware()
478 fdet->mu = fdet->dummy_header.mu; /* use dummy space */ in obtain_one_firmware()
479 fdet->firmware_ptr = ff->firmware; in obtain_one_firmware()
480 fdet->firmware_len = fdet->fw->size - in obtain_one_firmware()
489 } else if ((css->size * 4) + AUGMENT_SIZE == fdet->fw->size) { in obtain_one_firmware()
492 (struct augmented_firmware_file *)fdet->fw->data; in obtain_one_firmware()
495 ret = payload_check(dd, name, fdet->fw->size, in obtain_one_firmware()
498 fdet->css_header = css; in obtain_one_firmware()
499 fdet->modulus = aff->modulus; in obtain_one_firmware()
500 fdet->exponent = aff->exponent; in obtain_one_firmware()
501 fdet->signature = aff->signature; in obtain_one_firmware()
502 fdet->r2 = aff->r2; in obtain_one_firmware()
503 fdet->mu = aff->mu; in obtain_one_firmware()
504 fdet->firmware_ptr = aff->firmware; in obtain_one_firmware()
505 fdet->firmware_len = fdet->fw->size - in obtain_one_firmware()
512 fdet->fw->size / 4, in obtain_one_firmware()
513 (fdet->fw->size - AUGMENT_SIZE) / 4, in obtain_one_firmware()
522 dispose_one_firmware(fdet); in obtain_one_firmware()
526 static void dispose_one_firmware(struct firmware_details *fdet) in dispose_one_firmware() argument
528 release_firmware(fdet->fw); in dispose_one_firmware()
530 memset(fdet, 0, sizeof(*fdet)); in dispose_one_firmware()
889 struct firmware_details *fdet) in load_security_variables() argument
892 write_rsa_data(dd, MISC_CFG_RSA_MODULUS, fdet->modulus, KEY_SIZE); in load_security_variables()
894 write_rsa_data(dd, MISC_CFG_RSA_R2, fdet->r2, KEY_SIZE); in load_security_variables()
896 write_rsa_data(dd, MISC_CFG_RSA_MU, fdet->mu, MU_SIZE); in load_security_variables()
899 (u8 *)fdet->css_header, in load_security_variables()
938 struct firmware_details *fdet) in load_8051_firmware() argument
973 load_security_variables(dd, fdet); in load_8051_firmware()
981 ret = write_8051(dd, 1/*code*/, 0, fdet->firmware_ptr, in load_8051_firmware()
982 fdet->firmware_len); in load_8051_firmware()
995 ret = run_rsa(dd, "8051", fdet->signature); in load_8051_firmware()
1216 struct firmware_details *fdet) in load_fabric_serdes_firmware() argument
1224 load_security_variables(dd, fdet); in load_fabric_serdes_firmware()
1234 for (i = 0; i < fdet->firmware_len; i += 4) { in load_fabric_serdes_firmware()
1236 *(u32 *)&fdet->firmware_ptr[i]); in load_fabric_serdes_firmware()
1244 err = run_rsa(dd, "fabric serdes", fdet->signature); in load_fabric_serdes_firmware()
1257 struct firmware_details *fdet) in load_sbus_firmware() argument
1265 load_security_variables(dd, fdet); in load_sbus_firmware()
1273 for (i = 0; i < fdet->firmware_len; i += 4) { in load_sbus_firmware()
1275 *(u32 *)&fdet->firmware_ptr[i]); in load_sbus_firmware()
1283 err = run_rsa(dd, "SBus", fdet->signature); in load_sbus_firmware()
1294 struct firmware_details *fdet) in load_pcie_serdes_firmware() argument
1302 load_security_variables(dd, fdet); in load_pcie_serdes_firmware()
1312 for (i = 0; i < fdet->firmware_len; i += 4) { in load_pcie_serdes_firmware()
1314 *(u32 *)&fdet->firmware_ptr[i]); in load_pcie_serdes_firmware()
1325 return run_rsa(dd, "PCIe serdes", fdet->signature); in load_pcie_serdes_firmware()