Lines Matching refs:pFwupgCtx

53 int HpmfwupgValidateImageIntegrity(struct HpmfwupgUpgradeCtx *pFwupgCtx);
55 struct HpmfwupgUpgradeCtx *pFwupgCtx, int option);
57 struct HpmfwupgUpgradeCtx *pFwupgCtx, int option);
59 struct HpmfwupgUpgradeCtx *pFwupgCtx);
66 struct HpmfwupgUpgradeCtx *pFwupgCtx);
69 struct HpmfwupgUpgradeCtx *pFwupgCtx);
74 struct HpmfwupgUpgradeCtx *pFwupgCtx);
77 struct HpmfwupgUpgradeCtx *pFwupgCtx, int count,
81 struct HpmfwupgUpgradeCtx *pFwupgCtx, int option);
84 struct HpmfwupgUpgradeCtx *pFwupgCtx);
87 struct HpmfwupgUpgradeCtx *pFwupgCtx, int silent);
96 struct HpmfwupgUpgradeCtx *pFwupgCtx);
98 struct HpmfwupgUpgradeCtx *pFwupgCtx);
100 struct ipmi_rq req, struct HpmfwupgUpgradeCtx* pFwupgCtx);
104 struct HpmfwupgUpgradeCtx* pFwupgCtx,
561 HpmfwupgValidateImageIntegrity(struct HpmfwupgUpgradeCtx *pFwupgCtx) in HpmfwupgValidateImageIntegrity() argument
563 struct HpmfwupgImageHeader *pImageHeader = (struct HpmfwupgImageHeader*)pFwupgCtx->pImageData; in HpmfwupgValidateImageIntegrity()
566 unsigned char *pMd5Sig = pFwupgCtx->pImageData in HpmfwupgValidateImageIntegrity()
567 + (pFwupgCtx->imageSize - HPMFWUPG_MD5_SIGNATURE_LENGTH); in HpmfwupgValidateImageIntegrity()
572 md5_append(&ctx, pFwupgCtx->pImageData, in HpmfwupgValidateImageIntegrity()
573 pFwupgCtx->imageSize - HPMFWUPG_MD5_SIGNATURE_LENGTH); in HpmfwupgValidateImageIntegrity()
608 struct HpmfwupgUpgradeCtx *pFwupgCtx, int option) in HpmfwupgPreparationStage() argument
614 pFwupgCtx->pImageData; in HpmfwupgPreparationStage()
616 rc = HpmfwupgGetDeviceId(intf, &pFwupgCtx->devId); in HpmfwupgPreparationStage()
622 if (pImageHeader->deviceId == pFwupgCtx->devId.device_id) { in HpmfwupgPreparationStage()
625 pFwupgCtx->devId.product_id, in HpmfwupgPreparationStage()
629 pFwupgCtx->devId.manufacturer_id, in HpmfwupgPreparationStage()
633 buf2short(pFwupgCtx->devId.manufacturer_id)); in HpmfwupgPreparationStage()
639 buf2short(pFwupgCtx->devId.product_id)); in HpmfwupgPreparationStage()
644 pFwupgCtx->devId.device_id); in HpmfwupgPreparationStage()
666 printf("\n Device Id : 0x%x", pFwupgCtx->devId.device_id); in HpmfwupgPreparationStage()
668 pFwupgCtx->devId.product_id[1], pFwupgCtx->devId.product_id[0]); in HpmfwupgPreparationStage()
670 pFwupgCtx->devId.manufacturer_id[2], in HpmfwupgPreparationStage()
671 pFwupgCtx->devId.manufacturer_id[1], in HpmfwupgPreparationStage()
672 pFwupgCtx->devId.manufacturer_id[0]); in HpmfwupgPreparationStage()
681 if (pImageHeader->compRevision[0] > pFwupgCtx->devId.fw_rev1 in HpmfwupgPreparationStage()
682 || (pImageHeader->compRevision[0] == pFwupgCtx->devId.fw_rev1 in HpmfwupgPreparationStage()
683 && pImageHeader->compRevision[1] > pFwupgCtx->devId.fw_rev2)) { in HpmfwupgPreparationStage()
688 lprintf(LOG_NOTICE, " Version: Major: %d", pFwupgCtx->devId.fw_rev1); in HpmfwupgPreparationStage()
689 lprintf(LOG_NOTICE, " Minor: %x", pFwupgCtx->devId.fw_rev2); in HpmfwupgPreparationStage()
706 memcpy(&pFwupgCtx->targetCap, in HpmfwupgPreparationStage()
716 pFwupgCtx->targetCap.componentsPresent.ComponentBits.byte) != in HpmfwupgPreparationStage()
723 if (pFwupgCtx->targetCap.GlobalCapabilities.bitField.fwUpgUndesirable == 1) { in HpmfwupgPreparationStage()
731 && (pFwupgCtx->targetCap.GlobalCapabilities.bitField.servAffectDuringUpg == 1 in HpmfwupgPreparationStage()
745 memset(&pFwupgCtx->genCompProp[componentId], 0, in HpmfwupgPreparationStage()
755 memcpy(&pFwupgCtx->genCompProp[componentId], in HpmfwupgPreparationStage()
832 struct HpmfwupgUpgradeCtx *pFwupgCtx, in HpmfwupgPreUpgradeCheck() argument
839 pImageHeader = (struct HpmfwupgImageHeader*)pFwupgCtx->pImageData; in HpmfwupgPreUpgradeCheck()
841 pImagePtr = (unsigned char*)(pFwupgCtx->pImageData in HpmfwupgPreUpgradeCheck()
849 while (pImagePtr < (pFwupgCtx->pImageData + pFwupgCtx->imageSize in HpmfwupgPreUpgradeCheck()
859 && !pFwupgCtx->targetCap.componentsPresent.ComponentBits.byte) { in HpmfwupgPreUpgradeCheck()
875 && pFwupgCtx->genCompProp[componentId].GeneralCompProperties.bitfield.rollbackBackup == 0) { in HpmfwupgPreUpgradeCheck()
895 … && pFwupgCtx->genCompProp[componentId].GeneralCompProperties.bitfield.preparationSupport == 0) { in HpmfwupgPreUpgradeCheck()
956 pFwupgCtx->compUpdateMask.ComponentBits.byte|= 1 << componentId; in HpmfwupgPreUpgradeCheck()
992 struct HpmfwupgUpgradeCtx *pFwupgCtx, int option) in HpmfwupgUpgradeStage() argument
995 pFwupgCtx->pImageData; in HpmfwupgUpgradeStage()
1003 (pFwupgCtx->pImageData + sizeof(struct HpmfwupgImageHeader) + in HpmfwupgUpgradeStage()
1006 actionsSize = pFwupgCtx->imageSize - sizeof(struct HpmfwupgImageHeader); in HpmfwupgUpgradeStage()
1011 while (( pImagePtr < (pFwupgCtx->pImageData + pFwupgCtx->imageSize - in HpmfwupgUpgradeStage()
1029 pFwupgCtx->compUpdateMask.ComponentBits.byte & in HpmfwupgUpgradeStage()
1034 rc = HpmfwupgInitiateUpgradeAction(intf, &initUpgActionCmd, pFwupgCtx); in HpmfwupgUpgradeStage()
1047 pFwupgCtx->compUpdateMask.ComponentBits.byte & in HpmfwupgUpgradeStage()
1052 rc = HpmfwupgInitiateUpgradeAction(intf, &initUpgActionCmd, pFwupgCtx); in HpmfwupgUpgradeStage()
1061 pFwupgCtx, in HpmfwupgUpgradeStage()
1081 struct HpmfwupgUpgradeCtx *pFwupgCtx, in HpmFwupgActionUploadFirmware() argument
1120 pFwupgCtx->componentId = componentId; in HpmFwupgActionUploadFirmware()
1156 if ((1 << componentId) & pFwupgCtx->compUpdateMask.ComponentBits.byte) { in HpmFwupgActionUploadFirmware()
1181 rc = HpmfwupgInitiateUpgradeAction(intf, &initUpgActionCmd, pFwupgCtx); in HpmFwupgActionUploadFirmware()
1207 pFwupgCtx, count, &imageOffset,&blockLength); in HpmFwupgActionUploadFirmware()
1303 …&& !pFwupgCtx->genCompProp[pFwupgCtx->componentId].GeneralCompProperties.bitfield.comparisonSuppor… in HpmFwupgActionUploadFirmware()
1320 pFwupgCtx, option); in HpmFwupgActionUploadFirmware()
1332 struct HpmfwupgUpgradeCtx *pFwupgCtx) in HpmfwupgActivationStage() argument
1337 pFwupgCtx->pImageData; in HpmfwupgActivationStage()
1343 rc = HpmfwupgActivateFirmware(intf, &activateCmd, pFwupgCtx); in HpmfwupgActivationStage()
1346 if ((pFwupgCtx->targetCap.GlobalCapabilities.bitField.ipmcSelftestCap == 1) in HpmfwupgActivationStage()
1350 pFwupgCtx); in HpmfwupgActivationStage()
1374 if ((pFwupgCtx->targetCap.GlobalCapabilities.bitField.autRollback == 1) in HpmfwupgActivationStage()
1375 …&& (pFwupgCtx->genCompProp[pFwupgCtx->componentId].GeneralCompProperties.bitfield.rollbackBackup !… in HpmfwupgActivationStage()
1380 &rollCmd, pFwupgCtx); in HpmfwupgActivationStage()
1388 struct HpmfwupgUpgradeCtx *pFwupgCtx) in HpmfwupgGetBufferFromFile() argument
1400 pFwupgCtx->imageSize = ftell(pImageFile); in HpmfwupgGetBufferFromFile()
1401 pFwupgCtx->pImageData = malloc(sizeof(unsigned char)*pFwupgCtx->imageSize); in HpmfwupgGetBufferFromFile()
1402 if (pFwupgCtx->pImageData == NULL) { in HpmfwupgGetBufferFromFile()
1408 ret = fread(pFwupgCtx->pImageData, in HpmfwupgGetBufferFromFile()
1410 pFwupgCtx->imageSize, in HpmfwupgGetBufferFromFile()
1412 if (ret != pFwupgCtx->imageSize) { in HpmfwupgGetBufferFromFile()
1416 pFwupgCtx->imageSize); in HpmfwupgGetBufferFromFile()
1681 struct HpmfwupgUpgradeCtx *pFwupgCtx) in HpmfwupgInitiateUpgradeAction() argument
1692 rsp = HpmfwupgSendCmd(intf, req, pFwupgCtx); in HpmfwupgInitiateUpgradeAction()
1699 rc = HpmfwupgWaitLongDurationCmd(intf, pFwupgCtx); in HpmfwupgInitiateUpgradeAction()
1713 struct HpmfwupgUpgradeCtx *pFwupgCtx, int count, in HpmfwupgUploadFirmwareBlock() argument
1726 rsp = HpmfwupgSendCmd(intf, req, pFwupgCtx); in HpmfwupgUploadFirmwareBlock()
1762 rc = HpmfwupgWaitLongDurationCmd(intf, pFwupgCtx); in HpmfwupgUploadFirmwareBlock()
1792 struct HpmfwupgUpgradeCtx *pFwupgCtx, int option) in HpmfwupgFinishFirmwareUpload() argument
1803 rsp = HpmfwupgSendCmd(intf, req, pFwupgCtx); in HpmfwupgFinishFirmwareUpload()
1810 rc = HpmfwupgWaitLongDurationCmd(intf, pFwupgCtx); in HpmfwupgFinishFirmwareUpload()
1828 struct HpmfwupgUpgradeCtx *pFwupgCtx) in HpmfwupgActivateFirmware() argument
1840 rsp = HpmfwupgSendCmd(intf, req, pFwupgCtx); in HpmfwupgActivateFirmware()
1849 rc = HpmfwupgWaitLongDurationCmd(intf, pFwupgCtx); in HpmfwupgActivateFirmware()
1868 struct HpmfwupgUpgradeCtx *pFwupgCtx, in HpmfwupgGetUpgradeStatus() argument
1879 rsp = HpmfwupgSendCmd(intf, req, pFwupgCtx); in HpmfwupgGetUpgradeStatus()
1966 struct HpmfwupgUpgradeCtx *pFwupgCtx) in HpmfwupgQueryRollbackStatus() argument
1980 if (pFwupgCtx != NULL) { in HpmfwupgQueryRollbackStatus()
1982 if (pFwupgCtx->pImageData) { in HpmfwupgQueryRollbackStatus()
1983 pImageHeader = (struct HpmfwupgImageHeader*)pFwupgCtx->pImageData; in HpmfwupgQueryRollbackStatus()
1990 pFwupgCtx->targetCap.rollbackTimeout) * 5; in HpmfwupgQueryRollbackStatus()
2000 rsp = HpmfwupgSendCmd(intf, req, pFwupgCtx); in HpmfwupgQueryRollbackStatus()
2051 struct HpmfwupgUpgradeCtx *pFwupgCtx) in HpmfwupgQuerySelftestResult() argument
2060 if (pFwupgCtx != NULL) { in HpmfwupgQuerySelftestResult()
2063 pFwupgCtx->pImageData; in HpmfwupgQuerySelftestResult()
2065 pFwupgCtx->targetCap.selftestTimeout) * 5; in HpmfwupgQuerySelftestResult()
2080 rsp = HpmfwupgSendCmd(intf, req, pFwupgCtx); in HpmfwupgQuerySelftestResult()
2122 struct HpmfwupgUpgradeCtx *pFwupgCtx) in HpmfwupgSendCmd() argument
2130 if (pFwupgCtx != NULL) { in HpmfwupgSendCmd()
2131 inaccessTimeout = pFwupgCtx->targetCap.inaccessTimeout*5; in HpmfwupgSendCmd()
2132 upgradeTimeout = pFwupgCtx->targetCap.upgradeTimeout*5; in HpmfwupgSendCmd()
2260 struct HpmfwupgUpgradeCtx *pFwupgCtx) in HpmfwupgWaitLongDurationCmd() argument
2267 if (pFwupgCtx != NULL) { in HpmfwupgWaitLongDurationCmd()
2268 upgradeTimeout = (unsigned int)(pFwupgCtx->targetCap.upgradeTimeout*5); in HpmfwupgWaitLongDurationCmd()
2295 pFwupgCtx, 1); in HpmfwupgWaitLongDurationCmd()
2309 rc = HpmfwupgGetUpgradeStatus(intf, &upgStatusCmd, pFwupgCtx, 1); in HpmfwupgWaitLongDurationCmd()