From f5a061769d06e41b20c44f2a19ee87b2119e443a Mon Sep 17 00:00:00 2001 From: Benjamin Drung Date: Wed, 12 Jan 2022 12:38:01 +0100 Subject: [PATCH 01/63] Use pkg-config for muparser and sqlite3 Let pkg-config determine the correct flags for the muparser and sqlite3 system libraries. Signed-off-by: Benjamin Drung --- configure.ac | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index e2515b44..949a454c 100644 --- a/configure.ac +++ b/configure.ac @@ -288,7 +288,7 @@ PKG_CHECK_MODULES([JSON], [jsoncpp], [JSON_SYSTEM_AVAILABLE="yes"],[ ]) AM_CONDITIONAL([USE_LOCAL_JSON], [test "$JSON_SYSTEM_AVAILABLE" = no]) -AC_SEARCH_LIBS([mupCreateVar], [muparser], [MUPARSER_SYSTEM_AVAILABLE="yes"],[ +PKG_CHECK_MODULES([MUPARSER], [muparser], [MUPARSER_SYSTEM_AVAILABLE="yes"],[ MUPARSER_SYSTEM_AVAILABLE="no" MUPARSER_CFLAGS='-I$(top_srcdir)/ext_libs/muparser' AC_SUBST(MUPARSER_CFLAGS) @@ -297,7 +297,7 @@ AC_SEARCH_LIBS([mupCreateVar], [muparser], [MUPARSER_SYSTEM_AVAILABLE="yes"],[ ]) AM_CONDITIONAL([USE_LOCAL_MUPARSER], [test "$MUPARSER_SYSTEM_AVAILABLE" = no]) -AC_SEARCH_LIBS([sqlite3_initialize], [sqlite3], [SQLITE_SYSTEM_AVAILABLE="yes"],[ +PKG_CHECK_MODULES([SQLITE], [sqlite3], [SQLITE_SYSTEM_AVAILABLE="yes"],[ SQLITE_SYSTEM_AVAILABLE="no" SQLITE_CFLAGS='-I$(top_srcdir)/ext_libs/sqlite' AC_SUBST(SQLITE_CFLAGS) From 21706b9a715ebd163a4f673ace19662c5e9cc351 Mon Sep 17 00:00:00 2001 From: Mustafa Dalloul Date: Sun, 14 Aug 2022 15:33:42 +0300 Subject: [PATCH 02/63] [mstlink] Minimizing access register functions Description: Code refactoring by minimizing access register functions Tested OS: Linux64 Tested flows: Sanity checks of mstlink commands Known gaps (with RM ticket): NA Issue: 2806625 Signed-off-by: Mustafa Dalloul --- mlxlink/modules/mlxlink_amBER_collector.cpp | 81 +- mlxlink/modules/mlxlink_amBER_collector.h | 4 +- mlxlink/modules/mlxlink_cables_commander.cpp | 182 +-- mlxlink/modules/mlxlink_cables_commander.h | 3 +- mlxlink/modules/mlxlink_commander.cpp | 1324 +++++------------ mlxlink/modules/mlxlink_commander.h | 16 +- mlxlink/modules/mlxlink_enums.h | 68 +- mlxlink/modules/mlxlink_err_inj_commander.cpp | 24 +- mlxlink/modules/mlxlink_err_inj_commander.h | 2 - mlxlink/modules/mlxlink_eye_opener.cpp | 119 +- mlxlink/modules/mlxlink_eye_opener.h | 14 +- mlxlink/modules/mlxlink_port_info.cpp | 42 +- mlxlink/modules/mlxlink_port_info.h | 8 - mlxlink/modules/mlxlink_reg_parser.cpp | 72 +- mlxlink/modules/mlxlink_reg_parser.h | 11 + mlxlink/modules/mlxlink_utils.cpp | 2 +- mlxlink/modules/mlxlink_utils.h | 2 +- 17 files changed, 683 insertions(+), 1291 deletions(-) diff --git a/mlxlink/modules/mlxlink_amBER_collector.cpp b/mlxlink/modules/mlxlink_amBER_collector.cpp index d4f1c03a..070a3dfc 100644 --- a/mlxlink/modules/mlxlink_amBER_collector.cpp +++ b/mlxlink/modules/mlxlink_amBER_collector.cpp @@ -80,14 +80,14 @@ MlxlinkAmBerCollector::MlxlinkAmBerCollector(Json::Value& jsonRoot) : _jsonRoot( _baseSheetsList[AMBER_SHEET_MODULE_STATUS] = FIELDS_COUNT{111, 111, 0}; _baseSheetsList[AMBER_SHEET_SYSTEM] = FIELDS_COUNT{16, 21, 11}; _baseSheetsList[AMBER_SHEET_SERDES_16NM] = FIELDS_COUNT{376, 736, 0}; - _baseSheetsList[AMBER_SHEET_SERDES_7NM] = FIELDS_COUNT{206, 326, 499}; + _baseSheetsList[AMBER_SHEET_SERDES_7NM] = FIELDS_COUNT{206, 374, 499}; _baseSheetsList[AMBER_SHEET_PORT_COUNTERS] = FIELDS_COUNT{35, 0, 35}; _baseSheetsList[AMBER_SHEET_TROUBLESHOOTING] = FIELDS_COUNT{2, 2, 0}; _baseSheetsList[AMBER_SHEET_PHY_OPERATION_INFO] = FIELDS_COUNT{18, 18, 15}; _baseSheetsList[AMBER_SHEET_LINK_UP_INFO] = FIELDS_COUNT{9, 9, 0}; _baseSheetsList[AMBER_SHEET_LINK_DOWN_INFO] = FIELDS_COUNT{5, 5, 0}; _baseSheetsList[AMBER_SHEET_TEST_MODE_INFO] = FIELDS_COUNT{68, 136, 0}; - _baseSheetsList[AMBER_SHEET_TEST_MODE_MODULE_INFO] = FIELDS_COUNT{58, 110, 0}; + _baseSheetsList[AMBER_SHEET_TEST_MODE_MODULE_INFO] = FIELDS_COUNT{70, 110, 0}; _baseSheetsList[AMBER_SHEET_PHY_DEBUG_INFO] = FIELDS_COUNT{4, 4, 0}; for_each(_baseSheetsList.begin(), _baseSheetsList.end(), [&](pair sheet) { @@ -158,8 +158,6 @@ u_int32_t MlxlinkAmBerCollector::getLocalFieldValue(const string& fieldName) void MlxlinkAmBerCollector::startCollector() { - MlxlinkRecord::printCmdLine("Collecting amBER and producing report to " + _csvFileName, _jsonRoot); - if (_localPorts.empty()) { _localPorts.push_back(PortGroup(_localPort, _localPort, 0, 0)); @@ -401,14 +399,16 @@ vector MlxlinkAmBerCollector::getIndexesInfo() AmberField::_dataValid = true; string labelPortStr = to_string(_labelPort); - if ((_splitPort && _splitPort != 1) || (_devID == DeviceQuantum2)) + if ((_splitPort && _splitPort != 1) || (_devID == DeviceQuantum2) || (_devID == DeviceQuantum3) || + (_devID == DeviceGB100)) { /* For Quantum-2, the split notation will stand for the port in the cage * For other, only add the split notation if it's not 1 */ labelPortStr += "/" + to_string(_splitPort); } - if ((_secondSplit && _secondSplit != 1) && _devID == DeviceQuantum2) + if ((_secondSplit && _secondSplit != 1) && + ((_devID == DeviceQuantum2) || (_devID == DeviceQuantum3) || (_devID == DeviceGB100))) { labelPortStr += "/" + to_string(_secondSplit); } @@ -427,7 +427,7 @@ vector MlxlinkAmBerCollector::getGeneralInfo() AmberField::_dataValid = true; fields.push_back(AmberField("amBer_Version", AMBER_VERSION)); - fields.push_back(AmberField("Time_Stamp", getCurrentTimeStamp())); + fields.push_back(AmberField("TimeStamp", getCurrentTimeStamp())); fields.push_back(AmberField("Iteration/Sweep", to_string(_iteration))); fields.push_back(AmberField("Test_Description", _testMode)); @@ -552,10 +552,14 @@ vector MlxlinkAmBerCollector::getPhyOperationInfo() string coreToPhyLinkEnabledStr = "N/A"; string cableProtoCapStr = "N/A"; - fields.push_back(AmberField("eth_an_fsm_state", _mlxlinkMaps->_ethANFsmState[getFieldValue("eth_an_fsm_" - "state")])); - fields.push_back(AmberField("ib_phy_fsm_state", _mlxlinkMaps->_ibPhyFsmState[getFieldValue("ib_phy_fsm_" - "state")])); + fields.push_back(AmberField("eth_an_fsm_state", + _mlxlinkMaps->_ethANFsmState[getFieldValue("eth_an_fsm_" + "state")], + !_isPortPCIE)); + fields.push_back(AmberField("ib_phy_fsm_state", + _mlxlinkMaps->_ibPhyFsmState[getFieldValue("ib_phy_fsm_" + "state")], + !_isPortPCIE)); if (_isPortIB) { phyManagerLinkEnabledStr = @@ -572,16 +576,16 @@ vector MlxlinkAmBerCollector::getPhyOperationInfo() getStrByMask(getFieldValue("core_to_phy_link_eth_enabled"), _mlxlinkMaps->_EthExtSpeed2Str); cableProtoCapStr = getStrByMask(getFieldValue("cable_ext_eth_proto_cap"), _mlxlinkMaps->_EthExtSpeed2Str); } - fields.push_back(AmberField("phy_manager_link_enabled", phyManagerLinkEnabledStr)); - fields.push_back(AmberField("core_to_phy_link_enabled", coreToPhyLinkEnabledStr)); - fields.push_back(AmberField("cable_proto_cap", cableProtoCapStr)); + fields.push_back(AmberField("phy_manager_link_enabled", phyManagerLinkEnabledStr, !_isPortPCIE)); + fields.push_back(AmberField("core_to_phy_link_enabled", coreToPhyLinkEnabledStr, !_isPortPCIE)); + fields.push_back(AmberField("cable_proto_cap", cableProtoCapStr, !_isPortPCIE)); u_int32_t phyMngrFsmState = getFieldValue("phy_mngr_fsm_state"); string loopbackMode = (phyMngrFsmState != PHY_MNGR_DISABLED) ? _mlxlinkMaps->_loopbackModeList[getFieldValue("loopback_mode")].second : "-1"; u_int32_t fecModeRequest = (u_int32_t)log2((float)getFieldValue("fec_mode_request")); - fields.push_back(AmberField("loopback_mode", loopbackMode)); - fields.push_back(AmberField("fec_mode_request ", _mlxlinkMaps->_fecModeActive[fecModeRequest])); + fields.push_back(AmberField("loopback_mode", loopbackMode, !_isPortPCIE)); + fields.push_back(AmberField("fec_mode_request ", _mlxlinkMaps->_fecModeActive[fecModeRequest], !_isPortPCIE)); if (_isPortPCIE) { @@ -658,7 +662,7 @@ void MlxlinkAmBerCollector::getPpcntBer(u_int32_t portType, vector& { string effErrorsStr = (portType == NETWORK_PORT_TYPE_NEAR || portType == NETWORK_PORT_TYPE_FAR) ? to_string(add32BitTo64(getFieldValue("phy_effective_errors_high"), - getFieldValue("phy_effective_errors__low"))) : + getFieldValue("phy_effective_errors_low"))) : "N/A"; fields.push_back(AmberField(preTitle + "Effective_Errors", effErrorsStr)); @@ -773,7 +777,7 @@ vector MlxlinkAmBerCollector::getLinkStatus() for (u_int32_t idx = 0; idx < NUM_OF_BINS; idx++) { val = "N/A"; - if (idx < numOfBins || skipBinLimit) + if (idx < numOfBins || (skipBinLimit || !numOfBins)) { histBin = add32BitTo64(getFieldValue("hist[" + to_string(idx) + "]_hi"), getFieldValue("hist[" + to_string(idx) + "]_lo")); @@ -1208,26 +1212,21 @@ string MlxlinkAmBerCollector::getCableBreakoutStr(u_int32_t cableBreakout, u_int return cableBreakoutStr; } -void MlxlinkAmBerCollector::calcRxTxPowerLane(vector& fields, string str) +void MlxlinkAmBerCollector::pushModulePerLaneField(vector& fields, string fieldName, float valueCorrection) { + float value = 0; for (u_int32_t lane = 0; lane < MAX_NETWORK_LANES; lane++) { - string laneStr = to_string(lane); - fields.push_back(AmberField(str + laneStr, to_string(getPower(getFieldValue(str + laneStr))))); - } -} - -void MlxlinkAmBerCollector::getTxBiasLane(vector& fields) -{ - for (u_int32_t lane = 0; lane < MAX_NETWORK_LANES; lane++) - { - string laneStr = to_string(lane); - fields.push_back( - AmberField("tx_bias_lane" + laneStr, to_string(getFieldValue("tx_bias_lane" + laneStr) / 500.0))); + value = getFieldValue(fieldName + to_string(lane)); + if (fieldName.find("power") != string::npos) + { + value = getPower(value); + } + fields.push_back(AmberField(fieldName + "_" + to_string(lane), to_string(value / valueCorrection))); } } -void MlxlinkAmBerCollector::loopAllLanesStr(vector& fields, const string str) +void MlxlinkAmBerCollector::pushModuleDpPerLane(vector& fields, const string str) { string dpStateStr = "N/A"; string fieldName = str; @@ -1361,7 +1360,7 @@ void MlxlinkAmBerCollector::getModuleInfoPage(vector& fields) getPowerClass(_mlxlinkMaps, cableIdentifier, getFieldValue("cable_power_class"), getFieldValue("max_power")))); fields.push_back(AmberField("max_power", getFieldStr("max_power"))); fields.push_back(AmberField("cable_rx_amp", passive ? "N/A" : getFieldStr("cable_rx_amp"))); - fields.push_back(AmberField("cable_rx_emphasis", passive ? "N/A" : getFieldStr("cable_rx_emphasis"))); + fields.push_back(AmberField("cable_rx_pre_emphasis", passive ? "N/A" : getFieldStr("cable_rx_emphasis"))); fields.push_back(AmberField("cable_rx_post_emphasis", passive ? "N/A" : getFieldStr("cable_rx_post_emphasis"))); fields.push_back(AmberField("cable_tx_equalization", passive ? "N/A" : getFieldStr("cable_tx_equalization"))); fields.push_back(AmberField("cable_attenuation_25g", getFieldStr("cable_attenuation_25g"))); @@ -1376,11 +1375,11 @@ void MlxlinkAmBerCollector::getModuleInfoPage(vector& fields) fields.push_back(AmberField("tx_cdr_state", getRxTxCDRState(getFieldValue("tx_cdr_state"), _maxLanes))); fields.push_back(AmberField("vendor_name", getAscii("vendor_name", 16))); fields.push_back(AmberField("vendor_rev", getVendorRev(getFieldValue("vendor_rev")))); - fields.push_back(AmberField("module_fw_version", getFwVersion(passive, getFieldValue("fw_version")))); + fields.push_back(AmberField("module_fw_version", getModuleFwVersion(passive, getFieldValue("fw_version")))); - calcRxTxPowerLane(fields, "rx_power_lane"); - calcRxTxPowerLane(fields, "tx_power_lane"); - getTxBiasLane(fields); + pushModulePerLaneField(fields, "rx_power_lane"); + pushModulePerLaneField(fields, "tx_power_lane"); + pushModulePerLaneField(fields, "tx_bias_lane", 500.0); fields.push_back(AmberField("temperature_high_th", getTemp(getFieldValue("temperature_high_th")))); fields.push_back(AmberField("temperature_low_th", getTemp(getFieldValue("temperature_low_th")))); @@ -1408,7 +1407,7 @@ void MlxlinkAmBerCollector::getModuleInfoPage(vector& fields) fields.push_back(AmberField("Module_st", moduleSt)); - loopAllLanesStr(fields, "Dp_st_lane"); + pushModuleDpPerLane(fields, "Dp_st_lane"); fields.push_back(AmberField("rx_output_valid", getBitmaskPerLaneStr(getFieldValue("rx_output_valid_change")))); fields.push_back(AmberField("rx_input_valid", getBitmaskPerLaneStr(getFieldValue("rx_input_valid_change")))); @@ -1424,9 +1423,9 @@ void MlxlinkAmBerCollector::getModuleInfoPage(vector& fields) fields.push_back(AmberField("Rx_Power_Type", _mlxlinkMaps->_rxPowerType[getFieldValue("rx_power_type")])); fields.push_back( - AmberField("Date_code", getDateCode(add32BitTo64(getFieldValue("date_code_hi"), getFieldValue("date_code_lo"))))); - fields.push_back(AmberField("Module_temperature", getTemp(getFieldValue("temperature")))); - fields.push_back(AmberField("Module_voltage", to_string(getFieldValue("voltage") / 10.0))); + AmberField("Date_Code", getDateCode(add32BitTo64(getFieldValue("date_code_hi"), getFieldValue("date_code_lo"))))); + fields.push_back(AmberField("Module_Temperature", getTemp(getFieldValue("temperature")))); + fields.push_back(AmberField("Module_Voltage", to_string(getFieldValue("voltage") / 10.0))); if (_isCmisCable) { diff --git a/mlxlink/modules/mlxlink_amBER_collector.h b/mlxlink/modules/mlxlink_amBER_collector.h index fe3fb024..0be01cc9 100644 --- a/mlxlink/modules/mlxlink_amBER_collector.h +++ b/mlxlink/modules/mlxlink_amBER_collector.h @@ -106,11 +106,11 @@ class MlxlinkAmBerCollector : public MlxlinkRegParser void getIbComplianceCodes(string& ibComplianceCodeStr); string getCableTechnologyStr(u_int32_t cableTechnology); string getCableBreakoutStr(u_int32_t cableBreakout, u_int32_t cableIdentifier); - void calcRxTxPowerLane(vector& fields, string str); + void pushModulePerLaneField(vector& fields, string fieldName, float valueCorrection = 1.0); void getModuleInfoPage(vector& fields); string getSmfLength(const u_int32_t smfLength, const u_int32_t cableTechnology, const bool optical); string getDateCode(u_int64_t dateCode); - void loopAllLanesStr(vector& fields, const string str); + void pushModuleDpPerLane(vector& fields, const string str); void getTxBiasLane(vector& fields); string getByMap(u_int32_t flags, std::map map); void getCmisComplianceCode(u_int32_t ethComplianceCode, diff --git a/mlxlink/modules/mlxlink_cables_commander.cpp b/mlxlink/modules/mlxlink_cables_commander.cpp index b5507748..5aeea0f9 100644 --- a/mlxlink/modules/mlxlink_cables_commander.cpp +++ b/mlxlink/modules/mlxlink_cables_commander.cpp @@ -65,16 +65,10 @@ void MlxlinkCablesCommander::readMCIA(u_int32_t page, u_int8_t* data, u_int32_t i2cAddress) { - string regName = "MCIA"; - resetParser(regName); - updateField("module", _moduleNumber); - updateField("slot_index", _slotIndex); - updateField("size", size); - updateField("page_number", page); - updateField("device_address", offset); - updateField("i2c_device_address", i2cAddress); - updateField("l", 0); - genBuffSendRegister(regName, MACCESS_REG_METHOD_GET); + sendPrmReg(ACCESS_REG_MCIA, GET, + "module=%d,slot_index=%d,size=%d,page_number=%d,device_address=%d,i2c_device_address=%d", _moduleNumber, + _slotIndex, size, page, offset, i2cAddress); + u_int32_t i = 0; char fieldName[32]; for (; i < size / 4; i++) @@ -99,27 +93,24 @@ void MlxlinkCablesCommander::writeMCIA(u_int32_t page, { throw MlxRegException("Data exceeded the maximum page size (255 bytes), check the offset or data size"); } - string regName = "MCIA"; - resetParser(regName); - updateField("module", _moduleNumber); - updateField("slot_index", _slotIndex); - updateField("size", dataSize); - updateField("page_number", page); - updateField("device_address", offset); - updateField("i2c_device_address", i2cAddress); + u_int32_t i = 0; - char fieldName[20]; + char fieldName[64]; + string dataCmd = ""; u_int32_t dwordDataSize = (u_int32_t)ceil((double)size / sizeof(u_int32_t)); u_int32_t* dwordData = (u_int32_t*)malloc(dwordDataSize); memset(dwordData, 0, dwordDataSize); memcpy(dwordData, data, size); for (; i < dwordDataSize; i++) { - sprintf(fieldName, "dword[%d]", i); - updateField(fieldName, __cpu_to_be32(dwordData[i])); + sprintf(fieldName, ",dword[%d]=%d", i, __cpu_to_be32(dwordData[i])); + dataCmd += string(fieldName); } free(dwordData); - genBuffSendRegister(regName, MACCESS_REG_METHOD_SET); + + sendPrmReg(ACCESS_REG_MCIA, SET, + "module=%d,slot_index=%d,size=%d,page_number=%d,device_address=%d,i2c_device_address=%d%s", + _moduleNumber, _slotIndex, size, page, offset, i2cAddress, dataCmd.c_str()); } // Reading EEPROM data from MCIA register and loading it to readable pages @@ -186,13 +177,7 @@ u_int16_t MlxlinkCablesCommander::getStatusBit(u_int32_t channel, u_int16_t val, void MlxlinkCablesCommander::getDdmValuesFromPddr() { - string regName = "PDDR"; - resetParser(regName); - - updateField("local_port", _localPort); - updateField("pnat", 0); - updateField("page_select", 3); - genBuffSendRegister(regName, MACCESS_REG_METHOD_GET); + sendPrmReg(ACCESS_REG_PDDR, GET, "page_select=%d", PDDR_MODULE_INFO_PAGE); _cableDdm.channels = _numOfLanes; _cableDdm.temperature.val = getFieldValue("temperature") / 256; @@ -1148,10 +1133,7 @@ void MlxlinkCablesCommander::getNumOfModuleLanes() // As a WA, use module_width for MEDIA and HOST lanes // TODO: use module_media_width once it be supported // if (_modulePrbsParams[MODULE_PRBS_SELECT] == "HOST") { - resetParser(ACCESS_REG_PMTM); - updateField("module", _moduleNumber); - updateField("slot_index", _slotIndex); - genBuffSendRegister(ACCESS_REG_PMTM, MACCESS_REG_METHOD_GET); + sendPrmReg(ACCESS_REG_PMTM, GET, "module=%d,slot_index=%d", _moduleNumber, _slotIndex); _numOfLanes = getFieldValue("module_width"); //} else { @@ -1168,11 +1150,7 @@ void MlxlinkCablesCommander::checkAndParsePMPTCap(ModuleAccess_t moduleAccess) bool regFaild = false; try { - resetParser(ACCESS_REG_PMPT); - updateField("module", _moduleNumber); - updateField("slot_index", _slotIndex); - updateField("lane_mask", 0x1); - genBuffSendRegister(ACCESS_REG_PMPT, MACCESS_REG_METHOD_GET); + sendPrmReg(ACCESS_REG_PMPT, GET, "module=%d,slot_index=%d,lane_mask=%d", _moduleNumber, _slotIndex, 1); } catch (MlxRegException& exc) { @@ -1185,14 +1163,9 @@ void MlxlinkCablesCommander::checkAndParsePMPTCap(ModuleAccess_t moduleAccess) _prbsRate = getRateAdminFromStr(getFieldValue("lane_rate_cap"), _modulePrbsParams[ModulePrbs_t(MODULE_PRBS_RATE)]); // read the other PMPT caps according to the prbsRate - resetParser(ACCESS_REG_PMPT); - updateField("module", _moduleNumber); - updateField("slot_index", _slotIndex); - updateField("host_media", _modulePrbsParams[MODULE_PRBS_SELECT] == "HOST"); - updateField("ch_ge", (u_int32_t)moduleAccess); - updateField("modulation", _prbsRate >= MODULE_PRBS_LANE_RATE_HDR); - updateField("lane_mask", 0x1); - genBuffSendRegister(ACCESS_REG_PMPT, MACCESS_REG_METHOD_GET); + sendPrmReg(ACCESS_REG_PMPT, GET, "module=%d,slot_index=%d,host_media=%d,lane_mask=%d,ch_ge=%d,modulation=%d", + _moduleNumber, _slotIndex, _modulePrbsParams[MODULE_PRBS_SELECT] == "HOST", 1, (u_int32_t)moduleAccess, + _prbsRate >= MODULE_PRBS_LANE_RATE_HDR); u_int32_t chAccessShift = moduleAccess == MODULE_PRBS_ACCESS_CH ? MODULE_PRBS_GEN_INV : 0; @@ -1208,13 +1181,8 @@ void MlxlinkCablesCommander::checkAndParsePMPTCap(ModuleAccess_t moduleAccess) u_int32_t MlxlinkCablesCommander::getPMPTStatus(ModuleAccess_t moduleAccess) { - resetParser(ACCESS_REG_PMPT); - updateField("module", _moduleNumber); - updateField("slot_index", _slotIndex); - updateField("host_media", _modulePrbsParams[MODULE_PRBS_SELECT] == "HOST"); - updateField("ch_ge", (u_int32_t)moduleAccess); - updateField("lane_mask", 0x1); - genBuffSendRegister(ACCESS_REG_PMPT, MACCESS_REG_METHOD_GET); + sendPrmReg(ACCESS_REG_PMPT, GET, "module=%d,slot_index=%d,host_media=%d,lane_mask=%d,ch_ge=%d", _moduleNumber, + _slotIndex, _modulePrbsParams[MODULE_PRBS_SELECT] == "HOST", 1, (u_int32_t)moduleAccess); return getFieldValue("status"); } @@ -1223,20 +1191,12 @@ void MlxlinkCablesCommander::sendPMPT(ModuleAccess_t moduleAccess) { checkAndParsePMPTCap(moduleAccess); - resetParser(ACCESS_REG_PMPT); - updateField("module", _moduleNumber); - updateField("slot_index", _slotIndex); - updateField("host_media", _modulePrbsParams[MODULE_PRBS_SELECT] == "HOST"); - updateField("ch_ge", (u_int32_t)moduleAccess); - updateField("e", 1); - updateField("prbs_mode_admin", _prbsMode); - updateField("lane_rate_admin", _prbsRate); - updateField("invt_admin", _prbsInv); - updateField("swap_admin", _prbsSwap); - updateField("lane_mask", _prbsLanes ? _prbsLanes : 0xff); - updateField("le", _prbsLanes != 0); - updateField("modulation", _prbsRate >= MODULE_PRBS_LANE_RATE_HDR); - genBuffSendRegister(ACCESS_REG_PMPT, MACCESS_REG_METHOD_SET); + sendPrmReg(ACCESS_REG_PMPT, SET, + "module=%d,slot_index=%d,host_media=%d,lane_mask=%d,ch_ge=%d,e=%d,prbs_mode_admin=%d,lane_rate_admin=%d," + "invt_admin=%d,swap_admin=%d,le=%d,modulation=%d", + _moduleNumber, _slotIndex, _modulePrbsParams[MODULE_PRBS_SELECT] == "HOST", + _prbsLanes ? _prbsLanes : 0xff, (u_int32_t)moduleAccess, 1, _prbsMode, _prbsRate, _prbsInv, _prbsSwap, + _prbsLanes != 0, _prbsRate >= MODULE_PRBS_LANE_RATE_HDR); if (getPMPTStatus(moduleAccess) == PMPT_STATUS_CONFIG_ERROR) { @@ -1263,17 +1223,8 @@ void MlxlinkCablesCommander::enablePMPT(ModuleAccess_t moduleAccess) void MlxlinkCablesCommander::disablePMPT() { - resetParser(ACCESS_REG_PMPT); - updateField("module", _moduleNumber); - updateField("slot_index", _slotIndex); - updateField("host_media", _modulePrbsParams[MODULE_PRBS_SELECT] == "HOST"); - updateField("ch_ge", 0); - updateField("e", 0); - updateField("prbs_mode_admin", _prbsMode); - updateField("lane_rate_admin", _prbsRate); - updateField("modulation", 1); - updateField("lane_mask", 0xff); - genBuffSendRegister(ACCESS_REG_PMPT, MACCESS_REG_METHOD_SET); + sendPrmReg(ACCESS_REG_PMPT, SET, "module=%d,slot_index=%d,host_media=%d,lane_mask=%d", _moduleNumber, _slotIndex, + _modulePrbsParams[MODULE_PRBS_SELECT] == "HOST", 0xff); } void MlxlinkCablesCommander::handlePrbsTestMode(const string& ctrl, ModuleAccess_t moduleAccess) @@ -1301,13 +1252,8 @@ void MlxlinkCablesCommander::getPMPTConfiguration(ModuleAccess_t moduleAccess, vector& prbsInv, vector& prbsSwap) { - resetParser(ACCESS_REG_PMPT); - updateField("module", _moduleNumber); - updateField("slot_index", _slotIndex); - updateField("host_media", _modulePrbsParams[MODULE_PRBS_SELECT] == "HOST"); - updateField("ch_ge", (u_int32_t)moduleAccess); - updateField("lane_mask", 0x1); - genBuffSendRegister(ACCESS_REG_PMPT, MACCESS_REG_METHOD_GET); + sendPrmReg(ACCESS_REG_PMPT, GET, "module=%d,slot_index=%d,host_media=%d,lane_mask=%d,ch_ge=%d", _moduleNumber, + _slotIndex, _modulePrbsParams[MODULE_PRBS_SELECT] == "HOST", 1, (u_int32_t)moduleAccess); u_int32_t index = (u_int32_t)pow(2.0, (double)getFieldValue("prbs_mode_admin")); prbsPattern.push_back(MlxlinkRecord::addSpaceForModulePrbs(_mlxlinkMaps->_modulePrbsModeCapToStr[index])); @@ -1330,12 +1276,8 @@ string MlxlinkCablesCommander::getPMPDLockStatus() for (u_int32_t lane = 0; lane < _numOfLanes; lane++) { - resetParser(ACCESS_REG_PMPD); - updateField("module", _moduleNumber); - updateField("slot_index", _slotIndex); - updateField("host_media", _modulePrbsParams[MODULE_PRBS_SELECT] == "HOST"); - updateField("lane", lane); - genBuffSendRegister(ACCESS_REG_PMPD, MACCESS_REG_METHOD_GET); + sendPrmReg(ACCESS_REG_PMPD, GET, "module=%d,slot_index=%d,host_media=%d,lane=%d", _moduleNumber, _slotIndex, + _modulePrbsParams[MODULE_PRBS_SELECT] == "HOST", lane); lockStatusStr += MlxlinkRecord::addSpaceForModulePrbs(_mlxlinkMaps->_modulePMPDStatus[getFieldValue("status")]); lockStatusStr += ","; @@ -1363,13 +1305,8 @@ void MlxlinkCablesCommander::showPrbsTestMode() try { - resetParser(ACCESS_REG_PMPT); - updateField("module", _moduleNumber); - updateField("slot_index", _slotIndex); - updateField("host_media", _modulePrbsParams[MODULE_PRBS_SELECT] == "HOST"); - updateField("ch_ge", 0); - updateField("lane_mask", 0x1); - genBuffSendRegister(ACCESS_REG_PMPT, MACCESS_REG_METHOD_GET); + sendPrmReg(ACCESS_REG_PMPT, GET, "module=%d,slot_index=%d,host_media=%d,lane_mask=%d", _moduleNumber, + _slotIndex, _modulePrbsParams[MODULE_PRBS_SELECT] == "HOST", 1); } catch (MlxRegException& exc) { @@ -1408,12 +1345,8 @@ void MlxlinkCablesCommander::getPMPDInfo(vector& traffic, bool skipSnrCap = false; for (u_int32_t lane = 0; lane < _numOfLanes; lane++) { - resetParser(ACCESS_REG_PMPD); - updateField("module", _moduleNumber); - updateField("slot_index", _slotIndex); - updateField("host_media", _modulePrbsParams[MODULE_PRBS_SELECT] == "HOST"); - updateField("lane", lane); - genBuffSendRegister(ACCESS_REG_PMPD, MACCESS_REG_METHOD_GET); + sendPrmReg(ACCESS_REG_PMPD, GET, "module=%d,slot_index=%d,host_media=%d,lane=%d", _moduleNumber, _slotIndex, + _modulePrbsParams[MODULE_PRBS_SELECT] == "HOST", lane); traficStr = to_string(add32BitTo64(getFieldValue("prbs_bits_high"), getFieldValue("prbs_bits_low"))); errorsStr = to_string(add32BitTo64(getFieldValue("prbs_errors_high"), getFieldValue("prbs_errors_low"))); @@ -1477,12 +1410,8 @@ void MlxlinkCablesCommander::clearPrbsDiagInfo() { MlxlinkRecord::printCmdLine("Clearing PRBS Diagnostic Counters", _jsonRoot); - resetParser(ACCESS_REG_PMPD); - updateField("module", _moduleNumber); - updateField("slot_index", _slotIndex); - updateField("host_media", _modulePrbsParams[MODULE_PRBS_SELECT] == "HOST"); - updateField("cl", 1); - genBuffSendRegister(ACCESS_REG_PMPD, MACCESS_REG_METHOD_GET); + sendPrmReg(ACCESS_REG_PMPD, GET, "module=%d,slot_index=%d,host_media=%d,cl=%d", _moduleNumber, _slotIndex, + _modulePrbsParams[MODULE_PRBS_SELECT] == "HOST", 1); } void MlxlinkCablesCommander::showControlParams() @@ -1490,10 +1419,7 @@ void MlxlinkCablesCommander::showControlParams() MlxlinkCmdPrint controlParamsOutput = MlxlinkCmdPrint(); setPrintTitle(controlParamsOutput, "Module Control Parameters", CABLE_CONTROL_PARAMETERS_SET_RX_AMP); - resetParser(ACCESS_REG_PDDR); - updateField("local_port", _localPort); - updateField("page_select", PDDR_MODULE_INFO_PAGE); - genBuffSendRegister(ACCESS_REG_PDDR, MACCESS_REG_METHOD_GET); + sendPrmReg(ACCESS_REG_PDDR, GET, "page_select=%d", PDDR_MODULE_INFO_PAGE); u_int32_t txEq = getFieldValue("cable_tx_equalization"); float rxEmph = (double)getFieldValue("cable_rx_emphasis"); @@ -1501,9 +1427,7 @@ void MlxlinkCablesCommander::showControlParams() u_int32_t rxAmp = getFieldValue("cable_rx_amp"); bool isCmis = _cableIdentifier >= IDENTIFIER_SFP_DD; - resetParser(ACCESS_REG_PMCR); - updateField("local_port", _localPort); - genBuffSendRegister(ACCESS_REG_PMCR, MACCESS_REG_METHOD_GET); + sendPrmReg(ACCESS_REG_PMCR, GET); if (isCmis) { @@ -1561,7 +1485,7 @@ u_int32_t MlxlinkCablesCommander::pmcrStrToValue(ControlParam paramId, const str if (isCmis && paramId == CABLE_CONTROL_PARAMETERS_SET_RX_EMPH) { - _modulePMCRParams[paramId].first += " (Pre)"; + _modulePMCRParams[paramId].first += " (pre)"; valueToSet *= 2; if ((valueToSet - (int)valueToSet) > 0) { @@ -1628,9 +1552,7 @@ string MlxlinkCablesCommander::getPMCRCapValueStr(u_int32_t valueCap, ControlPar void MlxlinkCablesCommander::checkPMCRFieldsCap(vector>& params) { - resetParser(ACCESS_REG_PMCR); - updateField("local_port", _localPort); - genBuffSendRegister(ACCESS_REG_PMCR, MACCESS_REG_METHOD_GET); + sendPrmReg(ACCESS_REG_PMCR, GET); // Check provided params exestance capability string fieldName = ""; @@ -1683,12 +1605,14 @@ void MlxlinkCablesCommander::checkPMCRFieldsCap(vectorfirst].first + ", "; - buildPMCRRequest(it->first, it->second); + pmcrFieldsRequest += buildPMCRRequest(it->first, it->second); + pmcrFieldsRequest += ","; } - genBuffSendRegister(ACCESS_REG_PMCR, MACCESS_REG_METHOD_SET); + pmcrFieldsRequest = deleteLastChar(pmcrFieldsRequest); + sendPrmReg(ACCESS_REG_PMCR, SET, pmcrFieldsRequest.c_str()); } catch (MlxRegException& exc) { diff --git a/mlxlink/modules/mlxlink_cables_commander.h b/mlxlink/modules/mlxlink_cables_commander.h index 36f7e7fa..cd350cab 100644 --- a/mlxlink/modules/mlxlink_cables_commander.h +++ b/mlxlink/modules/mlxlink_cables_commander.h @@ -137,7 +137,6 @@ class MlxlinkCablesCommander : public MlxlinkRegParser u_int32_t _cableIdentifier; bool _sfp51Paging; bool _passiveQsfp; - u_int32_t _localPort; u_int32_t _numOfLanes; MlxlinkMaps* _mlxlinkMaps; map _modulePrbsParams; @@ -200,7 +199,7 @@ class MlxlinkCablesCommander : public MlxlinkRegParser u_int32_t pmcrStrToValue(ControlParam paramId, const string& value); string getPMCRCapValueStr(u_int32_t valueCap, ControlParam paramId); void checkPMCRFieldsCap(vector>& params); - void buildPMCRRequest(ControlParam paramId, const string& value); + string buildPMCRRequest(ControlParam paramId, const string& value); Json::Value& _jsonRoot; vector _validPages; diff --git a/mlxlink/modules/mlxlink_commander.cpp b/mlxlink/modules/mlxlink_commander.cpp index 6f17bf87..302bdd69 100644 --- a/mlxlink/modules/mlxlink_commander.cpp +++ b/mlxlink/modules/mlxlink_commander.cpp @@ -50,7 +50,6 @@ MlxlinkCommander::MlxlinkCommander() : _userInput() _linkModeForce = false; _prbsTestMode = false; _useExtAdb = true; - _isHCA = false; _portPolling = false; _speedForce = ""; _anDisable = 0; @@ -141,21 +140,6 @@ MlxlinkCommander::~MlxlinkCommander() } } -void MlxlinkCommander::updatePortType() -{ - if (!_isHCA) - { - try - { - updateField("port_type", _portType); - } - catch (MlxRegException& exc) - { - // Ignore updating the port type field if it's not exist - } - } -} - void MlxlinkCommander::validatePortType(const string& portTypeStr) { _portType = NETWORK_PORT_TYPE; @@ -203,13 +187,9 @@ void MlxlinkCommander::gearboxBlock(const string& option) void MlxlinkCommander::checkRegCmd() { - string regName = "PAOS"; - resetParser(regName); - updateField("local_port", _localPort); - updateField("swid", SWID); try { - genBuffSendRegister(regName, MACCESS_REG_METHOD_GET); + sendPrmReg(ACCESS_REG_PAOS, GET, "local_port=%d,swid=%d", _localPort, SWID); } catch (MlxRegException& exp) { @@ -234,15 +214,10 @@ void MlxlinkCommander::checkValidFW() { // Fw validity should be checked, so set the local port to 1. _localPort = 1; } - string regName = "PDDR"; - resetParser(regName); - updateField("local_port", _localPort); - updateField("pnat", PNAT_LOCAL); - updateField("page_select", PDDR_OPERATIONAL_INFO_PAGE); try { - genBuffSendRegister(regName, MACCESS_REG_METHOD_GET); + sendPrmReg(ACCESS_REG_PDDR, GET, "page_select=%d", PDDR_OPERATIONAL_INFO_PAGE); } catch (MlxRegException& exp) { @@ -258,12 +233,8 @@ void MlxlinkCommander::checkValidFW() u_int32_t phyMngrFsmState = getFieldValue("phy_mngr_fsm_state"); - resetParser(regName); - updateField("local_port", _localPort); - updateField("pnat", PNAT_LOCAL); - updateField("page_select", PDDR_TROUBLESHOOTING_INFO_PAGE); - updateField("group_opcode", ADVANCED_OPCODE); - genBuffSendRegister(regName, MACCESS_REG_METHOD_GET); + sendPrmReg(ACCESS_REG_PDDR, GET, "page_select=%d,group_opcode=%d", PDDR_TROUBLESHOOTING_INFO_PAGE, + ADVANCED_OPCODE); u_int32_t statusOpcode = getFieldValue("advanced_opcode"); @@ -282,40 +253,36 @@ void MlxlinkCommander::checkValidFW() u_int32_t MlxlinkCommander::getTechnologyFromMGIR() { - u_int32_t technology = 0; - - try - { - resetParser(ACCESS_REG_MGIR); - genBuffSendRegister(ACCESS_REG_MGIR, MACCESS_REG_METHOD_GET); + sendPrmReg(ACCESS_REG_MGIR, GET); - technology = getFieldValue("technology"); - } - catch (MlxRegException& exc) - { - } - - return technology; + return getFieldValue("technology"); } void MlxlinkCommander::getProductTechnology() { - try - { - resetParser(ACCESS_REG_SLRG); - updateField("local_port", _localPort); - updateField("pnat", (_userInput._pcie) ? PNAT_PCIE : PNAT_LOCAL); + _productTechnology = getTechnologyFromMGIR(); - genBuffSendRegister(ACCESS_REG_SLRG, MACCESS_REG_METHOD_GET); - - _productTechnology = getVersion(getFieldValue("version")); + if (_productTechnology) + { + if (_productTechnology <= 2) + { + _productTechnology = PRODUCT_28NM; + } } - catch (MlxRegException& exc) + else { - _productTechnology = getTechnologyFromMGIR(); - if (!_productTechnology) + // Use SLRG to get the product technology, for backward compatibility + try + { + sendPrmReg(ACCESS_REG_SLRG, GET); + _productTechnology = getVersion(getFieldValue("version")); + } + catch (MlxRegException& exc) { - throw MlxRegException("Unable to get product technology: %s", exc.what_s().c_str()); + if (!_productTechnology) + { + throw MlxRegException("Unable to get product technology: %s", exc.what_s().c_str()); + } } } } @@ -335,6 +302,8 @@ u_int32_t MlxlinkCommander::maxLocalPort() return MAX_LOCAL_PORT_QUANTUM; case DeviceQuantum2: + case DeviceQuantum3: + case DeviceGB100: return MAX_LOCAL_PORT_QUANTUM2; case DeviceSpectrum2: @@ -352,27 +321,12 @@ u_int32_t MlxlinkCommander::maxLocalPort() bool MlxlinkCommander::checkPortStatus(u_int32_t localPort) { - string regName = "PDDR"; - resetParser(regName); - updatePortType(); - - updateField("local_port", localPort); - updateField("pnat", PNAT_LOCAL); - updateField("page_select", PDDR_OPERATIONAL_INFO_PAGE); - - genBuffSendRegister(regName, MACCESS_REG_METHOD_GET); + sendPrmReg(ACCESS_REG_PDDR, GET, "local_port=%d,page_select=%d", localPort, PDDR_OPERATIONAL_INFO_PAGE); u_int32_t phyMngrFsmState = getFieldValue("phy_mngr_fsm_state"); - resetParser(regName); - updatePortType(); - - updateField("local_port", localPort); - updateField("pnat", PNAT_LOCAL); - updateField("page_select", PDDR_TROUBLESHOOTING_INFO_PAGE); - updateField("group_opcode", ADVANCED_OPCODE); - - genBuffSendRegister(regName, MACCESS_REG_METHOD_GET); + sendPrmReg(ACCESS_REG_PDDR, GET, "local_port=%d,page_select=%d,group_opcode=%d", localPort, + PDDR_TROUBLESHOOTING_INFO_PAGE, ADVANCED_OPCODE); u_int32_t statusOpcode = getFieldValue("advanced_opcode"); @@ -391,17 +345,15 @@ void MlxlinkCommander::checkAllPortsStatus() } if (_devID == DeviceSpectrum) { - string regName = "PMLP"; for (u_int32_t localPort = 1; localPort <= maxLocalPort(); localPort++) { - resetParser(regName); - updateField("local_port", localPort); + sendPrmReg(ACCESS_REG_PMLP, GET, "local_port=%d", localPort); - genBuffSendRegister(regName, MACCESS_REG_METHOD_GET); if (getFieldValue("width") == 0) { continue; } + if (checkPortStatus(localPort)) { return; @@ -411,17 +363,15 @@ void MlxlinkCommander::checkAllPortsStatus() } else if (dm_dev_is_ib_switch(_devID)) { - string regName = "PLIB"; for (u_int32_t localPort = 1; localPort <= maxLocalPort(); localPort++) { - resetParser(regName); - updateField("local_port", localPort); + sendPrmReg(ACCESS_REG_PLIB, GET, "local_port=%d", localPort); - genBuffSendRegister(regName, MACCESS_REG_METHOD_GET); if (getFieldValue("ib_port") == 0) { continue; } + if (checkPortStatus(localPort)) { return; @@ -434,20 +384,14 @@ void MlxlinkCommander::checkAllPortsStatus() void MlxlinkCommander::validatePortToLC() { bool isDownStreamDevValid = true; - string regName = "PMLP"; - resetParser(regName); - updateField("local_port", _localPort); - genBuffSendRegister(regName, MACCESS_REG_METHOD_GET); + + sendPrmReg(ACCESS_REG_PMLP, GET); u_int32_t slotIndex = getFieldValue("slot_index_0"); try { - regName = "MDDQ"; - resetParser(regName); - updateField("query_type", 1); // 1 for slot query - updateField("slot_index", slotIndex); - genBuffSendRegister(regName, MACCESS_REG_METHOD_GET); + sendPrmReg(ACCESS_REG_MDDQ, GET, "query_type=%d,slot_index=%d", 1, slotIndex); } catch (MlxRegException& exc) { @@ -511,6 +455,8 @@ void MlxlinkCommander::handlePortStr(const string& portStr) void MlxlinkCommander::labelToLocalPort() { + _pnat = _userInput._pcie ? PNAT_PCIE : PNAT_LOCAL; + if (_isHCA && _userInput._pcie) { _dpn.depth = _userInput._depth; @@ -582,10 +528,7 @@ bool MlxlinkCommander::isDSdevice() try { - resetParser(ACCESS_REG_MDDQ); - updateField("query_type", 1); - updateField("slot_index", 1); - genBuffSendRegister(ACCESS_REG_MDDQ, MACCESS_REG_METHOD_GET); + sendPrmReg(ACCESS_REG_MDDQ, GET, "query_type=1,slot_index=1"); } catch (MlxRegException& exc) { @@ -606,13 +549,18 @@ void MlxlinkCommander::labeltoDSlocalPort() throw MlxRegException("No split supported for downstream devices"); } + sendPrmReg(ACCESS_REG_MDDQ, GET, "query_type=%d,slot_index=%d", 1, lineCard); + + if (getFieldValue("lc_ready") != 1) + { + throw MlxRegException("Invalid port number, Line card %d is not ready", lineCard); + } + for (u_int32_t localPort = 1; localPort <= maxLocalPort(); localPort++) { - resetParser(ACCESS_REG_PLLP); - updateField("local_port", localPort); try { - genBuffSendRegister(ACCESS_REG_PLLP, MACCESS_REG_METHOD_GET); + sendPrmReg(ACCESS_REG_PLLP, GET, "local_port=%d", localPort); } catch (MlxRegException& exp) { @@ -630,34 +578,18 @@ void MlxlinkCommander::labeltoDSlocalPort() if (!isLocalPortValid) { - resetParser(ACCESS_REG_MDDQ); - updateField("query_type", 1); - updateField("slot_index", lineCard); - genBuffSendRegister(ACCESS_REG_MDDQ, MACCESS_REG_METHOD_GET); - - if (getFieldValue("lc_ready") != 1) - { - throw MlxRegException("Invalid port number, Line card %d is not ready", lineCard); - } - else - { - throw MlxRegException("Invalid port number"); - } + throw MlxRegException("Invalid port number"); } } void MlxlinkCommander::checkLocalPortDPNMapping(u_int32_t localPort) { - string regName = "MPIR"; for (u_int32_t i = 0; i < _validDpns.size(); i++) { - resetParser(regName); - updateField("depth", _validDpns[i].depth); - updateField("pcie_index", _validDpns[i].pcieIndex); - updateField("node", _validDpns[i].node); try { - genBuffSendRegister(regName, MACCESS_REG_METHOD_GET); + sendPrmReg(ACCESS_REG_MPIR, GET, "depth=%d,pcie_index=%d,node=%d", _validDpns[i].depth, + _validDpns[i].pcieIndex, _validDpns[i].node); } catch (MlxRegException& exc) { @@ -683,14 +615,9 @@ int MlxlinkCommander::getLocalPortFromMPIR(DPN& dpn) int localPort = -1; if (!_userInput._portSpecified && !(dpn.depth == 0 && dpn.node == 0 && dpn.pcieIndex == 0)) { - string regName = "MPIR"; - resetParser(regName); - updateField("depth", dpn.depth); - updateField("pcie_index", dpn.pcieIndex); - updateField("node", dpn.node); try { - genBuffSendRegister(regName, MACCESS_REG_METHOD_GET); + sendPrmReg(ACCESS_REG_MPIR, GET, "depth=%d,pcie_index=%d,node=%d", dpn.depth, dpn.pcieIndex, dpn.node); localPort = getFieldValue("local_port"); } catch (MlxRegException& exc) @@ -716,11 +643,11 @@ void MlxlinkCommander::labelToHCALocalPort() { throw MlxRegException("No Splits in HCA!"); } - else if (_userInput._labelPort > 1 && !(mtype & (MST_USB | MST_USB_DIMAX))) + else if (_userInput._labelPort > 1 && !(mtype & (MST_USB_DIMAX))) { throw MlxRegException("Please Provide the Physical Device of Port " + to_string(_userInput._labelPort)); } - else if (_userInput._labelPort > 1 && (mtype & (MST_USB | MST_USB_DIMAX))) + else if (_userInput._labelPort > 1 && (mtype & (MST_USB_DIMAX))) { if (_userInput._labelPort == 2) { @@ -759,9 +686,7 @@ void MlxlinkCommander::labelToSpectLocalPort() { try { - resetParser(ACCESS_REG_PLLP); - updateField("local_port", localPort); - genBuffSendRegister(ACCESS_REG_PLLP, MACCESS_REG_METHOD_GET); + sendPrmReg(ACCESS_REG_PLLP, GET, "local_port=%d", localPort); } catch (...) { @@ -783,30 +708,31 @@ void MlxlinkCommander::labelToSpectLocalPort() void MlxlinkCommander::labelToIBLocalPort() { u_int32_t labelPort = _userInput._labelPort; - bool ibSplitReady = isIBSplitReady() && (_devID == DeviceQuantum || _devID == DeviceQuantum2); + bool ibSplitReady = isIBSplitReady() && (_devID == DeviceQuantum || _devID == DeviceQuantum2 || + _devID == DeviceQuantum3 || _devID == DeviceGB100); if (_userInput._splitProvided && _devID != DeviceQuantum && _devID != DeviceQuantum2) { throw MlxRegException("No split in IB!"); } - u_int32_t maxLabelPort = - _devID == DeviceQuantum2 ? maxLocalPort() / 4 : _devID == DeviceQuantum ? maxLocalPort() / 2 - 1 : maxLocalPort(); - if ((labelPort > maxLabelPort) || (_userInput._secondSplitProvided && _devID != DeviceQuantum2) || + u_int32_t maxLabelPort = (_devID == DeviceQuantum2 || _devID == DeviceQuantum3 || _devID == DeviceGB100) ? + maxLocalPort() / 4 : + _devID == DeviceQuantum ? maxLocalPort() / 2 - 1 : maxLocalPort(); + if ((labelPort > maxLabelPort) || + (_userInput._secondSplitProvided && _devID != DeviceQuantum2 && _devID != DeviceQuantum3 && + _devID != DeviceGB100) || (_userInput._splitPort > 2)) { throw MlxRegException("Invalid port number!"); } - if (_devID == DeviceQuantum || _devID == DeviceQuantum2) + if (_devID == DeviceQuantum || _devID == DeviceQuantum2 || _devID == DeviceQuantum3 || _devID == DeviceGB100) { labelPort = calculatePanelPort(ibSplitReady); } - string regName = "PLIB"; for (u_int32_t localPort = 1; localPort <= maxLocalPort(); localPort++) { - resetParser(regName); - updateField("local_port", localPort); try { - genBuffSendRegister(regName, MACCESS_REG_METHOD_GET); + sendPrmReg(ACCESS_REG_PLIB, GET, "local_port=%d", localPort); } catch (MlxRegException& exp) { @@ -818,11 +744,12 @@ void MlxlinkCommander::labelToIBLocalPort() return; } } - if ((_devID == DeviceQuantum || _devID == DeviceQuantum2) && ibSplitReady) + if ((_devID == DeviceQuantum || _devID == DeviceQuantum2 || _devID == DeviceQuantum3 || _devID == DeviceGB100) && + ibSplitReady) { string portStr = "Port " + to_string(_userInput._labelPort); string swSplitCmd = "module-type qsfp-split-2"; - if (_devID == DeviceQuantum2) + if (_devID == DeviceQuantum2 || _devID == DeviceQuantum3 || _devID == DeviceGB100) { portStr = portStr + "/" + to_string(_userInput._splitPort); swSplitCmd = "port-type split-2"; @@ -836,15 +763,12 @@ void MlxlinkCommander::labelToIBLocalPort() bool MlxlinkCommander::isIBSplitReady() { - string regName = "PLIB"; u_int32_t max_port = maxLocalPort(); for (u_int32_t localPort = 1; localPort <= max_port; localPort++) { - resetParser(regName); - updateField("local_port", localPort); try { - genBuffSendRegister(regName, MACCESS_REG_METHOD_GET); + sendPrmReg(ACCESS_REG_PLIB, GET, "local_port=%d", localPort); } catch (MlxRegException& exp) { @@ -863,7 +787,7 @@ u_int32_t MlxlinkCommander::calculatePanelPort(bool ibSplitReady) u_int32_t panelPort = _userInput._labelPort; // by default, the label port is equal to panel port if no split bool splitProvided = _devID == DeviceQuantum ? _userInput._splitProvided : _userInput._secondSplitProvided; u_int32_t split = _devID == DeviceQuantum ? _userInput._splitPort : _userInput._secondSplitPort; - if (_devID == DeviceQuantum2) + if (_devID == DeviceQuantum2 || _devID == DeviceQuantum3 || _devID == DeviceGB100) { // For Quantum-2, user should provide cage/port to access the ports in the cage // cage"panelPort"/port"_userInput._splitPort" is converted to label port according to the following equation: @@ -911,11 +835,7 @@ void MlxlinkCommander::getActualNumOfLanes(u_int32_t linkSpeedActive, bool exten { if (_protoActive == IB) { - string regName = "PTYS"; - resetParser(regName); - updateField("local_port", _localPort); - updateField("proto_mask", _protoActive); - genBuffSendRegister(regName, MACCESS_REG_METHOD_GET); + sendPrmReg(ACCESS_REG_PTYS, GET, "proto_mask=%d", _protoActive); _numOfLanes = getFieldValue("ib_link_width_oper"); } @@ -934,10 +854,7 @@ void MlxlinkCommander::getActualNumOfLanes(u_int32_t linkSpeedActive, bool exten } else { - string regName = "PMLP"; - resetParser(regName); - updateField("local_port", _localPort); - genBuffSendRegister(regName, MACCESS_REG_METHOD_GET); + sendPrmReg(ACCESS_REG_PMLP, GET); _numOfLanes = getFieldValue("width"); } @@ -966,14 +883,7 @@ void MlxlinkCommander::getCableParams() { try { - string regName = "PDDR"; - resetParser(regName); - - updateField("local_port", _localPort); - updateField("pnat", PNAT_LOCAL); - updateField("page_select", PDDR_MODULE_INFO_PAGE); - - genBuffSendRegister(regName, MACCESS_REG_METHOD_GET); + sendPrmReg(ACCESS_REG_PDDR, GET, "page_select=%d", PDDR_MODULE_INFO_PAGE); _cableMediaType = getFieldValue("cable_type"); _cableIdentifier = getFieldValue("cable_identifier"); @@ -986,10 +896,9 @@ void MlxlinkCommander::getCableParams() _moduleTemp = getTemp(getFieldValue("temperature")); _cmisCable = isCMISCable(_cableIdentifier); _qsfpCable = isQsfpCable(_cableIdentifier); - regName = "PMLP"; - resetParser(regName); - updateField("local_port", _localPort); - genBuffSendRegister(regName, MACCESS_REG_METHOD_GET); + + sendPrmReg(ACCESS_REG_PMLP, GET); + _moduleNumber = getFieldValue("module_0"); } catch (const std::exception& exc) @@ -1016,13 +925,7 @@ bool MlxlinkCommander::inPrbsTestMode() bool MlxlinkCommander::checkGBPpaosDown() { - string regName = "PPAOS"; - resetParser(regName); - updatePortType(); - - updateField("swid", SWID); - updateField("local_port", _localPort); - genBuffSendRegister(regName, MACCESS_REG_METHOD_GET); + sendPrmReg(ACCESS_REG_PPAOS, GET); return getFieldValue("phy_status") != PAOS_UP; } @@ -1035,11 +938,8 @@ bool MlxlinkCommander::checkPaosDown() } else { - string regName = "PAOS"; - resetParser(regName); - updateField("swid", SWID); - updateField("local_port", _localPort); - genBuffSendRegister(regName, MACCESS_REG_METHOD_GET); + sendPrmReg(ACCESS_REG_PAOS, GET); + u_int32_t paosOperStatus = getFieldValue("oper_status"); if (paosOperStatus == PAOS_DOWN) { @@ -1051,14 +951,8 @@ bool MlxlinkCommander::checkPaosDown() bool MlxlinkCommander::checkPpaosTestMode() { - string regName = "PPAOS"; - resetParser(regName); - updatePortType(); + sendPrmReg(ACCESS_REG_PPAOS, GET); - updateField("swid", SWID); - updateField("local_port", _localPort); - - genBuffSendRegister(regName, MACCESS_REG_METHOD_GET); u_int32_t ppaosPhyTestModeStatus = getFieldValue("phy_test_mode_status"); if (ppaosPhyTestModeStatus == PHY_TEST_MODE_STATUS) { @@ -1105,23 +999,21 @@ void MlxlinkCommander::getprbsLanesFromParams(std::vector prbsLanesParam int MlxlinkCommander::handleIBLocalPort(u_int32_t labelPort, bool ibSplitReady) { - string regName = "PLIB"; int targetLocalPort = -1; - if ((_devID == DeviceQuantum2 || (_devID == DeviceQuantum && ibSplitReady))) + if (((_devID == DeviceQuantum2 || _devID == DeviceQuantum3 || _devID == DeviceGB100) || + (_devID == DeviceQuantum && ibSplitReady))) { labelPort = 2 * labelPort - 1; } - if (_devID == DeviceQuantum2 && ibSplitReady) + if ((_devID == DeviceQuantum2 || _devID == DeviceQuantum3 || _devID == DeviceGB100) && ibSplitReady) { labelPort = 2 * labelPort - 1; } for (u_int32_t localPort = 1; localPort <= maxLocalPort(); localPort++) { - resetParser(regName); - updateField("local_port", localPort); try { - genBuffSendRegister(regName, MACCESS_REG_METHOD_GET); + sendPrmReg(ACCESS_REG_PLIB, GET, "local_port=%d", localPort); } catch (MlxRegException& exp) { @@ -1139,17 +1031,16 @@ int MlxlinkCommander::handleIBLocalPort(u_int32_t labelPort, bool ibSplitReady) int MlxlinkCommander::handleEthLocalPort(u_int32_t labelPort, bool spect2WithGb) { - string regName = "PMLP"; int targetLocalPort = -1; for (u_int32_t localPort = 1; localPort <= maxLocalPort(); localPort++) { - resetParser(regName); - updateField("local_port", localPort); - genBuffSendRegister(regName, MACCESS_REG_METHOD_GET); + sendPrmReg(ACCESS_REG_PMLP, GET, "local_port=%d", localPort); + if (getFieldValue("width") == 0) { continue; } + if (getFieldValue("module_0") + 1 == labelPort) { targetLocalPort = localPort; @@ -1211,11 +1102,9 @@ void MlxlinkCommander::fillEthPortGroupMap(u_int32_t localPort, bool MlxlinkCommander::isIbLocalPortValid(u_int32_t localPort) { bool valid = true; - resetParser(ACCESS_REG_PLIB); - updateField("local_port", localPort); try { - genBuffSendRegister(ACCESS_REG_PLIB, MACCESS_REG_METHOD_GET); + sendPrmReg(ACCESS_REG_PLIB, GET, "local_port=%d", localPort); } catch (MlxRegException& exp) { @@ -1241,7 +1130,7 @@ void MlxlinkCommander::fillIbPortGroupMap(u_int32_t localPort, u_int32_t labelPo _localPortsPerGroup.push_back(PortGroup(localPort, labelPort, group, 1)); } } - else if (_devID == DeviceQuantum2) + else if (_devID == DeviceQuantum2 || _devID == DeviceQuantum3 || _devID == DeviceGB100) { labelPort = (labelPort / 2) + 1; if (isIbLocalPortValid(localPort + 1)) @@ -1270,7 +1159,7 @@ void MlxlinkCommander::fillIbPortGroupMap(u_int32_t localPort, u_int32_t labelPo { _localPortsPerGroup.push_back(PortGroup(localPort, labelPort, group, 0)); } - else if (_devID == DeviceQuantum2) + else if (_devID == DeviceQuantum2 || _devID == DeviceQuantum3 || _devID == DeviceGB100) { labelPort = (labelPort / 2) + 1; _localPortsPerGroup.push_back(PortGroup(localPort, labelPort, group, 1)); @@ -1281,9 +1170,8 @@ void MlxlinkCommander::fillIbPortGroupMap(u_int32_t localPort, u_int32_t labelPo bool MlxlinkCommander::isSpect2WithGb() { - string regName = "MGPIR"; - resetParser(regName); - genBuffSendRegister(regName, MACCESS_REG_METHOD_GET); + sendPrmReg(ACCESS_REG_MGPIR, GET); + return getFieldValue("num_of_devices") > 0; } @@ -1297,24 +1185,22 @@ vector MlxlinkCommander::localToPortsPerGroup(vector localPor { if (_devID == DeviceSpectrum2) { - regName = "PMLP"; - resetParser(regName); - updateField("local_port", *it); - genBuffSendRegister(regName, MACCESS_REG_METHOD_GET); + sendPrmReg(ACCESS_REG_PMLP, GET, "local_port=%d", *it); + if (getFieldValue("width") == 0) { continue; } + labelPort = (getFieldValue("module_0")) + 1; } - else if (_devID == DeviceQuantum || _devID == DeviceQuantum2) + else if (_devID == DeviceQuantum || _devID == DeviceQuantum2 || _devID == DeviceQuantum3 || + _devID == DeviceGB100) { - regName = "PLIB"; - resetParser(regName); - updateField("local_port", *it); try { - genBuffSendRegister(regName, MACCESS_REG_METHOD_GET); + sendPrmReg(ACCESS_REG_PLIB, GET, "local_port=%d", *it); + labelPort = getFieldValue("ib_port"); } catch (MlxRegException& exc) @@ -1343,7 +1229,10 @@ void MlxlinkCommander::handleLabelPorts(std::vector labelPortsStr, bool { throw MlxRegException("The number of ports is invalid"); } - bool ibSplitReady = (_devID == DeviceQuantum || _devID == DeviceQuantum2) ? isIBSplitReady() : false; + bool ibSplitReady = + (_devID == DeviceQuantum || _devID == DeviceQuantum2 || _devID == DeviceQuantum3 || _devID == DeviceGB100) ? + isIBSplitReady() : + false; bool spect2WithGb = (_devID == DeviceSpectrum2) ? isSpect2WithGb() : false; for (vector::iterator it = labelPortsStr.begin(); it != labelPortsStr.end(); ++it) { @@ -1352,7 +1241,8 @@ void MlxlinkCommander::handleLabelPorts(std::vector labelPortsStr, bool { localPort = handleEthLocalPort(labelPort, spect2WithGb); } - else if (_devID == DeviceQuantum || _devID == DeviceQuantum2) + else if (_devID == DeviceQuantum || _devID == DeviceQuantum2 || _devID == DeviceQuantum3 || + _devID == DeviceGB100) { localPort = handleIBLocalPort(labelPort, ibSplitReady); } @@ -1441,8 +1331,8 @@ void MlxlinkCommander::prepareAttenuationAndFwSection(bool valid) } setPrintVal(_moduleInfoCmd, attenuationTitle, cableAttenuation, ANSI_COLOR_RESET, true, valid); - setPrintVal(_moduleInfoCmd, "FW Version", getFwVersion(passive, getFieldValue("fw_version")), ANSI_COLOR_RESET, - true, valid); + setPrintVal(_moduleInfoCmd, "FW Version", getModuleFwVersion(passive, getFieldValue("fw_version")), + ANSI_COLOR_RESET, true, valid); } void MlxlinkCommander::preparePowerAndCdrSection(bool valid) @@ -1543,7 +1433,7 @@ void MlxlinkCommander::prepareBerModuleInfoNdr(bool valid) fieldsToQuery.push_back(MODULE_FIELD{"SMF Length", "smf_length", false, false, false}); fieldsToQuery.push_back(MODULE_FIELD{"MAX Power", "max_power", false, false, false}); fieldsToQuery.push_back(MODULE_FIELD{"Cable Rx AMP", "cable_rx_amp", false, false, false}); - fieldsToQuery.push_back(MODULE_FIELD{"Cable Rx Emphasis", "cable_rx_emphasis", false, false, false}); + fieldsToQuery.push_back(MODULE_FIELD{"Cable Rx Emphasis", "cable_rx_pre_emphasis", false, false, false}); fieldsToQuery.push_back(MODULE_FIELD{"Cable Rx Post Emphasis", "cable_rx_post_emphasis", false, false, false}); fieldsToQuery.push_back(MODULE_FIELD{"Cable Tx Equalization", "cable_tx_equalization", false, false, false}); fieldsToQuery.push_back(MODULE_FIELD{"Wavelength Tolerance", "wavelength_tolerance", false, false, false}); @@ -1553,7 +1443,7 @@ void MlxlinkCommander::prepareBerModuleInfoNdr(bool valid) fieldsToQuery.push_back(MODULE_FIELD{"Rx Input Valid [per lane]", "rx_input_valid", true, true, true}); fieldsToQuery.push_back(MODULE_FIELD{"Nominal bit rate", "Nominal_Bit_Rate", false, false, false}); fieldsToQuery.push_back(MODULE_FIELD{"Rx Power Type", "Rx_Power_Type", false, false, false}); - fieldsToQuery.push_back(MODULE_FIELD{"Manufacturing Date", "Date_code", false, false, false}); + fieldsToQuery.push_back(MODULE_FIELD{"Manufacturing Date", "Date_Code", false, false, false}); fieldsToQuery.push_back( MODULE_FIELD{"Active Set Host Compliance Code", "Active_set_host_compliance_code", false, false, false}); fieldsToQuery.push_back( @@ -1596,26 +1486,16 @@ void MlxlinkCommander::showModuleInfo() { gearboxBlock(MODULE_INFO_FLAG); - string regName = "PMAOS"; - resetParser(regName); - updateField("module", _moduleNumber); - updateField("slot_index", _slotIndex); - genBuffSendRegister(regName, MACCESS_REG_METHOD_GET); - u_int32_t oper_status = getFieldValue("oper_status"); + sendPrmReg(ACCESS_REG_PMAOS, GET, "module=%d,slot_index=%d", _moduleNumber, _slotIndex); - regName = "PDDR"; - resetParser(regName); - updatePortType(); + u_int32_t oper_status = getFieldValue("oper_status"); - updateField("local_port", _localPort); - updateField("pnat", PNAT_LOCAL); - updateField("page_select", PDDR_MODULE_INFO_PAGE); + sendPrmReg(ACCESS_REG_PDDR, GET, "page_select=%d", PDDR_MODULE_INFO_PAGE); - genBuffSendRegister(regName, MACCESS_REG_METHOD_GET); setPrintTitle(_moduleInfoCmd, "Module Info", _productTechnology >= PRODUCT_16NM ? MODULE_INFO_AMBER : MODULE_INFO_LAST); - bool valid = (_cableMediaType != UNIDENTIFIED) && _plugged; + bool valid = (_cableMediaType != UNIDENTIFIED) && _plugged; prepareStaticInfoSection(valid); prepareAttenuationAndFwSection(valid); preparePowerAndCdrSection(valid); @@ -1797,20 +1677,19 @@ void MlxlinkCommander::operatingInfoPage() { try { - string regName = "PDDR"; - resetParser(regName); - updatePortType(); - updateField("local_port", _localPort); - updateField("pnat", PNAT_LOCAL); - updateField("page_select", PDDR_OPERATIONAL_INFO_PAGE); - genBuffSendRegister(regName, MACCESS_REG_METHOD_GET); - _protoActive = getFieldValue("proto_active"); - _fecActive = getFieldValue("fec_mode_active"); + sendPrmReg(ACCESS_REG_PDDR, GET, "page_select=%d", PDDR_OPERATIONAL_INFO_PAGE); u_int32_t phyMngrFsmState = getFieldValue("phy_mngr_fsm_state"); int loopbackMode = (phyMngrFsmState != PHY_MNGR_DISABLED) ? getFieldValue("loopback_mode") : -1; + u_int32_t ethAnFsmState = getFieldValue("eth_an_fsm_state"); + string color = + MlxlinkRecord::state2Color(phyMngrFsmState == PHY_MNGR_RX_DISABLE ? YELLOW : (STATUS_COLOR)phyMngrFsmState); + _protoActive = getFieldValue("proto_active"); + _fecActive = getFieldValue("fec_mode_active"); + _linkUP = (phyMngrFsmState == PHY_MNGR_ACTIVE_LINKUP); _portPolling = phyMngrFsmState == PHY_MNGR_POLLING; _protoCapability = getFieldValue("cable_ext_eth_proto_cap"); + if (_protoActive == IB) { _protoCapability = getFieldValue("cable_link_speed_cap"); @@ -1818,50 +1697,34 @@ void MlxlinkCommander::operatingInfoPage() _protoAdmin = (phyMngrFsmState != 0) ? getFieldValue("core_to_phy_link_proto_enabled") : getFieldValue("phy_manager_link_proto_enabled"); } + getPtys(); bool extended = _activeSpeedEx && _protoAdminEx; _isPam4Speed = isPAM4Speed(_protoActive == IB ? _activeSpeed : _activeSpeedEx, _protoActive, extended); _linkSpeed = extended ? _activeSpeedEx : _activeSpeed; + _speedBerCsv = activeSpeed2gNum(_linkSpeed, extended); + _speedStrG = activeSpeed2Str(_linkSpeed, extended); getActualNumOfLanes(_linkSpeed, extended); - resetParser(regName); - updatePortType(); - updateField("local_port", _localPort); - updateField("pnat", PNAT_LOCAL); - updateField("page_select", PDDR_OPERATIONAL_INFO_PAGE); - - genBuffSendRegister(regName, MACCESS_REG_METHOD_GET); - setPrintTitle(_operatingInfoCmd, "Operational Info", PDDR_OPERATIONAL_INFO_LAST, !_prbsTestMode); - _speedBerCsv = activeSpeed2gNum(_linkSpeed, extended); - _speedStrG = activeSpeed2Str(_linkSpeed, extended); - string color = - MlxlinkRecord::state2Color(phyMngrFsmState == PHY_MNGR_RX_DISABLE ? YELLOW : (STATUS_COLOR)phyMngrFsmState); - setPrintVal(_operatingInfoCmd, "State", _mlxlinkMaps->_pmFsmState[phyMngrFsmState], color, true, + setPrintVal(_operatingInfoCmd, "State", getStrByValue(phyMngrFsmState, _mlxlinkMaps->_pmFsmState), color, true, !_prbsTestMode); - string physical_state = _mlxlinkMaps->_ethANFsmState[getFieldValue("eth_an_fsm_state")]; - setPrintVal(_operatingInfoCmd, "Physical state", physical_state, color, !_prbsTestMode); + setPrintVal(_operatingInfoCmd, "Physical state", getStrByValue(ethAnFsmState, _mlxlinkMaps->_ethANFsmState), + color, !_prbsTestMode); setPrintVal(_operatingInfoCmd, "Speed", _speedStrG, color, !_prbsTestMode, _linkUP); setPrintVal(_operatingInfoCmd, "Width", to_string(_numOfLanes) + "x", color, !_prbsTestMode, _linkUP); - - u_int32_t fec_mode = getFieldValue("fec_mode_active"); - string fec_mode_str = _mlxlinkMaps->_fecModeActive[fec_mode]; - setPrintVal(_operatingInfoCmd, "FEC", fec_mode_str == "" ? "N/A" : fec_mode_str, - fec_mode_str == "" ? MlxlinkRecord::state2Color(0) : color, !_prbsTestMode, _linkUP); - + setPrintVal(_operatingInfoCmd, "FEC", getStrByValue(_fecActive, _mlxlinkMaps->_fecModeActive), + _mlxlinkMaps->_fecModeActive[_fecActive] == "" ? MlxlinkRecord::state2Color(0) : color, + !_prbsTestMode, _linkUP); setPrintVal(_operatingInfoCmd, "Loopback Mode", _mlxlinkMaps->_loopbackModeList[loopbackMode].second, getLoopbackColor(loopbackMode), true, !_prbsTestMode && loopbackMode != -1); setPrintVal(_operatingInfoCmd, "Auto Negotiation", _mlxlinkMaps->_anDisableList[_anDisable] + _speedForce, getAnDisableColor(_anDisable), true, !_prbsTestMode); + // Checking cable DDM capability - resetParser(regName); - updatePortType(); - updateField("local_port", _localPort); - updateField("pnat", PNAT_LOCAL); - updateField("page_select", PDDR_MODULE_INFO_PAGE); + sendPrmReg(ACCESS_REG_PDDR, GET, "page_select=%d", PDDR_MODULE_INFO_PAGE); - genBuffSendRegister(regName, MACCESS_REG_METHOD_GET); _ddmSupported = getFieldValue("temperature") && _numOfLanes; } catch (const std::exception& exc) @@ -1908,15 +1771,8 @@ void MlxlinkCommander::troubInfoPage() { try { - string regName = "PDDR"; - resetParser(regName); - updatePortType(); - updateField("local_port", _localPort); - updateField("pnat", PNAT_LOCAL); - updateField("page_select", PDDR_TROUBLESHOOTING_INFO_PAGE); - updateField("group_opcode", ADVANCED_OPCODE); - - genBuffSendRegister(regName, MACCESS_REG_METHOD_GET); + sendPrmReg(ACCESS_REG_PDDR, GET, "page_select=%d,group_opcode=%d", PDDR_TROUBLESHOOTING_INFO_PAGE, + ADVANCED_OPCODE); u_int32_t advancedOpcode = getFieldValue("advanced_opcode"); string color = status2Color(advancedOpcode); @@ -1996,13 +1852,7 @@ void MlxlinkCommander::showPddr() void MlxlinkCommander::getPtys() { - string regName = "PTYS"; - resetParser(regName); - updatePortType(); - updateField("local_port", _localPort); - updateField("proto_mask", _protoActive); - - genBuffSendRegister(regName, MACCESS_REG_METHOD_GET); + sendPrmReg(ACCESS_REG_PTYS, GET, "proto_mask=%d", _protoActive); if (_protoActive == ETH) { @@ -2078,41 +1928,27 @@ string MlxlinkCommander::prbsMaskToMode(u_int32_t mask, u_int32_t modeSelector) std::map MlxlinkCommander::getPprt() { - string regName = "PPRT"; - resetParser(regName); - updatePortType(); + std::map pprtMap; - updateField("local_port", _localPort); - updateField("pnat", PNAT_LOCAL); - updateField("e", PPRT_PPTT_ENABLE); + sendPrmReg(ACCESS_REG_PPRT, GET, "e=%d", PPRT_PPTT_ENABLE); - genBuffSendRegister(regName, MACCESS_REG_METHOD_GET); + u_int32_t statusMask = getFieldValue("prbs_lock_status"); + statusMask |= (getFieldValue("prbs_lock_status_ext") << 4); - std::map pprtMap; pprtMap["pprtPrbsMode"] = prbsMaskToMode(getFieldValue("prbs_mode_admin"), PRBS_RX); pprtMap["pprtLaneRate"] = prbsMaskToLaneRate(getFieldValue("lane_rate_oper")); pprtMap["pprtTuningStatus"] = prbsMaskToTuningStatus(getFieldValue("prbs_rx_tuning_status")); - bool pcie = _userInput._pcie; - u_int32_t numOfLanesToUse = (pcie) ? _numOfLanesPcie : _numOfLanes; - u_int32_t statusMask = getFieldValue("prbs_lock_status"); - statusMask |= (getFieldValue("prbs_lock_status_ext") << 4); - pprtMap["pprtLockStatus"] = prbsMaskToLockStatus(statusMask, numOfLanesToUse); + pprtMap["pprtLockStatus"] = prbsMaskToLockStatus(statusMask, _numOfLanes); + return pprtMap; } std::map MlxlinkCommander::getPptt() { - string regName = "PPTT"; - resetParser(regName); - updatePortType(); - - updateField("local_port", _localPort); - updateField("pnat", PNAT_LOCAL); - updateField("e", PPRT_PPTT_ENABLE); + std::map ppttMap; - genBuffSendRegister(regName, MACCESS_REG_METHOD_GET); + sendPrmReg(ACCESS_REG_PPTT, GET, "e=%d", PPRT_PPTT_ENABLE); - std::map ppttMap; ppttMap["ppttPrbsMode"] = prbsMaskToMode(getFieldValue("prbs_mode_admin"), PRBS_TX); ppttMap["ppttLaneRate"] = prbsMaskToLaneRate(getFieldValue("lane_rate_admin")); @@ -2121,14 +1957,8 @@ std::map MlxlinkCommander::getPptt() void MlxlinkCommander::showMpcntTimers(DPN& dpn) { - string regName = "MPCNT"; - resetParser(regName); - updateField("depth", dpn.depth); - updateField("pcie_index", dpn.pcieIndex); - updateField("node", dpn.node); - updateField("grp", MPCNT_TIMERS_GROUPS); - - genBuffSendRegister(regName, MACCESS_REG_METHOD_GET); + sendPrmReg(ACCESS_REG_MPCNT, GET, "depth=%d,pcie_index=%d,node=%d,grp=%d", dpn.depth, dpn.pcieIndex, dpn.node, + MPCNT_TIMERS_GROUPS); setPrintTitle(_mpcntTimerInfCmd, "Management PCIe Timers Counters Info", MPCNT_TIMER_INFO_LAST); setPrintVal(_mpcntTimerInfCmd, "dl down", getFieldStr("dl_down")); @@ -2167,28 +1997,19 @@ void MlxlinkCommander::prepareBerInfo() void MlxlinkCommander::prepareBerInfoEDR() { - string regName = "PPCNT"; - resetParser(regName); - updatePortType(); - updateField("local_port", _localPort); - updateField("swid", SWID); - updateField("pnat", PNAT_LOCAL); - updateField("grp", PPCNT_STATISTICAL_GROUP); - updateField("clr", 0); - updateField("prio_tc", 0); + char lastClearTimerBuff[64]; - genBuffSendRegister(regName, MACCESS_REG_METHOD_GET); + sendPrmReg(ACCESS_REG_PPCNT, GET, "grp=%d", PPCNT_STATISTICAL_GROUP); - char buff[64]; - float val = - (float)add32BitTo64(getFieldValue("time_since_last_clear_high"), getFieldValue("time_since_last_clear_low")) / + double lastClearTimer = + (double)add32BitTo64(getFieldValue("time_since_last_clear_high"), getFieldValue("time_since_last_clear_low")) / 60000.0; - sprintf(buff, "%.01f", val); - setPrintVal(_berInfoCmd, "Time Since Last Clear [Min]", buff, ANSI_COLOR_RESET, true, _linkUP); - setPrintVal( - _berInfoCmd, "Effective Physical Errors", - to_string(add32BitTo64(getFieldValue("phy_symbol_errors_high"), getFieldValue("phy_symbol_errors_low"))), - ANSI_COLOR_RESET, true, _linkUP); + sprintf(lastClearTimerBuff, "%.01f", lastClearTimer); + string symbolErrors = + to_string(add32BitTo64(getFieldValue("phy_symbol_errors_high"), getFieldValue("phy_symbol_errors_low"))); + + setPrintVal(_berInfoCmd, "Time Since Last Clear [Min]", lastClearTimerBuff, ANSI_COLOR_RESET, true, _linkUP); + setPrintVal(_berInfoCmd, "Effective Physical Errors", symbolErrors, ANSI_COLOR_RESET, true, _linkUP); std::vector rawErrorsPerLane; string phy_raw_err = ""; @@ -2243,16 +2064,8 @@ void MlxlinkCommander::showBer() if (_protoActive == IB) { - string regName = "PPCNT"; - resetParser(regName); - updatePortType(); - updateField("local_port", _localPort); - updateField("swid", SWID); - updateField("pnat", PNAT_LOCAL); - updateField("grp", PPCNT_IB_PORT_COUNTERS_GROUP); - updateField("clr", 0); - updateField("prio_tc", 0); - genBuffSendRegister(regName, MACCESS_REG_METHOD_GET); + sendPrmReg(ACCESS_REG_PPCNT, GET, "grp=%d", PPCNT_IB_PORT_COUNTERS_GROUP); + setPrintVal(_berInfoCmd, "Link Down Counter", getFieldStr("link_downed_counter"), ANSI_COLOR_RESET, true, _linkUP); setPrintVal(_berInfoCmd, "Link Error Recovery Counter", getFieldStr("link_error_recovery_counter"), @@ -2270,18 +2083,7 @@ void MlxlinkCommander::showBer() void MlxlinkCommander::showTestModeBer() { - string regName = "PPCNT"; - resetParser(regName); - updatePortType(); - - updateField("local_port", _localPort); - updateField("swid", SWID); - updateField("pnat", PNAT_LOCAL); - updateField("grp", PPCNT_STATISTICAL_GROUP); - updateField("clr", 0); - updateField("prio_tc", 0); - - genBuffSendRegister(regName, MACCESS_REG_METHOD_GET); + sendPrmReg(ACCESS_REG_PPCNT, GET, "grp=%d", PPCNT_STATISTICAL_GROUP); std::vector errors; for (u_int32_t lane = 0; lane < _numOfLanes; lane++) @@ -2291,8 +2093,8 @@ void MlxlinkCommander::showTestModeBer() } char buff[64]; - float val = - (float)add32BitTo64(getFieldValue("time_since_last_clear_high"), getFieldValue("time_since_last_clear_low")) / + double val = + (double)add32BitTo64(getFieldValue("time_since_last_clear_high"), getFieldValue("time_since_last_clear_low")) / 60000.0; sprintf(buff, "%.01f", val); @@ -2316,15 +2118,8 @@ void MlxlinkCommander::getPcieNdrCounters() void MlxlinkCommander::showMpcntPerformance(DPN& dpn) { - string regName = "MPCNT"; - resetParser(regName); - - updateField("depth", dpn.depth); - updateField("pcie_index", dpn.pcieIndex); - updateField("node", dpn.node); - updateField("grp", MPCNT_PERFORMANCE_GROUP); - - genBuffSendRegister(regName, MACCESS_REG_METHOD_GET); + sendPrmReg(ACCESS_REG_MPCNT, GET, "depth=%d,pcie_index=%d,node=%d,grp=%d", dpn.depth, dpn.pcieIndex, dpn.node, + MPCNT_PERFORMANCE_GROUP); setPrintTitle(_mpcntPerfInfCmd, "Management PCIe Performance Counters Info", MPCNT_PERFORMANCE_INFO_LAST + 2); setPrintVal(_mpcntPerfInfCmd, "RX Errors", getFieldStr("rx_errors")); @@ -2364,9 +2159,8 @@ void MlxlinkCommander::prepare40_28_16nmEyeInfo(u_int32_t numOfLanes) std::vector phaseWidths; string phaseEONegStr = "N/A"; string offsetEONegStr = "N/A"; - string regName = "SLRG"; - bool validPhaseHeight = _productTechnology == PRODUCT_40NM || _productTechnology == PRODUCT_28NM || - _productTechnology == PRODUCT_16NM || _userInput._pcie; + bool validPhaseHeight = _productTechnology <= PRODUCT_16NM || _userInput._pcie; + string height_eo_pos("height_eo_pos"); string height_eo_neg("height_eo_neg"); string phase_eo_pos("phase_eo_pos"); @@ -2378,15 +2172,9 @@ void MlxlinkCommander::prepare40_28_16nmEyeInfo(u_int32_t numOfLanes) phase_eo_pos.append("_mid"); phase_eo_neg.append("_mid"); } - for (u_int32_t i = 0; i < numOfLanes; i++) + for (u_int32_t lane = 0; lane < numOfLanes; lane++) { - resetParser(regName); - updatePortType(); - updateField("local_port", _localPort); - updateField("pnat", (_userInput._pcie) ? PNAT_PCIE : PNAT_LOCAL); - updateField("lane", i); - - genBuffSendRegister(regName, MACCESS_REG_METHOD_GET); + sendPrmReg(ACCESS_REG_SLRG, GET, "lane=%d", lane); physicalGrades.push_back(MlxlinkRecord::addSpaceForSlrg(to_string(getFieldValue("grade")))); if (validPhaseHeight) @@ -2429,12 +2217,7 @@ void MlxlinkCommander::startSlrgPciScan(u_int32_t numOfLanesToUse) // Start EOM measurements per lane for (u_int32_t lane = 0; lane < numOfLanesToUse; lane++) { - resetParser(ACCESS_REG_SLRG); - updateField("local_port", _localPort); - updateField("pnat", PNAT_PCIE); - updateField("lane", lane); - updateField("fom_measurment", SLRG_EOM_COMPOSITE); - genBuffSendRegister(ACCESS_REG_SLRG, MACCESS_REG_METHOD_GET); + sendPrmReg(ACCESS_REG_SLRG, GET, "lane=%d,fom_measurment=%d", lane, SLRG_EOM_COMPOSITE); } // For each lane, wait until process finish for (u_int32_t lane = 0; lane < numOfLanesToUse; lane++) @@ -2442,15 +2225,13 @@ void MlxlinkCommander::startSlrgPciScan(u_int32_t numOfLanesToUse) u_int32_t it = 0; while (it < SLRG_PCIE_7NM_TIMEOUT) { - resetParser(ACCESS_REG_SLRG); - updateField("local_port", _localPort); - updateField("pnat", PNAT_PCIE); - updateField("lane", lane); - genBuffSendRegister(ACCESS_REG_SLRG, MACCESS_REG_METHOD_GET); + sendPrmReg(ACCESS_REG_SLRG, GET, "lane=%d", lane); + if (getFieldValue("status")) { break; } + it++; msleep(SLRG_PCIE_7NM_SLEEP); } @@ -2479,13 +2260,8 @@ void MlxlinkCommander::prepare7nmEyeInfo(u_int32_t numOfLanesToUse) for (u_int32_t lane = 0; lane < numOfLanesToUse; lane++) { status = 0; - resetParser(ACCESS_REG_SLRG); - updatePortType(); - updateField("local_port", _localPort); - updateField("pnat", (_userInput._pcie) ? PNAT_PCIE : PNAT_LOCAL); - updateField("lane", lane); - updateField("fom_measurment", fomMeasurement); - genBuffSendRegister(ACCESS_REG_SLRG, MACCESS_REG_METHOD_GET); + + sendPrmReg(ACCESS_REG_SLRG, GET, "lane=%d,fom_measurment=%d", lane, fomMeasurement); status = getFieldValue("status"); initialFom.push_back(MlxlinkRecord::addSpaceForSlrg(status ? getFieldStr("initial_fom") : "N/A")); @@ -2525,12 +2301,11 @@ void MlxlinkCommander::showEye() showEyeTitle += " (PCIe)"; } setPrintTitle(_eyeOpeningInfoCmd, showEyeTitle, EYE_OPENING_INFO_LAST); - if (_productTechnology == PRODUCT_16NM || _productTechnology == PRODUCT_28NM || - _productTechnology == PRODUCT_40NM) + if (_productTechnology <= PRODUCT_16NM) { prepare40_28_16nmEyeInfo(numOfLanesToUse); } - else if (_productTechnology == PRODUCT_7NM) + else if (_productTechnology >= PRODUCT_7NM) { prepare7nmEyeInfo(numOfLanesToUse); } @@ -2622,9 +2397,7 @@ void MlxlinkCommander::showFEC() { try { - resetParser(ACCESS_REG_PPLM); - updateField("local_port", _localPort); - genBuffSendRegister(ACCESS_REG_PPLM, MACCESS_REG_METHOD_GET); + sendPrmReg(ACCESS_REG_PPLM, GET); string supportedSpeedsStr = SupportedSpeeds2Str(_protoActive, _deviceCapability, _protoCapabilityEx); vector supportedSpeeds = MlxlinkRecord::split(supportedSpeedsStr, ","); @@ -2677,7 +2450,7 @@ string MlxlinkCommander::getSltpHeader() vector sltpHeader; map sltpParam = _mlxlinkMaps->_SltpNdrParams; - if (_productTechnology == PRODUCT_7NM) + if (_productTechnology >= PRODUCT_7NM) { bool is100gPerLane = isSpeed100GPerLane(_protoActive == IB ? _activeSpeed : _activeSpeedEx, _protoActive); bool is50gPerLane = isSpeed50GPerLane(_protoActive == IB ? _activeSpeed : _activeSpeedEx, _protoActive); @@ -2748,23 +2521,17 @@ void MlxlinkCommander::showSltp() } setPrintVal(_sltpInfoCmd, "Serdes TX parameters", sltpHeader, ANSI_COLOR_RESET, true, true, true); - for (u_int32_t i = 0; i < numOfLanesToUse; i++) + for (u_int32_t lane = 0; lane < numOfLanesToUse; lane++) { - resetParser(ACCESS_REG_SLTP); - updatePortType(); - updateField("local_port", _localPort); - updateField("pnat", (_userInput._pcie) ? PNAT_PCIE : PNAT_LOCAL); - updateField("lane", i); - updateField("c_db", _userInput._db); - genBuffSendRegister(ACCESS_REG_SLTP, MACCESS_REG_METHOD_GET); + sendPrmReg(ACCESS_REG_SLTP, GET, "lane=%d,c_db=%d", lane, _userInput._db); - if (_productTechnology == PRODUCT_7NM) + if (_productTechnology >= PRODUCT_7NM) { - prepareSltpNdrGen(sltpLanes, i); + prepareSltpNdrGen(sltpLanes, lane); } else { - prepareSltpEdrHdrGen(sltpLanes, i); + prepareSltpEdrHdrGen(sltpLanes, lane); } if (!getFieldValue("status")) @@ -2772,8 +2539,8 @@ void MlxlinkCommander::showSltp() valid = false; } - setPrintVal(_sltpInfoCmd, "Lane " + to_string(i), getStringFromVector(sltpLanes[i]), ANSI_COLOR_RESET, true, - valid, true); + setPrintVal(_sltpInfoCmd, "Lane " + to_string(lane), getStringFromVector(sltpLanes[lane]), ANSI_COLOR_RESET, + true, valid, true); } cout << _sltpInfoCmd; } @@ -2789,23 +2556,24 @@ void MlxlinkCommander::showDeviceData() try { std::vector showDeviceDataValues; - string regName = "MSGI"; bool success = false; + try { - resetParser(regName); - genBuffSendRegister(regName, MACCESS_REG_METHOD_GET); + sendPrmReg(ACCESS_REG_MSGI, GET); success = true; } catch (...) { } + setPrintTitle(_showDeviceInfoCmd, "Device Info", DEVICE_INFO_LAST); - setPrintVal(_showDeviceInfoCmd, "Part Number", success ? getDevicePN() : "N/A"); - setPrintVal(_showDeviceInfoCmd, "Part Name", success ? getDeviceProductName() : "N/A"); - setPrintVal(_showDeviceInfoCmd, "Serial Number", success ? getDeviceSN() : "N/A"); - setPrintVal(_showDeviceInfoCmd, "Revision", success ? getDeviceRev() : "N/A"); - setPrintVal(_showDeviceInfoCmd, "FW Version", getDeviceFW()); + + setPrintVal(_showDeviceInfoCmd, "Part Number", success ? getAscii("part_number", 20) : "N/A"); + setPrintVal(_showDeviceInfoCmd, "Part Name", success ? getAscii("product_name", 64) : "N/A"); + setPrintVal(_showDeviceInfoCmd, "Serial Number", success ? getAscii("serial_number", 24) : "N/A"); + setPrintVal(_showDeviceInfoCmd, "Revision", success ? getVendorRev(getFieldValue("revision")) : "N/A"); + setPrintVal(_showDeviceInfoCmd, "FW Version", getFwVersion()); cout << _showDeviceInfoCmd; @@ -2830,17 +2598,13 @@ void MlxlinkCommander::showBerMonitorInfo() } try { - string regName = "PPBMC"; string monitor_state = "N/A"; string monitor_type = "N/A"; string alarm_th = "N/A"; string warning_th = "N/A"; string normal_th = "N/A"; - resetParser(regName); - updatePortType(); - updateField("local_port", _localPort); - updateField("pnat", PNAT_LOCAL); - genBuffSendRegister(regName, MACCESS_REG_METHOD_GET); + + sendPrmReg(ACCESS_REG_PPBMC, GET); monitor_state = _mlxlinkMaps->_ppbmcBerMonitorState[getFieldValue("monitor_state")]; u_int32_t monitor_type_int = getFieldValue("monitor_type"); @@ -2864,21 +2628,20 @@ void MlxlinkCommander::showExternalPhy() try { gearboxBlock(PEPC_SHOW_FLAG); + if (_isHCA || _devID == DeviceSwitchIB || _devID == DeviceSwitchIB2 || _devID == DeviceQuantum || - _devID == DeviceQuantum2) + _devID == DeviceQuantum2 || _devID == DeviceQuantum3 || _devID == DeviceGB100) { throw MlxRegException("\"--" PEPC_SHOW_FLAG "\" option is not supported for HCA and InfiniBand switches"); } - string regName = "PEPC"; - string twisted_pair_an = "N/A"; - string twisted_pair_force_mode = "N/A"; - string twisted_pair_an_mode = "N/A"; - resetParser(regName); - updateField("local_port", _localPort); - genBuffSendRegister(regName, MACCESS_REG_METHOD_GET); - twisted_pair_force_mode = _mlxlinkMaps->_pepcTwistedPairForceMode[getFieldValue("twisted_pair_force_mode")]; + + sendPrmReg(ACCESS_REG_PEPC, GET); + setPrintTitle(_extPhyInfoCmd, "External PHY Info", EXT_PHY_INFO_INFO_LAST); - setPrintVal(_extPhyInfoCmd, "Twisted Pair Force Mode", twisted_pair_force_mode); + + setPrintVal(_extPhyInfoCmd, "Twisted Pair Force Mode", + getStrByValue(getFieldValue("twisted_pair_force_mode"), _mlxlinkMaps->_pepcTwistedPairForceMode)); + cout << _extPhyInfoCmd; } catch (const std::exception& exc) @@ -2890,80 +2653,67 @@ void MlxlinkCommander::showExternalPhy() void MlxlinkCommander::initValidDPNList() { - if (!_validDpns.empty()) - { - return; - } - string regName = "MPEIN"; bool valid = false; u_int32_t maxNumOfHost = 4; u_int32_t maxNumOfDsPort = 16; u_int32_t maxDepth = 4; - u_int32_t depth, pcie_index, node; + u_int32_t depth, pcieIndex, node; - for (pcie_index = 0; pcie_index < maxNumOfHost; pcie_index++) + if (_validDpns.empty()) { - resetParser(regName); - updateField("pcie_index", pcie_index); - updateField("depth", 0); - updateField("node", 0); - try + for (pcieIndex = 0; pcieIndex < maxNumOfHost; pcieIndex++) { - genBuffSendRegister(regName, MACCESS_REG_METHOD_GET); - valid = getFieldValue("bdf0"); - } - catch (...) - { - valid = false; - } - if (valid && getFieldValue("port_type") == PORT_TYPE_EP) - { - _validDpns.push_back(DPN(0, pcie_index, 0)); - } - else - { - if (valid && getFieldValue("port_type") == PORT_TYPE_US) + try { - _validDpns.push_back(DPN(0, pcie_index, 0)); + sendPrmReg(ACCESS_REG_MPEIN, GET, "depth=%d,pcie_index=%d,node=%d", 0, pcieIndex, 0); + valid = getFieldValue("bdf0"); } - for (depth = 1; depth < maxDepth; depth++) + catch (...) { - resetParser(regName); - updateField("pcie_index", pcie_index); - updateField("depth", depth); - updateField("node", 0); - try + valid = false; + } + if (valid && getFieldValue("port_type") == PORT_TYPE_EP) + { + _validDpns.push_back(DPN(0, pcieIndex, 0)); + } + else + { + if (valid && getFieldValue("port_type") == PORT_TYPE_US) + { + _validDpns.push_back(DPN(0, pcieIndex, 0)); + } + for (depth = 1; depth < maxDepth; depth++) { - genBuffSendRegister(regName, MACCESS_REG_METHOD_GET); - if (getFieldValue("port_type") == PORT_TYPE_DS) + try { - _validDpns.push_back(DPN(depth, pcie_index, 0)); - for (node = 1; node < maxNumOfDsPort; node++) + sendPrmReg(ACCESS_REG_MPEIN, GET, "depth=%d,pcie_index=%d,node=%d", depth, pcieIndex, 0); + if (getFieldValue("port_type") == PORT_TYPE_DS) { - resetParser(regName); - updateField("pcie_index", pcie_index); - updateField("depth", depth); - updateField("node", node); - try - { - genBuffSendRegister(regName, MACCESS_REG_METHOD_GET); - _validDpns.push_back(DPN(depth, pcie_index, node)); - } - catch (...) + _validDpns.push_back(DPN(depth, pcieIndex, 0)); + for (node = 1; node < maxNumOfDsPort; node++) { - break; + try + { + sendPrmReg(ACCESS_REG_MPEIN, GET, "depth=%d,pcie_index=%d,node=%d", depth, + pcieIndex, node); + _validDpns.push_back(DPN(depth, pcieIndex, node)); + } + catch (...) + { + break; + } } } } - } - catch (...) - { + catch (...) + { + } } } - } - if (!_isHCA) - { - break; + if (!_isHCA) + { + break; + } } } } @@ -3034,15 +2784,8 @@ void MlxlinkCommander::showPcie() void MlxlinkCommander::showPcieState(DPN& dpn) { - string regName = "MPEIN"; - resetParser(regName); - - _pcieInfoCmd = MlxlinkCmdPrint(); - updateField("pcie_index", dpn.pcieIndex); - updateField("depth", dpn.depth); - updateField("node", dpn.node); + sendPrmReg(ACCESS_REG_MPEIN, GET, "depth=%d,pcie_index=%d,node=%d", dpn.depth, dpn.pcieIndex, dpn.node); - genBuffSendRegister(regName, MACCESS_REG_METHOD_GET); string linkSpeedEnabled = " (" + pcieSpeedStr(getFieldValue("link_speed_enabled")) + ")"; string linkWidthEnabled = " (" + to_string((getFieldValue("link_width_enabled"))) + "X)"; _numOfLanesPcie = getFieldValue("link_width_active"); @@ -3065,6 +2808,8 @@ void MlxlinkCommander::collectAMBER() { if (_productTechnology >= PRODUCT_16NM) { + MlxlinkRecord::printCmdLine("Collecting amBER and producing report to " + _userInput._csvBer, _jsonRoot); + initAmBerCollector(); if (!_isHCA) @@ -3073,7 +2818,7 @@ void MlxlinkCommander::collectAMBER() if (_userInput._portSpecified) { PortGroup pg{_localPort, _userInput._labelPort, 0, _userInput._splitPort}; - if (_devID == DeviceQuantum2) + if (_devID == DeviceQuantum2 || _devID == DeviceQuantum3 || _devID == DeviceGB100) { pg.secondSplit = _userInput._secondSplitProvided ? _userInput._secondSplitPort : 0; } @@ -3082,9 +2827,8 @@ void MlxlinkCommander::collectAMBER() else { // collect all ports info if the port flag wasn't provided - string regName = "MGPIR"; - resetParser(regName); - genBuffSendRegister(regName, MACCESS_REG_METHOD_GET); + sendPrmReg(ACCESS_REG_MGPIR, GET); + u_int32_t numOfPorts = getFieldValue("num_of_modules"); vector labelPorts; _ignorePortStatus = false; @@ -3092,6 +2836,7 @@ void MlxlinkCommander::collectAMBER() { labelPorts.push_back(to_string(labelPort)); } + handleLabelPorts(labelPorts, true); _amberCollector->_localPorts = _localPortsPerGroup; } @@ -3135,8 +2880,8 @@ void MlxlinkCommander::collectBER() string active_fec = _prbsTestMode ? "N/A" : _mlxlinkMaps->_fecModeActive[_fecActive]; findAndReplace(active_fec, ",", " "); - string devicePN = getDevicePN(true); - string deviceFW = getDeviceFW(); + string devicePN = getDevicePN(); + string deviceFW = _fwVersion; getCableParams(); u_int32_t linkDown = getLinkDown(); std::map errorsVector = getRawEffectiveErrors(); @@ -3190,18 +2935,13 @@ void MlxlinkCommander::showTxGroupMapping() { try { - if (_devID != DeviceSpectrum2 && _devID != DeviceQuantum && _devID != DeviceQuantum2) + if (_devID != DeviceSpectrum2 && _devID != DeviceQuantum && _devID != DeviceQuantum2 && + _devID != DeviceQuantum3 && _devID != DeviceGB100) { throw MlxRegException("Port group mapping supported for Spectrum-2 and Quantum switches only!"); } - string regName = "PGMR"; - resetParser(regName); - updateField("local_port", 1); // it will not affect the request - updateField("group", _userInput._showGroup); - updateField("pnat", PNAT_LOCAL); - updateField("pg_sel", TX_GROUP); - genBuffSendRegister(regName, MACCESS_REG_METHOD_GET); + sendPrmReg(ACCESS_REG_PGMR, GET, "local_port=%d,group=%d,pg_sel=%d", 1, _userInput._showGroup, TX_GROUP); vector localPorts; u_int32_t localPortMask = 0; @@ -3213,7 +2953,9 @@ void MlxlinkCommander::showTxGroupMapping() localPorts.push_back(i); } } + string ports = getStringFromVector(localToPortsPerGroup(localPorts)); + setPrintTitle(_portGroupMapping, "Tx Port Group Mapping ", 1); char title[64]; sprintf(title, "Ports Mapped to Group %d", _userInput._showGroup); @@ -3231,38 +2973,17 @@ void MlxlinkCommander::showTxGroupMapping() int MlxlinkCommander::getLinkDown() { - string regName = "PPCNT"; - resetParser(regName); - updatePortType(); - - updateField("local_port", _localPort); - updateField("swid", SWID); - updateField("pnat", PNAT_LOCAL); - updateField("grp", PPCNT_PHY_GROUP); - updateField("clr", 0); - updateField("prio_tc", 0); - - genBuffSendRegister(regName, MACCESS_REG_METHOD_GET); + sendPrmReg(ACCESS_REG_PPCNT, GET, "grp=%d", PPCNT_PHY_GROUP); return getFieldValue("link_down_events"); } std::map MlxlinkCommander::getRawEffectiveErrorsinTestMode() { - string regName = "PPCNT"; - resetParser(regName); - updatePortType(); - - updateField("local_port", _localPort); - updateField("swid", SWID); - updateField("pnat", PNAT_LOCAL); - updateField("grp", PPCNT_PHY_GROUP); - updateField("clr", 0); - updateField("prio_tc", 0); + std::map errorsVector; - genBuffSendRegister(regName, MACCESS_REG_METHOD_GET); + sendPrmReg(ACCESS_REG_PPCNT, GET, "grp=%d", PPCNT_PHY_GROUP); - std::map errorsVector; errorsVector["phy_corrected_bits_lane0"] = add32BitTo64(getFieldValue("edpl_bip_errors_lane0_high"), getFieldValue("edpl_bip_errors_lane0_low")); errorsVector["phy_corrected_bits_lane1"] = @@ -3274,15 +2995,7 @@ std::map MlxlinkCommander::getRawEffectiveErrorsinTestMode() errorsVector["time_since_last_clear_sec"] = (add32BitTo64(getFieldValue("time_since_last_clear_high"), getFieldValue("time_since_last_clear_low"))) / 1000; - resetParser(regName); - updatePortType(); - - updateField("local_port", _localPort); - updateField("swid", SWID); - updateField("pnat", PNAT_LOCAL); - updateField("grp", PPCNT_STATISTICAL_GROUP); - updateField("clr", 0); - updateField("prio_tc", 0); + sendPrmReg(ACCESS_REG_PPCNT, GET, "grp=%d", PPCNT_STATISTICAL_GROUP); float effBerCoef = 0, effBerMag = 0, rawBerCoef = 0, rawBerMag = 0; float raw_ber = 0, eff_ber = 0; @@ -3311,18 +3024,8 @@ std::map MlxlinkCommander::getRawEffectiveErrors() { return getRawEffectiveErrorsinTestMode(); } - string regName = "PPCNT"; - resetParser(regName); - updatePortType(); - - updateField("local_port", _localPort); - updateField("swid", SWID); - updateField("pnat", PNAT_LOCAL); - updateField("grp", PPCNT_STATISTICAL_GROUP); - updateField("clr", 0); - updateField("prio_tc", 0); - genBuffSendRegister(regName, MACCESS_REG_METHOD_GET); + sendPrmReg(ACCESS_REG_PPCNT, GET, "grp=%d", PPCNT_STATISTICAL_GROUP); std::map errorsVector; errorsVector["phy_corrected_bits_lane0"] = @@ -3367,17 +3070,13 @@ std::map MlxlinkCommander::getRawEffectiveErrors() string MlxlinkCommander::getSupportedPrbsRates(u_int32_t modeSelector) { - string regName = "PPRT"; + string regName = ACCESS_REG_PPRT; if (modeSelector == PRBS_TX) { - regName = "PPTT"; + regName = ACCESS_REG_PPTT; } - resetParser(regName); - updatePortType(); - updateField("local_port", _localPort); - updateField("pnat", PNAT_LOCAL); + sendPrmReg(regName, GET); - genBuffSendRegister(regName, MACCESS_REG_METHOD_GET); u_int32_t capsMask = getFieldValue("lane_rate_cap"); string modeCapStr = ""; @@ -3394,17 +3093,13 @@ string MlxlinkCommander::getSupportedPrbsRates(u_int32_t modeSelector) string MlxlinkCommander::getSupportedPrbsModes(u_int32_t modeSelector) { - string regName = "PPRT"; + string regName = ACCESS_REG_PPRT; if (modeSelector == PRBS_TX) { - regName = "PPTT"; + regName = ACCESS_REG_PPTT; } - resetParser(regName); - updatePortType(); - updateField("local_port", _localPort); - updateField("pnat", PNAT_LOCAL); + sendPrmReg(regName, GET); - genBuffSendRegister(regName, MACCESS_REG_METHOD_GET); u_int32_t capsMask = getFieldValue("prbs_modes_cap"); capsMask = modeSelector == PRBS_RX ? capsMask & 0xffe3fff : capsMask; string modeCapStr = ""; @@ -3432,30 +3127,14 @@ string MlxlinkCommander::getSupportedPrbsModes(u_int32_t modeSelector) string MlxlinkCommander::getPrbsModeRX() { - string regName = "PPRT"; - resetParser(regName); - updatePortType(); - - updateField("local_port", _localPort); - updateField("pnat", PNAT_LOCAL); - updateField("e", PPRT_PPTT_ENABLE); - - genBuffSendRegister(regName, MACCESS_REG_METHOD_GET); + sendPrmReg(ACCESS_REG_PPRT, GET, "e=%d", PPRT_PPTT_ENABLE); return prbsMaskToMode(getFieldValue("prbs_mode_admin"), PRBS_RX); } u_int32_t MlxlinkCommander::getPrbsRateRX() { - string regName = "PPRT"; - resetParser(regName); - updatePortType(); - - updateField("local_port", _localPort); - updateField("pnat", PNAT_LOCAL); - updateField("e", PPRT_PPTT_ENABLE); - - genBuffSendRegister(regName, MACCESS_REG_METHOD_GET); + sendPrmReg(ACCESS_REG_PPRT, GET, "e=%d", PPRT_PPTT_ENABLE); return prbsMaskToRateNum(getFieldValue("lane_rate_oper")); } @@ -3548,81 +3227,23 @@ bool MlxlinkCommander::getResult(std::map errorsVector, floa return false; } -string MlxlinkCommander::getDevicePN(bool queryMSGI) +string MlxlinkCommander::getFwVersion() { - if (queryMSGI) - { - string regName = "MSGI"; - try - { - resetParser(regName); - genBuffSendRegister(regName, MACCESS_REG_METHOD_GET); - } - catch (...) - { - return "N/A"; - } - } - return getAscii("part_number", 20); + return _fwVersion; } -string MlxlinkCommander::getDeviceSN(bool queryMSGI) +string MlxlinkCommander::getDevicePN() { - if (queryMSGI) + try { - string regName = "MSGI"; - try - { - resetParser(regName); - genBuffSendRegister(regName, MACCESS_REG_METHOD_GET); - } - catch (...) - { - return "N/A"; - } + sendPrmReg(ACCESS_REG_MSGI, GET); } - return getAscii("serial_number", 24); -} - -string MlxlinkCommander::getDeviceProductName(bool queryMSGI) -{ - if (queryMSGI) + catch (...) { - string regName = "MSGI"; - try - { - resetParser(regName); - genBuffSendRegister(regName, MACCESS_REG_METHOD_GET); - } - catch (...) - { - return "N/A"; - } + return "N/A"; } - return getAscii("product_name", 64); -} -string MlxlinkCommander::getDeviceRev(bool queryMSGI) -{ - if (queryMSGI) - { - string regName = "MSGI"; - try - { - resetParser(regName); - genBuffSendRegister(regName, MACCESS_REG_METHOD_GET); - } - catch (...) - { - return "N/A"; - } - } - return getVendorRev(getFieldValue("revision")); -} - -string MlxlinkCommander::getDeviceFW() -{ - return _fwVersion; + return getAscii("part_number", 20); } // Config functions @@ -3633,18 +3254,7 @@ void MlxlinkCommander::clearCounters() { MlxlinkRecord::printCmdLine("Clearing Counters", _jsonRoot); - string regName = "PPCNT"; - resetParser(regName); - updatePortType(); - - updateField("local_port", _localPort); - updateField("swid", SWID); - updateField("pnat", PNAT_LOCAL); - updateField("grp", PPCNT_ALL_GROUPS); - updateField("prio_tc", 0); - updateField("clr", 1); - - genBuffSendRegister(regName, MACCESS_REG_METHOD_SET); + sendPrmReg(ACCESS_REG_PPCNT, SET, "clr=%d,grp=%d", 1, PPCNT_ALL_GROUPS); } catch (const std::exception& exc) { @@ -3660,12 +3270,8 @@ bool MlxlinkCommander::isForceDownSupported() { // checking force_down cap u_int64_t fdCapMask = PCAM_FORCE_DOWN_CAP_MASK; // feature_cap_mask.Bit 45 (feature_cap_mask[2].bit 13) - string regName = "PCAM"; - resetParser(regName); - updateField("feature_group", 0); - updateField("access_reg_group", 0); - genBuffSendRegister(regName, MACCESS_REG_METHOD_GET); + sendPrmReg(ACCESS_REG_PCAM, GET); supported = getFieldValue("feature_cap_mask[2]") & fdCapMask; } @@ -3676,18 +3282,12 @@ void MlxlinkCommander::sendGBPaosCmd(PAOS_ADMIN adminStatus, bool forceDown) { try { - string regName = "PPAOS"; - resetParser(regName); - updateField("swid", SWID); - updatePortType(); - updateField("local_port", _localPort); - updateField("phy_status_admin", adminStatus == PAOS_UP); + string forceDownCmd = ""; if (forceDown) { - updateField("fpd", forceDown); + forceDownCmd = ",fpd=1"; } - - genBuffSendRegister(regName, MACCESS_REG_METHOD_SET); + sendPrmReg(ACCESS_REG_PPAOS, SET, "phy_status_admin=%d%s", adminStatus == PAOS_UP, forceDownCmd.c_str()); } catch (const std::exception& exc) { @@ -3706,21 +3306,16 @@ void MlxlinkCommander::sendPaosCmd(PAOS_ADMIN adminStatus, bool forceDown) } else { - string regName = "PAOS"; - resetParser(regName); - updateField("swid", SWID); - updateField("local_port", _localPort); - updateField("admin_status", adminStatus); - updateField("ase", 1); // Send force down for test mode only + string forceDownCmd = ""; if (!_userInput._prbsMode.empty()) { if (forceDown) { - updateField("fd", 1); + forceDownCmd = ",fd=1"; } } - genBuffSendRegister(regName, MACCESS_REG_METHOD_SET); + sendPrmReg(ACCESS_REG_PAOS, SET, "admin_status=%d,ase=%d%s", adminStatus, 1, forceDownCmd.c_str()); } } catch (const std::exception& exc) @@ -3882,22 +3477,6 @@ void MlxlinkCommander::checkPRBSModeCap(u_int32_t modeSelector, u_int32_t capMas modeToCheck += "A"; } - switch (modeToCheck[-1]) - { - case '8': - findAndReplace(modeToCheck, "8", "A"); - break; - case '4': - findAndReplace(modeToCheck, "4", "B"); - break; - case '2': - findAndReplace(modeToCheck, "2", "C"); - break; - case '1': - findAndReplace(modeToCheck, "1", "D"); - break; - } - // Fetching mode capability from mode list u_int32_t modeCap = 0; @@ -3926,10 +3505,8 @@ void MlxlinkCommander::checkPRBSModeCap(u_int32_t modeSelector, u_int32_t capMas void MlxlinkCommander::checkPrbsRegsCap(const string& prbsReg, const string& laneRate) { u_int32_t modeSelector = (prbsReg == "PPTT") ? PRBS_TX : PRBS_RX; - resetParser(prbsReg); - updateField("local_port", _localPort); - updateField("pnat", PNAT_LOCAL); - genBuffSendRegister(prbsReg, MACCESS_REG_METHOD_GET); + + sendPrmReg(prbsReg, GET); bool invalidRateStr = !laneRate.empty() && !_mlxlinkMaps->_prbsLaneRate[laneRate].capMask; @@ -3992,8 +3569,10 @@ void MlxlinkCommander::checkPprtPptt() } } } + checkPrbsRegsCap("PPRT", _userInput._pprtRate); checkPrbsRegsCap("PPTT", _userInput._ppttRate); + if (_userInput._prbsTxInv) { checkPrbsPolCap("PPTT"); @@ -4011,10 +3590,8 @@ void MlxlinkCommander::checkPrbsPolCap(const string& prbsReg) { invalidPol = "RX"; } - resetParser(prbsReg); - updateField("local_port", _localPort); - updateField("pnat", PNAT_LOCAL); - genBuffSendRegister(prbsReg, MACCESS_REG_METHOD_GET); + + sendPrmReg(prbsReg, GET); if (!getFieldValue("p_c")) { @@ -4024,29 +3601,13 @@ void MlxlinkCommander::checkPrbsPolCap(const string& prbsReg) void MlxlinkCommander::sendPrbsPpaos(bool testMode) { - string regName = "PPAOS"; - resetParser(regName); - updatePortType(); - - updateField("swid", SWID); - updateField("local_port", _localPort); - updateField("phy_test_mode_admin", (testMode ? PPAOS_PHY_TEST_MODE : PPAOS_REGULAR_OPERATION)); - - genBuffSendRegister(regName, MACCESS_REG_METHOD_SET); + sendPrmReg(ACCESS_REG_PPAOS, SET, "phy_test_mode_admin=%d", + (testMode ? PPAOS_PHY_TEST_MODE : PPAOS_REGULAR_OPERATION)); } void MlxlinkCommander::startTuning() { - string regName = "PPRT"; - resetParser(regName); - updatePortType(); - - updateField("local_port", _localPort); - updateField("pnat", PNAT_LOCAL); - updateField("e", PPRT_PPTT_ENABLE); - updateField("s", PPRT_PPTT_START_TUNING); - - genBuffSendRegister(regName, MACCESS_REG_METHOD_SET); + sendPrmReg(ACCESS_REG_PPRT, SET, "e=%d,s=%d", PPRT_PPTT_ENABLE, PPRT_PPTT_START_TUNING); } void MlxlinkCommander::prbsConfiguration(const string& prbsReg, @@ -4057,59 +3618,40 @@ void MlxlinkCommander::prbsConfiguration(const string& prbsReg, bool prbsPolInv) { string rateToUpdate = prbsReg == "PPRT" ? "lane_rate_oper" : "lane_rate_admin"; + string prbsExtraCmd = ""; if (perLaneConfig) { - for (map::iterator it = _userInput._prbsLanesToSet.begin(); - it != _userInput._prbsLanesToSet.end(); - it++) + for (const auto& lane : _userInput._prbsLanesToSet) { - resetParser(prbsReg); - updatePortType(); - updateField("local_port", _localPort); - updateField("pnat", PNAT_LOCAL); - updateField("e", enable); - updateField(rateToUpdate, laneRate); - updateField("prbs_mode_admin", prbsMode); - updateField("le", perLaneConfig); + prbsExtraCmd = ""; if (prbsPolInv) { - updateField("p", prbsPolInv); + prbsExtraCmd += ",p=1"; } - updateField("lane", it->first); + if (laneRate == PRBS_HDR) { - updateField("modulation", PRBS_PAM4_ENCODING); - } - if (prbsReg == "PPRT") - { - updateField("s", 0); + prbsExtraCmd += ",modulation=" + to_string(PRBS_PAM4_ENCODING); } - genBuffSendRegister(prbsReg, MACCESS_REG_METHOD_SET); + + sendPrmReg(prbsReg, SET, "e=%d,%s=%d,prbs_mode_admin=%d,le=%d,lane=%d%s", enable, rateToUpdate.c_str(), + laneRate, prbsMode, perLaneConfig, lane.first, prbsExtraCmd.c_str()); } } else { - resetParser(prbsReg); - updatePortType(); - updateField("local_port", _localPort); - updateField("pnat", PNAT_LOCAL); - updateField("e", enable); - updateField(rateToUpdate, laneRate); - updateField("le", 0); + prbsExtraCmd = ""; if (prbsPolInv) { - updateField("p", prbsPolInv); + prbsExtraCmd += ",p=1"; } - updateField("prbs_mode_admin", prbsMode); if (laneRate == PRBS_HDR) { - updateField("modulation", PRBS_PAM4_ENCODING); + prbsExtraCmd += ",modulation=" + to_string(PRBS_PAM4_ENCODING); } - if (prbsReg == "PPRT") - { - updateField("s", 0); - } - genBuffSendRegister(prbsReg, MACCESS_REG_METHOD_SET); + + sendPrmReg(prbsReg, SET, "e=%d,%s=%d,prbs_mode_admin=%d%s", enable, rateToUpdate.c_str(), laneRate, prbsMode, + prbsExtraCmd.c_str()); } } @@ -4194,16 +3736,14 @@ void MlxlinkCommander::sendPtys() { throw MlxRegException("Cannot Configure Port Speeds in Physical Test Mode. Please Disable First"); } + MlxlinkRecord::printCmdLine("Configuring Port Speeds", _jsonRoot); + validateSpeedStr(); - string regName = "PTYS"; - resetParser(regName); - updatePortType(); - updateField("local_port", _localPort); - updateField("proto_mask", _protoActive); u_int32_t ptysMask = 0x0; - string proto = (_protoActive == IB) ? "ib" : "eth"; + string ptysExtraCmd = ""; + string protoAdminField = ""; for (u_int32_t i = 0; i < _ptysSpeeds.size(); i++) { ptysMask |= ptysSpeedToMask(_ptysSpeeds[i]); @@ -4211,7 +3751,8 @@ void MlxlinkCommander::sendPtys() if (_linkModeForce == true) { gearboxBlock(PTYS_LINK_MODE_FORCE_FLAG); - updateField("an_disable_admin", 1); + + ptysExtraCmd += ",an_disable_admin=1"; } if (_protoActive == IB) { @@ -4219,21 +3760,23 @@ void MlxlinkCommander::sendPtys() { ptysMask |= 0x1; } - updateField("ib_link_width_admin", 7); - updateField("ib_proto_admin", ptysMask); + ptysExtraCmd += ",ib_link_width_admin=7"; + protoAdminField = "ib_proto_admin"; } else { if (_productTechnology >= PRODUCT_16NM) { - updateField("ext_eth_proto_admin", ptysMask); + protoAdminField = "ext_eth_proto_admin"; } else { - updateField("eth_proto_admin", ptysMask); + protoAdminField = "eth_proto_admin"; } } - genBuffSendRegister(regName, MACCESS_REG_METHOD_SET); + + sendPrmReg(ACCESS_REG_PTYS, SET, "proto_mask=%d,%s=%d%s", _protoActive, protoAdminField.c_str(), ptysMask, + ptysExtraCmd.c_str()); } catch (const std::exception& exc) { @@ -4323,24 +3866,22 @@ void MlxlinkCommander::sendPplm() checkPplmCap(); // after calling checkPplmCap, _userInput._speedFec will be changed to the correct fec speed - resetParser(ACCESS_REG_PPLM); - updatePortType(); - updateField("local_port", _localPort); - - string speedToConfigure = - (_linkUP && _userInput._speedFec == "") ? speedToFecSpeedStr(_speedStrG, _numOfLanes) : _userInput._speedFec; + string fecSpeedStr = speedToFecSpeedStr(_speedStrG, _numOfLanes); + string speedToConfigure = (_linkUP && _userInput._speedFec == "") ? fecSpeedStr : _userInput._speedFec; u_int32_t fecAdmin = fecToBit(_userInput._pplmFec, speedToConfigure); + string pplmFecCmd = ""; if (speedToConfigure == "50g" || speedToConfigure == "25g") { // 25g and 50g must be set the same - updateField("fec_override_admin_25g", fecAdmin); - updateField("fec_override_admin_50g", fecAdmin); + pplmFecCmd += "fec_override_admin_25g=" + to_string(fecAdmin); + pplmFecCmd += ",fec_override_admin_50g=" + to_string(fecAdmin); } else { - updateField(string(_protoActive == IB ? "ib_" : "") + "fec_override_admin_" + speedToConfigure, fecAdmin); + pplmFecCmd = string(_protoActive == IB ? "ib_" : "") + "fec_override_admin_" + speedToConfigure; + pplmFecCmd += "=" + to_string(fecAdmin); } - genBuffSendRegister(ACCESS_REG_PPLM, MACCESS_REG_METHOD_SET); + sendPrmReg(ACCESS_REG_PPLM, SET, pplmFecCmd.c_str()); } catch (const std::exception& exc) { @@ -4453,10 +3994,8 @@ u_int32_t MlxlinkCommander::fecToBit(const string& fec, const string& speedStrG) u_int32_t MlxlinkCommander::getFecCapForCheck(const string& speedStr) { u_int32_t fecCapMask = 0; - resetParser(ACCESS_REG_PPLM); - updatePortType(); - updateField("local_port", _localPort); - genBuffSendRegister(ACCESS_REG_PPLM, MACCESS_REG_METHOD_GET); + + sendPrmReg(ACCESS_REG_PPLM, GET); try { @@ -4554,26 +4093,14 @@ void MlxlinkCommander::checkPplmCap() void MlxlinkCommander::getSltpAlevOut(u_int32_t lane) { - resetParser(ACCESS_REG_SLTP); - updatePortType(); - updateField("local_port", _localPort); - updateField("pnat", PNAT_LOCAL); - updateField("lane", lane); - - genBuffSendRegister(ACCESS_REG_SLTP, MACCESS_REG_METHOD_GET); + sendPrmReg(ACCESS_REG_SLTP, GET, "lane=%d", lane); _userInput._sltpParams[SLTP_HDR_OB_ALEV_OUT] = getFieldValue("ob_alev_out"); } void MlxlinkCommander::getSltpRegAndLeva(u_int32_t lane) { - resetParser(ACCESS_REG_SLTP); - updatePortType(); - updateField("local_port", _localPort); - updateField("pnat", PNAT_LOCAL); - updateField("lane", lane); - - genBuffSendRegister(ACCESS_REG_SLTP, MACCESS_REG_METHOD_GET); + sendPrmReg(ACCESS_REG_SLTP, GET, "lane=%d", lane); _userInput._sltpParams[SLTP_EDR_OB_REG] = getFieldValue("ob_reg"); _userInput._sltpParams[SLTP_EDR_OB_LEVA] = getFieldValue("ob_leva"); @@ -4581,13 +4108,7 @@ void MlxlinkCommander::getSltpRegAndLeva(u_int32_t lane) u_int32_t MlxlinkCommander::getLaneSpeed(u_int32_t lane) { - resetParser(ACCESS_REG_SLTP); - updatePortType(); - updateField("local_port", _localPort); - updateField("pnat", PNAT_LOCAL); - updateField("lane", lane); - - genBuffSendRegister(ACCESS_REG_SLTP, MACCESS_REG_METHOD_GET); + sendPrmReg(ACCESS_REG_SLTP, GET, "lane=%d", lane); return getFieldValue("lane_speed"); } @@ -4642,7 +4163,7 @@ void MlxlinkCommander::checkSltpParamsSize() } } } - else if (_productTechnology == PRODUCT_7NM) + else if (_productTechnology >= PRODUCT_7NM) { validateNumOfParamsForNDRGen(); } @@ -4650,15 +4171,18 @@ void MlxlinkCommander::checkSltpParamsSize() { sltpParamsSize = SLTP_EDR_LAST; } - if (_userInput._sltpParams.size() != sltpParamsSize && _productTechnology != PRODUCT_7NM) + if (_userInput._sltpParams.size() != sltpParamsSize && _productTechnology != PRODUCT_7NM && + _productTechnology != PRODUCT_5NM) { throw MlxRegException("Invalid set of Transmitter Parameters"); } } -void MlxlinkCommander::updateSltpEdrHdrFields() +string MlxlinkCommander::updateSltpEdrHdrFields() { map sltpParam = _mlxlinkMaps->_SltpEdrParams; + string sltpParamCmd = ""; + char hdrEdrParamBuff[32]; if (_productTechnology == PRODUCT_16NM) { sltpParam = _mlxlinkMaps->_SltpHdrParams; @@ -4668,38 +4192,49 @@ void MlxlinkCommander::updateSltpEdrHdrFields() { if (param.second.fieldAccess & (FIELD_ACCESS_W | FIELD_ACCESS_ADVANCED)) { - updateField(param.second.prmField, _userInput._sltpParams[param.first]); + snprintf(hdrEdrParamBuff, 32, "%s=%d,", param.second.prmField.c_str(), _userInput._sltpParams[param.first]); + sltpParamCmd += string(hdrEdrParamBuff); } } + + return deleteLastChar(sltpParamCmd); } -void MlxlinkCommander::updateSltpNdrFields() +string MlxlinkCommander::updateSltpNdrFields() { u_int32_t indexCorrection = 0; + char ndrParamBuff[64]; + char hdrParamBuff[32]; + char paramBuff[128]; + string sltpParamsCmd = ""; + if (isSpeed100GPerLane(_protoActive == IB ? _activeSpeed : _activeSpeedEx, _protoActive)) { - updateField("fir_pre3", _userInput._sltpParams[SLTP_NDR_FIR_PRE3]); - updateField("fir_pre2", _userInput._sltpParams[SLTP_NDR_FIR_PRE2]); + snprintf(ndrParamBuff, 64, ",fir_pre3=%d,fir_pre2=%d", _userInput._sltpParams[SLTP_NDR_FIR_PRE3], + _userInput._sltpParams[SLTP_NDR_FIR_PRE2]); } else if (isSpeed50GPerLane(_protoActive == IB ? _activeSpeed : _activeSpeedEx, _protoActive)) { indexCorrection = 1; - updateField("fir_pre2", _userInput._sltpParams[SLTP_NDR_FIR_PRE2 - indexCorrection]); + snprintf(hdrParamBuff, 32, ",fir_pre2=%d", _userInput._sltpParams[SLTP_NDR_FIR_PRE2 - indexCorrection]); } else { indexCorrection = 2; } - updateField("fir_pre1", _userInput._sltpParams[SLTP_NDR_FIR_PRE1 - indexCorrection]); - updateField("fir_main", _userInput._sltpParams[SLTP_NDR_FIR_MAIN - indexCorrection]); - updateField("fir_post1", _userInput._sltpParams[SLTP_NDR_FIR_POST1 - indexCorrection]); + + snprintf(paramBuff, 128, "fir_pre1=%d,fir_main=%d,fir_post1=%d", + _userInput._sltpParams[SLTP_NDR_FIR_PRE1 - indexCorrection], + _userInput._sltpParams[SLTP_NDR_FIR_MAIN - indexCorrection], + _userInput._sltpParams[SLTP_NDR_FIR_POST1 - indexCorrection]); + + return string(paramBuff) + string(hdrParamBuff) + string(ndrParamBuff); } string MlxlinkCommander::getSltpStatus() { - resetParser(ACCESS_REG_SLTP); - updatePortType(); - updateField("local_port", _localPort); + sendPrmReg(ACCESS_REG_SLTP, GET); + string statusStr = "Invalid parameters"; u_int32_t status = getFieldValue("ob_bad_stat"); if (status) @@ -4714,6 +4249,7 @@ string MlxlinkCommander::getSltpStatus() statusStr = _mlxlinkMaps->_SLTP16BadSetStatus2Str[status]; break; case PRODUCT_7NM: + case PRODUCT_5NM: statusStr = _mlxlinkMaps->_SLTP7BadSetStatus2Str[status]; break; } @@ -4738,7 +4274,9 @@ void MlxlinkCommander::sendSltp() try { - if ((_devID == DeviceSpectrum2 || _devID == DeviceQuantum || _devID == DeviceQuantum2) && _userInput._db) + if ((_devID == DeviceSpectrum2 || _devID == DeviceQuantum || _devID == DeviceQuantum2 || + _devID == DeviceQuantum3 || _devID == DeviceGB100) && + _userInput._db) { u_int32_t portGroup = getPortGroup(_localPort); MlxlinkRecord::printWar("Port " + to_string(_userInput._labelPort) + " is mapped to group " + @@ -4750,44 +4288,39 @@ void MlxlinkCommander::sendSltp() _jsonRoot); } u_int32_t laneSpeed = 0; - for (u_int32_t i = 0; i < _numOfLanes; i++) + string sltpParamsCmd = ""; + for (u_int32_t lane = 0; lane < _numOfLanes; lane++) { - if (_userInput._sltpLane && _userInput._lane != i) + if (_userInput._sltpLane && _userInput._lane != lane) { continue; } - if (_userInput._db && i != 0) + if (_userInput._db && lane != 0) { break; } - laneSpeed = getLaneSpeed(i); + + laneSpeed = getLaneSpeed(lane); if (_productTechnology < PRODUCT_16NM && !_userInput._advancedMode) { - getSltpRegAndLeva(i); + getSltpRegAndLeva(lane); } else if (_productTechnology == PRODUCT_16NM) { - getSltpAlevOut(i); + getSltpAlevOut(lane); } - resetParser(ACCESS_REG_SLTP); - updatePortType(); - updateField("local_port", _localPort); - updateField("pnat", PNAT_LOCAL); - updateField("lane_speed", laneSpeed); - updateField("lane", i); - updateField("tx_policy", _userInput._txPolicy); - - if (_productTechnology == PRODUCT_7NM) + + if (_productTechnology >= PRODUCT_7NM) { - updateSltpNdrFields(); + sltpParamsCmd = updateSltpNdrFields(); } else { - updateSltpEdrHdrFields(); + sltpParamsCmd = updateSltpEdrHdrFields(); } - updateField("c_db", _userInput._db || _userInput._txPolicy); - genBuffSendRegister(ACCESS_REG_SLTP, MACCESS_REG_METHOD_SET); + sendPrmReg(ACCESS_REG_SLTP, SET, "lane=%d,lane_speed=%d,tx_policy=%d,c_db=%d,%s", lane, laneSpeed, + _userInput._txPolicy, _userInput._db || _userInput._txPolicy, sltpParamsCmd.c_str()); } } catch (MlxRegException& exc) @@ -4815,12 +4348,8 @@ string MlxlinkCommander::getLoopbackStr(u_int32_t loopbackCapMask) void MlxlinkCommander::checkPplrCap() { - string regName = "PPLR"; - resetParser(regName); - updatePortType(); + sendPrmReg(ACCESS_REG_PPLR, GET); - updateField("local_port", _localPort); - genBuffSendRegister(regName, MACCESS_REG_METHOD_GET); u_int32_t loopBackCap = getFieldValue("lb_cap"); u_int32_t loopBackVal = getLoopbackMode(_userInput._pplrLB); if (loopBackVal != LOOPBACK_MODE_NO) @@ -4851,13 +4380,8 @@ void MlxlinkCommander::sendPplr() MlxlinkRecord::printCmdLine("Configuring Port Loopback", _jsonRoot); checkPplrCap(); - resetParser(ACCESS_REG_PPLR); - updatePortType(); - - updateField("local_port", _localPort); - updateField("lb_en", getLoopbackMode(_userInput._pplrLB)); - genBuffSendRegister(ACCESS_REG_PPLR, MACCESS_REG_METHOD_SET); + sendPrmReg(ACCESS_REG_PPLR, SET, "lb_en=%d", getLoopbackMode(_userInput._pplrLB)); } catch (const std::exception& exc) { @@ -4886,7 +4410,7 @@ void MlxlinkCommander::sendPepc() gearboxBlock(PEPC_SET_FLAG); if (_isHCA || _devID == DeviceSwitchIB || _devID == DeviceSwitchIB2 || _devID == DeviceQuantum || - _devID == DeviceQuantum2) + _devID == DeviceQuantum2 || _devID == DeviceQuantum3 || _devID == DeviceGB100) { throw MlxRegException("\"--" PEPC_SET_FLAG "\" option is not supported for HCA and InfiniBand switches"); } @@ -4894,25 +4418,19 @@ void MlxlinkCommander::sendPepc() string regName = "PEPC"; // Get old values of PEPC fields - resetParser(regName); - updateField("local_port", _localPort); - genBuffSendRegister(regName, MACCESS_REG_METHOD_GET); + sendPrmReg(ACCESS_REG_PEPC, GET); + u_int32_t forceMode_int = getFieldValue("twisted_pair_force_mode"); u_int32_t anMode_int = getFieldValue("twisted_pair_an_mode"); // Set new values of PEPC fields - resetParser(regName); - updateField("local_port", _localPort); + u_int32_t forceMode = forceMode_int; if (_userInput._sendPepcForceMode) { - updateField("twisted_pair_force_mode", pepc_force_mode_to_int(_userInput._forceMode)); + forceMode = pepc_force_mode_to_int(_userInput._forceMode); } - else - { - updateField("twisted_pair_force_mode", forceMode_int); - } - updateField("twisted_pair_an_mode", anMode_int); - genBuffSendRegister(regName, MACCESS_REG_METHOD_SET); + + sendPrmReg(ACCESS_REG_PEPC, SET, "twisted_pair_an_mode=%d,twisted_pair_force_mode=%d", anMode_int, forceMode); } catch (const std::exception& exc) { @@ -4924,39 +4442,24 @@ void MlxlinkCommander::sendPepc() u_int32_t MlxlinkCommander::getPortGroup(u_int32_t localPort) { - string regName = "PGMR"; - resetParser(regName); - - updateField("local_port", (localPort - 1)); - updateField("group", 0); // it will not affect the request - updateField("pnat", PNAT_LOCAL); - updateField("pg_sel", TX_LOCAL_PORT); + sendPrmReg(ACCESS_REG_PGMR, GET, "local_port=%d,pg_sel=%d", (localPort - 1), TX_LOCAL_PORT); - genBuffSendRegister(regName, MACCESS_REG_METHOD_GET); - - u_int32_t groupNum = getFieldValue("group_of_port"); - - return groupNum; + return getFieldValue("group_of_port"); } void MlxlinkCommander::setTxGroupMapping() { try { - if (_devID != DeviceSpectrum2 && _devID != DeviceQuantum && _devID != DeviceQuantum2) + if (_devID != DeviceSpectrum2 && _devID != DeviceQuantum && _devID != DeviceQuantum2 && + _devID != DeviceQuantum3 && _devID != DeviceGB100) { throw MlxRegException("Port group mapping supported for Spectrum-2 and Quantum switches only!"); } + MlxlinkRecord::printCmdLine("Configuring Ports-Group Mapping", _jsonRoot); handleLabelPorts(_userInput._labelPorts); - string regName = "PGMR"; - resetParser(regName); - - updateField("local_port", 1); // it will not affect the request - updateField("group", _userInput._setGroup); - updateField("pnat", PNAT_LOCAL); - updateField("pg_sel", TX_GROUP); u_int32_t blockSelector, bitMask; u_int32_t blocksToSet[4] = {0, 0, 0, 0}; u_int32_t localPort = 0; @@ -4967,12 +4470,11 @@ void MlxlinkCommander::setTxGroupMapping() bitMask = (u_int32_t)pow(2.0, (int)((localPort - 1) - (blockSelector * MAX_DWORD_BLOCK_SIZE))); blocksToSet[blockSelector] |= (bitMask); } - updateField("ports_mapping_of_group[0]", blocksToSet[0]); - updateField("ports_mapping_of_group[1]", blocksToSet[1]); - updateField("ports_mapping_of_group[2]", blocksToSet[2]); - updateField("ports_mapping_of_group[3]", blocksToSet[3]); - - genBuffSendRegister(regName, MACCESS_REG_METHOD_SET); + sendPrmReg(ACCESS_REG_PGMR, SET, + "local_port=%d,pg_sel=%d,group=%d," + "ports_mapping_of_group[0]=%d,ports_mapping_of_group[1]=%d," + "ports_mapping_of_group[2]=%d,ports_mapping_of_group[3]=%d", + 1, TX_GROUP, _userInput._setGroup, blocksToSet[0], blocksToSet[1], blocksToSet[2], blocksToSet[3]); } catch (const std::exception& exc) { @@ -4981,9 +4483,8 @@ void MlxlinkCommander::setTxGroupMapping() { errorMsg = "Invalid configuration values"; } - _allUnhandledErrors += string("Configuring ports group mapping " - "raised the following exception: ") + - errorMsg + string("\n"); + _allUnhandledErrors += + string("Configuring ports group mapping raised the following exception: ") + errorMsg + string("\n"); } } @@ -5251,14 +4752,14 @@ void MlxlinkCommander::initEyeOpener() _eyeOpener->_regLib = _regLib; _eyeOpener->_gvmiAddress = _gvmiAddress; _eyeOpener->_mlxlinkLogger = _mlxlinkLogger; - _eyeOpener->localPort = _localPort; + _eyeOpener->_localPort = _localPort; + _eyeOpener->_pnat = _pnat; + _eyeOpener->version = _productTechnology; _eyeOpener->depth = _dpn.depth; _eyeOpener->pcieIndex = _dpn.pcieIndex; _eyeOpener->node = _dpn.node; - _eyeOpener->portType = _portType; _eyeOpener->numOfLanes = _userInput._pcie ? _numOfLanesPcie : _numOfLanes; _eyeOpener->lane = _userInput.gradeScanPerLane ? _userInput._lane : -1; - _eyeOpener->pciePort = _userInput._pcie; _eyeOpener->isPam4Speed = _isPam4Speed || ((_linkSpeed == IB_LINK_SPEED_HDR) && (_protoActive == IB)); _eyeOpener->activeSpeedStr = _speedStrG; @@ -5353,12 +4854,7 @@ bool MlxlinkCommander::isPPHCRSupported() bool supported = true; try { - string regName = "PPHCR"; - resetParser(regName); - updateField("local_port", 1); - updateField("pnat", 1); - - genBuffSendRegister(PPHCR_REG, MACCESS_REG_METHOD_GET); + sendPrmReg(ACCESS_REG_PPHCR, GET, "local_port=1,pnat=1"); } catch (MlxRegException& exc) { @@ -5417,7 +4913,7 @@ void MlxlinkCommander::setAmBerCollectorFields() { _amberCollector->_regLib = _regLib; _amberCollector->_mlxlinkLogger = _mlxlinkLogger; - _amberCollector->_pnat = _userInput._pcie ? PNAT_PCIE : PNAT_LOCAL; + _amberCollector->_pnat = _pnat; _amberCollector->_localPort = _localPort; _amberCollector->_csvFileName = _userInput._csvBer; _amberCollector->_iteration = _userInput._iteration; diff --git a/mlxlink/modules/mlxlink_commander.h b/mlxlink/modules/mlxlink_commander.h index 03bb9d22..fff89579 100644 --- a/mlxlink/modules/mlxlink_commander.h +++ b/mlxlink/modules/mlxlink_commander.h @@ -414,7 +414,7 @@ class MlxlinkCommander : public MlxlinkRegParser virtual void showEye(); void showFEC(); virtual void showSltp(); - virtual void showDeviceData(); + void showDeviceData(); void showBerMonitorInfo(); void showExternalPhy(); void showPcie(); @@ -473,11 +473,8 @@ class MlxlinkCommander : public MlxlinkRegParser int getLinkDown(); float getRawBERLimit(); bool getResult(std::map errors_vector, float raw_ber_limit, int link_down); - string getDevicePN(bool queryMSGI = false); - string getDeviceSN(bool queryMSGI = false); - string getDeviceProductName(bool queryMSGI = false); - string getDeviceRev(bool queryMSGI = false); - string getDeviceFW(); + string getDevicePN(); + virtual string getFwVersion(); void printOuptputVector(vector& cmdOut); virtual void prepareJsonOut(); @@ -563,8 +560,8 @@ class MlxlinkCommander : public MlxlinkRegParser u_int32_t fecToBit(const string& fec, const string& speedStrG); u_int32_t getFecCapForCheck(const string& speedStr); void checkPplmCap(); - void updateSltpEdrHdrFields(); - void updateSltpNdrFields(); + string updateSltpEdrHdrFields(); + string updateSltpNdrFields(); string getSltpStatus(); void getSltpAlevOut(u_int32_t lane); void getSltpRegAndLeva(u_int32_t lane); @@ -575,8 +572,6 @@ class MlxlinkCommander : public MlxlinkRegParser // Mlxlink params UserInput _userInput; dm_dev_id_t _devID; - u_int32_t _localPort; - u_int32_t _portType; DPN _dpn; u_int32_t _numOfLanes; u_int32_t _numOfLanesPcie; @@ -616,7 +611,6 @@ class MlxlinkCommander : public MlxlinkRegParser bool _plugged; bool _linkModeForce; bool _useExtAdb; - bool _isHCA; bool _ddmSupported; bool _cmisCable; bool _qsfpCable; diff --git a/mlxlink/modules/mlxlink_enums.h b/mlxlink/modules/mlxlink_enums.h index aed41482..89009e8c 100644 --- a/mlxlink/modules/mlxlink_enums.h +++ b/mlxlink/modules/mlxlink_enums.h @@ -36,46 +36,48 @@ // Common definitions #define AMBER_VERSION "2.05" -#define ACCESS_REG_PGUID "PGUID" -#define ACCESS_REG_SPZR "SPZR" -#define ACCESS_REG_SPAD "SPAD" -#define ACCESS_REG_PPCNT "PPCNT" -#define ACCESS_REG_PPHCR "PPHCR" -#define ACCESS_REG_PPLM "PPLM" -#define ACCESS_REG_PDDR "PDDR" -#define ACCESS_REG_PTYS "PTYS" -#define ACCESS_REG_MPCNT "MPCNT" -#define ACCESS_REG_MPEIN "MPEIN" -#define ACCESS_REG_PMDR "PMDR" -#define ACCESS_REG_PMCR "PMCR" -#define ACCESS_REG_PLLP "PLLP" +#define ACCESS_REG_MCIA "MCIA" #define ACCESS_REG_MDDQ "MDDQ" -#define ACCESS_REG_SLRG "SLRG" -#define ACCESS_REG_SLTP "SLTP" -#define ACCESS_REG_SLRIP "SLRIP" -#define ACCESS_REG_SLRP "SLRP" -#define ACCESS_REG_PPLL "PPLL" -#define ACCESS_REG_SLSIR "SLSIR" -#define ACCESS_REG_SLLM "SLLM" +#define ACCESS_REG_MDIR "MDIR" #define ACCESS_REG_MGIR "MGIR" -#define ACCESS_REG_PMLP "PMLP" +#define ACCESS_REG_MGPIR "MGPIR" +#define ACCESS_REG_MPCNT "MPCNT" +#define ACCESS_REG_MPEIN "MPEIN" +#define ACCESS_REG_MPIR "MPIR" #define ACCESS_REG_MSGI "MSGI" -#define ACCESS_REG_MDIR "MDIR" -#define ACCESS_REG_MVCR "MVCR" +#define ACCESS_REG_MTCAP "MTCAP" #define ACCESS_REG_MTMP "MTMP" #define ACCESS_REG_MVCAP "MVCAP" -#define ACCESS_REG_MTCAP "MTCAP" -#define ACCESS_REG_SLRED "SLRED" +#define ACCESS_REG_MVCR "MVCR" +#define ACCESS_REG_PAOS "PAOS" +#define ACCESS_REG_PCAM "PCAM" +#define ACCESS_REG_PDDR "PDDR" +#define ACCESS_REG_PEPC "PEPC" +#define ACCESS_REG_PGMR "PGMR" +#define ACCESS_REG_PGUID "PGUID" #define ACCESS_REG_PLIB "PLIB" -#define ACCESS_REG_PMLP "PMLP" +#define ACCESS_REG_PLLP "PLLP" #define ACCESS_REG_PMAOS "PMAOS" -#define ACCESS_REG_PPAOS "PPAOS" -#define ACCESS_REG_PPTT "PPTT" -#define ACCESS_REG_PPRT "PPRT" -#define ACCESS_REG_PMPT "PMPT" +#define ACCESS_REG_PMCR "PMCR" +#define ACCESS_REG_PMLP "PMLP" #define ACCESS_REG_PMPD "PMPD" +#define ACCESS_REG_PMPT "PMPT" #define ACCESS_REG_PMTM "PMTM" +#define ACCESS_REG_PPAOS "PPAOS" +#define ACCESS_REG_PPBMC "PPBMC" +#define ACCESS_REG_PPCNT "PPCNT" +#define ACCESS_REG_PPHCR "PPHCR" +#define ACCESS_REG_PPLM "PPLM" #define ACCESS_REG_PPLR "PPLR" +#define ACCESS_REG_PPRT "PPRT" +#define ACCESS_REG_PPTT "PPTT" +#define ACCESS_REG_PREI "PREI" +#define ACCESS_REG_PTYS "PTYS" +#define ACCESS_REG_SLRED "SLRED" +#define ACCESS_REG_SLRG "SLRG" +#define ACCESS_REG_SLTP "SLTP" +#define ACCESS_REG_SPAD "SPAD" +#define ACCESS_REG_SPZR "SPZR" // define all used regs above this line #define QSFP_CHANNELS 4 @@ -400,6 +402,9 @@ #define SECOND_LEVEL_PORT_ACCESS 2 #define THIRD_LEVEL_PORT_ACCESS 3 +#define GET MACCESS_REG_METHOD_GET +#define SET MACCESS_REG_METHOD_SET + enum FIELD_ACCESS { FIELD_ACCESS_R = 0x1, @@ -1393,7 +1398,8 @@ enum PRODUCT_TECHNOLOGY PRODUCT_40NM = 0, PRODUCT_28NM = 1, PRODUCT_16NM = 3, - PRODUCT_7NM = 4 + PRODUCT_7NM = 4, + PRODUCT_5NM = 5 }; enum STATUS_OPCODE diff --git a/mlxlink/modules/mlxlink_err_inj_commander.cpp b/mlxlink/modules/mlxlink_err_inj_commander.cpp index bb596538..9d801d5a 100644 --- a/mlxlink/modules/mlxlink_err_inj_commander.cpp +++ b/mlxlink/modules/mlxlink_err_inj_commander.cpp @@ -36,8 +36,6 @@ MlxlinkErrInjCommander::MlxlinkErrInjCommander(Json::Value& jsonRoot) : _jsonRoot(jsonRoot) { - _localPort = 0; - _pnat = 0; _mixerOffset0 = -1; _mixerOffset1 = -1; _force = false; @@ -56,11 +54,8 @@ bool MlxlinkErrInjCommander::getUserConfirm() u_int16_t MlxlinkErrInjCommander::getMixerOffset(u_int32_t id) { - string regName = "PREI"; - resetParser(regName); - updateField("local_port", _localPort); + sendPrmReg(ACCESS_REG_PREI, GET); - genBuffSendRegister(regName, MACCESS_REG_METHOD_GET); return getFieldValue("mixer_offset" + to_string(id)); } @@ -68,26 +63,27 @@ void MlxlinkErrInjCommander::setMixersOffset() { u_int16_t oldMixer0 = getMixerOffset(0); u_int16_t oldMixer1 = getMixerOffset(1); - string regName = "PREI"; - resetParser(regName); - updateField("local_port", _localPort); + string mixerFieldsCmd = ""; + if (_mixerOffset0 >= 0) { - updateField("mixer_offset0", (u_int16_t)_mixerOffset0); + mixerFieldsCmd += "mixer_offset0=" + to_string((u_int16_t)_mixerOffset0); if (_mixerOffset1 == -1) { - updateField("mixer_offset1", oldMixer1); + mixerFieldsCmd += ",mixer_offset1=" + to_string(oldMixer1); } } + if (_mixerOffset1 >= 0) { - updateField("mixer_offset1", (u_int16_t)_mixerOffset1); + mixerFieldsCmd += "mixer_offset1=" + to_string((u_int16_t)_mixerOffset1); if (_mixerOffset0 == -1) { - updateField("mixer_offset0", oldMixer0); + mixerFieldsCmd += ",mixer_offset0=" + to_string((u_int16_t)oldMixer0); } } - genBuffSendRegister(regName, MACCESS_REG_METHOD_SET); + + sendPrmReg(ACCESS_REG_PREI, GET, mixerFieldsCmd.c_str()); } void MlxlinkErrInjCommander::updateMixerOffsets() diff --git a/mlxlink/modules/mlxlink_err_inj_commander.h b/mlxlink/modules/mlxlink_err_inj_commander.h index 4b587767..440cc7fe 100644 --- a/mlxlink/modules/mlxlink_err_inj_commander.h +++ b/mlxlink/modules/mlxlink_err_inj_commander.h @@ -51,8 +51,6 @@ class MlxlinkErrInjCommander : public MlxlinkRegParser void showMixersOffset(); void updateMixerOffsets(); - u_int32_t _localPort; - u_int32_t _pnat; int _mixerOffset0; int _mixerOffset1; bool _force; diff --git a/mlxlink/modules/mlxlink_eye_opener.cpp b/mlxlink/modules/mlxlink_eye_opener.cpp index a76fdd26..c16e0517 100644 --- a/mlxlink/modules/mlxlink_eye_opener.cpp +++ b/mlxlink/modules/mlxlink_eye_opener.cpp @@ -34,9 +34,6 @@ MlxlinkEyeOpener::MlxlinkEyeOpener(Json::Value& jsonRoot) : _jsonRoot(jsonRoot) { - _pageDataSel = 0; - _errResBase = 0; - _eyeDiagDim = 0; _measureTime = -1; _eyeSel = -1; _numOfEyes = 0; @@ -44,6 +41,7 @@ MlxlinkEyeOpener::MlxlinkEyeOpener(Json::Value& jsonRoot) : _jsonRoot(jsonRoot) _oneLaneScan = false; _oneEyeScan = false; scanIterations = MAX_ITERATION_SCAN_PCIE; + initSlredMaps(); } @@ -80,21 +78,6 @@ void MlxlinkEyeOpener::initSlredMaps() _laneSpeedMap[SLRED_LANE_SPEED_HDR] = "HDR (50GE / 200GE / 400GE) (26.5625Gbd / 53.125Gb/s)"; } -void MlxlinkEyeOpener::setPageDataSel(u_int32_t pageDataSel) -{ - _pageDataSel = pageDataSel; -} - -void MlxlinkEyeOpener::setErrResBase(u_int32_t errResBase) -{ - _errResBase = errResBase; -} - -void MlxlinkEyeOpener::setEyeDiagDim(u_int32_t eyeDiagDim) -{ - _eyeDiagDim = eyeDiagDim; -} - void MlxlinkEyeOpener::setMeasureTime(u_int32_t measureTime) { string timesStr = ""; @@ -122,7 +105,7 @@ void MlxlinkEyeOpener::setMeasureTime(u_int32_t measureTime) void MlxlinkEyeOpener::setEyeSel(const string& eyeSel) { - if (pciePort) + if (_pnat == PNAT_PCIE) { return; } @@ -182,7 +165,7 @@ void MlxlinkEyeOpener::initWarMsgs() { numOfLanes = 1; } - scanIterations = pciePort ? MAX_ITERATION_SCAN_PCIE : MAX_ITERATION_SCAN_PORT; + scanIterations = (_pnat == PNAT_PCIE) ? MAX_ITERATION_SCAN_PCIE : MAX_ITERATION_SCAN_PORT; u_int32_t totalScan = totalEysScanTime * numOfLanes * scanIterations; char scanTitle[64]; u_int32_t min = (u_int32_t)totalScan / 60; @@ -198,78 +181,47 @@ void MlxlinkEyeOpener::initWarMsgs() MlxlinkRecord::printWar(scanTitle, _jsonRoot); } -void MlxlinkEyeOpener::updatePortType() -{ - if (portType) - { - updateField("port_type", portType); - } -} - -u_int32_t MlxlinkEyeOpener::getDeviceVersion() -{ - string regName = "SLRG"; - resetParser(regName); - updatePortType(); - updateField("local_port", localPort); - updateField("pnat", (pciePort) ? PNAT_PCIE : PNAT_LOCAL); - updateField("lane", 0); - - genBuffSendRegister(regName, MACCESS_REG_METHOD_GET); - u_int32_t version = getVersion(getFieldValue("version")); - - return version; -} - bool MlxlinkEyeOpener::isActiveGenSupported() { - string regName = "MPEIN"; - resetParser(regName); - updateField("pcie_index", pcieIndex); - updateField("depth", depth); - updateField("node", node); - - genBuffSendRegister(regName, MACCESS_REG_METHOD_GET); - u_int32_t activeGen = getFieldValue("link_speed_active"); + sendPrmReg(ACCESS_REG_MPEIN, GET, "depth=%d,pcie_index=%d,node=%d", depth, pcieIndex, node); - return (activeGen >= GEN3); + return (getFieldValue("link_speed_active") >= GEN3); } -void MlxlinkEyeOpener::prepareSlred(u_int32_t lane, u_int32_t eye) +string MlxlinkEyeOpener::prepareSlred(u_int32_t lane, u_int32_t eye) { - resetParser(ACCESS_REG_SLRED); - updatePortType(); - updateField("local_port", localPort); - updateField("pnat", (pciePort) ? PNAT_PCIE : PNAT_LOCAL); - updateField("lane", lane); - updateField("measure_time", _measureTime); - updateField("err_res_scale", DFLT_ERR_RES_SCALE); - updateField("err_res_base", DFLT_ERR_RES_BASE); - updateField("eye_diag_dim", pciePort ? DFLT_EYE_DIAG_DIM_PCIE : DFLT_EYE_DIAG_DIM_PORT); - if (!pciePort && isPam4Speed) + string fields = "lane=" + to_string(lane); + fields += ",measure_time=" + to_string(_measureTime); + fields += ",err_res_scale=" + to_string(DFLT_ERR_RES_SCALE); + fields += ",err_res_base=" + to_string(DFLT_ERR_RES_BASE); + fields += ",eye_diag_dim=" + to_string((_pnat == PNAT_PCIE) ? DFLT_EYE_DIAG_DIM_PCIE : DFLT_EYE_DIAG_DIM_PORT); + + if (_pnat != PNAT_PCIE && isPam4Speed) { - updateField("eye_sel", eye); + fields += ",eye_sel=" + to_string(eye); } + + return fields; } void MlxlinkEyeOpener::enableSlredGradeScan(u_int32_t lane, u_int32_t eye) { - prepareSlred(lane, eye); + string fields = prepareSlred(lane, eye); + if ((_numOfEyes == EYE_ALL && eye == EYE_DOWN) || (_numOfEyes != EYE_ALL)) { - updateField("last_scan", 1); + fields += ",last_scan=1"; } - updateField("en", 1); - genBuffSendRegister(ACCESS_REG_SLRED, MACCESS_REG_METHOD_SET); + + sendPrmReg(ACCESS_REG_SLRED, SET, "en=%d,%s", 1, fields.c_str()); } void MlxlinkEyeOpener::slredStopSignalHandler() { if (mft_signal_is_fired()) { - prepareSlred(0, 0); - updateField("abort", 1); - genBuffSendRegister(SLRED_REG, MACCESS_REG_METHOD_SET); + string fields = prepareSlred(0, 0); + sendPrmReg(ACCESS_REG_SLRED, SET, "abort=%d,%s", 1, fields.c_str()); printf("\n\n"); exit(1); @@ -278,27 +230,26 @@ void MlxlinkEyeOpener::slredStopSignalHandler() void MlxlinkEyeOpener::getSlredMargin(u_int32_t iteration, u_int32_t lane, u_int32_t eye) { - prepareSlred(lane, eye); - updateField("page_data_sel", 0); - genBuffSendRegister(SLRED_REG, MACCESS_REG_METHOD_GET); + string fields = prepareSlred(lane, eye); + sendPrmReg(ACCESS_REG_SLRED, SET, fields.c_str()); // put all margins in one vector for later calculations - _measuredMargins.push_back(MarginInfo(lane, (!pciePort && isPam4Speed) ? eye : 0, getFieldValue("margin"), + _measuredMargins.push_back(MarginInfo(lane, (_pnat != PNAT_PCIE && isPam4Speed) ? eye : 0, getFieldValue("margin"), getFieldValue("status"), getFieldValue("margin_version"), iteration)); } // Get the status of scan for specific lane\eye u_int32_t MlxlinkEyeOpener::getSlredStatus(u_int32_t lane, u_int32_t eye) { - prepareSlred(lane, eye); - genBuffSendRegister(ACCESS_REG_SLRED, MACCESS_REG_METHOD_GET); + string fields = prepareSlred(lane, eye); + sendPrmReg(ACCESS_REG_SLRED, GET, fields.c_str()); return getFieldValue("status"); } string MlxlinkEyeOpener::getSlredLaneSpeedStr(u_int32_t lane, u_int32_t eye) { - prepareSlred(lane, eye); - genBuffSendRegister(ACCESS_REG_SLRED, MACCESS_REG_METHOD_GET); + string fields = prepareSlred(lane, eye); + sendPrmReg(ACCESS_REG_SLRED, GET, fields.c_str()); return _laneSpeedMap[getFieldValue("lane_speed")]; } @@ -345,7 +296,7 @@ void MlxlinkEyeOpener::gradeEyeScanner(u_int32_t iteration, u_int32_t lane, u_in // scan all grades per lane void MlxlinkEyeOpener::laneEyesScanner(u_int32_t iteration, u_int32_t lane) { - if (isPam4Speed && _eyeSel == MAX_NUMBER_OF_EYES && !pciePort) + if (isPam4Speed && _eyeSel == MAX_NUMBER_OF_EYES && _pnat != PNAT_PCIE) { // scan all eyes for (u_int32_t i = 0; i < MAX_NUMBER_OF_EYES; i++) @@ -390,11 +341,11 @@ void MlxlinkEyeOpener::preChecks() "use --yes flag to force the execution"); } - if (getDeviceVersion() != PRODUCT_16NM) + if (version != PRODUCT_16NM) { throw MlxRegException("Device not supported!"); } - if (pciePort) + if (_pnat == PNAT_PCIE) { if (!isActiveGenSupported()) { @@ -530,7 +481,7 @@ void MlxlinkEyeOpener::printMarginsSummary() if (status != EYE_SCAN_COMPLETED || (status == EYE_SCAN_COMPLETED && it->version == NO_MARGIN)) { sprintf(laneIdxStr, "Failure of lane %d", it->lane); - if (!pciePort && isPam4Speed) + if (_pnat != PNAT_PCIE && isPam4Speed) { sprintf(failureStr, "%s, %s eye", laneIdxStr, _eyeSelctorMap[it->eye].c_str()); } @@ -619,7 +570,7 @@ void MlxlinkEyeOpener::enableGradeScan() printField("Scanning status", "Completed ", true); fflush(MlxlinkRecord::stdOut); - if (!pciePort && isPam4Speed) + if (_pnat != PNAT_PCIE && isPam4Speed) { char gradeTitle[64]; if (_eyeSel != EYE_ALL) diff --git a/mlxlink/modules/mlxlink_eye_opener.h b/mlxlink/modules/mlxlink_eye_opener.h index 91dac3bc..7452a307 100644 --- a/mlxlink/modules/mlxlink_eye_opener.h +++ b/mlxlink/modules/mlxlink_eye_opener.h @@ -57,7 +57,6 @@ #define DFLT_EYE_DIAG_DIM_PORT 1 #define MAX_ITERATION_SCAN_PORT 1 -#define SLRED_REG "SLRED" #define CMD_TITLE "Eye Grades per lane info" enum SCAN_TIME @@ -143,9 +142,6 @@ class MlxlinkEyeOpener : public MlxlinkRegParser virtual ~MlxlinkEyeOpener(); // Fields setters - void setPageDataSel(u_int32_t pageDataSel); - void setErrResBase(u_int32_t errResBase); - void setEyeDiagDim(u_int32_t eyeDiagDim); void setMeasureTime(u_int32_t measureTime); void setEyeSel(const string& eyeSel); void setNonInteractiveMode(bool force); @@ -154,7 +150,7 @@ class MlxlinkEyeOpener : public MlxlinkRegParser void enableGradeScan(); // Global fields should be taken from mlxlink_commander - u_int32_t localPort; + u_int32_t version; u_int32_t portType; u_int32_t depth; u_int32_t pcieIndex; @@ -163,7 +159,6 @@ class MlxlinkEyeOpener : public MlxlinkRegParser u_int32_t numOfLanes; u_int32_t scanIterations; bool isPam4Speed; - bool pciePort; int lane; string activeSpeedStr; @@ -176,11 +171,9 @@ class MlxlinkEyeOpener : public MlxlinkRegParser void printField(const string& key, const string& val, bool newLine = true); void printTitle(const string& title); bool isActiveGenSupported(); - void updatePortType(); - u_int32_t getDeviceVersion(); void preChecks(); void printFinalResults(); - void prepareSlred(u_int32_t lane, u_int32_t eye); + string prepareSlred(u_int32_t lane, u_int32_t eye); void enableSlredGradeScan(u_int32_t lane, u_int32_t eye); void slredStopSignalHandler(); void getSlredMargin(u_int32_t iteration, u_int32_t lane, u_int32_t eye); @@ -193,9 +186,6 @@ class MlxlinkEyeOpener : public MlxlinkRegParser // Internal fields Json::Value& _jsonRoot; - int _pageDataSel; - int _errResBase; - int _eyeDiagDim; int _measureTime; int _eyeSel; u_int32_t _numOfEyes; diff --git a/mlxlink/modules/mlxlink_port_info.cpp b/mlxlink/modules/mlxlink_port_info.cpp index bd965b1c..773b4bdd 100644 --- a/mlxlink/modules/mlxlink_port_info.cpp +++ b/mlxlink/modules/mlxlink_port_info.cpp @@ -37,9 +37,6 @@ MlxlinkPortInfo::MlxlinkPortInfo(Json::Value& jsonRoot) : _jsonRoot(jsonRoot) { - _localPort = 0; - _pnat = 0; - _portType = 0; _fecActive = 0; _histType = HIST_TYPE_AUTO; _numOfBins = 0; @@ -48,34 +45,9 @@ MlxlinkPortInfo::MlxlinkPortInfo(Json::Value& jsonRoot) : _jsonRoot(jsonRoot) MlxlinkPortInfo::~MlxlinkPortInfo() {} -void MlxlinkPortInfo::resetPPHCR() -{ - resetParser(PPHCR_REG); - updateField("local_port", _localPort); - updateField("pnat", _pnat); - updateField("hist_type", _histType); -} - -void MlxlinkPortInfo::resetPPCNT() -{ - resetParser(PPCNT_REG); - updateField("local_port", _localPort); - updateField("pnat", _pnat); - updateField("grp", PPCNT_HISTOGRAM_GROUP); -} - -u_int32_t MlxlinkPortInfo::getNumberOfBins() -{ - resetPPHCR(); - genBuffSendRegister(PPHCR_REG, MACCESS_REG_METHOD_GET); - - return getFieldValue("num_of_bins"); -} - void MlxlinkPortInfo::init() { - resetPPHCR(); - genBuffSendRegister(PPHCR_REG, MACCESS_REG_METHOD_GET); + sendPrmReg(ACCESS_REG_PPHCR, GET); if (!getFieldValue("active_hist_type")) { @@ -87,13 +59,12 @@ void MlxlinkPortInfo::init() _fieldSep = ","; } - _numOfBins = getNumberOfBins(); + _numOfBins = getFieldValue("num_of_bins"); } void MlxlinkPortInfo::updateBinsRange() { - resetPPHCR(); - genBuffSendRegister(PPHCR_REG, MACCESS_REG_METHOD_GET); + sendPrmReg(ACCESS_REG_PPHCR, GET); for (u_int32_t binIdx = 0; binIdx < _numOfBins; ++binIdx) { @@ -105,8 +76,7 @@ void MlxlinkPortInfo::updateBinsRange() void MlxlinkPortInfo::updateBinsErrorsCount() { - resetPPCNT(); - genBuffSendRegister(PPCNT_REG, MACCESS_REG_METHOD_GET); + sendPrmReg(ACCESS_REG_PPCNT, GET, "grp=%d", PPCNT_HISTOGRAM_GROUP); for (u_int32_t binIdx = 0; binIdx < _numOfBins; ++binIdx) { @@ -146,7 +116,5 @@ void MlxlinkPortInfo::clearHistogram() { MlxlinkRecord::printCmdLine("Clearing Histogram Counters", _jsonRoot); - resetPPCNT(); - updateField("clr", 1); - genBuffSendRegister(PPCNT_REG, MACCESS_REG_METHOD_SET); + sendPrmReg(ACCESS_REG_PPCNT, SET, "grp=%d,clr=%d", PPCNT_HISTOGRAM_GROUP, 1); } diff --git a/mlxlink/modules/mlxlink_port_info.h b/mlxlink/modules/mlxlink_port_info.h index 8a40c6a0..9cbb3ad6 100644 --- a/mlxlink/modules/mlxlink_port_info.h +++ b/mlxlink/modules/mlxlink_port_info.h @@ -37,9 +37,6 @@ #include "mlxlink_reg_parser.h" -#define PPHCR_REG "PPHCR" -#define PPCNT_REG "PPCNT" - enum HISTOGRAM_TYPE { HIST_TYPE_AUTO, @@ -82,14 +79,9 @@ class MlxlinkPortInfo : public MlxlinkRegParser void showHistogram(); void clearHistogram(); - u_int32_t _localPort; - u_int32_t _pnat; - u_int32_t _portType; u_int32_t _fecActive; private: - void resetPPHCR(); - void resetPPCNT(); u_int32_t getNumberOfBins(); void updateBinsRange(); void updateBinsErrorsCount(); diff --git a/mlxlink/modules/mlxlink_reg_parser.cpp b/mlxlink/modules/mlxlink_reg_parser.cpp index 89e305a5..3445e171 100644 --- a/mlxlink/modules/mlxlink_reg_parser.cpp +++ b/mlxlink/modules/mlxlink_reg_parser.cpp @@ -40,6 +40,12 @@ MlxlinkRegParser::MlxlinkRegParser() : RegAccessParser("", "", "", NULL, 0) _regLib = NULL; _gvmiAddress = 0; _mlxlinkLogger = NULL; + + _localPort = 0; + _portType = 0; + _pnat = 0; + + _isHCA = false; } MlxlinkRegParser::~MlxlinkRegParser() {} @@ -75,6 +81,7 @@ void MlxlinkRegParser::resetParser(const string& regName) void MlxlinkRegParser::genBuffSendRegister(const string& regName, maccess_reg_method_t method) { DEBUG_LOG(_mlxlinkLogger, "%-15s: %s\n", "ACCESS_METHOD", method == MACCESS_REG_METHOD_GET ? "GET" : "SET"); + if (_gvmiAddress) { writeGvmi(1); @@ -95,11 +102,11 @@ void MlxlinkRegParser::writeGvmi(u_int32_t data) void MlxlinkRegParser::updateField(string field_name, u_int32_t value) { + RegAccessParser::updateField(field_name, value); + DEBUG_LOG(_mlxlinkLogger, "%-15s: %-30s\tVALUE: 0x%08x (%d)\n", "UPDATE_FIELD", (char*)field_name.c_str(), value, value); - RegAccessParser::updateField(field_name, value); - if (field_name == "local_port") { try @@ -115,6 +122,67 @@ void MlxlinkRegParser::updateField(string field_name, u_int32_t value) } } +void MlxlinkRegParser::updateWithDefault(const string& fieldName, const string& fieldsStr, u_int32_t val) +{ + if (fieldsStr.find(fieldName) == string::npos) + { + try + { + updateField(fieldName, val); + } + catch (...) + { + } + } +} + +void MlxlinkRegParser::setDefaultFields(const string& fieldsStr) +{ + updateWithDefault("local_port", fieldsStr, _localPort); + updateWithDefault("pnat", fieldsStr, _pnat); + + if (!_isHCA) + { + updateWithDefault("port_type", fieldsStr, _portType); + } +} + +void MlxlinkRegParser::sendPrmReg(const string& regName, maccess_reg_method_t method) +{ + resetParser(regName); + + setDefaultFields(""); + + genBuffSendRegister(regName, method); +} + +void MlxlinkRegParser::sendPrmReg(const string& regName, maccess_reg_method_t method, const char* fields, ...) +{ + char fieldsCstr[MAX_FIELDS_BUFFER]; + va_list args; + va_start(args, fields); + vsnprintf(fieldsCstr, MAX_FIELDS_BUFFER, fields, args); + va_end(args); + + string fieldsStr = string(fieldsCstr); + auto vectorOffields = MlxlinkRecord::split(fieldsStr, ","); + + resetParser(regName); + + for (const auto& token : vectorOffields) + { + auto fieldToken = MlxlinkRecord::split(token, "="); + string fieldName = fieldToken[0]; + u_int32_t fieldValue = stoi(fieldToken[1], nullptr, 0); + + updateField(fieldName, fieldValue); + } + + setDefaultFields(fieldsStr); + + genBuffSendRegister(regName, method); +} + string MlxlinkRegParser::getFieldStr(const string& field) { return to_string(getFieldValue(field)); diff --git a/mlxlink/modules/mlxlink_reg_parser.h b/mlxlink/modules/mlxlink_reg_parser.h index 0c7defe4..e2589db3 100644 --- a/mlxlink/modules/mlxlink_reg_parser.h +++ b/mlxlink/modules/mlxlink_reg_parser.h @@ -54,6 +54,8 @@ using namespace mlxreg; #define PDDR_STATUS_MESSAGE_LENGTH_HCA 236 #define PDDR_STATUS_MESSAGE_LENGTH_SWITCH 59 +#define MAX_FIELDS_BUFFER 1024 + class MlxlinkRegParser : public RegAccessParser { public: @@ -65,6 +67,10 @@ class MlxlinkRegParser : public RegAccessParser void genBuffSendRegister(const string& regName, maccess_reg_method_t method); void writeGvmi(u_int32_t data); void updateField(string field_name, u_int32_t value); + void updateWithDefault(const string& fieldName, const string& fieldsStr, u_int32_t val); + void setDefaultFields(const string& fieldsStr); + void sendPrmReg(const string& regName, maccess_reg_method_t method, const char* fields, ...); + void sendPrmReg(const string& regName, maccess_reg_method_t method); u_int32_t getFieldValue(string field_name); string getFieldStr(const string& field); string getRawFieldValueStr(const string fieldName); @@ -75,6 +81,11 @@ class MlxlinkRegParser : public RegAccessParser MlxRegLib* _regLib; mfile* _mf; MlxlinkLogger* _mlxlinkLogger; + + u_int32_t _localPort; + u_int32_t _pnat; + u_int32_t _portType; + bool _isHCA; }; #endif /* MLXLINK_REG_PARSER_H */ diff --git a/mlxlink/modules/mlxlink_utils.cpp b/mlxlink/modules/mlxlink_utils.cpp index f15a2efa..2d37c7ea 100644 --- a/mlxlink/modules/mlxlink_utils.cpp +++ b/mlxlink/modules/mlxlink_utils.cpp @@ -1257,7 +1257,7 @@ string getCompliance(u_int32_t compliance, std::map comp return compliance_str; } -string getFwVersion(bool passive, u_int32_t moduleFWVer) +string getModuleFwVersion(bool passive, u_int32_t moduleFWVer) { string moduleFWVersion = "N/A"; if (!passive) diff --git a/mlxlink/modules/mlxlink_utils.h b/mlxlink/modules/mlxlink_utils.h index 18d24661..0a665775 100644 --- a/mlxlink/modules/mlxlink_utils.h +++ b/mlxlink/modules/mlxlink_utils.h @@ -143,7 +143,7 @@ bool isSpeed100GPerLane(u_int32_t speed, u_int32_t protocol); bool askUser(const char* question, bool force = false); string getCableLengthStr(u_int32_t cableLength, bool cmisCable); string getRxTxCDRState(u_int32_t state, u_int32_t numOfLanes); -string getFwVersion(bool passive, u_int32_t moduleFWVer); +string getModuleFwVersion(bool passive, u_int32_t moduleFWVer); string getVendorRev(u_int32_t rev); string getStrByValue(u_int32_t flags, map map); string getStrByMask(u_int32_t bitmask, map maskMap, const string& fieldSeparator = ","); From 7bfd3e72f765e0dab80efa235967664c2c6513c7 Mon Sep 17 00:00:00 2001 From: Mustafa Dalloul Date: Sun, 14 Aug 2022 16:07:28 +0300 Subject: [PATCH 03/63] [mstlink] Using Monitor Opcodes instead of advanced opcodes page Description: Advanced opcodes become internal, so we moved to monitor opcode page Tested OS: Linux64 Tested devices: ConnectX-6 Tested flows: mstlink query commands Known gaps (with RM ticket): NA Issue: 3173141 Signed-off-by: Mustafa Dalloul --- mlxlink/modules/mlxlink_amBER_collector.cpp | 5 ++--- mlxlink/modules/mlxlink_commander.cpp | 20 ++++++++++---------- mlxlink/modules/mlxlink_enums.h | 1 - 3 files changed, 12 insertions(+), 14 deletions(-) diff --git a/mlxlink/modules/mlxlink_amBER_collector.cpp b/mlxlink/modules/mlxlink_amBER_collector.cpp index 070a3dfc..755ac942 100644 --- a/mlxlink/modules/mlxlink_amBER_collector.cpp +++ b/mlxlink/modules/mlxlink_amBER_collector.cpp @@ -241,7 +241,6 @@ void MlxlinkAmBerCollector::init() updateField("local_port", _localPort); updateField("pnat", PNAT_LOCAL); updateField("page_select", PDDR_MODULE_INFO_PAGE); - updateField("group_opcode", ADVANCED_OPCODE); genBuffSendRegister(ACCESS_REG_PDDR, MACCESS_REG_METHOD_GET); u_int32_t cableType = getFieldValue("cable_type"); @@ -1728,7 +1727,7 @@ vector MlxlinkAmBerCollector::getTroubleshootingInfo() updateField("local_port", _localPort); updateField("pnat", PNAT_LOCAL); updateField("page_select", PDDR_TROUBLESHOOTING_INFO_PAGE); - updateField("group_opcode", ADVANCED_OPCODE); + updateField("group_opcode", MONITOR_OPCODE); sendRegister(ACCESS_REG_PDDR, MACCESS_REG_METHOD_GET); string message = ""; @@ -1758,7 +1757,7 @@ vector MlxlinkAmBerCollector::getTroubleshootingInfo() } } - fields.push_back(AmberField("Advanced_Status_Opcode", getFieldStr("advanced_opcode"))); + fields.push_back(AmberField("Advanced_Status_Opcode", getFieldStr("monitor_opcode"))); fields.push_back(AmberField("Status_Message", message)); } } diff --git a/mlxlink/modules/mlxlink_commander.cpp b/mlxlink/modules/mlxlink_commander.cpp index 302bdd69..05c2b1b6 100644 --- a/mlxlink/modules/mlxlink_commander.cpp +++ b/mlxlink/modules/mlxlink_commander.cpp @@ -234,9 +234,9 @@ void MlxlinkCommander::checkValidFW() u_int32_t phyMngrFsmState = getFieldValue("phy_mngr_fsm_state"); sendPrmReg(ACCESS_REG_PDDR, GET, "page_select=%d,group_opcode=%d", PDDR_TROUBLESHOOTING_INFO_PAGE, - ADVANCED_OPCODE); + MONITOR_OPCODE); - u_int32_t statusOpcode = getFieldValue("advanced_opcode"); + u_int32_t statusOpcode = getFieldValue("monitor_opcode"); if (phyMngrFsmState == 0 && statusOpcode == 0) { @@ -326,9 +326,9 @@ bool MlxlinkCommander::checkPortStatus(u_int32_t localPort) u_int32_t phyMngrFsmState = getFieldValue("phy_mngr_fsm_state"); sendPrmReg(ACCESS_REG_PDDR, GET, "local_port=%d,page_select=%d,group_opcode=%d", localPort, - PDDR_TROUBLESHOOTING_INFO_PAGE, ADVANCED_OPCODE); + PDDR_TROUBLESHOOTING_INFO_PAGE, MONITOR_OPCODE); - u_int32_t statusOpcode = getFieldValue("advanced_opcode"); + u_int32_t statusOpcode = getFieldValue("monitor_opcode"); if (!(phyMngrFsmState == 0 && statusOpcode == 0)) { @@ -1772,21 +1772,21 @@ void MlxlinkCommander::troubInfoPage() try { sendPrmReg(ACCESS_REG_PDDR, GET, "page_select=%d,group_opcode=%d", PDDR_TROUBLESHOOTING_INFO_PAGE, - ADVANCED_OPCODE); + MONITOR_OPCODE); - u_int32_t advancedOpcode = getFieldValue("advanced_opcode"); - string color = status2Color(advancedOpcode); + u_int32_t monitorOpcode = getFieldValue("monitor_opcode"); + string color = status2Color(monitorOpcode); setPrintTitle(_troubInfoCmd, "Troubleshooting Info", PDDR_TRUOBLESHOOTING_INFO_LAST, !_prbsTestMode); - if (advancedOpcode == CABLE_IS_UNPLUGGED) + if (monitorOpcode == CABLE_IS_UNPLUGGED) { _mngCableUnplugged = true; } stringstream statusOp; - statusOp << std::dec << advancedOpcode; + statusOp << std::dec << monitorOpcode; setPrintVal(_troubInfoCmd, "Status Opcode", statusOp.str(), color, true, !_prbsTestMode); - string groupOpcode = getGroupStr(advancedOpcode); + string groupOpcode = getGroupStr(monitorOpcode); setPrintVal(_troubInfoCmd, "Group Opcode", groupOpcode, color, true, !_prbsTestMode); string message = ""; diff --git a/mlxlink/modules/mlxlink_enums.h b/mlxlink/modules/mlxlink_enums.h index 89009e8c..99a19f00 100644 --- a/mlxlink/modules/mlxlink_enums.h +++ b/mlxlink/modules/mlxlink_enums.h @@ -489,7 +489,6 @@ enum PDDR_PAGES enum GROUP_OPCODE { MONITOR_OPCODE = 0, - ADVANCED_OPCODE = 1 }; enum PPCNT_GROUPS From 7835e91ed467320dffb874f1c7560a0eeeb198f4 Mon Sep 17 00:00:00 2001 From: Tzafrir Cohen Date: Mon, 15 Aug 2022 17:08:18 +0300 Subject: [PATCH 04/63] man: proper header line Parameters for .TH are: title section date source manual * Some manpages had a commaa at the end of the name * Replace generated description of tool with sourec name (mstflint) A proper header with source name and proper section number. --- man/mstarchive.1 | 3 +-- man/mstconfig.1 | 3 +-- man/mstcongestion.1 | 3 +-- man/mstflint.1 | 3 +-- man/mstfwmanager.1 | 3 +-- man/mstfwreset.1 | 3 +-- man/mstfwtrace.1 | 3 +-- man/mstlink.1 | 3 +-- man/mstmcra.1 | 3 +-- man/mstmread.1 | 3 +-- man/mstmtserver.1 | 3 +-- man/mstmwrite.1 | 3 +-- man/mstprivhost.1 | 3 +-- man/mstreg.1 | 3 +-- man/mstregdump.1 | 3 +-- man/mstresourcedump.1 | 3 +-- man/mstvpd.1 | 3 +-- 17 files changed, 17 insertions(+), 34 deletions(-) diff --git a/man/mstarchive.1 b/man/mstarchive.1 index 82ec2947..ad3c90cf 100644 --- a/man/mstarchive.1 +++ b/man/mstarchive.1 @@ -1,5 +1,4 @@ -.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.41.1. -.TH MSTARCHIVE "1" "March 2020" "mstarchive NAME" "User Commands" +.TH MSTARCHIVE "1" "March 2020" "mstflint" "User Commands" .SH NAME mstarchive \- generate MFA2 archives .SH DESCRIPTION diff --git a/man/mstconfig.1 b/man/mstconfig.1 index 302673b6..91f252ea 100644 --- a/man/mstconfig.1 +++ b/man/mstconfig.1 @@ -1,5 +1,4 @@ -.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.41.1. -.TH MSTCONFIG, "1" "March 2020" "mstconfig, mstflint 4.14.0, built on Mar 3 2020, 14:01:56. Git SHA Hash: N/A" "User Commands" +.TH MSTCONFIG "1" "March 2020" "mstflint" "User Commands" .SH NAME mstconfig \- set or query non-volatile configurable options for Mellanox HCAs .SH DESCRIPTION diff --git a/man/mstcongestion.1 b/man/mstcongestion.1 index 3fc0b45b..d86162bb 100644 --- a/man/mstcongestion.1 +++ b/man/mstcongestion.1 @@ -1,5 +1,4 @@ -.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.41.1. -.TH MSTCONGESTION, "1" "March 2020" "mstcongestion, mstflint 4.14.0, built on Mar 3 2020, 14:02:45. Git SHA Hash: N/A" "User Commands" +.TH MSTCONGESTION "1" "March 2020" "mstflint" "User Commands" .SH NAME mstcongestion \- utility for configuring Mellanox device's receive congestion handling .SH DESCRIPTION diff --git a/man/mstflint.1 b/man/mstflint.1 index b604e02f..e99ad022 100644 --- a/man/mstflint.1 +++ b/man/mstflint.1 @@ -1,5 +1,4 @@ -.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.41.1. -.TH MSTFLINT, "1" "March 2020" "mstflint, mstflint 4.14.0, built on Mar 3 2020, 14:02:39. Git SHA Hash: N/A" "User Commands" +.TH MSTFLINT "1" "March 2020" "mstflint" "User Commands" .SH NAME mstflint \- Flash Interface .SH DESCRIPTION diff --git a/man/mstfwmanager.1 b/man/mstfwmanager.1 index bef0171b..e9419e23 100644 --- a/man/mstfwmanager.1 +++ b/man/mstfwmanager.1 @@ -1,5 +1,4 @@ -.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.41.1. -.TH MSTFWMANAGER "1" "March 2020" "mstfwmanager 1.0, mstflint 4.14.0, built on Mar 3 2020, 14:02:20. Git SHA Hash: N/A" "User Commands" +.TH MSTFWMANAGER "1" "March 2020" "mstflint" "User Commands" .SH NAME mstfwmanager \- Mellanox Firmware Manager .SH DESCRIPTION diff --git a/man/mstfwreset.1 b/man/mstfwreset.1 index 4f0893a1..f8c420b7 100644 --- a/man/mstfwreset.1 +++ b/man/mstfwreset.1 @@ -1,5 +1,4 @@ -.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.41.1. -.TH MSTFWRESET "1" "March 2020" "mstfwreset 1.0.0, mstflint 4.14.0, built on Mar 03 2020, 14:01:10. Git SHA Hash: N/A" "User Commands" +.TH MSTFWRESET "1" "March 2020" "mstflint" "User Commands" .SH NAME mstfwreset \- Query and perform reset operation on the device .SH DESCRIPTION diff --git a/man/mstfwtrace.1 b/man/mstfwtrace.1 index 2fd63938..4bb2a119 100644 --- a/man/mstfwtrace.1 +++ b/man/mstfwtrace.1 @@ -1,5 +1,4 @@ -.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.41.1. -.TH MSTFWTRACE, "1" "March 2020" "mstfwtrace, mstflint 4.14.0, built on Mar 03 2020, 14:01:10. Git SHA Hash: N/A" "User Commands" +.TH MSTFWTRACE "1" "March 2020" "mstflint" "User Commands" .SH NAME mstfwtrace \- Extracts and prints trace messages generated by the firmware of 5th generation devices .SH DESCRIPTION diff --git a/man/mstlink.1 b/man/mstlink.1 index b7713b02..040f8697 100644 --- a/man/mstlink.1 +++ b/man/mstlink.1 @@ -1,5 +1,4 @@ -.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.41.1. -.TH MSTLINK, "1" "March 2020" "mstlink, mstflint 4.14.0, built on Mar 3 2020, 14:03:31. Git SHA Hash: N/A" "User Commands" +.TH MSTLINK "1" "March 2020" "mstflint" "User Commands" .SH NAME mstlink \- check and debug link status and issues related to them .SH diff --git a/man/mstmcra.1 b/man/mstmcra.1 index 42fcfc63..e361cb10 100644 --- a/man/mstmcra.1 +++ b/man/mstmcra.1 @@ -1,5 +1,4 @@ -.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.41.1. -.TH MSTMCRA "1" "March 2020" "mstmcra Mellanox Configuration Registers Access tool" "User Commands" +.TH MSTMCRA "1" "March 2020" "mstflint" "User Commands" .SH NAME mstmcra \- Mellanox Configuration Registers Access tool .SH DESCRIPTION diff --git a/man/mstmread.1 b/man/mstmread.1 index cc5fefe4..e7e05500 100644 --- a/man/mstmread.1 +++ b/man/mstmread.1 @@ -1,5 +1,4 @@ -.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.41.1. -.TH MSTMREAD "1" "March 2020" "mstmread " "User Commands" +.TH MSTMREAD "1" "March 2020" "mstflint" "User Commands" .SH NAME mstmread \- Mellanox Read Configuration Register Tool .SH DESCRIPTION diff --git a/man/mstmtserver.1 b/man/mstmtserver.1 index cf495274..d31e67c0 100644 --- a/man/mstmtserver.1 +++ b/man/mstmtserver.1 @@ -1,5 +1,4 @@ -.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.41.1. -.TH MSTMTSERVER "1" "March 2020" +.TH MSTMTSERVER "1" "March 2020" "mstflint" "User Commands" .SH NAME mstmtserver \- mstflint mst mt server .SH DESCRIPTION diff --git a/man/mstmwrite.1 b/man/mstmwrite.1 index 110a6d17..3fc2fcd9 100644 --- a/man/mstmwrite.1 +++ b/man/mstmwrite.1 @@ -1,5 +1,4 @@ -.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.41.1. -.TH MSTMWRITE "1" "March 2020" "mstmwrite " "User Commands" +.TH MSTMWRITE "1" "March 2020" "mstflint" "User Commands" .SH NAME mstmwrite \- Mellanox Write Configuration Register Tool .SH DESCRIPTION diff --git a/man/mstprivhost.1 b/man/mstprivhost.1 index 2c8b3ec2..6a68e0ee 100644 --- a/man/mstprivhost.1 +++ b/man/mstprivhost.1 @@ -1,5 +1,4 @@ -.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.41.1. -.TH MSTPRIVHOST "1" "March 2020" "mstprivhost 1.0.0, mstflint 4.14.0, built on Mar 03 2020, 14:01:10. Git SHA Hash: N/A" "User Commands" +.TH MSTPRIVHOST "1" "March 2020" "mstflint" "User Commands" .SH NAME mstprivhost \- privilege modification tool .SH DESCRIPTION diff --git a/man/mstreg.1 b/man/mstreg.1 index 8276064b..cc4bb436 100644 --- a/man/mstreg.1 +++ b/man/mstreg.1 @@ -1,5 +1,4 @@ -.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.41.1. -.TH MSTREG, "1" "March 2020" "mstreg, mstflint 4.14.0, built on Mar 3 2020, 14:03:18. Git SHA Hash: N/A" "User Commands" +.TH MSTREG "1" "March 2020" "mstflint" "User Commands" .SH NAME mstreg \- Expose supported access registers .SH DESCRIPTION diff --git a/man/mstregdump.1 b/man/mstregdump.1 index 546b9f95..10e4189e 100644 --- a/man/mstregdump.1 +++ b/man/mstregdump.1 @@ -1,5 +1,4 @@ -.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.41.1. -.TH MSTREGDUMP, "1" "March 2020" "mstregdump, mstflint 4.14.0, built on Mar 3 2020, 14:02:48. Git SHA Hash: N/A" "User Commands" +.TH MSTREGDUMP "1" "March 2020" "mstflint" "User Commands" .SH NAME mstdump \- Mellanox mstdump utility, dumps device internal configuration data .SH SYNOPSIS diff --git a/man/mstresourcedump.1 b/man/mstresourcedump.1 index 7d06cd21..b7fa94e0 100644 --- a/man/mstresourcedump.1 +++ b/man/mstresourcedump.1 @@ -1,5 +1,4 @@ -.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.41.1. -.TH MSTRESOURCEDUMP, "1" "March 2020" "mstresourcedump, mstflint 4.14.0, built on Mar 03 2020, 14:01:10. Git SHA Hash: N/A" "User Commands" +.TH MSTRESOURCEDUMP "1" "March 2020" "mstflint" "User Commands" .SH NAME mstresourcedump \- dump resource information .SH DESCRIPTION diff --git a/man/mstvpd.1 b/man/mstvpd.1 index 1af3051d..e6a4c3ae 100644 --- a/man/mstvpd.1 +++ b/man/mstvpd.1 @@ -1,5 +1,4 @@ -.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.41.1. -.TH USAGE: "1" "March 2020" "Usage: mstvpd [-m|-n|-r] [-t ##] [-- keyword ...]" "User Commands" +.TH MSTVPD "1" "March 2020" "mstflint" "User Commands" .SH NAME mstvpd \- Mellanox VPD read tool .SH SYNOPSIS From ad94589c75e811b3ac8b8d26143933996ae79ce5 Mon Sep 17 00:00:00 2001 From: Tzafrir Cohen Date: Mon, 15 Aug 2022 17:23:37 +0300 Subject: [PATCH 05/63] man: remove info reference from SEE ALSO * Remove false information about info page, because that one will never come. * Put there mstflint(1) as an example. There is probably better content. --- man/mstarchive.1 | 12 +----------- man/mstconfig.1 | 12 +----------- man/mstcongestion.1 | 12 +----------- man/mstflint.1 | 12 +----------- man/mstfwmanager.1 | 12 +----------- man/mstfwreset.1 | 12 +----------- man/mstfwtrace.1 | 12 +----------- man/mstlink.1 | 12 +----------- man/mstmcra.1 | 12 +----------- man/mstmread.1 | 12 +----------- man/mstmtserver.1 | 3 ++- man/mstmwrite.1 | 12 +----------- man/mstprivhost.1 | 12 +----------- man/mstreg.1 | 12 +----------- man/mstregdump.1 | 12 +----------- man/mstresourcedump.1 | 12 +----------- man/mstvpd.1 | 12 +----------- 17 files changed, 18 insertions(+), 177 deletions(-) diff --git a/man/mstarchive.1 b/man/mstarchive.1 index ad3c90cf..1d8446b4 100644 --- a/man/mstarchive.1 +++ b/man/mstarchive.1 @@ -37,14 +37,4 @@ mstarchive OPTIONS \fB\-m\fR|\-\-mfa2\-file mfa2_file : Mfa2 file to parse .SH "SEE ALSO" -The full documentation for -.B mstarchive -is maintained as a Texinfo manual. If the -.B info -and -.B mstarchive -programs are properly installed at your site, the command -.IP -.B info mstarchive -.PP -should give you access to the complete manual. +.B mstflint(1) diff --git a/man/mstconfig.1 b/man/mstconfig.1 index 91f252ea..0a3fa2f5 100644 --- a/man/mstconfig.1 +++ b/man/mstconfig.1 @@ -117,14 +117,4 @@ Supported devices: .IP Note: query device to view supported configurations by Firmware. .SH "SEE ALSO" -The full documentation for -.B mstconfig -is maintained as a Texinfo manual. If the -.B info -and -.B mstconfig -programs are properly installed at your site, the command -.IP -.B info mstconfig -.PP -should give you access to the complete manual. +.B mstflint(1) diff --git a/man/mstcongestion.1 b/man/mstcongestion.1 index d86162bb..4531aa17 100644 --- a/man/mstcongestion.1 +++ b/man/mstcongestion.1 @@ -41,14 +41,4 @@ mark] \fB\-v\fR|\-\-version : Show version and exit .SH "SEE ALSO" -The full documentation for -.B mstcongestion, -is maintained as a Texinfo manual. If the -.B info -and -.B mstcongestion, -programs are properly installed at your site, the command -.IP -.B info mstcongestion, -.PP -should give you access to the complete manual. +.B mstflint(1) diff --git a/man/mstflint.1 b/man/mstflint.1 index e99ad022..27e8f9ed 100644 --- a/man/mstflint.1 +++ b/man/mstflint.1 @@ -416,14 +416,4 @@ An error has occurred. For burn command \- FW already updated \- burn was aborted. .SH "SEE ALSO" -The full documentation for -.B mstflint -is maintained as a Texinfo manual. If the -.B info -and -.B mstflint -programs are properly installed at your site, the command -.IP -.B info mstflint -.PP -should give you access to the complete manual. +.B mstarchive(1) diff --git a/man/mstfwmanager.1 b/man/mstfwmanager.1 index e9419e23..19a78030 100644 --- a/man/mstfwmanager.1 +++ b/man/mstfwmanager.1 @@ -153,14 +153,4 @@ available OS for sfx download 5. Download latest FW package from the web >> mstfwmanager \-\-download\-default \-\-download\-os Linux_x64 \-\-download\-type self_extractor .SH "SEE ALSO" -The full documentation for -.B mstfwmanager -is maintained as a Texinfo manual. If the -.B info -and -.B mstfwmanager -programs are properly installed at your site, the command -.IP -.B info mstfwmanager -.PP -should give you access to the complete manual. +.B mstflint(1) diff --git a/man/mstfwreset.1 b/man/mstfwreset.1 index f8c420b7..31a2dab6 100644 --- a/man/mstfwreset.1 +++ b/man/mstfwreset.1 @@ -58,14 +58,4 @@ reset_fsm_register: Reset the fsm register. 0: Full chip reset 1: Phy\-less reset ("port\-alive" \- network link will remain up) .SH "SEE ALSO" -The full documentation for -.B mstfwreset -is maintained as a Texinfo manual. If the -.B info -and -.B mstfwreset -programs are properly installed at your site, the command -.IP -.B info mstfwreset -.PP -should give you access to the complete manual. +.B mstflint(1) diff --git a/man/mstfwtrace.1 b/man/mstfwtrace.1 index 4bb2a119..04d630f3 100644 --- a/man/mstfwtrace.1 +++ b/man/mstfwtrace.1 @@ -144,14 +144,4 @@ Trace classes: .IP class1, class2 .SH "SEE ALSO" -The full documentation for -.B mstfwtrace, -is maintained as a Texinfo manual. If the -.B info -and -.B mstfwtrace, -programs are properly installed at your site, the command -.IP -.B info mstfwtrace, -.PP -should give you access to the complete manual. +.B mstflint(1) diff --git a/man/mstlink.1 b/man/mstlink.1 index 040f8697..f2a22a49 100644 --- a/man/mstlink.1 +++ b/man/mstlink.1 @@ -174,14 +174,4 @@ Configure Transmitter Parameters (on lane, to database): mstlink \fB\-d\fR \fB\-p\fR (\fB\-\-serdes_tx_lane\fR ) (\fB\-\-database\fR) \\ \fB\-\-serdes_tx\fR ,,,,, .SH "SEE ALSO" -The full documentation for -.B mstlink, -is maintained as a Texinfo manual. If the -.B info -and -.B mstlink, -programs are properly installed at your site, the command -.IP -.B info mstlink, -.PP -should give you access to the complete manual. +mstflint(1) diff --git a/man/mstmcra.1 b/man/mstmcra.1 index e361cb10..8614752e 100644 --- a/man/mstmcra.1 +++ b/man/mstmcra.1 @@ -45,14 +45,4 @@ Reads/writes a single word from/to a device configuration register space ADB_DUMP : Holds the path to adb dump, used for access by path (can be overridden by "\-a"). .SH "SEE ALSO" -The full documentation for -.B mstmcra -is maintained as a Texinfo manual. If the -.B info -and -.B mstmcra -programs are properly installed at your site, the command -.IP -.B info mstmcra -.PP -should give you access to the complete manual. +.B mstflint(1) diff --git a/man/mstmread.1 b/man/mstmread.1 index e7e05500..b2388621 100644 --- a/man/mstmread.1 +++ b/man/mstmread.1 @@ -4,14 +4,4 @@ mstmread \- Mellanox Read Configuration Register Tool .SH DESCRIPTION mstmread .SH "SEE ALSO" -The full documentation for -.B mstmread -is maintained as a Texinfo manual. If the -.B info -and -.B mstmread -programs are properly installed at your site, the command -.IP -.B info mstmread -.PP -should give you access to the complete manual. +.B mstflint(1) diff --git a/man/mstmtserver.1 b/man/mstmtserver.1 index d31e67c0..5b776186 100644 --- a/man/mstmtserver.1 +++ b/man/mstmtserver.1 @@ -14,4 +14,5 @@ mstmtserver [switches] \fB\-h[elp]\fR \- Print help message. .HP \fB\-v[ersion]\fR \- Print version. - +.SH "SEE ALSO" +.B mstflint(1) diff --git a/man/mstmwrite.1 b/man/mstmwrite.1 index 3fc2fcd9..fea7bbe0 100644 --- a/man/mstmwrite.1 +++ b/man/mstmwrite.1 @@ -4,14 +4,4 @@ mstmwrite \- Mellanox Write Configuration Register Tool .SH DESCRIPTION mstmwrite .SH "SEE ALSO" -The full documentation for -.B mstmwrite -is maintained as a Texinfo manual. If the -.B info -and -.B mstmwrite -programs are properly installed at your site, the command -.IP -.B info mstmwrite -.PP -should give you access to the complete manual. +.B mstflint(1) diff --git a/man/mstprivhost.1 b/man/mstprivhost.1 index 6a68e0ee..47846dc1 100644 --- a/man/mstprivhost.1 +++ b/man/mstprivhost.1 @@ -53,14 +53,4 @@ privilege: Set host 1 (ARM) privileged, host 0 (x86_64) privileged .IP (back to default). .SH "SEE ALSO" -The full documentation for -.B mstprivhost -is maintained as a Texinfo manual. If the -.B info -and -.B mstprivhost -programs are properly installed at your site, the command -.IP -.B info mstprivhost -.PP -should give you access to the complete manual. +mstflint(1) diff --git a/man/mstreg.1 b/man/mstreg.1 index cc4bb436..991f4029 100644 --- a/man/mstreg.1 +++ b/man/mstreg.1 @@ -74,14 +74,4 @@ SET PAOS with indexes: local port 0x1 and swid 0x5, and data: e 0x0: .IP mstreg \fB\-d\fR \fB\-\-set\fR "e=0x0" \fB\-\-reg_name\fR PAOS \fB\-\-indexes\fR "local_port=0x1,swid=0x5" .SH "SEE ALSO" -The full documentation for -.B mstreg, -is maintained as a Texinfo manual. If the -.B info -and -.B mstreg, -programs are properly installed at your site, the command -.IP -.B info mstreg, -.PP -should give you access to the complete manual. +.B mstflint(1) diff --git a/man/mstregdump.1 b/man/mstregdump.1 index 10e4189e..a3074c7e 100644 --- a/man/mstregdump.1 +++ b/man/mstregdump.1 @@ -19,14 +19,4 @@ Print this help message .IP mstregdump 0b:00.0 .SH "SEE ALSO" -The full documentation for -.B mstregdump -is maintained as a Texinfo manual. If the -.B info -and -.B mstregdump -programs are properly installed at your site, the command -.IP -.B info mstregdump -.PP -should give you access to the complete manual. +.B mstflint(1) diff --git a/man/mstresourcedump.1 b/man/mstresourcedump.1 index b7fa94e0..2fcda17a 100644 --- a/man/mstresourcedump.1 +++ b/man/mstresourcedump.1 @@ -16,14 +16,4 @@ Shows tool version .PP Use 'mstresourcedump \fB\-h\fR' to read about a specific command. .SH "SEE ALSO" -The full documentation for -.B mstresourcedump, -is maintained as a Texinfo manual. If the -.B info -and -.B mstresourcedump, -programs are properly installed at your site, the command -.IP -.B info mstresourcedump, -.PP -should give you access to the complete manual. +.B mstflint(1) diff --git a/man/mstvpd.1 b/man/mstvpd.1 index e6a4c3ae..607bd3b2 100644 --- a/man/mstvpd.1 +++ b/man/mstvpd.1 @@ -21,14 +21,4 @@ or '\-' to read VPD data from the standard input. keyword(s): Only display the requested information. (ID, PN, EC, SN, etc...) .PP .SH "SEE ALSO" -The full documentation for -.B Usage: -is maintained as a Texinfo manual. If the -.B info -and -.B Usage: -programs are properly installed at your site, the command -.IP -.B info Usage: -.PP -should give you access to the complete manual. +.B mstflint(1) From f38a7db943b35cfcd06aa9bc7dce55d1a70a62cb Mon Sep 17 00:00:00 2001 From: Mustafa Dalloul Date: Tue, 16 Aug 2022 11:58:18 +0300 Subject: [PATCH 06/63] [mstlink] Fixing show ddm info for QSFP_CMIS cables Description: Adding missing case for QSFP_CMIS cables while running ddm command, And adding default case for un-recognized identifiers Issue: 3174798 Signed-off-by: Mustafa Dalloul --- mlxlink/modules/mlxlink_cables_commander.cpp | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/mlxlink/modules/mlxlink_cables_commander.cpp b/mlxlink/modules/mlxlink_cables_commander.cpp index 5aeea0f9..b947de76 100644 --- a/mlxlink/modules/mlxlink_cables_commander.cpp +++ b/mlxlink/modules/mlxlink_cables_commander.cpp @@ -47,6 +47,7 @@ MlxlinkCablesCommander::MlxlinkCablesCommander(Json::Value& jsonRoot) : _jsonRoo _prbsSwap = false; _prbsLanes = 0; + memset(&_cableDdm, 0, sizeof(cable_ddm_q_t)); // PMCR control fields names // pair(UI name, PMCR field name) _modulePMCRParams[CABLE_CONTROL_PARAMETERS_SET_TX_EQ] = make_pair("TX Equalization", "tx_equ_override"); @@ -543,6 +544,7 @@ void MlxlinkCablesCommander::readCableDDMInfo() { case IDENTIFIER_QSFP28: case IDENTIFIER_QSFP_PLUS: + case IDENTIFIER_QSFP_SPLIT_CABLE: prepareQSFPDdmInfo(); loadEEPRMPage(PAGE_03, UPPER_PAGE_OFFSET, thresholdPage); prepareThresholdInfo(thresholdPage); @@ -559,8 +561,12 @@ void MlxlinkCablesCommander::readCableDDMInfo() case IDENTIFIER_QSFP_DD: case IDENTIFIER_OSFP: case IDENTIFIER_DSFP: + case IDENTIFIER_QSFP_CMIS: prepareQsfpddDdmInfo(); break; + default: + free(thresholdPage); + throw MlxRegException("Cable does not support DDM"); } fixThresholdBytes(); @@ -647,11 +653,11 @@ void MlxlinkCablesCommander::prepareDDMOutput() int skipTitle = (_cableDdm.channels == 1); if (!skipTitle) { - setPrintVal(cableDDMCmd, "Channels", title, ANSI_COLOR_RESET, true, true, true); + setPrintVal(cableDDMCmd, "Channels", title, ANSI_COLOR_RESET, true, _cableDdm.channels > 0, true); } - setPrintVal(cableDDMCmd, "RX Power", rxPower, ANSI_COLOR_RESET, true, true, true); - setPrintVal(cableDDMCmd, "TX Power", txPower, ANSI_COLOR_RESET, true, true, true); - setPrintVal(cableDDMCmd, "TX Bias", txBias, ANSI_COLOR_RESET, true, true, true); + setPrintVal(cableDDMCmd, "RX Power", rxPower, ANSI_COLOR_RESET, true, _cableDdm.channels > 0, true); + setPrintVal(cableDDMCmd, "TX Power", txPower, ANSI_COLOR_RESET, true, _cableDdm.channels > 0, true); + setPrintVal(cableDDMCmd, "TX Bias", txBias, ANSI_COLOR_RESET, true, _cableDdm.channels > 0, true); cableDDMCmd.toJsonFormat(_jsonRoot); _cableDDMOutput.push_back(cableDDMCmd); From f759c0c33a125a61b1de32ec74995368d0f8e0ab Mon Sep 17 00:00:00 2001 From: Tzafrir Cohen Date: Tue, 16 Aug 2022 15:03:42 +0300 Subject: [PATCH 07/63] Fix types (lintian) Signed-off-by: Tzafrir Cohen --- ext_libs/iniParser/README.md | 2 +- ext_libs/iniParser/dictionary.c | 2 +- ext_libs/iniParser/dictionary.h | 2 +- ext_libs/iniParser/iniparser.c | 2 +- ext_libs/sqlite/sqlite3.c | 4 ++-- fw_comps_mgr/fw_comps_mgr_dma_access.cpp | 2 +- mlxconfig/mlxcfg_generic_commander.cpp | 2 +- mlxconfig/mlxcfg_parser.cpp | 2 +- reg_access/reg_access.c | 4 ++-- tools_layouts/tools_open_layouts.h | 2 +- 10 files changed, 12 insertions(+), 12 deletions(-) diff --git a/ext_libs/iniParser/README.md b/ext_libs/iniParser/README.md index dbc30d0a..d8f72a78 100644 --- a/ext_libs/iniParser/README.md +++ b/ext_libs/iniParser/README.md @@ -29,7 +29,7 @@ You should consider trying the following rules too : ## III - License This software is released under MIT License. -See LICENSE for full informations +See LICENSE for full information ## IV - Versions diff --git a/ext_libs/iniParser/dictionary.c b/ext_libs/iniParser/dictionary.c index 5e998193..3773b218 100644 --- a/ext_libs/iniParser/dictionary.c +++ b/ext_libs/iniParser/dictionary.c @@ -6,7 +6,7 @@ This module implements a simple dictionary object, i.e. a list of string/string associations. This object is useful to store e.g. - informations retrieved from a configuration file (ini files). + information retrieved from a configuration file (ini files). */ /*--------------------------------------------------------------------------*/ diff --git a/ext_libs/iniParser/dictionary.h b/ext_libs/iniParser/dictionary.h index 772b5156..f0623d19 100644 --- a/ext_libs/iniParser/dictionary.h +++ b/ext_libs/iniParser/dictionary.h @@ -7,7 +7,7 @@ This module implements a simple dictionary object, i.e. a list of string/string associations. This object is useful to store e.g. - informations retrieved from a configuration file (ini files). + information retrieved from a configuration file (ini files). */ /*--------------------------------------------------------------------------*/ diff --git a/ext_libs/iniParser/iniparser.c b/ext_libs/iniParser/iniparser.c index f91962b9..a897482a 100644 --- a/ext_libs/iniParser/iniparser.c +++ b/ext_libs/iniParser/iniparser.c @@ -37,7 +37,7 @@ typedef enum _line_status_ @param in String to convert. @param out Output buffer. @param len Size of the out buffer. - @return ptr to the out buffer or NULL if an error occured. + @return ptr to the out buffer or NULL if an error occurred. This function convert a string into lowercase. At most len - 1 elements of the input string will be converted. diff --git a/ext_libs/sqlite/sqlite3.c b/ext_libs/sqlite/sqlite3.c index 5394db40..98d8d127 100644 --- a/ext_libs/sqlite/sqlite3.c +++ b/ext_libs/sqlite/sqlite3.c @@ -109831,7 +109831,7 @@ static RenameToken *renameColumnTokenNext(RenameCtx *pCtx){ } /* -** An error occured while parsing or otherwise processing a database +** An error occurred while parsing or otherwise processing a database ** object (either pParse->pNewTable, pNewIndex or pNewTrigger) as part of an ** ALTER TABLE RENAME COLUMN program. The error message emitted by the ** sub-routine is currently stored in pParse->zErrMsg. This function @@ -214381,7 +214381,7 @@ static int sessionBindRow( ** iterator pIter points to to the SELECT and attempts to seek to the table ** entry. If a row is found, the SELECT statement left pointing at the row ** and SQLITE_ROW is returned. Otherwise, if no row is found and no error -** has occured, the statement is reset and SQLITE_OK is returned. If an +** has occurred, the statement is reset and SQLITE_OK is returned. If an ** error occurs, the statement is reset and an SQLite error code is returned. ** ** If this function returns SQLITE_ROW, the caller must eventually reset() diff --git a/fw_comps_mgr/fw_comps_mgr_dma_access.cpp b/fw_comps_mgr/fw_comps_mgr_dma_access.cpp index b6aa474d..95fa0f5c 100644 --- a/fw_comps_mgr/fw_comps_mgr_dma_access.cpp +++ b/fw_comps_mgr/fw_comps_mgr_dma_access.cpp @@ -399,7 +399,7 @@ bool DMAComponentAccess::accessComponent(u_int32_t updateHandle, } catch (std::exception& e) { - DPRINTF(("DMAComponentAccess::Exception occured %s\n", e.what())); + DPRINTF(("DMAComponentAccess::Exception occurred %s\n", e.what())); return false; } #endif diff --git a/mlxconfig/mlxcfg_generic_commander.cpp b/mlxconfig/mlxcfg_generic_commander.cpp index b53cb50c..1e80d4dc 100644 --- a/mlxconfig/mlxcfg_generic_commander.cpp +++ b/mlxconfig/mlxcfg_generic_commander.cpp @@ -1503,7 +1503,7 @@ void GenericCommander::sign(vector& buff, if ((keySize != KEY_SIZE_256) && (keySize != KEY_SIZE_512)) { throw MlxcfgException("Invalid length of private key(%d bytes). It is " - "recommanded to use 4096 bit key.\n", + "recommended to use 4096 bit key.\n", keySize); } // Init successfuly with valid key -> can continue to sign the massage diff --git a/mlxconfig/mlxcfg_parser.cpp b/mlxconfig/mlxcfg_parser.cpp index 25e474c9..6250a51e 100644 --- a/mlxconfig/mlxcfg_parser.cpp +++ b/mlxconfig/mlxcfg_parser.cpp @@ -99,7 +99,7 @@ void MlxCfg::printHelp() printf("\n"); printf(IDENT "COMMANDS SUMMARY\n"); printf(IDENT2 "%-24s : %s\n", "clear_semaphore", "clear the tool semaphore."); - printf(IDENT2 "%-24s : %s\n", "i|show_confs", "display informations about all configurations."); + printf(IDENT2 "%-24s : %s\n", "i|show_confs", "display information about all configurations."); printf(IDENT2 "%-24s : %s\n", "q|query", "query supported configurations."); printf(IDENT2 "%-24s : %s\n", "r|reset", "reset all configurations to their default value."); printf(IDENT2 "%-24s : %s\n", "s|set", "set configurations to a specific device."); diff --git a/reg_access/reg_access.c b/reg_access/reg_access.c index 8b9751bb..9178860d 100644 --- a/reg_access/reg_access.c +++ b/reg_access/reg_access.c @@ -679,7 +679,7 @@ reg_access_status_t reg_access_mcqs(mfile* mf, reg_access_method_t method, struc char* path_env = getenv("MCQS_DEBUG"); if (path_env != NULL) { - printf("-I- MCQS: Recieved data --\n"); + printf("-I- MCQS: Received data --\n"); reg_access_hca_mcqs_reg_dump(mcqs, stdout); } @@ -700,7 +700,7 @@ reg_access_status_t reg_access_mcqi(mfile* mf, reg_access_method_t method, struc char* path_env = getenv("MCQI_DEBUG"); if (path_env != NULL) { - printf("-I- MCQI: Recieved data --\n"); + printf("-I- MCQI: Received data --\n"); reg_access_hca_mcqi_reg_dump(mcqi, stdout); } return ret; diff --git a/tools_layouts/tools_open_layouts.h b/tools_layouts/tools_open_layouts.h index a4baed7d..df420e5c 100644 --- a/tools_layouts/tools_open_layouts.h +++ b/tools_layouts/tools_open_layouts.h @@ -2844,7 +2844,7 @@ the default link type when no cable is connected */ /* Description - Status of current operation that FW sends to host. */ /* 0x20.0 - 0x20.7 */ u_int8_t status; - /* Description - Last error index, if occured. */ + /* Description - Last error index, if occurred. */ /* 0x20.8 - 0x20.15 */ u_int8_t error; /* Description - Reserved. */ From d1a3a3183a27cfbb27d2aa037b387f03e142eaec Mon Sep 17 00:00:00 2001 From: Alex Blago Date: Thu, 8 Sep 2022 14:31:17 -0700 Subject: [PATCH 08/63] update mstflint version for 4.22.0 release --- configure.ac | 4 ++-- debian/changelog | 6 ++++++ kernel/mstflint_kernel.spec | 2 +- mstflint.spec.in | 5 ++++- 4 files changed, 13 insertions(+), 4 deletions(-) diff --git a/configure.ac b/configure.ac index 4d549ee4..0fb7ab74 100644 --- a/configure.ac +++ b/configure.ac @@ -31,12 +31,12 @@ dnl Process this file with autoconf to produce a configure script. -AC_INIT(mstflint, 4.21.0, eranj@mellanox.co.il) +AC_INIT(mstflint, 4.22.0, akiselman-org@exchange.nvidia.com) AC_DEFINE_UNQUOTED([PROJECT], ["mstflint"], [Define the project name.]) AC_SUBST([PROJECT]) -AC_DEFINE_UNQUOTED([VERSION], ["4.21.0"], [Define the project version.]) +AC_DEFINE_UNQUOTED([VERSION], ["4.22.0"], [Define the project version.]) AC_SUBST([VERSION]) AC_CONFIG_MACRO_DIR([m4]) diff --git a/debian/changelog b/debian/changelog index bcb0ec4a..98eeb84b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +mstflint (4.22.0-1) unstable; urgency=low + + * Updated from MFT-4.22.0 + + -- Alex Blago Thu, 8 Sep 2022 00:00:00 +0000 + mstflint (4.21.0-1) unstable; urgency=low * Updated from MFT-4.21.0 diff --git a/kernel/mstflint_kernel.spec b/kernel/mstflint_kernel.spec index c261c39d..1d811108 100644 --- a/kernel/mstflint_kernel.spec +++ b/kernel/mstflint_kernel.spec @@ -22,7 +22,7 @@ %global _name kernel-mstflint %endif -%{!?version: %global version 4.21.0} +%{!?version: %global version 4.22.0} %{!?_release: %global _release 1} %global _kmp_rel %{_release}%{?_kmp_build_num}%{?_dist} diff --git a/mstflint.spec.in b/mstflint.spec.in index fc619a55..9488532b 100644 --- a/mstflint.spec.in +++ b/mstflint.spec.in @@ -1,6 +1,6 @@ %{!?ibmadlib: %define ibmadlib libibmad-devel} %{!?name: %define name mstflint} -%{!?version: %define version 4.21.0} +%{!?version: %define version 4.22.0} %{!?release: %define release 1} %{!?buildtype: %define buildtype "native"} %{!?noinband: %define noinband 0} @@ -215,6 +215,9 @@ rm -rf $RPM_BUILD_ROOT %{_mandir}/man1/* %changelog +* Thu Sep 8 2022 Alex Blago + MFT 4.22.0 Updates + * Sun Jul 31 2022 Tomer Tubi MFT 4.21.0 Updates From b776862b2167abfd2a4532aec6dcde1278fc4f70 Mon Sep 17 00:00:00 2001 From: Matan Eliyahu Date: Mon, 11 Jul 2022 15:52:30 +0300 Subject: [PATCH 09/63] Support new MCC error message for token already applied Description: New MCC error code added 0x17: REJECTED_TOKEN_ALREADY_APPLIED Tested OS: N/A Tested devices: N/A Tested flows: N/A Known gaps (with RM ticket): N/A Issue: 2895268 Change-Id: I60a4970c299c9df84c249f28a21d22d263c1edd0 Signed-off-by: Matan Eliyahu --- fw_comps_mgr/fw_comps_mgr.cpp | 7 ++++++- fw_comps_mgr/fw_comps_mgr.h | 4 +++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/fw_comps_mgr/fw_comps_mgr.cpp b/fw_comps_mgr/fw_comps_mgr.cpp index 45ad5043..dd580453 100644 --- a/fw_comps_mgr/fw_comps_mgr.cpp +++ b/fw_comps_mgr/fw_comps_mgr.cpp @@ -1873,7 +1873,6 @@ unsigned char* FwCompsMgr::getLastErrMsg() case FWCOMPS_READ_COMP_NOT_SUPPORTED: return (unsigned char*)"Reading component is not supported"; - break; case FWCOMPS_COMP_NOT_SUPPORTED: return (unsigned char*)"Component not supported"; @@ -1957,6 +1956,9 @@ unsigned char* FwCompsMgr::getLastErrMsg() case FWCOMPS_MCC_REJECTED_INCOMPATIBLE_FLASH: return (unsigned char*)"The image does not support the device's flash type"; + case FWCOMPS_MCC_REJECTED_TOKEN_ALREADY_APPLIED: + return (unsigned char*)"Token already applied"; + case FWCOMPS_UNSUPPORTED_DEVICE: return (unsigned char*)"Unsupported device"; @@ -2443,6 +2445,9 @@ fw_comps_error_t FwCompsMgr::mccErrTrans(u_int8_t err) case MCC_ERRCODE_REJECTED_INCOMPATIBLE_FLASH: return FWCOMPS_MCC_REJECTED_INCOMPATIBLE_FLASH; + case MCC_ERRCODE_REJECTED_TOKEN_ALREADY_APPLIED: + return FWCOMPS_MCC_REJECTED_TOKEN_ALREADY_APPLIED; + default: return FWCOMPS_GENERAL_ERR; } diff --git a/fw_comps_mgr/fw_comps_mgr.h b/fw_comps_mgr/fw_comps_mgr.h index 65ca3a2a..18242e8f 100644 --- a/fw_comps_mgr/fw_comps_mgr.h +++ b/fw_comps_mgr/fw_comps_mgr.h @@ -274,6 +274,7 @@ typedef enum FWCOMPS_MCC_REJECTED_LINKX_TRANSFER = 0x115, FWCOMPS_MCC_REJECTED_LINKX_ACTIVATE = 0x116, FWCOMPS_MCC_REJECTED_INCOMPATIBLE_FLASH = 0x117, + FWCOMPS_MCC_REJECTED_TOKEN_ALREADY_APPLIED = 0x118, // errors regarding REG_ACCESS FWCOMPS_REG_ACCESS_OK = 0, @@ -469,7 +470,8 @@ class FwCompsMgr MCC_ERRCODE_REJECTED_HOST_STORAGE_IN_USE = 0x13, MCC_ERRCODE_REJECTED_LINKX_TRANSFER = 0x14, MCC_ERRCODE_REJECTED_LINKX_ACTIVATE = 0x15, - MCC_ERRCODE_REJECTED_INCOMPATIBLE_FLASH = 0x16 + MCC_ERRCODE_REJECTED_INCOMPATIBLE_FLASH = 0x16, + MCC_ERRCODE_REJECTED_TOKEN_ALREADY_APPLIED = 0x17 } mcc_command_error_t; typedef enum From cda200fa8ac6f2464125629125984d14f21e9709 Mon Sep 17 00:00:00 2001 From: Matan Eliyahu Date: Sun, 10 Jul 2022 17:06:36 +0300 Subject: [PATCH 10/63] Sync 1 as default in case of DPU and driver sync supported according to MCAM Description: Changing default behavior of reset-sync to 1 in case of DPU (Smart-NIC) device and MCAM.pcie_sync_for_fw_update is set Tested OS: Linux Tested devices: CX6DX, BF Tested flows: mlxfwreset reset Known gaps (with RM ticket): N/A Issue: 3128038 Change-Id: I449166f52747d5560978329d5b28d06cc6364488 Signed-off-by: Matan Eliyahu --- small_utils/mlxfwresetlib/pci_device.py | 2 +- small_utils/mstfwreset.py | 91 +++++++++++++++++-------- 2 files changed, 65 insertions(+), 28 deletions(-) diff --git a/small_utils/mlxfwresetlib/pci_device.py b/small_utils/mlxfwresetlib/pci_device.py index cb36d5bb..aba6afea 100644 --- a/small_utils/mlxfwresetlib/pci_device.py +++ b/small_utils/mlxfwresetlib/pci_device.py @@ -39,7 +39,7 @@ from mtcr import MstDevice from .mcra import Mcra -# TODO fix it latter - need to import the function from mlxfwreset.py +# TODO fix it later - need to import the function from mlxfwreset.py import sys import os mlxfwreset_dir = os.path.dirname(os.path.dirname(__file__)) diff --git a/small_utils/mstfwreset.py b/small_utils/mstfwreset.py index 6591d7b2..8c2f5544 100644 --- a/small_utils/mstfwreset.py +++ b/small_utils/mstfwreset.py @@ -96,10 +96,10 @@ class SyncOwner(): dict(name="ConnectX4", devid=0x209, status_config_not_done=(0xb0004, 31)), dict(name="ConnectX4LX", devid=0x20b, status_config_not_done=(0xb0004, 31)), dict(name="ConnectX5", devid=0x20d, status_config_not_done=(0xb5e04, 31)), - dict(name="BlueField", devid=0x211, status_config_not_done=(0xb5e04, 31)), - dict(name="BlueField2", devid=0x214, status_config_not_done=(0xb5f04, 31)), - dict(name="BlueField3", devid=0x21c, status_config_not_done=(0xb5f04, 31)), - dict(name="BlueField4", devid=0x220, status_config_not_done=(0xb5f04, 31)), + dict(name="BlueField", devid=0x211, status_config_not_done=(0xb5e04, 31), is_dpu=True), + dict(name="BlueField2", devid=0x214, status_config_not_done=(0xb5f04, 31), is_dpu=True), + dict(name="BlueField3", devid=0x21c, status_config_not_done=(0xb5f04, 31), is_dpu=True), + dict(name="BlueField4", devid=0x220, status_config_not_done=(0xb5f04, 31), is_dpu=True), dict(name="ConnectX6", devid=0x20f, status_config_not_done=(0xb5f04, 31)), dict(name="ConnectX6DX", devid=0x212, status_config_not_done=(0xb5f04, 31)), dict(name="ConnectX6LX", devid=0x216, status_config_not_done=(0xb5f04, 31)), @@ -114,7 +114,7 @@ class SyncOwner(): SUPP_OS = ["FreeBSD", "Linux", "Windows"] IS_MSTFLINT = os.path.basename(__file__) == "mstfwreset.py" -# TODO latter remove mcra to the new class +# TODO later remove mcra to the new class MCRA = 'mcra' if IS_MSTFLINT: MCRA = "mstmcra" @@ -220,9 +220,8 @@ def is_fw_ready(device): devid = getDevidFromDevice(device) - for mlnx_device in MLNX_DEVICES: - if mlnx_device['devid'] == devid: - address, offset = mlnx_device['status_config_not_done'] + devDict = getDeviceDict(devid) + address, offset = devDict['status_config_not_done'] status_config_not_done = mcraRead(device, address, offset, 1) return False if status_config_not_done == 1 else True @@ -792,24 +791,55 @@ def getDevidFromDevice(device): ###################################################################### -# Description: Check if device is supported -# OS Support : Linux/Windows. +# Description: Check if device is DPU ###################################################################### -def isDevSupp(device): - logger.info('isDevSupp() called. Inputs : device = {0}'.format(device)) +def isDPU(device): + logger.info('isDPU() called. Inputs : device = {0}'.format(device)) + res = False + try: devid = getDevidFromDevice(device) logger.debug('devid = {0:x}'.format(devid)) except Exception as e: raise RuntimeError("Failed to Identify Device: %s, %s" % (device, str(e))) + + devDict = getDeviceDict(devid) + if devDict.get("is_dpu") is True: + res = True + return res + +###################################################################### +# Description: Get device dictionary from MLNX_DEVICES +###################################################################### + + +def getDeviceDict(devid): + logger.info('getDeviceDict() called. Inputs : devid = {0}'.format(devid)) for devDict in MLNX_DEVICES: if devDict["devid"] == devid: - if devDict["name"] in SUPP_DEVICES: - return - else: - raise RuntimeError("Unsupported Device: %s (%s)" % (device, devDict["name"])) - raise RuntimeError("Failed to Identify Device: %s" % (device)) + return devDict + else: + raise RuntimeError("Failed to Identify devid: %s" % (devid)) + +###################################################################### +# Description: Check if device is supported +# OS Support : Linux/Windows. +###################################################################### + + +def assertDevSupp(device): + logger.info('assertDevSupp() called. Inputs : device = {0}'.format(device)) + try: + devid = getDevidFromDevice(device) + logger.debug('devid = {0:x}'.format(devid)) + except Exception as e: + raise RuntimeError("Failed to Identify Device: %s, %s" % (device, str(e))) + devDict = getDeviceDict(devid) + if devDict["name"] in SUPP_DEVICES: + return + else: + raise RuntimeError("Unsupported Device: %s (%s)" % (device, devDict["name"])) ###################################################################### # Description: Get All PCI Module Paths @@ -1532,11 +1562,19 @@ def map2DevPath(device): return d raise RuntimeError("Can not find path of the provided mst device: " + device) +###################################################################### +# Description: Returns default value for reset sync +###################################################################### + + +def get_default_reset_sync(device, mcam): + return SyncOwner.DRIVER if isDPU(device) and mcam.is_reset_by_fw_driver_sync_supported() else SyncOwner.TOOL ###################################################################### # Description: Main ###################################################################### + def main(): global logger global IS_MSTFLINT @@ -1577,7 +1615,6 @@ def main(): options_group.add_argument('--sync', type=int, choices=[SyncOwner.TOOL, SyncOwner.DRIVER], - default=SyncOwner.TOOL, dest='reset_sync', help=': Run reset with the specified reset-sync') options_group.add_argument('--yes', @@ -1648,7 +1685,7 @@ def check_positive_float(val): device = args.device global device_global - device_global = args.device # required for reset_fsm_register when exiting with ctrl+c/exception (latter think how to move the global) + device_global = args.device # required for reset_fsm_register when exiting with ctrl+c/exception (later think how to move the global) yes = args.yes command = args.command[0] @@ -1674,10 +1711,6 @@ def check_positive_float(val): global DevDBDF global FWResetStatusChecker - if args.reset_sync == SyncOwner.TOOL and command == "reset" and is_uefi_secureboot() \ - and args.reset_level != CmdRegMfrl.WARM_REBOOT: # The tool is using sysfs to access PCI config - raise RuntimeError("The tool supports only reset-level 4 on UEFI Secure Boot") # and it's restricted on UEFI secure boot - # Exit in case of virtual-machine (not implemented for FreeBSD and Windows) if command == "reset" and platform.system() == "Linux" and "ppc64" not in platform.machine(): rc, out, _ = cmdExec('lscpu') @@ -1699,7 +1732,7 @@ def check_positive_float(val): device = map2DevPath(device) # Insert Flow here - isDevSupp(device) # function takes ~330msec - TODO remove it if you need performace + assertDevSupp(device) # function takes ~330msec - TODO remove it if you need performace DevDBDF = mlxfwreset_utils.getDevDBDF(device, logger) logger.info('device domain:bus:dev.fn (DBDF) is {0}'.format(DevDBDF)) @@ -1720,12 +1753,17 @@ def check_positive_float(val): if DevMgtObj.isLivefishMode() == 1: raise RuntimeError("%s is not supported for device in Flash Recovery mode" % PROG) + reset_sync = args.reset_sync if args.reset_sync is not None else get_default_reset_sync(device, mcam) + if reset_sync == SyncOwner.TOOL and command == "reset" and is_uefi_secureboot() \ + and args.reset_level != CmdRegMfrl.WARM_REBOOT: # The tool is using sysfs to access PCI config + raise RuntimeError("The tool supports only reset-level 4 on UEFI Secure Boot") # and it's restricted on UEFI secure boot + # Check if other process is accessing the device (burning the device) - # Supportted on Windows OS only + # Supported on Windows OS only if platform.system() == "Windows": from tools_sync import ToolsSync if ToolsSync(MstDevObj.mf).lock() == False: - raise RuntimeError("Other tool is accessing the device! Please try again latter") + raise RuntimeError("Other tool is accessing the device! Please try again later") # Socket Direct - Create a list of command i/f for all "other" devices global CmdifObjsSD @@ -1792,7 +1830,6 @@ def check_positive_float(val): if args.reset_type and mfrl.is_reset_level_support_reset_type(reset_level) is False: raise RuntimeError("Reset-level '{0}' is not supported with reset-type '{1}'".format(reset_level, reset_type)) - reset_sync = args.reset_sync if reset_sync == SyncOwner.DRIVER and mcam.is_reset_by_fw_driver_sync_supported() is False: raise RuntimeError("Synchronization by driver is not supported in the current state of this device") if reset_sync != SyncOwner.TOOL and reset_level != CmdRegMfrl.PCI_RESET: From 3269c0a05ab6f52699331ae545f5de89a40d42ed Mon Sep 17 00:00:00 2001 From: Matan Eliyahu Date: Thu, 14 Jul 2022 12:12:04 +0300 Subject: [PATCH 11/63] Support GPIO toggling for BF3 same as CX7 Description: BF3 will also have Winbond flash in some PNs so we'll need to toggle GPIO 29 in order to force it out of HOLD state Reviewed with Denys and BF3 GPIO toggle flow is the same as CX7 Tested OS: N/A Tested devices: N/A Tested flows: N/A Known gaps (with RM ticket): Test on BF3 in BU Issue: 3138592 Change-Id: I4f94d98a5e8d185caebf41a229b31258d28a3906 Signed-off-by: Matan Eliyahu --- mflash/mflash.c | 1 + 1 file changed, 1 insertion(+) diff --git a/mflash/mflash.c b/mflash/mflash.c index 87c433c9..255dc9db 100644 --- a/mflash/mflash.c +++ b/mflash/mflash.c @@ -2646,6 +2646,7 @@ bool force_flash_out_of_hold_state(mflash* mfl) break; } case DeviceConnectX7: + case DeviceBlueField3: { gpio_toggle_conf_cx7 gpio_toggle_conf = {0}; set_gpio_toggle_conf_cx7(&gpio_toggle_conf); From 9bb8d2c8662ce0fb52838f9bcb20cf8a0f37dba3 Mon Sep 17 00:00:00 2001 From: Matan Eliyahu Date: Sun, 17 Jul 2022 15:39:35 +0300 Subject: [PATCH 12/63] Fix MaskBootRecordCRC for CX8 Description: N/A Tested OS: N/A Tested devices: N/A Tested flows: N/A Known gaps (with RM ticket): N/A Issue: None Change-Id: Iad82ab10bc3b7b768657e8e9761d9e3c9b96a2cc Signed-off-by: Matan Eliyahu --- mlxfwops/lib/fs4_ops.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/mlxfwops/lib/fs4_ops.cpp b/mlxfwops/lib/fs4_ops.cpp index fc35b6d0..8e9d7bee 100644 --- a/mlxfwops/lib/fs4_ops.cpp +++ b/mlxfwops/lib/fs4_ops.cpp @@ -580,8 +580,7 @@ bool Fs4Operations::GetImageDataForSign(MlxSign::SHAType shaType, vector Date: Sun, 17 Jul 2022 15:59:03 +0300 Subject: [PATCH 13/63] Burn tools coverity fixes Description: Fixes in mlxfwops, fw_comps_mft and flint Tested OS: Linux Tested devices: N/A Tested flows: Compile Known gaps (with RM ticket): N/A Issue: None Change-Id: I1524ed6e50249364aae74d5dfbc1a297b3b3d7d4 Signed-off-by: Matan Eliyahu --- fw_comps_mgr/fw_comps_mgr.cpp | 9 ++++++++- fw_comps_mgr/fw_comps_mgr.h | 3 ++- mlxfwops/lib/flint_base.cpp | 3 +-- mlxfwops/lib/fs3_ops.cpp | 6 ++++-- mlxfwops/lib/fs4_ops.cpp | 6 ++++-- mlxfwops/lib/fsctrl_ops.cpp | 1 + mlxfwops/lib/mlxfwops.cpp | 1 + 7 files changed, 21 insertions(+), 8 deletions(-) diff --git a/fw_comps_mgr/fw_comps_mgr.cpp b/fw_comps_mgr/fw_comps_mgr.cpp index dd580453..b6bfc928 100644 --- a/fw_comps_mgr/fw_comps_mgr.cpp +++ b/fw_comps_mgr/fw_comps_mgr.cpp @@ -1100,6 +1100,11 @@ FwCompsMgr::FwCompsMgr(uefi_Dev_t* uefi_dev, uefi_dev_extra_t* uefi_extra) _activation_delay_sec = 0; _rejectedIndex = -1; _isDelayedActivationCommandSent = false; + _deviceType = FwCompsMgr::DEVICE_UNKNOWN; + _deviceIndex = 0; +#ifndef UEFI_BUILD + _trm = NULL; +#endif initialize(mf); } FwCompsMgr::~FwCompsMgr() @@ -2099,6 +2104,7 @@ bool FwCompsMgr::GetComponentLinkxProperties(FwComponent::comps_ids_t compType, comp_query_st* currCompQuery = &(_compsQueryMap[compType]); u_int32_t componentIndex = currCompQuery->comp_status.component_index; comp_status_st query; + memset(&query, 0, sizeof(query)); if (!queryComponentStatus(componentIndex, &query)) { return false; @@ -2203,7 +2209,8 @@ bool FwCompsMgr::fwReactivateImage() return false; } - reg_access_status_t rc; + reg_access_status_t rc = ME_OK; + memset(&mirc, 0, sizeof(mirc)); rc = reg_access_mirc(_mf, REG_ACCESS_METHOD_SET, &mirc); // send trigger to FW deal_with_signal(); if (rc) diff --git a/fw_comps_mgr/fw_comps_mgr.h b/fw_comps_mgr/fw_comps_mgr.h index 18242e8f..8e9b150b 100644 --- a/fw_comps_mgr/fw_comps_mgr.h +++ b/fw_comps_mgr/fw_comps_mgr.h @@ -365,7 +365,8 @@ class FwCompsMgr typedef enum { DEVICE_HCA_SWITCH = 0, - DEVICE_GEARBOX = 1 + DEVICE_GEARBOX = 1, + DEVICE_UNKNOWN } DeviceTypeT; FwCompsMgr(const char* devname, DeviceTypeT devType = DEVICE_HCA_SWITCH, int deviceIndex = 0); diff --git a/mlxfwops/lib/flint_base.cpp b/mlxfwops/lib/flint_base.cpp index 9e12217f..bf9de00e 100644 --- a/mlxfwops/lib/flint_base.cpp +++ b/mlxfwops/lib/flint_base.cpp @@ -216,6 +216,7 @@ bool FlintErrMsg::errmsgAdv(bool showAdv, const char* normalFmt, const char* Adv { snprintf(errFmt, 1024, "%s %s", normalFmt, AdvFmt); _err = vprint(errFmt, args); + delete[] prev_err; } else { @@ -225,8 +226,6 @@ bool FlintErrMsg::errmsgAdv(bool showAdv, const char* normalFmt, const char* Adv } va_end(args); - delete[] prev_err; - return false; } diff --git a/mlxfwops/lib/fs3_ops.cpp b/mlxfwops/lib/fs3_ops.cpp index 37ccf514..49e4bc63 100644 --- a/mlxfwops/lib/fs3_ops.cpp +++ b/mlxfwops/lib/fs3_ops.cpp @@ -351,6 +351,7 @@ bool Fs3Operations::GetImageInfo(u_int8_t* buff) else if (image_info.minor_version == 3) { strncpy(_fs3ImgInfo.ext_info.name, image_info.name, NAME_LEN); + _fs3ImgInfo.ext_info.name[NAME_LEN - 1] = '\0'; strncpy(_fs3ImgInfo.ext_info.description, image_info.description, DESCRIPTION_LEN); _fs3ImgInfo.ext_info.description[DESCRIPTION_LEN - 1] = '\0'; strncpy(_fs3ImgInfo.ext_info.prs_name, image_info.prs_name, FS3_PRS_NAME_LEN); @@ -375,7 +376,8 @@ bool Fs3Operations::GetImageInfo(u_int8_t* buff) { if (VerifyBranchFormat(image_info.vsd)) { - (strncpy(_fwImgInfo.ext_info.branch_ver, image_info.vsd, BRANCH_LEN)); + strncpy(_fwImgInfo.ext_info.branch_ver, image_info.vsd, BRANCH_LEN); + _fwImgInfo.ext_info.branch_ver[BRANCH_LEN - 1] = '\0'; } } _fwImgInfo.ext_info.encrypted_fw = image_info.encrypted_fw; @@ -2943,7 +2945,7 @@ bool Fs3Operations::reburnItocSection(PrintCallBack callBackFunc, bool burnFails memcpy(p + CIBFW_ITOC_HEADER_SIZE + i * CIBFW_ITOC_ENTRY_SIZE, curr_itoc->data, CIBFW_ITOC_ENTRY_SIZE); } } - memset(&p[itocSize] - CIBFW_ITOC_ENTRY_SIZE, FS3_END, CIBFW_ITOC_ENTRY_SIZE); + memset(&p[itocSize - CIBFW_ITOC_ENTRY_SIZE], FS3_END, CIBFW_ITOC_ENTRY_SIZE); PRINT_PROGRESS(callBackFunc, (char*)"Updating ITOC section - "); bool rc = writeImage((ProgressCallBack)NULL, newItocAddr, p, itocSize, false, true); diff --git a/mlxfwops/lib/fs4_ops.cpp b/mlxfwops/lib/fs4_ops.cpp index 8e9d7bee..18c3c5da 100644 --- a/mlxfwops/lib/fs4_ops.cpp +++ b/mlxfwops/lib/fs4_ops.cpp @@ -3148,6 +3148,7 @@ bool Fs4Operations::UpdateDigitalCertRWSection(char* certChainFile, std::vector certChainBuff(certChainBuffData, certChainBuffData + certChainBuffSize); certChainBuff.resize(certChain0SectionSize); // Padding the cert chain if needed to match cert chain size + delete[] certChainBuffData; newSectionData = digitalCertRWSectionToc->section_data; u_int32_t newCertChainOffsetInSection = @@ -3180,6 +3181,7 @@ bool Fs4Operations::UpdateCertChainSection(struct fs4_toc_info* curr_toc, u_int32_t cert_chain_0_section_size = curr_toc->toc_entry.size << 2; if ((u_int32_t)cert_chain_buff_size > cert_chain_0_section_size) { + delete[] cert_chain_buff; return errmsg("Attestation certificate chain data exceeds its allocated size of 0x%x bytes", cert_chain_0_section_size); } @@ -3405,7 +3407,7 @@ bool Fs4Operations::reburnDTocSection(PrintCallBack callBackFunc) curr_itoc->data, IMAGE_LAYOUT_ITOC_ENTRY_SIZE); } - memset(&p[tocSize] - IMAGE_LAYOUT_ITOC_ENTRY_SIZE, FS3_END, IMAGE_LAYOUT_ITOC_ENTRY_SIZE); + memset(&p[tocSize - IMAGE_LAYOUT_ITOC_ENTRY_SIZE], FS3_END, IMAGE_LAYOUT_ITOC_ENTRY_SIZE); PRINT_PROGRESS(callBackFunc, (char*)"Updating DTOC section - "); bool rc = writeImage((ProgressCallBack)NULL, tocAddr, p, tocSize, true, true); @@ -3443,7 +3445,7 @@ bool Fs4Operations::reburnITocSection(PrintCallBack callBackFunc, bool isFailSaf curr_itoc->data, IMAGE_LAYOUT_ITOC_ENTRY_SIZE); } - memset(&p[tocSize] - IMAGE_LAYOUT_ITOC_ENTRY_SIZE, FS3_END, IMAGE_LAYOUT_ITOC_ENTRY_SIZE); + memset(&p[tocSize - IMAGE_LAYOUT_ITOC_ENTRY_SIZE], FS3_END, IMAGE_LAYOUT_ITOC_ENTRY_SIZE); PRINT_PROGRESS(callBackFunc, (char*)"Updating ITOC section - "); bool rc = writeImage((ProgressCallBack)NULL, newITocAddr, p, tocSize, true, true); diff --git a/mlxfwops/lib/fsctrl_ops.cpp b/mlxfwops/lib/fsctrl_ops.cpp index f9d4d63b..8438e318 100644 --- a/mlxfwops/lib/fsctrl_ops.cpp +++ b/mlxfwops/lib/fsctrl_ops.cpp @@ -348,6 +348,7 @@ void FsCtrlOperations::ExtractSwitchFWVersion(const fwInfoT& fwQuery) if (VerifyBranchFormat(fwQuery.imageVsd)) { strncpy(_fwImgInfo.ext_info.running_branch_ver, fwQuery.imageVsd, BRANCH_LEN); + _fwImgInfo.ext_info.running_branch_ver[BRANCH_LEN - 1] = '\0'; } if (fwQuery.running_fw_version.version_string_length && fwQuery.running_fw_version.version_string_length <= BRANCH_LEN) diff --git a/mlxfwops/lib/mlxfwops.cpp b/mlxfwops/lib/mlxfwops.cpp index 878ecea1..72c27bab 100644 --- a/mlxfwops/lib/mlxfwops.cpp +++ b/mlxfwops/lib/mlxfwops.cpp @@ -93,6 +93,7 @@ FwOperations::ExtBurnParams initBurnParams(u_int8_t force_version, f_prog_func p burnParams.progressFunc = prog_func; burnParams.allowPsidChange = allow_psid_change ? true : false; burnParams.shift8MBIfNeeded = true; + burnParams.ProgressFuncAdv = {nullptr, nullptr, nullptr}; return burnParams; } From a77ea6de0c7835e29dbd3c03137267593eee8f36 Mon Sep 17 00:00:00 2001 From: ashargorodsk Date: Mon, 18 Jul 2022 12:40:39 +0300 Subject: [PATCH 14/63] Burn tools coverity fixes (imgen + mlxfwupdate) Description: Tested OS: Linux Tested devices: N/A Tested flows: Build Known gaps (with RM ticket): N/A Issue: None Change-Id: Idd0374edced5a5ed8eaaad8d9180324691294c2e Signed-off-by: Matan Eliyahu --- mlxfwupdate/mlnx_dev.cpp | 4 +++- mlxfwupdate/output_fmts.cpp | 6 ++++++ mlxfwupdate/server_request.cpp | 2 ++ 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/mlxfwupdate/mlnx_dev.cpp b/mlxfwupdate/mlnx_dev.cpp index 0dc28bde..7c709532 100644 --- a/mlxfwupdate/mlnx_dev.cpp +++ b/mlxfwupdate/mlnx_dev.cpp @@ -636,6 +636,7 @@ int MlnxDev::preBurn(string mfa_file, } FwOperations::fw_ops_params_t fwParams; + memset(&fwParams, 0, sizeof(fwParams)); if (InitDevFWParams(fwParams)) { FsChecks fsChecks(dev_fw_query, _devFwOps, _imgFwOps, _burnParams, fwParams); @@ -1107,8 +1108,9 @@ int MlnxDev::query() ImgVersion imgv; u_int16_t fwVer[4]; fw_info_t fw_query; - int versionFields = 3; /*TODO: set variable length*/ + memset(&fw_query, 0, sizeof(fw_query)); + if (geteuid() == 0) { return queryFwops(); diff --git a/mlxfwupdate/output_fmts.cpp b/mlxfwupdate/output_fmts.cpp index fb4269e4..ffe5c778 100644 --- a/mlxfwupdate/output_fmts.cpp +++ b/mlxfwupdate/output_fmts.cpp @@ -135,6 +135,8 @@ int OutputFmts::createInventoryXML(vector& devs, xmlFreeDoc(doc); xmlCleanupParser(); + xmlUnlinkNode(root_node); + xmlFreeNode(root_node); #endif return res; } @@ -271,6 +273,8 @@ int OutputFmts::createBurnXML(vector& devs, (void)node; xmlFreeDoc(doc); xmlCleanupParser(); + xmlUnlinkNode(root_node); + xmlFreeNode(root_node); #endif return res; } @@ -331,6 +335,8 @@ int OutputFmts::createFailXML(int result, int update_query_, string& buffer, int (void)node; xmlFreeDoc(doc); xmlCleanupParser(); + xmlUnlinkNode(root_node); + xmlFreeNode(root_node); #endif return res; } diff --git a/mlxfwupdate/server_request.cpp b/mlxfwupdate/server_request.cpp index 0b3f5e06..2be4af15 100644 --- a/mlxfwupdate/server_request.cpp +++ b/mlxfwupdate/server_request.cpp @@ -527,6 +527,8 @@ int ServerRequest::curl_request(const char* url, const char* data, const char* d if (fp == NULL) { setError(-1, "Failed to Open file for writing " + (string)strerror(errno) + "\n"); + curl_easy_cleanup(_curl); + curl_global_cleanup(); return -1; } curl_easy_setopt(_curl, CURLOPT_TIMEOUT, 360); // 6 minute operation timeout From 8f5ce0a8de7c63d912214e88efe6c4682c0525cf Mon Sep 17 00:00:00 2001 From: Matan Eliyahu Date: Sun, 24 Jul 2022 18:06:20 +0300 Subject: [PATCH 15/63] Fix --ignore_crc_check when failing on ITOC/DTOC entry CRC Description: N/A Tested OS: N/A Tested devices: N/A Tested flows: modify ITOC entry && flint verify Known gaps (with RM ticket): N/A Issue: None Change-Id: I29a852ac873c26188cba36482e778b8f43589a81 Signed-off-by: Matan Eliyahu --- mlxfwops/lib/fs3_ops.cpp | 157 ++++++++++++++++++++------------------- mlxfwops/lib/fs4_ops.cpp | 12 ++- 2 files changed, 89 insertions(+), 80 deletions(-) diff --git a/mlxfwops/lib/fs3_ops.cpp b/mlxfwops/lib/fs3_ops.cpp index 49e4bc63..79947cc8 100644 --- a/mlxfwops/lib/fs3_ops.cpp +++ b/mlxfwops/lib/fs3_ops.cpp @@ -606,111 +606,112 @@ bool Fs3Operations::VerifyTOC(u_int32_t dtoc_addr, u_int32_t entry_size_in_bytes = toc_entry.size * 4; // printf("-D- entry_crc = %#x, toc_entry.itoc_entry_crc = %#x\n", entry_crc, toc_entry.itoc_entry_crc); - if (toc_entry.itoc_entry_crc == entry_crc) + if (toc_entry.itoc_entry_crc != entry_crc) { - // Update last image address - u_int32_t section_last_addr; - u_int32_t flash_addr = toc_entry.flash_addr << 2; - if (!toc_entry.relative_addr) + if (_fwParams.ignoreCrcCheck) { - _ioAccess->set_address_convertor(0, 0); - phys_addr = flash_addr; - _fs3ImgInfo.smallestAbsAddr = - (_fs3ImgInfo.smallestAbsAddr < flash_addr && _fs3ImgInfo.smallestAbsAddr > 0) ? - _fs3ImgInfo.smallestAbsAddr : - flash_addr; + printf("-W- Bad Itoc Entry CRC. Expected: 0x%x , Actual: 0x%x\n", toc_entry.itoc_entry_crc, + entry_crc); } else { - phys_addr = - _ioAccess->get_phys_from_cont(flash_addr, _fwImgInfo.cntxLog2ChunkSize, _fwImgInfo.imgStart != 0); - u_int32_t currSizeOfImgdata = phys_addr + entry_size_in_bytes; - _fs3ImgInfo.sizeOfImgData = - (_fs3ImgInfo.sizeOfImgData > currSizeOfImgdata) ? _fs3ImgInfo.sizeOfImgData : currSizeOfImgdata; + return errmsg(MLXFW_BAD_CRC_ERR, "Bad Itoc Entry CRC. Expected: 0x%x , Actual: 0x%x", + toc_entry.itoc_entry_crc, entry_crc); } - section_last_addr = phys_addr + entry_size_in_bytes; - _fwImgInfo.lastImageAddr = - (_fwImgInfo.lastImageAddr >= section_last_addr) ? _fwImgInfo.lastImageAddr : section_last_addr; + } + + // Update last image address + u_int32_t section_last_addr; + u_int32_t flash_addr = toc_entry.flash_addr << 2; + if (!toc_entry.relative_addr) + { + _ioAccess->set_address_convertor(0, 0); + phys_addr = flash_addr; + _fs3ImgInfo.smallestAbsAddr = + (_fs3ImgInfo.smallestAbsAddr < flash_addr && _fs3ImgInfo.smallestAbsAddr > 0) ? + _fs3ImgInfo.smallestAbsAddr : + flash_addr; + } + else + { + phys_addr = + _ioAccess->get_phys_from_cont(flash_addr, _fwImgInfo.cntxLog2ChunkSize, _fwImgInfo.imgStart != 0); + u_int32_t currSizeOfImgdata = phys_addr + entry_size_in_bytes; + _fs3ImgInfo.sizeOfImgData = + (_fs3ImgInfo.sizeOfImgData > currSizeOfImgdata) ? _fs3ImgInfo.sizeOfImgData : currSizeOfImgdata; + } + section_last_addr = phys_addr + entry_size_in_bytes; + _fwImgInfo.lastImageAddr = + (_fwImgInfo.lastImageAddr >= section_last_addr) ? _fwImgInfo.lastImageAddr : section_last_addr; - if (IsFs3SectionReadable(toc_entry.type, queryOptions)) + if (IsFs3SectionReadable(toc_entry.type, queryOptions)) + { + if (ignoreDToc && toc_entry.device_data) { - if (ignoreDToc && toc_entry.device_data) + break; + } + // Only when we have full verify or the info of this section should be collected for query + std::vector buffv(entry_size_in_bytes); + u_int8_t* buff = (u_int8_t*)(buffv.size() ? (&(buffv[0])) : NULL); + if (show_itoc) + { + cibfw_itoc_entry_dump(&toc_entry, stdout); + if (!DumpFs3CRCCheck(toc_entry.type, phys_addr, entry_size_in_bytes, 0, 0, true, verifyCallBackFunc)) { - break; + ret_val = false; } - // Only when we have full verify or the info of this section should be collected for query - std::vector buffv(entry_size_in_bytes); - u_int8_t* buff = (u_int8_t*)(buffv.size() ? (&(buffv[0])) : NULL); - if (show_itoc) + } + else + { + if (!verbose) { - cibfw_itoc_entry_dump(&toc_entry, stdout); - if (!DumpFs3CRCCheck(toc_entry.type, phys_addr, entry_size_in_bytes, 0, 0, true, - verifyCallBackFunc)) - { - ret_val = false; - } + READBUF((*_ioAccess), flash_addr, buff, entry_size_in_bytes, "Section"); } else { - if (!verbose) + if (!(*_ioAccess).read(flash_addr, buff, entry_size_in_bytes, true, "Section")) { - READBUF((*_ioAccess), flash_addr, buff, entry_size_in_bytes, "Section"); + return errmsg("%s - read error (%s)\n", "Section", (*_ioAccess).err()); } - else + } + Fs3UpdateImgCache(buff, flash_addr, entry_size_in_bytes); + u_int32_t sect_crc = CalcImageCRC((u_int32_t*)buff, toc_entry.size); + + // printf("-D- flash_addr: %#x, toc_entry_size = %#x, actual sect = %#x, from itoc: %#x np_crc = + // %s\n", flash_addr, toc_entry.size, sect_crc, + // toc_entry.section_crc, toc_entry.no_crc ? "yes" : "no"); + if (!DumpFs3CRCCheck(toc_entry.type, phys_addr, entry_size_in_bytes, sect_crc, + toc_entry.section_crc, toc_entry.no_crc, verifyCallBackFunc)) + { + if (toc_entry.device_data) { - if (!(*_ioAccess).read(flash_addr, buff, entry_size_in_bytes, true, "Section")) - { - return errmsg("%s - read error (%s)\n", "Section", (*_ioAccess).err()); - } + _badDevDataSections = true; } - Fs3UpdateImgCache(buff, flash_addr, entry_size_in_bytes); - u_int32_t sect_crc = CalcImageCRC((u_int32_t*)buff, toc_entry.size); - - // printf("-D- flash_addr: %#x, toc_entry_size = %#x, actual sect = %#x, from itoc: %#x np_crc = - // %s\n", flash_addr, toc_entry.size, sect_crc, - // toc_entry.section_crc, toc_entry.no_crc ? "yes" : "no"); - if (!DumpFs3CRCCheck(toc_entry.type, phys_addr, entry_size_in_bytes, sect_crc, - toc_entry.section_crc, toc_entry.no_crc, verifyCallBackFunc)) + ret_val = false; + } + else + { + // printf("-D- toc type : 0x%.8x\n" , toc_entry.type); + GetSectData(_fs3ImgInfo.tocArr[section_index].section_data, (u_int32_t*)buff, + toc_entry.size * 4); + if (IsGetInfoSupported(toc_entry.type)) { - if (toc_entry.device_data) + if (!GetImageInfoFromSection(buff, toc_entry.type, toc_entry.size * 4)) { - _badDevDataSections = true; + ret_val = false; + errmsg("Failed to get info from section %d, check the supported_hw_id section in " + "MLX file!\n", + toc_entry.type); } - ret_val = false; } - else + else if (toc_entry.type == FS3_DBG_FW_INI) { - // printf("-D- toc type : 0x%.8x\n" , toc_entry.type); - GetSectData(_fs3ImgInfo.tocArr[section_index].section_data, (u_int32_t*)buff, - toc_entry.size * 4); - if (IsGetInfoSupported(toc_entry.type)) - { - if (!GetImageInfoFromSection(buff, toc_entry.type, toc_entry.size * 4)) - { - ret_val = false; - errmsg("Failed to get info from section %d, check the supported_hw_id section in " - "MLX file!\n", - toc_entry.type); - } - } - else if (toc_entry.type == FS3_DBG_FW_INI) - { - TOCPUn(buff, toc_entry.size); - GetSectData(_fwConfSect, (u_int32_t*)buff, toc_entry.size * 4); - } + TOCPUn(buff, toc_entry.size); + GetSectData(_fwConfSect, (u_int32_t*)buff, toc_entry.size * 4); } } } } - else - { - /* - printf("-D- Bad ITOC CRC: toc_entry.itoc_entry_crc = %#x, actual crc: %#x, entry_size_in_bytes = - %#x\n", toc_entry.itoc_entry_crc, entry_crc, entry_size_in_bytes); - */ - return errmsg(MLXFW_BAD_CRC_ERR, "Bad Itoc Entry CRC. Expected: 0x%x , Actual: 0x%x", - toc_entry.itoc_entry_crc, entry_crc); - } _fs3ImgInfo.tocArr[section_index].entry_addr = entry_addr; _fs3ImgInfo.tocArr[section_index].toc_entry = toc_entry; diff --git a/mlxfwops/lib/fs4_ops.cpp b/mlxfwops/lib/fs4_ops.cpp index 18c3c5da..7ea578eb 100644 --- a/mlxfwops/lib/fs4_ops.cpp +++ b/mlxfwops/lib/fs4_ops.cpp @@ -680,8 +680,16 @@ bool Fs4Operations::verifyTocEntries(u_int32_t tocAddr, entryCrc = CalcImageCRC((u_int32_t*)entryBuffer, (TOC_ENTRY_SIZE / 4) - 1); if (tocEntry.itoc_entry_crc != entryCrc) { - return errmsg(MLXFW_BAD_CRC_ERR, "Bad %s Entry CRC. Expected: 0x%x , Actual: 0x%x", - isDtoc ? "DToc" : "IToc", tocEntry.itoc_entry_crc, entryCrc); + if (_fwParams.ignoreCrcCheck) + { + printf("-W- Bad %s Entry CRC. Expected: 0x%x , Actual: 0x%x\n", isDtoc ? "DToc" : "IToc", + tocEntry.itoc_entry_crc, entryCrc); + } + else + { + return errmsg(MLXFW_BAD_CRC_ERR, "Bad %s Entry CRC. Expected: 0x%x , Actual: 0x%x", + isDtoc ? "DToc" : "IToc", tocEntry.itoc_entry_crc, entryCrc); + } } entrySizeInBytes = tocEntry.size * 4; From 29c787e6708756388e8cbd961d46518c80f8e054 Mon Sep 17 00:00:00 2001 From: ashargorodsk Date: Tue, 26 Jul 2022 13:48:14 +0300 Subject: [PATCH 16/63] Remove FuseGW unused classes Description: removed unused code Tested OS: Linux Tested devices: N/A Tested flows: Build Known gaps (with RM ticket): N/A Issue: 3107322 Change-Id: I8375ff3f3126e38b8109b978edd71b3a4122f083 Signed-off-by: Matan Eliyahu --- mlxfwops/lib/Makefile.am | 1 - mlxfwops/lib/fs3_ops.h | 1 - mlxfwops/lib/fuse_gw.cpp | 488 --------------------------------------- mlxfwops/lib/fuse_gw.h | 140 ----------- 4 files changed, 630 deletions(-) delete mode 100644 mlxfwops/lib/fuse_gw.cpp delete mode 100644 mlxfwops/lib/fuse_gw.h diff --git a/mlxfwops/lib/Makefile.am b/mlxfwops/lib/Makefile.am index fee94c27..364484fb 100644 --- a/mlxfwops/lib/Makefile.am +++ b/mlxfwops/lib/Makefile.am @@ -76,7 +76,6 @@ libmlxfwops_a_SOURCES = flint_base.cpp \ signature_manager_factory.h \ flint_io.cpp \ security_version_gw.cpp security_version_gw.h \ - fuse_gw.cpp fuse_gw.h \ fw_ops.cpp \ fs2_ops.cpp fs2_ops.h\ fs3_ops.cpp fs3_ops.h\ diff --git a/mlxfwops/lib/fs3_ops.h b/mlxfwops/lib/fs3_ops.h index 88f0c25c..0d225b2a 100644 --- a/mlxfwops/lib/fs3_ops.h +++ b/mlxfwops/lib/fs3_ops.h @@ -42,7 +42,6 @@ // #include "flint_base.h" #include "fw_ops.h" #include "aux_tlv_ops.h" -#include "fuse_gw.h" // FW Binary version diff --git a/mlxfwops/lib/fuse_gw.cpp b/mlxfwops/lib/fuse_gw.cpp deleted file mode 100644 index cb4569cc..00000000 --- a/mlxfwops/lib/fuse_gw.cpp +++ /dev/null @@ -1,488 +0,0 @@ -/* - * Copyright (C) Jan 2013 Mellanox Technologies Ltd. All rights reserved. - * Copyright (c) 2021 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * - * This software is available to you under a choice of one of two - * licenses. You may choose to be licensed under the terms of the GNU - * General Public License (GPL) Version 2, available from the file - * COPYING in the main directory of this source tree, or the - * OpenIB.org BSD license below: - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above - * copyright notice, this list of conditions and the following - * disclaimer. - * - * - Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following - * disclaimer in the documentation and/or other materials - * provided with the distribution. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS - * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -#include -#include -#include "fuse_gw.h" - -FuseGW::FuseGW(mfile* mf) : _mf(mf), _gw_address(0), _data_address(0), _data_bit_offset(0), _data_bit_len(0){}; - -void FuseGW::setGWAddress(u_int32_t address) -{ - _gw_address = address; -} - -void FuseGW::setDataAddress(u_int32_t address) -{ - _data_address = address; -} - -void FuseGW::setFieldBitOffset(size_t offset) -{ - _data_bit_offset = offset; -} - -void FuseGW::setFieldBitLen(size_t len) -{ - _data_bit_len = len; -} - -void FuseGW::getData(u_int32_t& data) -{ - // Read from GW - try - { - lock(); - executeReadCommand(); - waitForResult(); - readResult(data); - unlock(); - } - catch (const char* msg) - { - unlock(); - throw msg; - } -} - -// --------------- -// Private methods -// --------------- - -void FuseGW::lock() -{ - waitForGWLockState(_gw_address, 0); - - //* lock GW copy - waitForGWLockState(_gw_address + 4, 1); -} - -void FuseGW::waitForGWLockState(u_int32_t address, u_int32_t requiredState) -{ - const u_int32_t MAX_ITER_NUM = 100; - const u_int32_t SLEEP_TIME = 10; // [msec] - u_int32_t iter_num = 0; - u_int32_t currentState = getCurrentGWState(address); - - while (currentState != requiredState) - { - msleep(SLEEP_TIME); - - currentState = getCurrentGWState(address); - - iter_num++; - if (iter_num > MAX_ITER_NUM) - { - throw "failed to lock (timeout error)"; - } - } -} - -bool FuseGW::getCurrentGWState(u_int32_t address) -{ - u_int32_t ctrl_reg = 0; - - if (mread4(_mf, address, &ctrl_reg) != 4) - { - throw "failed to lock (read error)"; - } - - return EXTRACT(ctrl_reg, CTRL_LOCK_BIT_OFFSET, 1); -} - -void FuseGW::executeReadCommand() -{ - int rc = mwrite4(_mf, _gw_address, CTRL_READ | CTRL_BUSY); - if (rc != 4) - { - throw "failed to executeReadCommand (write error)"; - } -} - -void FuseGW::waitForResult() -{ - int iter_num = 0, MAX_ITER_NUM = 100; - int const SLEEP_TIME = 10; // [msec] - - bool busy; - do - { - int rc = 0; - u_int32_t ctrl_reg = 0; - - if (iter_num != 0) - { - msleep(SLEEP_TIME); - } - rc = mread4(_mf, _gw_address, &ctrl_reg); - - if (rc != 4) - { - throw "failed to waitForResult (read error)"; - } - - busy = (ctrl_reg & CTRL_BUSY) != 0; - iter_num++; - - if (iter_num > MAX_ITER_NUM) - { - throw "failed to waitForResult (timeout error)"; - } - } while (busy); -} - -void FuseGW::readResult(u_int32_t& result) -{ - int rc = mread4(_mf, _data_address, &result); - if (rc != 4) - { - throw "failed to readResult (read error)"; - } - - TOCPU(&result); - result = EXTRACT(result, _data_bit_offset, _data_bit_len); -} - -void FuseGW::unlock() -{ - int rc = mwrite4(_mf, _gw_address, 0); - if (rc != 4) - { - throw "failed to unlock (write error)"; - } -} - -/********************************************************************************/ -/* */ -/* SecureBootFuse Class */ -/* */ -/********************************************************************************/ - -SecureBootFuse::SecureBootFuse(mfile* mf, chip_type_t chip_type) : - _gw(mf), _chip_type(chip_type), _is_supported_in_live_fish(false) -{ - switch (chip_type) - { - case CT_CONNECTX7: - _gw.setGWAddress(0xE4C00); // irisc.ir_fuse_gw - _gw.setDataAddress(0xE4E7C); // irisc.ir_fuse_gw.desc0.secure_boot - _gw.setFieldBitOffset(28); - _gw.setFieldBitLen(1); - _is_supported_in_live_fish = true; - break; - case CT_QUANTUM2: - _gw.setGWAddress(0xa2800); // mng.irisc.ir_fuse_gw - _gw.setDataAddress(0xa2a7c); // mng.ir.ir_fuse_gw.desc0.secure_boot - _gw.setFieldBitOffset(29); - _gw.setFieldBitLen(1); - _is_supported_in_live_fish = true; - break; - default: - _is_supported_in_live_fish = false; - break; - } -} - -bool SecureBootFuse::isAccessibleInLiveFish() -{ - return _is_supported_in_live_fish; -} - -// secure boot means that the device is capable of using secure boot mode -int SecureBootFuse::isSecureBoot(bool& is_secure_boot) -{ - u_int32_t data; - int rc = 0; - - try - { - _gw.getData(data); - - switch (_chip_type) - { - case CT_CONNECTX7: - case CT_QUANTUM2: - is_secure_boot = (data & 0x1) == 0x1; - break; - default: - printf("-E- Failed to get data from Fuse: Device is not supported.\n"); - rc = -1; - break; - } - } - catch (const char* msg) - { - printf("-E- Failed to get data from Fuse: %s.\n", msg); - rc = -1; - } - catch (exception e) - { - printf("-E- Failed to get data from Fuse: %s.\n", e.what()); - rc = -1; - } - catch (...) - { - rc = -1; - } - - return rc; -} - -/********************************************************************************/ -/* */ -/* LifeCycleFuse Class */ -/* */ -/********************************************************************************/ - -LifeCycleFuse::LifeCycleFuse(mfile* mf, chip_type_t chip_type) : - _gw(mf), _chip_type(chip_type), _is_supported_in_live_fish(false) -{ - switch (chip_type) - { - case CT_CONNECTX7: - _gw.setGWAddress(0xF4550); // yu.fuse_gw_life_cycle - _gw.setDataAddress(0xF455C); // yu.fuse_gw_life_cycle.desc0.life_cycle_replica0 - _gw.setFieldBitOffset(0); - _gw.setFieldBitLen(32); - _is_supported_in_live_fish = true; - break; - case CT_QUANTUM2: - _gw.setGWAddress(0xf3250); // mng.yu.fuse_gw_life_cycle - _gw.setDataAddress(0xf325c); // mng.yu.fuse_gw_life_cycle.desc0.life_cycle_replica0 - _gw.setFieldBitOffset(0); - _gw.setFieldBitLen(32); - _is_supported_in_live_fish = true; - break; - default: - _is_supported_in_live_fish = false; - break; - } -} - -bool LifeCycleFuse::isAccessibleInLiveFish() -{ - return _is_supported_in_live_fish; -} - -int LifeCycleFuse::getStatus(life_cycle_t& life_cycle) -{ - u_int32_t data; - int rc = 0; - - try - { - _gw.getData(data); - - switch (_chip_type) - { - case CT_CONNECTX7: - case CT_QUANTUM2: - life_cycle = (life_cycle_t)calcMajorityVote4B(data); - break; - default: - printf("-E- Failed to get data from Fuse: Device is not supported.\n"); - rc = -1; - break; - } - } - catch (const char* msg) - { - printf("-E- Failed to get data from Fuse: %s.\n", msg); - rc = -1; - } - catch (exception e) - { - printf("-E- Failed to get data from Fuse: %s.\n", e.what()); - rc = -1; - } - catch (...) - { - rc = -1; - } - - return rc; -} - -// in 4 bytes there are 16 replicas, each replica is 2 bits. -// this method calculates the vote for each bit, and determines bit's value -// in the life cycle status using majority vote -life_cycle_t LifeCycleFuse::calcMajorityVote4B(u_int32_t data) -{ - int life_cycle = 0; - u_int32_t even_bits_mask = 0xAA; - u_int32_t odd_bits_mask = 0x55; - u_int32_t first_bit_vote = 0; - u_int32_t second_bit_vote = 0; - size_t i = 0; - - // Count the number of 'on' bits in 4B - for (; i < 4; ++i) - { - first_bit_vote += calcOnBits1B((data >> (i * 4)) & odd_bits_mask); - second_bit_vote += calcOnBits1B((data >> (i * 4)) & even_bits_mask); - } - - // Check if votes are equal (device is in RMA) - if ((first_bit_vote == 8) || (second_bit_vote == 8)) - { - return RMA; - } - - // Set life cycle according to majority vote - if (first_bit_vote > 8) - { - life_cycle |= 1; - } - if (second_bit_vote > 8) - { - life_cycle |= 2; - } - - return (life_cycle_t)life_cycle; -} - -u_int8_t LifeCycleFuse::calcOnBits1B(u_int8_t byte) -{ - u_int32_t on_bits_count = 0; - u_int8_t first_bit_mask = 0x1; - size_t i = 0; - - for (; i < BYTE_SIZE; ++i) - { - on_bits_count += ((byte >> i) & first_bit_mask); - } - - return on_bits_count; -} - -/********************************************************************************/ -/* */ -/* SecurityVersionFuse Class */ -/* */ -/********************************************************************************/ - -SecurityVersionFuse::SecurityVersionFuse(mfile* mf, chip_type_t chip_type) : - _rollbackProtectionGW(mf), _minimalSecurityVersionGW(mf), _chip_type(chip_type), _is_supported_in_live_fish(false) -{ - switch (chip_type) - { - case CT_CONNECTX7: - _rollbackProtectionGW.setGWAddress(0xf4540); - _rollbackProtectionGW.setDataAddress(0xf4548); - _rollbackProtectionGW.setFieldBitOffset(0); - _rollbackProtectionGW.setFieldBitLen(32); - _minimalSecurityVersionGW.setGWAddress(0xf4520); - _minimalSecurityVersionGW.setDataAddress(0xf452c); - _minimalSecurityVersionGW.setFieldBitOffset(0); - _minimalSecurityVersionGW.setFieldBitLen(32); - _is_supported_in_live_fish = true; - break; - case CT_QUANTUM2: - _rollbackProtectionGW.setGWAddress(0xf3240); - _rollbackProtectionGW.setDataAddress(0xf3248); - _rollbackProtectionGW.setFieldBitOffset(0); - _rollbackProtectionGW.setFieldBitLen(32); - _minimalSecurityVersionGW.setGWAddress(0xf3220); - _minimalSecurityVersionGW.setDataAddress(0xf322c); - _minimalSecurityVersionGW.setFieldBitOffset(0); - _minimalSecurityVersionGW.setFieldBitLen(32); - _is_supported_in_live_fish = true; - break; - default: - _is_supported_in_live_fish = false; - break; - } -} - -bool SecurityVersionFuse::isAccessibleInLiveFish() -{ - return _is_supported_in_live_fish; -} - -bool SecurityVersionFuse::getSecurityVersion(u_int32_t& securityVersion) -{ - u_int32_t data; - int rc = 0; - - try - { - u_int32_t const MINIMAL_SECURITY_VERSION_MASK = 0x00000ff0; - u_int32_t const MINIMAL_SECURITY_VERSION_OFFSET = 4; - - switch (_chip_type) - { - case CT_CONNECTX7: - case CT_QUANTUM2: - _rollbackProtectionGW.getData(data); - securityVersion += countSetBits(data); - _rollbackProtectionGW.setDataAddress(0xf454c); - _rollbackProtectionGW.getData(data); - securityVersion += countSetBits(data); - - _minimalSecurityVersionGW.getData(data); - securityVersion += ((data & MINIMAL_SECURITY_VERSION_MASK) >> MINIMAL_SECURITY_VERSION_OFFSET); - break; - default: - printf("-E- Failed to get data from Fuse: Device is not supported.\n"); - rc = -1; - break; - } - } - catch (const char* msg) - { - printf("-E- Failed to get data from Fuse: %s.\n", msg); - rc = -1; - } - catch (exception e) - { - printf("-E- Failed to get data from Fuse: %s.\n", e.what()); - rc = -1; - } - catch (...) - { - rc = -1; - } - - return rc; -} - -u_int32_t SecurityVersionFuse::countSetBits(u_int32_t num) -{ - u_int32_t count = 0; - while (num) - { - count += num & 1; - num >>= 1; - } - return count; -} \ No newline at end of file diff --git a/mlxfwops/lib/fuse_gw.h b/mlxfwops/lib/fuse_gw.h deleted file mode 100644 index 0ea0cca1..00000000 --- a/mlxfwops/lib/fuse_gw.h +++ /dev/null @@ -1,140 +0,0 @@ -/* - * Copyright (C) Jan 2013 Mellanox Technologies Ltd. All rights reserved. - * Copyright (c) 2021 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * - * This software is available to you under a choice of one of two - * licenses. You may choose to be licensed under the terms of the GNU - * General Public License (GPL) Version 2, available from the file - * COPYING in the main directory of this source tree, or the - * OpenIB.org BSD license below: - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above - * copyright notice, this list of conditions and the following - * disclaimer. - * - * - Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following - * disclaimer in the documentation and/or other materials - * provided with the distribution. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS - * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -#ifndef FUSE_GW_H -#define FUSE_GW_H - -#include -#include "flint_base.h" - -#define BYTE_SIZE 8 - -using namespace std; - -class FuseGW -{ -public: - FuseGW(mfile* mf); - ~FuseGW(){}; - - void getData(u_int32_t& data); - void setGWAddress(u_int32_t address); - void setDataAddress(u_int32_t address); - void setFieldBitOffset(size_t offset); - void setFieldBitLen(size_t len); - -private: - mfile* _mf; - u_int32_t _gw_address; - u_int32_t _data_address; - size_t _data_bit_offset; - size_t _data_bit_len; - - u_int32_t static const CTRL_LOCK_BIT_OFFSET = 31; - u_int32_t static const CTRL_RW = 0x40000000; - u_int32_t static const CTRL_READ = CTRL_RW & 0xffffffff; - u_int32_t static const CTRL_BUSY = 0x20000000; - - void lock(); - void waitForGWLockState(u_int32_t address, u_int32_t requiredState); - bool getCurrentGWState(u_int32_t address); - void executeReadCommand(); - void waitForResult(); - void readResult(u_int32_t& result); - void unlock(); - - void alignBits(u_int8_t* src, size_t byte_len, size_t bit_offset); -}; - -class LifeCycleFuse -{ -public: - LifeCycleFuse(mfile* mf, chip_type_t chip_type); - ~LifeCycleFuse(){}; - - bool isAccessibleInLiveFish(); - int getStatus(life_cycle_t& life_cycle); - -private: - life_cycle_t calcMajorityVote4B(u_int32_t data); - u_int8_t calcOnBits1B(u_int8_t byte); - - FuseGW _gw; - chip_type_t _chip_type; - - bool _is_supported_in_live_fish; -}; - -class SecureBootFuse -{ -public: - SecureBootFuse(mfile* mf, chip_type_t chip_type); - ~SecureBootFuse(){}; - - bool isAccessibleInLiveFish(); - int isSecureBoot(bool& is_secure_boot); - -private: - FuseGW _gw; - chip_type_t _chip_type; - bool _is_supported_in_live_fish; -}; - -class SecurityVersionFuse -{ -public: - SecurityVersionFuse(mfile* mf, chip_type_t chip_type); - ~SecurityVersionFuse(){}; - - bool isAccessibleInLiveFish(); - bool getSecurityVersion(u_int32_t& result); - -private: - typedef enum - { - ROLLBACK_PROTECTION, - MINIMAL_VERSION - } gw_type_t; - - void getRollbackProtection(u_int32_t* result); - void getMinimalSecurityVersion(u_int32_t* result); - void setGWAddress(gw_type_t gw_type); - u_int32_t countSetBits(u_int32_t num); - - FuseGW _rollbackProtectionGW; - FuseGW _minimalSecurityVersionGW; - chip_type_t _chip_type; - bool _is_supported_in_live_fish; -}; - -#endif /*FUSE_GW_H*/ From 53a6f3152db2924eff42aeefc7d1dab49a522210 Mon Sep 17 00:00:00 2001 From: Matan Eliyahu Date: Sun, 11 Sep 2022 20:01:52 +0300 Subject: [PATCH 17/63] [flint][mlxfwops] Setting RSA_PUBLIC_KEY was missing component_authentication_configuration field Description: Setting PUBLIC_KEYS_4096 included component_authentication_configuration field (using set_public_keys command) but setting RSA_PUBLIC_KEY missed this field. Now FW plans to use RSA_PUBLIC_KEY instead of PUBLIC_KEYS_4096 and they need this field Tested OS: Linux Tested devices: CX7 Tested flows: flint_oem -i cx7_3s_sign.bin --private_key /swgwork/matanel/workspace/dev_keys/dev_private_4k.pem --public_key /swgwork/matanel/workspace/dev_keys/dev_public_4k.pem --key_uuid df1d65f85b2911ec8eb0000000000000 rsa_sign Known gaps (with RM ticket): N/A Issue: 3151687 Change-Id: Id364ff393ebd80c16f2213835c382f82ba32fc52 --- mlxfwops/lib/fs4_ops.cpp | 120 ++++++---- mlxfwops/lib/fs4_ops.h | 16 +- mlxfwops/lib/fw_ops.cpp | 8 - mlxfwops/lib/fw_ops.h | 3 - tools_layouts/image_layout_layouts.c | 332 ++++++++++++++++++++++++++- tools_layouts/image_layout_layouts.h | 194 ++++++++++++++-- 6 files changed, 586 insertions(+), 87 deletions(-) diff --git a/mlxfwops/lib/fs4_ops.cpp b/mlxfwops/lib/fs4_ops.cpp index 7ea578eb..5b6aa4ff 100644 --- a/mlxfwops/lib/fs4_ops.cpp +++ b/mlxfwops/lib/fs4_ops.cpp @@ -4523,73 +4523,84 @@ bool Fs4Operations::IsLifeCycleSupported() return _signatureMngr->IsLifeCycleSupported(); } -bool Fs4Operations::PreparePublicKeyData(const char* public_key_file, - vector& publicKeyData, - unsigned int& pem_offset) +bool Fs4Operations::ParsePublicKeyFromFile(const char* public_key_file, + vector& publicKeyData, + u_int32_t& keyPairExp, + image_layout_component_authentication_configuration& keyAuthConf) { - connectx4_public_keys_3 unpackedData; + image_layout_public_keys_3 unpackedData; unsigned int PublicKeySize = sizeof(unpackedData.file_public_keys_3[0].key); fs3_section_t sectionType; bool PublicKeyIsSet = false; - string pubFileStr(public_key_file); + unsigned int pem_offset = 0; + keyPairExp = 0x10001; // Default value // is the public key file in PEM format? if (CheckPublicKeysFile(public_key_file, sectionType, true)) { if (sectionType == FS3_PUBLIC_KEYS_4096) { - if (Fs3UpdatePublicKeysSection((CONNECTX4_PUBLIC_KEYS_3_SIZE >> 2), public_key_file, publicKeyData, true)) + if (Fs3UpdatePublicKeysSection((IMAGE_LAYOUT_PUBLIC_KEYS_3_SIZE >> 2), public_key_file, publicKeyData, true)) { PublicKeyIsSet = true; - pem_offset = - CONNECTX4_FILE_PUBLIC_KEYS_3_SIZE - PublicKeySize; // first 32 bytes in the PEM file are auxilary data + pem_offset = IMAGE_LAYOUT_FILE_PUBLIC_KEYS_3_SIZE - + PublicKeySize; // first 32 bytes in the PEM file are auxilary data + image_layout_component_authentication_configuration_unpack( + &keyAuthConf, publicKeyData.data()); // First Dword represents the key auth conf + u_int32_t keyPairExpOffset = 3; // Fourth Dword represents key pair exponent + keyPairExp = *((u_int32_t*)publicKeyData.data() + keyPairExpOffset); + TOCPU1(keyPairExp); } } } // Is the public key file in text format? if (PublicKeyIsSet == false) { + string pubFileStr(public_key_file); if (!fromFileToArray(pubFileStr, publicKeyData, PublicKeySize)) { - return errmsg("PreparePublicKeyData: Public key file parsing failed"); + return errmsg("ParsePublicKeyFromFile: Public key file parsing failed"); } + DPRINTF(("Public key in text format. No key pair exponent and key auth conf, using default values\n")); + } + + if (pem_offset > 0) + { + publicKeyData.erase(publicKeyData.begin(), publicKeyData.begin() + pem_offset); } return true; } -bool Fs4Operations::storePublicKeyInSection(const char* public_key_file, const char* uuid) +void Fs4Operations::PreparePublicKey(const vector& publicKeyData, + const vector& uuidData, + const u_int32_t keyPairExp, + const image_layout_component_authentication_configuration& keyAuthConf, + image_layout_file_public_keys_3& publicKey) { - //* Parse uuid - vector uuidData; - if (!extractUUIDFromString(uuid, uuidData)) - { - return errmsg("storePublicKeyInSection: UUID parsing failed."); - } + unsigned int PublicKeySize = sizeof(publicKey.key); + publicKey.keypair_exp = keyPairExp; + publicKey.component_authentication_configuration = keyAuthConf; + memcpy(&publicKey.keypair_uuid, uuidData.data(), sizeof(publicKey.keypair_uuid)); + memcpy(&publicKey.key, publicKeyData.data(), PublicKeySize); + TOCPUn(&publicKey.key, PublicKeySize >> 2); +} - //* Parse public-key - vector publicKeyData; - unsigned int pem_offset = 0; - if (!PreparePublicKeyData(public_key_file, publicKeyData, pem_offset)) - { // Parsing public_key_file and storing public key in publicKeyData - return errmsg("storePublicKeyInSection failed - Error: %s", err()); +bool Fs4Operations::StorePublicKey(const char* public_key_file, const char* uuid) +{ + image_layout_public_keys_3 public_keys_3; + memset(&public_keys_3, 0, sizeof(public_keys_3)); + if (!GetPublicKeyFromFile(public_key_file, uuid, &(public_keys_3.file_public_keys_3[0]))) + { + return errmsg("StorePublicKey failed - Error: %s", err()); } - //* Prepare public-key and uuid data to be stored in section - vector finishData; - connectx4_public_keys_3 unpackedData; - unsigned int PublicKeySize = sizeof(unpackedData.file_public_keys_3[0].key); - memset(&unpackedData, 0, sizeof(unpackedData)); - unpackedData.file_public_keys_3[0].keypair_exp = 0x10001; - memcpy(&unpackedData.file_public_keys_3[0].keypair_uuid, uuidData.data(), - sizeof(unpackedData.file_public_keys_3[0].keypair_uuid)); - memcpy(&unpackedData.file_public_keys_3[0].key, publicKeyData.data() + pem_offset, PublicKeySize); - TOCPUn(&unpackedData.file_public_keys_3[0].key, PublicKeySize >> 2); - finishData.resize(connectx4_public_keys_3_size()); - connectx4_public_keys_3_pack(&unpackedData, finishData.data()); + vector public_keys_3_data; + public_keys_3_data.resize(image_layout_public_keys_3_size()); + image_layout_public_keys_3_pack(&public_keys_3, public_keys_3_data.data()); //* Store public-key and uuid in section and update its matching ITOC entry (with updated section_crc and entry_crc) - if (!UpdateSection(finishData.data(), FS4_RSA_PUBLIC_KEY, true, CMD_BURN, NULL)) + if (!UpdateSection(public_keys_3_data.data(), FS4_RSA_PUBLIC_KEY, true, CMD_BURN, NULL)) { - return errmsg("storePublicKeyInSection failed - Error: %s", err()); + return errmsg("StorePublicKey failed - Error: %s", err()); } return true; @@ -4607,7 +4618,7 @@ bool Fs4Operations::storeSecureBootSignaturesInSection(vector boot_sig vector finishData; - connectx4_secure_boot_signatures secure_boot_signatures; + image_layout_secure_boot_signatures secure_boot_signatures; memset(&secure_boot_signatures, 0, sizeof(secure_boot_signatures)); memcpy(&secure_boot_signatures.boot_signature, boot_signature.data(), @@ -4629,8 +4640,8 @@ bool Fs4Operations::storeSecureBootSignaturesInSection(vector boot_sig sizeof(secure_boot_signatures.non_critical_signature) >> 2); } - finishData.resize(connectx4_secure_boot_signatures_size()); - connectx4_secure_boot_signatures_pack(&secure_boot_signatures, finishData.data()); + finishData.resize(image_layout_secure_boot_signatures_size()); + image_layout_secure_boot_signatures_pack(&secure_boot_signatures, finishData.data()); if (!UpdateSection(finishData.data(), FS4_RSA_4096_SIGNATURES, true, CMD_BURN, NULL)) { return errmsg("storeSecureBootSignaturesInSection: store secure-boot signatures failed.\n"); @@ -4745,9 +4756,9 @@ bool Fs4Operations::signForSecureBootUsingHSM(const char* public_key_file, } } - if (!storePublicKeyInSection(public_key_file, uuid)) + if (!StorePublicKey(public_key_file, uuid)) { - return errmsg("signForSecureBootUsingHSM failed - Error: storePublicKeyInSection failed (%s)\n", err()); + return errmsg("signForSecureBootUsingHSM failed - Error: StorePublicKey failed (%s)\n", err()); } //* Get boot area signature @@ -4834,7 +4845,7 @@ bool Fs4Operations::signForSecureBoot(const char* private_key_file, const char* } } - if (!storePublicKeyInSection(public_key_file, uuid)) + if (!StorePublicKey(public_key_file, uuid)) { return errmsg("signForSecureBoot failed - Error: %s\n", err()); } @@ -4897,6 +4908,31 @@ bool Fs4Operations::signForSecureBoot(const char* private_key_file, const char* #endif } +bool Fs4Operations::GetPublicKeyFromFile(const char* public_key_file, + const char* uuid, + image_layout_file_public_keys_3* public_key) +{ + //* Parse uuid + vector uuidData; + if (!extractUUIDFromString(uuid, uuidData)) + { + return errmsg("preparePublicKeyDataForStore: UUID parsing failed."); + } + + //* Parse public-key + vector publicKeyData; + u_int32_t keyPairExp; + image_layout_component_authentication_configuration keyAuthConf; + if (!ParsePublicKeyFromFile(public_key_file, publicKeyData, keyPairExp, keyAuthConf)) + { + return errmsg("preparePublicKeyDataForStore failed - Error: %s", err()); + } + + PreparePublicKey(publicKeyData, uuidData, keyPairExp, keyAuthConf, *public_key); + + return true; +} + bool Fs4Operations::FwSignWithHmac(const char* keyFile) { #if !defined(UEFI_BUILD) && !defined(NO_OPEN_SSL) diff --git a/mlxfwops/lib/fs4_ops.h b/mlxfwops/lib/fs4_ops.h index 2a244beb..d612842a 100644 --- a/mlxfwops/lib/fs4_ops.h +++ b/mlxfwops/lib/fs4_ops.h @@ -102,9 +102,16 @@ class Fs4Operations : public Fs3Operations const char* uuid, MlxSign::OpensslEngineSigner& engineSigner); bool signForFwUpdateUsingHSM(const char* uuid, MlxSign::OpensslEngineSigner& engineSigner, PrintCallBack printFunc); - virtual bool - PreparePublicKeyData(const char* public_key_file, vector& publicKeyData, unsigned int& pem_offset); - virtual bool storePublicKeyInSection(const char* public_key_file, const char* uuid); + virtual bool ParsePublicKeyFromFile(const char* public_key_file, + vector& publicKeyData, + u_int32_t& keyPairExp, + image_layout_component_authentication_configuration& keyAuthConf); + virtual bool StorePublicKey(const char* public_key_file, const char* uuid); + virtual void PreparePublicKey(const vector& publicKeyData, + const vector& uuidData, + const u_int32_t keyPairExp, + const image_layout_component_authentication_configuration& keyAuthConf, + image_layout_file_public_keys_3& secureBootPublicKey); virtual bool storeSecureBootSignaturesInSection(vector boot_signature, vector critical_sections_signature = vector(), @@ -367,6 +374,9 @@ class Fs4Operations : public Fs3Operations void RemoveCRCsFromMainSection(vector& img); bool MaskBootRecordCRC(vector& img); + virtual bool + GetPublicKeyFromFile(const char* public_key_file, const char* uuid, image_layout_file_public_keys_3* public_key); + // Members Fs4ImgInfo _fs4ImgInfo; u_int32_t _boot2_ptr; diff --git a/mlxfwops/lib/fw_ops.cpp b/mlxfwops/lib/fw_ops.cpp index fc0701aa..456fbb99 100644 --- a/mlxfwops/lib/fw_ops.cpp +++ b/mlxfwops/lib/fw_ops.cpp @@ -2788,14 +2788,6 @@ bool FwOperations::InsertSecureFWSignature(vector, const char*, PrintC { return errmsg("InsertSecureFWSignature not supported"); } -bool FwOperations::PreparePublicKeyData(const char*, vector&, unsigned int&) -{ - return errmsg("PreparePublicKeyData not supported"); -} -bool FwOperations::storePublicKeyInSection(const char*, const char*) -{ - return errmsg("storePublicKeyInSection not supported"); -} bool FwOperations::storeSecureBootSignaturesInSection(vector, vector, vector) { return errmsg("storeSecureBootSignaturesInSection not supported"); diff --git a/mlxfwops/lib/fw_ops.h b/mlxfwops/lib/fw_ops.h index e99d5363..5d438114 100644 --- a/mlxfwops/lib/fw_ops.h +++ b/mlxfwops/lib/fw_ops.h @@ -162,9 +162,6 @@ class MLXFWOP_API FwOperations : public FlintErrMsg virtual bool FwReadBlock(u_int32_t addr, u_int32_t size, std::vector& dataVec); virtual u_int32_t GetPublicKeySecureBootPtr(); virtual bool FwReactivateImage() { return errmsg("Operation not supported."); } - virtual bool - PreparePublicKeyData(const char* public_key_file, vector& publicKeyData, unsigned int& pem_offset); - virtual bool storePublicKeyInSection(const char* public_key_file, const char* uuid); virtual bool FwInsertSHA256(PrintCallBack printFunc = (PrintCallBack)NULL); virtual bool InsertSecureFWSignature(vector signature, const char* uuid, PrintCallBack printFunc); virtual bool diff --git a/tools_layouts/image_layout_layouts.c b/tools_layouts/image_layout_layouts.c index b2a130c5..cc55df60 100644 --- a/tools_layouts/image_layout_layouts.c +++ b/tools_layouts/image_layout_layouts.c @@ -38,6 +38,167 @@ ***/ #include "image_layout_layouts.h" +void image_layout_component_authentication_configuration_pack( + const struct image_layout_component_authentication_configuration* ptr_struct, + u_int8_t* ptr_buff) +{ + u_int32_t offset; + + offset = 24; + adb2c_push_bits_to_buff(ptr_buff, offset, 8, (u_int32_t)ptr_struct->auth_type); + offset = 5; + adb2c_push_bits_to_buff(ptr_buff, offset, 1, (u_int32_t)ptr_struct->btc_token_en); + offset = 4; + adb2c_push_bits_to_buff(ptr_buff, offset, 1, (u_int32_t)ptr_struct->frc_en); + offset = 3; + adb2c_push_bits_to_buff(ptr_buff, offset, 1, (u_int32_t)ptr_struct->mlnx_nvconfig_en); + offset = 2; + adb2c_push_bits_to_buff(ptr_buff, offset, 1, (u_int32_t)ptr_struct->vendor_nvconfig_en); + offset = 1; + adb2c_push_bits_to_buff(ptr_buff, offset, 1, (u_int32_t)ptr_struct->cs_token_en); + offset = 0; + adb2c_push_bits_to_buff(ptr_buff, offset, 1, (u_int32_t)ptr_struct->fw_en); +} + +void image_layout_component_authentication_configuration_unpack( + struct image_layout_component_authentication_configuration* ptr_struct, + const u_int8_t* ptr_buff) +{ + u_int32_t offset; + + offset = 24; + ptr_struct->auth_type = (u_int8_t)adb2c_pop_bits_from_buff(ptr_buff, offset, 8); + offset = 5; + ptr_struct->btc_token_en = (u_int8_t)adb2c_pop_bits_from_buff(ptr_buff, offset, 1); + offset = 4; + ptr_struct->frc_en = (u_int8_t)adb2c_pop_bits_from_buff(ptr_buff, offset, 1); + offset = 3; + ptr_struct->mlnx_nvconfig_en = (u_int8_t)adb2c_pop_bits_from_buff(ptr_buff, offset, 1); + offset = 2; + ptr_struct->vendor_nvconfig_en = (u_int8_t)adb2c_pop_bits_from_buff(ptr_buff, offset, 1); + offset = 1; + ptr_struct->cs_token_en = (u_int8_t)adb2c_pop_bits_from_buff(ptr_buff, offset, 1); + offset = 0; + ptr_struct->fw_en = (u_int8_t)adb2c_pop_bits_from_buff(ptr_buff, offset, 1); +} + +void image_layout_component_authentication_configuration_print( + const struct image_layout_component_authentication_configuration* ptr_struct, + FILE* fd, + int indent_level) +{ + adb2c_add_indentation(fd, indent_level); + fprintf(fd, "======== image_layout_component_authentication_configuration ========\n"); + + adb2c_add_indentation(fd, indent_level); + fprintf(fd, "auth_type : " UH_FMT "\n", ptr_struct->auth_type); + adb2c_add_indentation(fd, indent_level); + fprintf(fd, "btc_token_en : " UH_FMT "\n", ptr_struct->btc_token_en); + adb2c_add_indentation(fd, indent_level); + fprintf(fd, "frc_en : " UH_FMT "\n", ptr_struct->frc_en); + adb2c_add_indentation(fd, indent_level); + fprintf(fd, "mlnx_nvconfig_en : " UH_FMT "\n", ptr_struct->mlnx_nvconfig_en); + adb2c_add_indentation(fd, indent_level); + fprintf(fd, "vendor_nvconfig_en : " UH_FMT "\n", ptr_struct->vendor_nvconfig_en); + adb2c_add_indentation(fd, indent_level); + fprintf(fd, "cs_token_en : " UH_FMT "\n", ptr_struct->cs_token_en); + adb2c_add_indentation(fd, indent_level); + fprintf(fd, "fw_en : " UH_FMT "\n", ptr_struct->fw_en); +} + +unsigned int image_layout_component_authentication_configuration_size(void) +{ + return IMAGE_LAYOUT_COMPONENT_AUTHENTICATION_CONFIGURATION_SIZE; +} + +void image_layout_component_authentication_configuration_dump( + const struct image_layout_component_authentication_configuration* ptr_struct, + FILE* fd) +{ + image_layout_component_authentication_configuration_print(ptr_struct, fd, 0); +} + +void image_layout_file_public_keys_3_pack(const struct image_layout_file_public_keys_3* ptr_struct, u_int8_t* ptr_buff) +{ + u_int32_t offset; + int i; + + offset = 0; + adb2c_push_integer_to_buff(ptr_buff, offset, 4, (u_int32_t)ptr_struct->keypair_exp); + for (i = 0; i < 4; ++i) + { + offset = adb2c_calc_array_field_address(32, 32, i, 4352, 1); + adb2c_push_integer_to_buff(ptr_buff, offset, 4, (u_int32_t)ptr_struct->keypair_uuid[i]); + } + for (i = 0; i < 128; ++i) + { + offset = adb2c_calc_array_field_address(160, 32, i, 4352, 1); + adb2c_push_integer_to_buff(ptr_buff, offset, 4, (u_int32_t)ptr_struct->key[i]); + } + offset = 4256; + image_layout_component_authentication_configuration_pack(&(ptr_struct->component_authentication_configuration), + ptr_buff + offset / 8); +} + +void image_layout_file_public_keys_3_unpack(struct image_layout_file_public_keys_3* ptr_struct, + const u_int8_t* ptr_buff) +{ + u_int32_t offset; + int i; + + offset = 0; + ptr_struct->keypair_exp = (u_int32_t)adb2c_pop_integer_from_buff(ptr_buff, offset, 4); + for (i = 0; i < 4; ++i) + { + offset = adb2c_calc_array_field_address(32, 32, i, 4352, 1); + ptr_struct->keypair_uuid[i] = (u_int32_t)adb2c_pop_integer_from_buff(ptr_buff, offset, 4); + } + for (i = 0; i < 128; ++i) + { + offset = adb2c_calc_array_field_address(160, 32, i, 4352, 1); + ptr_struct->key[i] = (u_int32_t)adb2c_pop_integer_from_buff(ptr_buff, offset, 4); + } + offset = 4256; + image_layout_component_authentication_configuration_unpack(&(ptr_struct->component_authentication_configuration), + ptr_buff + offset / 8); +} + +void image_layout_file_public_keys_3_print(const struct image_layout_file_public_keys_3* ptr_struct, + FILE* fd, + int indent_level) +{ + int i; + + adb2c_add_indentation(fd, indent_level); + fprintf(fd, "======== image_layout_file_public_keys_3 ========\n"); + + adb2c_add_indentation(fd, indent_level); + fprintf(fd, "keypair_exp : " U32H_FMT "\n", ptr_struct->keypair_exp); + for (i = 0; i < 4; ++i) + { + adb2c_add_indentation(fd, indent_level); + fprintf(fd, "keypair_uuid_%03d : " U32H_FMT "\n", i, ptr_struct->keypair_uuid[i]); + } + for (i = 0; i < 128; ++i) + { + adb2c_add_indentation(fd, indent_level); + fprintf(fd, "key_%03d : " U32H_FMT "\n", i, ptr_struct->key[i]); + } + adb2c_add_indentation(fd, indent_level); + fprintf(fd, "component_authentication_configuration:\n"); + image_layout_component_authentication_configuration_print(&(ptr_struct->component_authentication_configuration), fd, + indent_level + 1); +} + +unsigned int image_layout_file_public_keys_3_size(void) +{ + return IMAGE_LAYOUT_FILE_PUBLIC_KEYS_3_SIZE; +} + +void image_layout_file_public_keys_3_dump(const struct image_layout_file_public_keys_3* ptr_struct, FILE* fd) +{ + image_layout_file_public_keys_3_print(ptr_struct, fd, 0); +} void image_layout_uint64_pack(const u_int64_t* ptr_struct, u_int8_t* ptr_buff) { u_int32_t offset; @@ -214,6 +375,55 @@ void image_layout_module_version_dump(const struct image_layout_module_version* image_layout_module_version_print(ptr_struct, fd, 0); } +void image_layout_public_keys_3_pack(const struct image_layout_public_keys_3* ptr_struct, u_int8_t* ptr_buff) +{ + u_int32_t offset; + int i; + + for (i = 0; i < 8; ++i) + { + offset = adb2c_calc_array_field_address(0, 4352, i, 34816, 1); + image_layout_file_public_keys_3_pack(&(ptr_struct->file_public_keys_3[i]), ptr_buff + offset / 8); + } +} + +void image_layout_public_keys_3_unpack(struct image_layout_public_keys_3* ptr_struct, const u_int8_t* ptr_buff) +{ + u_int32_t offset; + int i; + + for (i = 0; i < 8; ++i) + { + offset = adb2c_calc_array_field_address(0, 4352, i, 34816, 1); + image_layout_file_public_keys_3_unpack(&(ptr_struct->file_public_keys_3[i]), ptr_buff + offset / 8); + } +} + +void image_layout_public_keys_3_print(const struct image_layout_public_keys_3* ptr_struct, FILE* fd, int indent_level) +{ + int i; + + adb2c_add_indentation(fd, indent_level); + fprintf(fd, "======== image_layout_public_keys_3 ========\n"); + + for (i = 0; i < 8; ++i) + { + adb2c_add_indentation(fd, indent_level); + fprintf(fd, "file_public_keys_3_%03d:\n", i); + image_layout_file_public_keys_3_print(&(ptr_struct->file_public_keys_3[i]), fd, indent_level + 1); + } +} + +unsigned int image_layout_public_keys_3_size(void) +{ + return IMAGE_LAYOUT_PUBLIC_KEYS_3_SIZE; +} + +void image_layout_public_keys_3_dump(const struct image_layout_public_keys_3* ptr_struct, FILE* fd) +{ + image_layout_public_keys_3_print(ptr_struct, fd, 0); +} + void image_layout_reset_capabilities_pack(const struct image_layout_reset_capabilities* ptr_struct, u_int8_t* ptr_buff) { u_int32_t offset; @@ -224,7 +434,8 @@ void image_layout_reset_capabilities_pack(const struct image_layout_reset_capabi adb2c_push_bits_to_buff(ptr_buff, offset, 8, (u_int32_t)ptr_struct->version_vector_ver); } -void image_layout_reset_capabilities_unpack(struct image_layout_reset_capabilities* ptr_struct, const u_int8_t* ptr_buff) +void image_layout_reset_capabilities_unpack(struct image_layout_reset_capabilities* ptr_struct, + const u_int8_t* ptr_buff) { u_int32_t offset; @@ -234,7 +445,9 @@ void image_layout_reset_capabilities_unpack(struct image_layout_reset_capabiliti ptr_struct->version_vector_ver = (u_int8_t)adb2c_pop_bits_from_buff(ptr_buff, offset, 8); } -void image_layout_reset_capabilities_print(const struct image_layout_reset_capabilities* ptr_struct, FILE* fd, int indent_level) +void image_layout_reset_capabilities_print(const struct image_layout_reset_capabilities* ptr_struct, + FILE* fd, + int indent_level) { adb2c_add_indentation(fd, indent_level); fprintf(fd, "======== image_layout_reset_capabilities ========\n"); @@ -302,6 +515,88 @@ void image_layout_reset_version_dump(const struct image_layout_reset_version* pt image_layout_reset_version_print(ptr_struct, fd, 0); } +void image_layout_secure_boot_signatures_pack(const struct image_layout_secure_boot_signatures* ptr_struct, + u_int8_t* ptr_buff) +{ + u_int32_t offset; + int i; + + for (i = 0; i < 128; ++i) + { + offset = adb2c_calc_array_field_address(0, 32, i, 12288, 1); + adb2c_push_integer_to_buff(ptr_buff, offset, 4, (u_int32_t)ptr_struct->boot_signature[i]); + } + for (i = 0; i < 128; ++i) + { + offset = adb2c_calc_array_field_address(4096, 32, i, 12288, 1); + adb2c_push_integer_to_buff(ptr_buff, offset, 4, (u_int32_t)ptr_struct->critical_signature[i]); + } + for (i = 0; i < 128; ++i) + { + offset = adb2c_calc_array_field_address(8192, 32, i, 12288, 1); + adb2c_push_integer_to_buff(ptr_buff, offset, 4, (u_int32_t)ptr_struct->non_critical_signature[i]); + } +} + +void image_layout_secure_boot_signatures_unpack(struct image_layout_secure_boot_signatures* ptr_struct, + const u_int8_t* ptr_buff) +{ + u_int32_t offset; + int i; + + for (i = 0; i < 128; ++i) + { + offset = adb2c_calc_array_field_address(0, 32, i, 12288, 1); + ptr_struct->boot_signature[i] = (u_int32_t)adb2c_pop_integer_from_buff(ptr_buff, offset, 4); + } + for (i = 0; i < 128; ++i) + { + offset = adb2c_calc_array_field_address(4096, 32, i, 12288, 1); + ptr_struct->critical_signature[i] = (u_int32_t)adb2c_pop_integer_from_buff(ptr_buff, offset, 4); + } + for (i = 0; i < 128; ++i) + { + offset = adb2c_calc_array_field_address(8192, 32, i, 12288, 1); + ptr_struct->non_critical_signature[i] = (u_int32_t)adb2c_pop_integer_from_buff(ptr_buff, offset, 4); + } +} + +void image_layout_secure_boot_signatures_print(const struct image_layout_secure_boot_signatures* ptr_struct, + FILE* fd, + int indent_level) +{ + int i; + + adb2c_add_indentation(fd, indent_level); + fprintf(fd, "======== image_layout_secure_boot_signatures ========\n"); + + for (i = 0; i < 128; ++i) + { + adb2c_add_indentation(fd, indent_level); + fprintf(fd, "boot_signature_%03d : " U32H_FMT "\n", i, ptr_struct->boot_signature[i]); + } + for (i = 0; i < 128; ++i) + { + adb2c_add_indentation(fd, indent_level); + fprintf(fd, "critical_signature_%03d : " U32H_FMT "\n", i, ptr_struct->critical_signature[i]); + } + for (i = 0; i < 128; ++i) + { + adb2c_add_indentation(fd, indent_level); + fprintf(fd, "non_critical_signature_%03d : " U32H_FMT "\n", i, ptr_struct->non_critical_signature[i]); + } +} + +unsigned int image_layout_secure_boot_signatures_size(void) +{ + return IMAGE_LAYOUT_SECURE_BOOT_SIGNATURES_SIZE; +} + +void image_layout_secure_boot_signatures_dump(const struct image_layout_secure_boot_signatures* ptr_struct, FILE* fd) +{ + image_layout_secure_boot_signatures_print(ptr_struct, fd, 0); +} + void image_layout_uid_entry_pack(const struct image_layout_uid_entry* ptr_struct, u_int8_t* ptr_buff) { u_int32_t offset; @@ -456,7 +751,9 @@ void image_layout_TRIPPLE_VERSION_unpack(struct image_layout_TRIPPLE_VERSION* pt ptr_struct->MINOR = (u_int16_t)adb2c_pop_bits_from_buff(ptr_buff, offset, 16); } -void image_layout_TRIPPLE_VERSION_print(const struct image_layout_TRIPPLE_VERSION* ptr_struct, FILE* fd, int indent_level) +void image_layout_TRIPPLE_VERSION_print(const struct image_layout_TRIPPLE_VERSION* ptr_struct, + FILE* fd, + int indent_level) { adb2c_add_indentation(fd, indent_level); fprintf(fd, "======== image_layout_TRIPPLE_VERSION ========\n"); @@ -522,7 +819,8 @@ void image_layout_guids_dump(const struct image_layout_guids* ptr_struct, FILE* image_layout_guids_print(ptr_struct, fd, 0); } -void image_layout_hashes_table_header_pack(const struct image_layout_hashes_table_header* ptr_struct, u_int8_t* ptr_buff) +void image_layout_hashes_table_header_pack(const struct image_layout_hashes_table_header* ptr_struct, + u_int8_t* ptr_buff) { u_int32_t offset; @@ -534,7 +832,8 @@ void image_layout_hashes_table_header_pack(const struct image_layout_hashes_tabl adb2c_push_bits_to_buff(ptr_buff, offset, 16, (u_int32_t)ptr_struct->crc); } -void image_layout_hashes_table_header_unpack(struct image_layout_hashes_table_header* ptr_struct, const u_int8_t* ptr_buff) +void image_layout_hashes_table_header_unpack(struct image_layout_hashes_table_header* ptr_struct, + const u_int8_t* ptr_buff) { u_int32_t offset; @@ -546,7 +845,9 @@ void image_layout_hashes_table_header_unpack(struct image_layout_hashes_table_he ptr_struct->crc = (u_int16_t)adb2c_pop_bits_from_buff(ptr_buff, offset, 16); } -void image_layout_hashes_table_header_print(const struct image_layout_hashes_table_header* ptr_struct, FILE* fd, int indent_level) +void image_layout_hashes_table_header_print(const struct image_layout_hashes_table_header* ptr_struct, + FILE* fd, + int indent_level) { adb2c_add_indentation(fd, indent_level); fprintf(fd, "======== image_layout_hashes_table_header ========\n"); @@ -693,7 +994,9 @@ void image_layout_hw_pointer_entry_unpack(struct image_layout_hw_pointer_entry* ptr_struct->crc = (u_int16_t)adb2c_pop_bits_from_buff(ptr_buff, offset, 16); } -void image_layout_hw_pointer_entry_print(const struct image_layout_hw_pointer_entry* ptr_struct, FILE* fd, int indent_level) +void image_layout_hw_pointer_entry_print(const struct image_layout_hw_pointer_entry* ptr_struct, + FILE* fd, + int indent_level) { adb2c_add_indentation(fd, indent_level); fprintf(fd, "======== image_layout_hw_pointer_entry ========\n"); @@ -797,7 +1100,9 @@ void image_layout_module_versions_unpack(struct image_layout_module_versions* pt image_layout_module_version_unpack(&(ptr_struct->mad), ptr_buff + offset / 8); } -void image_layout_module_versions_print(const struct image_layout_module_versions* ptr_struct, FILE* fd, int indent_level) +void image_layout_module_versions_print(const struct image_layout_module_versions* ptr_struct, + FILE* fd, + int indent_level) { adb2c_add_indentation(fd, indent_level); fprintf(fd, "======== image_layout_module_versions ========\n"); @@ -1209,7 +1514,8 @@ void image_layout_hw_pointers_carmel_pack(const struct image_layout_hw_pointers_ image_layout_hw_pointer_entry_pack(&(ptr_struct->hashes_table_pointer), ptr_buff + offset / 8); } -void image_layout_hw_pointers_carmel_unpack(struct image_layout_hw_pointers_carmel* ptr_struct, const u_int8_t* ptr_buff) +void image_layout_hw_pointers_carmel_unpack(struct image_layout_hw_pointers_carmel* ptr_struct, + const u_int8_t* ptr_buff) { u_int32_t offset; @@ -1247,7 +1553,9 @@ void image_layout_hw_pointers_carmel_unpack(struct image_layout_hw_pointers_carm image_layout_hw_pointer_entry_unpack(&(ptr_struct->hashes_table_pointer), ptr_buff + offset / 8); } -void image_layout_hw_pointers_carmel_print(const struct image_layout_hw_pointers_carmel* ptr_struct, FILE* fd, int indent_level) +void image_layout_hw_pointers_carmel_print(const struct image_layout_hw_pointers_carmel* ptr_struct, + FILE* fd, + int indent_level) { adb2c_add_indentation(fd, indent_level); fprintf(fd, "======== image_layout_hw_pointers_carmel ========\n"); @@ -1858,7 +2166,9 @@ void image_layout_image_layout_Nodes_unpack(union image_layout_image_layout_Node image_layout_hashes_table_unpack(&(ptr_struct->hashes_table), ptr_buff); } -void image_layout_image_layout_Nodes_print(const union image_layout_image_layout_Nodes* ptr_struct, FILE* fd, int indent_level) +void image_layout_image_layout_Nodes_print(const union image_layout_image_layout_Nodes* ptr_struct, + FILE* fd, + int indent_level) { adb2c_add_indentation(fd, indent_level); fprintf(fd, "======== image_layout_image_layout_Nodes ========\n"); diff --git a/tools_layouts/image_layout_layouts.h b/tools_layouts/image_layout_layouts.h index ad90ace9..188185e5 100644 --- a/tools_layouts/image_layout_layouts.h +++ b/tools_layouts/image_layout_layouts.h @@ -45,6 +45,56 @@ extern "C" #endif #include "adb_to_c_utils.h" + /* Description - */ + /* Size in bytes - 4 */ + struct image_layout_component_authentication_configuration + { + /*---------------- DWORD[0] (Offset 0x0) ----------------*/ + /* Description - 0-NULL, 1-SHA256Digest, 3-2048 bit RSA */ + /* 0x0.0 - 0x0.7 */ + u_int8_t auth_type; + /* Description - used for authenticating Back to commissioning tokens */ + /* 0x0.26 - 0x0.26 */ + u_int8_t btc_token_en; + /* Description - used for authenticating Factory Re-COnfiguration Responses */ + /* 0x0.27 - 0x0.27 */ + u_int8_t frc_en; + /* Description - used for signing NVCONFIG at MLNX level */ + /* 0x0.28 - 0x0.28 */ + u_int8_t mlnx_nvconfig_en; + /* Description - used for authenticating NVCONFIG at OEM level */ + /* 0x0.29 - 0x0.29 */ + u_int8_t vendor_nvconfig_en; + /* Description - used for authenticating CS tokens at OEM level */ + /* 0x0.30 - 0x0.30 */ + u_int8_t cs_token_en; + /* Description - Used for authenticating firmware, DBG_FW, DBG Tokens */ + /* 0x0.31 - 0x0.31 */ + u_int8_t fw_en; + }; + + /* Description - */ + /* Size in bytes - 544 */ + struct image_layout_file_public_keys_3 + { + /*---------------- DWORD[0] (Offset 0x0) ----------------*/ + /* Description - public key exponent, FW should use an exponent of 65537 */ + /* 0x0.0 - 0x0.31 */ + u_int32_t keypair_exp; + /*---------------- DWORD[1] (Offset 0x4) ----------------*/ + /* Description - UUID of this key created by server when it generates a keypair */ + /* 0x4.0 - 0x10.31 */ + u_int32_t keypair_uuid[4]; + /*---------------- DWORD[5] (Offset 0x14) ----------------*/ + /* Description - 4096 bit public-key */ + /* 0x14.0 - 0x210.31 */ + u_int32_t key[128]; + /*---------------- DWORD[133] (Offset 0x214) ----------------*/ + /* Description - configuration bits to enable authentication for each component */ + /* 0x214.0 - 0x214.31 */ + struct image_layout_component_authentication_configuration component_authentication_configuration; + }; + /* Description - */ /* Size in bytes - 8 */ struct image_layout_uint64 @@ -109,6 +159,16 @@ extern "C" u_int16_t major; }; + /* Description - */ + /* Size in bytes - 4352 */ + struct image_layout_public_keys_3 + { + /*---------------- DWORD[0] (Offset 0x0) ----------------*/ + /* Description - */ + /* 0x0.0 - 0x10fc.31 */ + struct image_layout_file_public_keys_3 file_public_keys_3[8]; + }; + /* Description - */ /* Size in bytes - 4 */ struct image_layout_reset_capabilities @@ -142,6 +202,24 @@ extern "C" u_int8_t minor; }; + /* Description - */ + /* Size in bytes - 1536 */ + struct image_layout_secure_boot_signatures + { + /*---------------- DWORD[0] (Offset 0x0) ----------------*/ + /* Description - boot signature of data: image signature, hw pointers, boot record, table of content, boot2 */ + /* 0x0.0 - 0x1fc.31 */ + u_int32_t boot_signature[128]; + /*---------------- DWORD[128] (Offset 0x200) ----------------*/ + /* Description - fw critical signature of itcos: HW_BOOT_INI, PCIE_PHY_UC_COMMANDS, PCIE_LINK_CODE */ + /* 0x200.0 - 0x3fc.31 */ + u_int32_t critical_signature[128]; + /*---------------- DWORD[256] (Offset 0x400) ----------------*/ + /* Description - fw non critical signatures of all other itocs */ + /* 0x400.0 - 0x5fc.31 */ + u_int32_t non_critical_signature[128]; + }; + /* Description - */ /* Size in bytes - 16 */ struct image_layout_uid_entry @@ -878,6 +956,33 @@ dtoc_header: Represents the layout version depicted by the dTOC: 1. */ }; /*================= PACK/UNPACK/PRINT FUNCTIONS ======================*/ + /* component_authentication_configuration */ + void image_layout_component_authentication_configuration_pack( + const struct image_layout_component_authentication_configuration* ptr_struct, + u_int8_t* ptr_buff); + void image_layout_component_authentication_configuration_unpack( + struct image_layout_component_authentication_configuration* ptr_struct, + const u_int8_t* ptr_buff); + void image_layout_component_authentication_configuration_print( + const struct image_layout_component_authentication_configuration* ptr_struct, + FILE* fd, + int indent_level); + unsigned int image_layout_component_authentication_configuration_size(void); +#define IMAGE_LAYOUT_COMPONENT_AUTHENTICATION_CONFIGURATION_SIZE (0x4) + void image_layout_component_authentication_configuration_dump( + const struct image_layout_component_authentication_configuration* ptr_struct, + FILE* fd); + /* file_public_keys_3 */ + void image_layout_file_public_keys_3_pack(const struct image_layout_file_public_keys_3* ptr_struct, + u_int8_t* ptr_buff); + void image_layout_file_public_keys_3_unpack(struct image_layout_file_public_keys_3* ptr_struct, + const u_int8_t* ptr_buff); + void image_layout_file_public_keys_3_print(const struct image_layout_file_public_keys_3* ptr_struct, + FILE* fd, + int indent_level); + unsigned int image_layout_file_public_keys_3_size(void); +#define IMAGE_LAYOUT_FILE_PUBLIC_KEYS_3_SIZE (0x220) + void image_layout_file_public_keys_3_dump(const struct image_layout_file_public_keys_3* ptr_struct, FILE* fd); /* uint64 */ void image_layout_uint64_pack(const u_int64_t* ptr_struct, u_int8_t* ptr_buff); void image_layout_uint64_unpack(u_int64_t* ptr_struct, const u_int8_t* ptr_buff); @@ -902,24 +1007,51 @@ dtoc_header: Represents the layout version depicted by the dTOC: 1. */ /* module_version */ void image_layout_module_version_pack(const struct image_layout_module_version* ptr_struct, u_int8_t* ptr_buff); void image_layout_module_version_unpack(struct image_layout_module_version* ptr_struct, const u_int8_t* ptr_buff); - void image_layout_module_version_print(const struct image_layout_module_version* ptr_struct, FILE* fd, int indent_level); + void image_layout_module_version_print(const struct image_layout_module_version* ptr_struct, + FILE* fd, + int indent_level); unsigned int image_layout_module_version_size(void); #define IMAGE_LAYOUT_MODULE_VERSION_SIZE (0x4) void image_layout_module_version_dump(const struct image_layout_module_version* ptr_struct, FILE* fd); + /* public_keys_3 */ + void image_layout_public_keys_3_pack(const struct image_layout_public_keys_3* ptr_struct, u_int8_t* ptr_buff); + void image_layout_public_keys_3_unpack(struct image_layout_public_keys_3* ptr_struct, const u_int8_t* ptr_buff); + void + image_layout_public_keys_3_print(const struct image_layout_public_keys_3* ptr_struct, FILE* fd, int indent_level); + unsigned int image_layout_public_keys_3_size(void); +#define IMAGE_LAYOUT_PUBLIC_KEYS_3_SIZE (0x1100) + void image_layout_public_keys_3_dump(const struct image_layout_public_keys_3* ptr_struct, FILE* fd); /* reset_capabilities */ - void image_layout_reset_capabilities_pack(const struct image_layout_reset_capabilities* ptr_struct, u_int8_t* ptr_buff); - void image_layout_reset_capabilities_unpack(struct image_layout_reset_capabilities* ptr_struct, const u_int8_t* ptr_buff); - void image_layout_reset_capabilities_print(const struct image_layout_reset_capabilities* ptr_struct, FILE* fd, int indent_level); + void image_layout_reset_capabilities_pack(const struct image_layout_reset_capabilities* ptr_struct, + u_int8_t* ptr_buff); + void image_layout_reset_capabilities_unpack(struct image_layout_reset_capabilities* ptr_struct, + const u_int8_t* ptr_buff); + void image_layout_reset_capabilities_print(const struct image_layout_reset_capabilities* ptr_struct, + FILE* fd, + int indent_level); unsigned int image_layout_reset_capabilities_size(void); #define IMAGE_LAYOUT_RESET_CAPABILITIES_SIZE (0x4) void image_layout_reset_capabilities_dump(const struct image_layout_reset_capabilities* ptr_struct, FILE* fd); /* reset_version */ void image_layout_reset_version_pack(const struct image_layout_reset_version* ptr_struct, u_int8_t* ptr_buff); void image_layout_reset_version_unpack(struct image_layout_reset_version* ptr_struct, const u_int8_t* ptr_buff); - void image_layout_reset_version_print(const struct image_layout_reset_version* ptr_struct, FILE* fd, int indent_level); + void + image_layout_reset_version_print(const struct image_layout_reset_version* ptr_struct, FILE* fd, int indent_level); unsigned int image_layout_reset_version_size(void); #define IMAGE_LAYOUT_RESET_VERSION_SIZE (0x4) void image_layout_reset_version_dump(const struct image_layout_reset_version* ptr_struct, FILE* fd); + /* secure_boot_signatures */ + void image_layout_secure_boot_signatures_pack(const struct image_layout_secure_boot_signatures* ptr_struct, + u_int8_t* ptr_buff); + void image_layout_secure_boot_signatures_unpack(struct image_layout_secure_boot_signatures* ptr_struct, + const u_int8_t* ptr_buff); + void image_layout_secure_boot_signatures_print(const struct image_layout_secure_boot_signatures* ptr_struct, + FILE* fd, + int indent_level); + unsigned int image_layout_secure_boot_signatures_size(void); +#define IMAGE_LAYOUT_SECURE_BOOT_SIGNATURES_SIZE (0x600) + void image_layout_secure_boot_signatures_dump(const struct image_layout_secure_boot_signatures* ptr_struct, + FILE* fd); /* uid_entry */ void image_layout_uid_entry_pack(const struct image_layout_uid_entry* ptr_struct, u_int8_t* ptr_buff); void image_layout_uid_entry_unpack(struct image_layout_uid_entry* ptr_struct, const u_int8_t* ptr_buff); @@ -937,7 +1069,9 @@ dtoc_header: Represents the layout version depicted by the dTOC: 1. */ /* TRIPPLE_VERSION */ void image_layout_TRIPPLE_VERSION_pack(const struct image_layout_TRIPPLE_VERSION* ptr_struct, u_int8_t* ptr_buff); void image_layout_TRIPPLE_VERSION_unpack(struct image_layout_TRIPPLE_VERSION* ptr_struct, const u_int8_t* ptr_buff); - void image_layout_TRIPPLE_VERSION_print(const struct image_layout_TRIPPLE_VERSION* ptr_struct, FILE* fd, int indent_level); + void image_layout_TRIPPLE_VERSION_print(const struct image_layout_TRIPPLE_VERSION* ptr_struct, + FILE* fd, + int indent_level); unsigned int image_layout_TRIPPLE_VERSION_size(void); #define IMAGE_LAYOUT_TRIPPLE_VERSION_SIZE (0x8) void image_layout_TRIPPLE_VERSION_dump(const struct image_layout_TRIPPLE_VERSION* ptr_struct, FILE* fd); @@ -949,9 +1083,13 @@ dtoc_header: Represents the layout version depicted by the dTOC: 1. */ #define IMAGE_LAYOUT_GUIDS_SIZE (0x40) void image_layout_guids_dump(const struct image_layout_guids* ptr_struct, FILE* fd); /* hashes_table_header */ - void image_layout_hashes_table_header_pack(const struct image_layout_hashes_table_header* ptr_struct, u_int8_t* ptr_buff); - void image_layout_hashes_table_header_unpack(struct image_layout_hashes_table_header* ptr_struct, const u_int8_t* ptr_buff); - void image_layout_hashes_table_header_print(const struct image_layout_hashes_table_header* ptr_struct, FILE* fd, int indent_level); + void image_layout_hashes_table_header_pack(const struct image_layout_hashes_table_header* ptr_struct, + u_int8_t* ptr_buff); + void image_layout_hashes_table_header_unpack(struct image_layout_hashes_table_header* ptr_struct, + const u_int8_t* ptr_buff); + void image_layout_hashes_table_header_print(const struct image_layout_hashes_table_header* ptr_struct, + FILE* fd, + int indent_level); unsigned int image_layout_hashes_table_header_size(void); #define IMAGE_LAYOUT_HASHES_TABLE_HEADER_SIZE (0xc) void image_layout_hashes_table_header_dump(const struct image_layout_hashes_table_header* ptr_struct, FILE* fd); @@ -971,8 +1109,11 @@ dtoc_header: Represents the layout version depicted by the dTOC: 1. */ void image_layout_htoc_hash_dump(const struct image_layout_htoc_hash* ptr_struct, FILE* fd); /* hw_pointer_entry */ void image_layout_hw_pointer_entry_pack(const struct image_layout_hw_pointer_entry* ptr_struct, u_int8_t* ptr_buff); - void image_layout_hw_pointer_entry_unpack(struct image_layout_hw_pointer_entry* ptr_struct, const u_int8_t* ptr_buff); - void image_layout_hw_pointer_entry_print(const struct image_layout_hw_pointer_entry* ptr_struct, FILE* fd, int indent_level); + void image_layout_hw_pointer_entry_unpack(struct image_layout_hw_pointer_entry* ptr_struct, + const u_int8_t* ptr_buff); + void image_layout_hw_pointer_entry_print(const struct image_layout_hw_pointer_entry* ptr_struct, + FILE* fd, + int indent_level); unsigned int image_layout_hw_pointer_entry_size(void); #define IMAGE_LAYOUT_HW_POINTER_ENTRY_SIZE (0x8) void image_layout_hw_pointer_entry_dump(const struct image_layout_hw_pointer_entry* ptr_struct, FILE* fd); @@ -986,21 +1127,26 @@ dtoc_header: Represents the layout version depicted by the dTOC: 1. */ /* module_versions */ void image_layout_module_versions_pack(const struct image_layout_module_versions* ptr_struct, u_int8_t* ptr_buff); void image_layout_module_versions_unpack(struct image_layout_module_versions* ptr_struct, const u_int8_t* ptr_buff); - void image_layout_module_versions_print(const struct image_layout_module_versions* ptr_struct, FILE* fd, int indent_level); + void image_layout_module_versions_print(const struct image_layout_module_versions* ptr_struct, + FILE* fd, + int indent_level); unsigned int image_layout_module_versions_size(void); #define IMAGE_LAYOUT_MODULE_VERSIONS_SIZE (0x40) void image_layout_module_versions_dump(const struct image_layout_module_versions* ptr_struct, FILE* fd); /* operation_key */ void image_layout_operation_key_pack(const struct image_layout_operation_key* ptr_struct, u_int8_t* ptr_buff); void image_layout_operation_key_unpack(struct image_layout_operation_key* ptr_struct, const u_int8_t* ptr_buff); - void image_layout_operation_key_print(const struct image_layout_operation_key* ptr_struct, FILE* fd, int indent_level); + void + image_layout_operation_key_print(const struct image_layout_operation_key* ptr_struct, FILE* fd, int indent_level); unsigned int image_layout_operation_key_size(void); #define IMAGE_LAYOUT_OPERATION_KEY_SIZE (0x10) void image_layout_operation_key_dump(const struct image_layout_operation_key* ptr_struct, FILE* fd); /* version_vector */ void image_layout_version_vector_pack(const struct image_layout_version_vector* ptr_struct, u_int8_t* ptr_buff); void image_layout_version_vector_unpack(struct image_layout_version_vector* ptr_struct, const u_int8_t* ptr_buff); - void image_layout_version_vector_print(const struct image_layout_version_vector* ptr_struct, FILE* fd, int indent_level); + void image_layout_version_vector_print(const struct image_layout_version_vector* ptr_struct, + FILE* fd, + int indent_level); unsigned int image_layout_version_vector_size(void); #define IMAGE_LAYOUT_VERSION_VECTOR_SIZE (0x30) void image_layout_version_vector_dump(const struct image_layout_version_vector* ptr_struct, FILE* fd); @@ -1019,9 +1165,13 @@ dtoc_header: Represents the layout version depicted by the dTOC: 1. */ #define IMAGE_LAYOUT_HASHES_TABLE_SIZE (0x804) void image_layout_hashes_table_dump(const struct image_layout_hashes_table* ptr_struct, FILE* fd); /* hw_pointers_carmel */ - void image_layout_hw_pointers_carmel_pack(const struct image_layout_hw_pointers_carmel* ptr_struct, u_int8_t* ptr_buff); - void image_layout_hw_pointers_carmel_unpack(struct image_layout_hw_pointers_carmel* ptr_struct, const u_int8_t* ptr_buff); - void image_layout_hw_pointers_carmel_print(const struct image_layout_hw_pointers_carmel* ptr_struct, FILE* fd, int indent_level); + void image_layout_hw_pointers_carmel_pack(const struct image_layout_hw_pointers_carmel* ptr_struct, + u_int8_t* ptr_buff); + void image_layout_hw_pointers_carmel_unpack(struct image_layout_hw_pointers_carmel* ptr_struct, + const u_int8_t* ptr_buff); + void image_layout_hw_pointers_carmel_print(const struct image_layout_hw_pointers_carmel* ptr_struct, + FILE* fd, + int indent_level); unsigned int image_layout_hw_pointers_carmel_size(void); #define IMAGE_LAYOUT_HW_POINTERS_CARMEL_SIZE (0x80) void image_layout_hw_pointers_carmel_dump(const struct image_layout_hw_pointers_carmel* ptr_struct, FILE* fd); @@ -1054,9 +1204,13 @@ dtoc_header: Represents the layout version depicted by the dTOC: 1. */ #define IMAGE_LAYOUT_TOOLS_AREA_SIZE (0x40) void image_layout_tools_area_dump(const struct image_layout_tools_area* ptr_struct, FILE* fd); /* image_layout_Nodes */ - void image_layout_image_layout_Nodes_pack(const union image_layout_image_layout_Nodes* ptr_struct, u_int8_t* ptr_buff); - void image_layout_image_layout_Nodes_unpack(union image_layout_image_layout_Nodes* ptr_struct, const u_int8_t* ptr_buff); - void image_layout_image_layout_Nodes_print(const union image_layout_image_layout_Nodes* ptr_struct, FILE* fd, int indent_level); + void image_layout_image_layout_Nodes_pack(const union image_layout_image_layout_Nodes* ptr_struct, + u_int8_t* ptr_buff); + void image_layout_image_layout_Nodes_unpack(union image_layout_image_layout_Nodes* ptr_struct, + const u_int8_t* ptr_buff); + void image_layout_image_layout_Nodes_print(const union image_layout_image_layout_Nodes* ptr_struct, + FILE* fd, + int indent_level); unsigned int image_layout_image_layout_Nodes_size(void); #define IMAGE_LAYOUT_IMAGE_LAYOUT_NODES_SIZE (0x804) void image_layout_image_layout_Nodes_dump(const union image_layout_image_layout_Nodes* ptr_struct, FILE* fd); From 12acc608b0d8dcbe4b51adf16a1d5d8d86bc997e Mon Sep 17 00:00:00 2001 From: Matan Eliyahu Date: Wed, 3 Aug 2022 21:57:44 +0300 Subject: [PATCH 18/63] Uninitialized field in public_keys_3 section caused different signatures each rsa_sign Description: N/A Tested OS: Linux Tested devices: CX6LX Tested flows: flint rsa_sign Known gaps (with RM ticket): N/A Issue: 3163642 Change-Id: If7306961962a0a8f21dc6040de95980909dcddb7 Signed-off-by: Matan Eliyahu --- mlxfwops/lib/fs4_ops.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/mlxfwops/lib/fs4_ops.cpp b/mlxfwops/lib/fs4_ops.cpp index 5b6aa4ff..c473dc7f 100644 --- a/mlxfwops/lib/fs4_ops.cpp +++ b/mlxfwops/lib/fs4_ops.cpp @@ -4923,6 +4923,7 @@ bool Fs4Operations::GetPublicKeyFromFile(const char* public_key_file, vector publicKeyData; u_int32_t keyPairExp; image_layout_component_authentication_configuration keyAuthConf; + memset(&keyAuthConf, 0, sizeof(keyAuthConf)); if (!ParsePublicKeyFromFile(public_key_file, publicKeyData, keyPairExp, keyAuthConf)) { return errmsg("preparePublicKeyDataForStore failed - Error: %s", err()); From 1c3dc4d988e51192bb2adc07e866ef5dbbe9dba6 Mon Sep 17 00:00:00 2001 From: Matan Eliyahu Date: Thu, 4 Aug 2022 09:17:54 +0300 Subject: [PATCH 19/63] Store public key in public_keys_2 section as part of rsa_sign command Description: Signing in 3S requires us to store public key in public_keys_2 section as part of rsa_sign in addition to storing it in public_keys_3. The reason is that public_keys_2 is set at set_public_keys command on FSS. Moving to sign in 3S requires to move keys from FSS to 3S, as a result FSS doesn't have the public key when executing set_public_keys command (it'll now hold only FRC key). Changes: 1. Store public key in public_keys_2 in rsa_sign command 2. Move new_key_and_signatures layouts to mlxfwops from tools_layouts Tested OS: Linux Tested devices: CX7 Tested flows: flint rsa_sign Known gaps (with RM ticket): N/A Issue: 3150876 Change-Id: I70bfc1c8dafd8721babf812f77bca846865bb02d Signed-off-by: Matan Eliyahu --- mlxfwops/lib/fs4_ops.cpp | 92 +++- mlxfwops/lib/fs4_ops.h | 5 +- tools_layouts/image_layout_layouts.c | 768 +++++++++++++++++---------- tools_layouts/image_layout_layouts.h | 328 ++++++++---- 4 files changed, 812 insertions(+), 381 deletions(-) diff --git a/mlxfwops/lib/fs4_ops.cpp b/mlxfwops/lib/fs4_ops.cpp index c473dc7f..095bb2e8 100644 --- a/mlxfwops/lib/fs4_ops.cpp +++ b/mlxfwops/lib/fs4_ops.cpp @@ -64,7 +64,6 @@ #include "fs4_ops.h" #include "fs3_ops.h" -#include "tools_layouts/image_layout_layouts.h" #define FS4_ENCRYPTED_LOG_CHUNK_SIZE 24 @@ -4584,6 +4583,89 @@ void Fs4Operations::PreparePublicKey(const vector& publicKeyData, TOCPUn(&publicKey.key, PublicKeySize >> 2); } +bool Fs4Operations::GetFreeSlotInPublicKeys2(fs4_toc_info* itocEntry, u_int32_t& idx) +{ + u_int32_t num_of_key_slots = image_layout_public_keys_2_size() / image_layout_file_public_keys_2_size(); + for (u_int32_t ii = 0; ii < num_of_key_slots; ii++) + { + u_int32_t key_start_offset = ii * image_layout_file_public_keys_2_size(); + u_int32_t key_end_offset = key_start_offset + image_layout_file_public_keys_2_size(); + if (all_of(itocEntry->section_data.begin() + key_start_offset, itocEntry->section_data.begin() + key_end_offset, + [](u_int8_t val) { return val == 0; })) + { + idx = ii; + DPRINTF(("free slot at index = %d\n", idx)); + return true; + } + } + return errmsg("GetFreeSlotInPublicKeys2 failed - No free slot for public key in FS3_PUBLIC_KEYS_4096\n"); +} + +bool Fs4Operations::IsPublicKeyAlreadyInPublicKeys2(const image_layout_file_public_keys_2& public_key, + fs4_toc_info* itocEntry) +{ + bool res = false; + u_int32_t num_of_key_slots = image_layout_public_keys_2_size() / image_layout_file_public_keys_2_size(); + for (u_int32_t ii = 0; ii < num_of_key_slots; ii++) + { + u_int32_t key_start_offset = ii * image_layout_file_public_keys_2_size(); + image_layout_file_public_keys_2 stored_public_key; + memset(&stored_public_key, 0, sizeof(stored_public_key)); + image_layout_file_public_keys_2_unpack(&stored_public_key, itocEntry->section_data.data() + key_start_offset); + + // Compare keys based on UUID + if (equal(begin(public_key.keypair_uuid), end(public_key.keypair_uuid), begin(stored_public_key.keypair_uuid))) + { + res = true; + break; + } + } + return res; +} + +bool Fs4Operations::StorePublicKeyInPublicKeys2(const image_layout_file_public_keys_3& public_key) +{ + // Find ITOC entry + fs4_toc_info* itocEntry = (fs4_toc_info*)NULL; + if (!Fs4GetItocInfo(_fs4ImgInfo.itocArr.tocArr, _fs4ImgInfo.itocArr.numOfTocs, FS3_PUBLIC_KEYS_4096, itocEntry)) + { + return errmsg("StorePublicKeyInPublicKeys2 failed - Error: %s", err()); + } + + // Convert public_keys_3 to public_keys_2 + image_layout_file_public_keys_2 public_key_2; + memset(&public_key_2, 0, sizeof(public_key_2)); + copy(begin(public_key.key), end(public_key.key), begin(public_key_2.key)); + copy(begin(public_key.keypair_uuid), end(public_key.keypair_uuid), begin(public_key_2.keypair_uuid)); + public_key_2.keypair_exp = public_key.keypair_exp; + public_key_2.component_authentication_configuration = public_key.component_authentication_configuration; + + if (IsPublicKeyAlreadyInPublicKeys2(public_key_2, itocEntry) == false) + { + // Get free slot for public key + u_int32_t public_keys_2_free_slot_idx = 0; + if (!GetFreeSlotInPublicKeys2(itocEntry, public_keys_2_free_slot_idx)) + { + return errmsg("StorePublicKeyInPublicKeys2 failed - Error: %s", err()); + } + + // Prepare public_keys_2 section data with public key at free slot index + image_layout_public_keys_2 public_keys_2; + memset(&public_keys_2, 0, sizeof(public_keys_2)); + image_layout_public_keys_2_unpack(&public_keys_2, itocEntry->section_data.data()); + public_keys_2.file_public_keys_2[public_keys_2_free_slot_idx] = public_key_2; + vector public_keys_2_data; + public_keys_2_data.resize(image_layout_public_keys_2_size()); + image_layout_public_keys_2_pack(&public_keys_2, public_keys_2_data.data()); + if (!UpdateSection(FS3_PUBLIC_KEYS_4096, public_keys_2_data, "PUBLIC KEYS 4096")) + { + return errmsg("StorePublicKeyInPublicKeys2 failed - Error: %s", err()); + } + } + + return true; +} + bool Fs4Operations::StorePublicKey(const char* public_key_file, const char* uuid) { image_layout_public_keys_3 public_keys_3; @@ -4593,11 +4675,15 @@ bool Fs4Operations::StorePublicKey(const char* public_key_file, const char* uuid return errmsg("StorePublicKey failed - Error: %s", err()); } + if (!StorePublicKeyInPublicKeys2(public_keys_3.file_public_keys_3[0])) + { + return errmsg("StorePublicKey failed - Error: %s", err()); + } + + //* Store public-key and uuid in section and update its matching ITOC entry (with updated section_crc and entry_crc) vector public_keys_3_data; public_keys_3_data.resize(image_layout_public_keys_3_size()); image_layout_public_keys_3_pack(&public_keys_3, public_keys_3_data.data()); - - //* Store public-key and uuid in section and update its matching ITOC entry (with updated section_crc and entry_crc) if (!UpdateSection(public_keys_3_data.data(), FS4_RSA_PUBLIC_KEY, true, CMD_BURN, NULL)) { return errmsg("StorePublicKey failed - Error: %s", err()); diff --git a/mlxfwops/lib/fs4_ops.h b/mlxfwops/lib/fs4_ops.h index d612842a..5b66d9eb 100644 --- a/mlxfwops/lib/fs4_ops.h +++ b/mlxfwops/lib/fs4_ops.h @@ -36,7 +36,6 @@ #include #include -#include #include #include "fw_ops.h" #include "fs3_ops.h" @@ -376,6 +375,10 @@ class Fs4Operations : public Fs3Operations virtual bool GetPublicKeyFromFile(const char* public_key_file, const char* uuid, image_layout_file_public_keys_3* public_key); + virtual bool GetFreeSlotInPublicKeys2(fs4_toc_info* itocEntry, u_int32_t& idx); + virtual bool IsPublicKeyAlreadyInPublicKeys2(const image_layout_file_public_keys_2& public_key, + fs4_toc_info* itocEntry); + virtual bool StorePublicKeyInPublicKeys2(const image_layout_file_public_keys_3& public_key); // Members Fs4ImgInfo _fs4ImgInfo; diff --git a/tools_layouts/image_layout_layouts.c b/tools_layouts/image_layout_layouts.c index cc55df60..42b56b5b 100644 --- a/tools_layouts/image_layout_layouts.c +++ b/tools_layouts/image_layout_layouts.c @@ -31,13 +31,48 @@ */ /*** - *** This file was generated at "2022-02-06 17:27:46" + *** This file was generated at "2022-08-02 16:49:25" *** by: *** > /mswg/release/tools/a-me/last_stable/adabe_plugins/adb2c/adb2pack.py --input adb/image_layout/image_layout.adb *--file-prefix image_layout --prefix image_layout_ --no-adb-utils ***/ #include "image_layout_layouts.h" +void image_layout_uint64_pack(const u_int64_t* ptr_struct, u_int8_t* ptr_buff) +{ + u_int32_t offset; + + offset = 0; + adb2c_push_integer_to_buff(ptr_buff, offset, 8, *ptr_struct); +} + +void image_layout_uint64_unpack(u_int64_t* ptr_struct, const u_int8_t* ptr_buff) +{ + u_int32_t offset; + + offset = 0; + *ptr_struct = adb2c_pop_integer_from_buff(ptr_buff, offset, 8); +} + +void image_layout_uint64_print(const u_int64_t* ptr_struct, FILE* fd, int indent_level) +{ + adb2c_add_indentation(fd, indent_level); + fprintf(fd, "======== image_layout_uint64 ========\n"); + + adb2c_add_indentation(fd, indent_level); + fprintf(fd, "uint64 : " U64H_FMT "\n", (u_int64_t)*ptr_struct); +} + +unsigned int image_layout_uint64_size(void) +{ + return IMAGE_LAYOUT_UINT64_SIZE; +} + +void image_layout_uint64_dump(const u_int64_t* ptr_struct, FILE* fd) +{ + image_layout_uint64_print(ptr_struct, fd, 0); +} + void image_layout_component_authentication_configuration_pack( const struct image_layout_component_authentication_configuration* ptr_struct, u_int8_t* ptr_buff) @@ -118,122 +153,6 @@ void image_layout_component_authentication_configuration_dump( image_layout_component_authentication_configuration_print(ptr_struct, fd, 0); } -void image_layout_file_public_keys_3_pack(const struct image_layout_file_public_keys_3* ptr_struct, u_int8_t* ptr_buff) -{ - u_int32_t offset; - int i; - - offset = 0; - adb2c_push_integer_to_buff(ptr_buff, offset, 4, (u_int32_t)ptr_struct->keypair_exp); - for (i = 0; i < 4; ++i) - { - offset = adb2c_calc_array_field_address(32, 32, i, 4352, 1); - adb2c_push_integer_to_buff(ptr_buff, offset, 4, (u_int32_t)ptr_struct->keypair_uuid[i]); - } - for (i = 0; i < 128; ++i) - { - offset = adb2c_calc_array_field_address(160, 32, i, 4352, 1); - adb2c_push_integer_to_buff(ptr_buff, offset, 4, (u_int32_t)ptr_struct->key[i]); - } - offset = 4256; - image_layout_component_authentication_configuration_pack(&(ptr_struct->component_authentication_configuration), - ptr_buff + offset / 8); -} - -void image_layout_file_public_keys_3_unpack(struct image_layout_file_public_keys_3* ptr_struct, - const u_int8_t* ptr_buff) -{ - u_int32_t offset; - int i; - - offset = 0; - ptr_struct->keypair_exp = (u_int32_t)adb2c_pop_integer_from_buff(ptr_buff, offset, 4); - for (i = 0; i < 4; ++i) - { - offset = adb2c_calc_array_field_address(32, 32, i, 4352, 1); - ptr_struct->keypair_uuid[i] = (u_int32_t)adb2c_pop_integer_from_buff(ptr_buff, offset, 4); - } - for (i = 0; i < 128; ++i) - { - offset = adb2c_calc_array_field_address(160, 32, i, 4352, 1); - ptr_struct->key[i] = (u_int32_t)adb2c_pop_integer_from_buff(ptr_buff, offset, 4); - } - offset = 4256; - image_layout_component_authentication_configuration_unpack(&(ptr_struct->component_authentication_configuration), - ptr_buff + offset / 8); -} - -void image_layout_file_public_keys_3_print(const struct image_layout_file_public_keys_3* ptr_struct, - FILE* fd, - int indent_level) -{ - int i; - - adb2c_add_indentation(fd, indent_level); - fprintf(fd, "======== image_layout_file_public_keys_3 ========\n"); - - adb2c_add_indentation(fd, indent_level); - fprintf(fd, "keypair_exp : " U32H_FMT "\n", ptr_struct->keypair_exp); - for (i = 0; i < 4; ++i) - { - adb2c_add_indentation(fd, indent_level); - fprintf(fd, "keypair_uuid_%03d : " U32H_FMT "\n", i, ptr_struct->keypair_uuid[i]); - } - for (i = 0; i < 128; ++i) - { - adb2c_add_indentation(fd, indent_level); - fprintf(fd, "key_%03d : " U32H_FMT "\n", i, ptr_struct->key[i]); - } - adb2c_add_indentation(fd, indent_level); - fprintf(fd, "component_authentication_configuration:\n"); - image_layout_component_authentication_configuration_print(&(ptr_struct->component_authentication_configuration), fd, - indent_level + 1); -} - -unsigned int image_layout_file_public_keys_3_size(void) -{ - return IMAGE_LAYOUT_FILE_PUBLIC_KEYS_3_SIZE; -} - -void image_layout_file_public_keys_3_dump(const struct image_layout_file_public_keys_3* ptr_struct, FILE* fd) -{ - image_layout_file_public_keys_3_print(ptr_struct, fd, 0); -} -void image_layout_uint64_pack(const u_int64_t* ptr_struct, u_int8_t* ptr_buff) -{ - u_int32_t offset; - - offset = 0; - adb2c_push_integer_to_buff(ptr_buff, offset, 8, *ptr_struct); -} - -void image_layout_uint64_unpack(u_int64_t* ptr_struct, const u_int8_t* ptr_buff) -{ - u_int32_t offset; - - offset = 0; - *ptr_struct = adb2c_pop_integer_from_buff(ptr_buff, offset, 8); -} - -void image_layout_uint64_print(const u_int64_t* ptr_struct, FILE* fd, int indent_level) -{ - adb2c_add_indentation(fd, indent_level); - fprintf(fd, "======== image_layout_uint64 ========\n"); - - adb2c_add_indentation(fd, indent_level); - fprintf(fd, "uint64 : " U64H_FMT "\n", (u_int64_t)*ptr_struct); -} - -unsigned int image_layout_uint64_size(void) -{ - return IMAGE_LAYOUT_UINT64_SIZE; -} - -void image_layout_uint64_dump(const u_int64_t* ptr_struct, FILE* fd) -{ - image_layout_uint64_print(ptr_struct, fd, 0); -} - void image_layout_htoc_entry_pack(const struct image_layout_htoc_entry* ptr_struct, u_int8_t* ptr_buff) { u_int32_t offset; @@ -375,55 +294,6 @@ void image_layout_module_version_dump(const struct image_layout_module_version* image_layout_module_version_print(ptr_struct, fd, 0); } -void image_layout_public_keys_3_pack(const struct image_layout_public_keys_3* ptr_struct, u_int8_t* ptr_buff) -{ - u_int32_t offset; - int i; - - for (i = 0; i < 8; ++i) - { - offset = adb2c_calc_array_field_address(0, 4352, i, 34816, 1); - image_layout_file_public_keys_3_pack(&(ptr_struct->file_public_keys_3[i]), ptr_buff + offset / 8); - } -} - -void image_layout_public_keys_3_unpack(struct image_layout_public_keys_3* ptr_struct, const u_int8_t* ptr_buff) -{ - u_int32_t offset; - int i; - - for (i = 0; i < 8; ++i) - { - offset = adb2c_calc_array_field_address(0, 4352, i, 34816, 1); - image_layout_file_public_keys_3_unpack(&(ptr_struct->file_public_keys_3[i]), ptr_buff + offset / 8); - } -} - -void image_layout_public_keys_3_print(const struct image_layout_public_keys_3* ptr_struct, FILE* fd, int indent_level) -{ - int i; - - adb2c_add_indentation(fd, indent_level); - fprintf(fd, "======== image_layout_public_keys_3 ========\n"); - - for (i = 0; i < 8; ++i) - { - adb2c_add_indentation(fd, indent_level); - fprintf(fd, "file_public_keys_3_%03d:\n", i); - image_layout_file_public_keys_3_print(&(ptr_struct->file_public_keys_3[i]), fd, indent_level + 1); - } -} - -unsigned int image_layout_public_keys_3_size(void) -{ - return IMAGE_LAYOUT_PUBLIC_KEYS_3_SIZE; -} - -void image_layout_public_keys_3_dump(const struct image_layout_public_keys_3* ptr_struct, FILE* fd) -{ - image_layout_public_keys_3_print(ptr_struct, fd, 0); -} - void image_layout_reset_capabilities_pack(const struct image_layout_reset_capabilities* ptr_struct, u_int8_t* ptr_buff) { u_int32_t offset; @@ -515,88 +385,6 @@ void image_layout_reset_version_dump(const struct image_layout_reset_version* pt image_layout_reset_version_print(ptr_struct, fd, 0); } -void image_layout_secure_boot_signatures_pack(const struct image_layout_secure_boot_signatures* ptr_struct, - u_int8_t* ptr_buff) -{ - u_int32_t offset; - int i; - - for (i = 0; i < 128; ++i) - { - offset = adb2c_calc_array_field_address(0, 32, i, 12288, 1); - adb2c_push_integer_to_buff(ptr_buff, offset, 4, (u_int32_t)ptr_struct->boot_signature[i]); - } - for (i = 0; i < 128; ++i) - { - offset = adb2c_calc_array_field_address(4096, 32, i, 12288, 1); - adb2c_push_integer_to_buff(ptr_buff, offset, 4, (u_int32_t)ptr_struct->critical_signature[i]); - } - for (i = 0; i < 128; ++i) - { - offset = adb2c_calc_array_field_address(8192, 32, i, 12288, 1); - adb2c_push_integer_to_buff(ptr_buff, offset, 4, (u_int32_t)ptr_struct->non_critical_signature[i]); - } -} - -void image_layout_secure_boot_signatures_unpack(struct image_layout_secure_boot_signatures* ptr_struct, - const u_int8_t* ptr_buff) -{ - u_int32_t offset; - int i; - - for (i = 0; i < 128; ++i) - { - offset = adb2c_calc_array_field_address(0, 32, i, 12288, 1); - ptr_struct->boot_signature[i] = (u_int32_t)adb2c_pop_integer_from_buff(ptr_buff, offset, 4); - } - for (i = 0; i < 128; ++i) - { - offset = adb2c_calc_array_field_address(4096, 32, i, 12288, 1); - ptr_struct->critical_signature[i] = (u_int32_t)adb2c_pop_integer_from_buff(ptr_buff, offset, 4); - } - for (i = 0; i < 128; ++i) - { - offset = adb2c_calc_array_field_address(8192, 32, i, 12288, 1); - ptr_struct->non_critical_signature[i] = (u_int32_t)adb2c_pop_integer_from_buff(ptr_buff, offset, 4); - } -} - -void image_layout_secure_boot_signatures_print(const struct image_layout_secure_boot_signatures* ptr_struct, - FILE* fd, - int indent_level) -{ - int i; - - adb2c_add_indentation(fd, indent_level); - fprintf(fd, "======== image_layout_secure_boot_signatures ========\n"); - - for (i = 0; i < 128; ++i) - { - adb2c_add_indentation(fd, indent_level); - fprintf(fd, "boot_signature_%03d : " U32H_FMT "\n", i, ptr_struct->boot_signature[i]); - } - for (i = 0; i < 128; ++i) - { - adb2c_add_indentation(fd, indent_level); - fprintf(fd, "critical_signature_%03d : " U32H_FMT "\n", i, ptr_struct->critical_signature[i]); - } - for (i = 0; i < 128; ++i) - { - adb2c_add_indentation(fd, indent_level); - fprintf(fd, "non_critical_signature_%03d : " U32H_FMT "\n", i, ptr_struct->non_critical_signature[i]); - } -} - -unsigned int image_layout_secure_boot_signatures_size(void) -{ - return IMAGE_LAYOUT_SECURE_BOOT_SIGNATURES_SIZE; -} - -void image_layout_secure_boot_signatures_dump(const struct image_layout_secure_boot_signatures* ptr_struct, FILE* fd) -{ - image_layout_secure_boot_signatures_print(ptr_struct, fd, 0); -} - void image_layout_uid_entry_pack(const struct image_layout_uid_entry* ptr_struct, u_int8_t* ptr_buff) { u_int32_t offset; @@ -768,12 +556,176 @@ void image_layout_TRIPPLE_VERSION_print(const struct image_layout_TRIPPLE_VERSIO unsigned int image_layout_TRIPPLE_VERSION_size(void) { - return IMAGE_LAYOUT_TRIPPLE_VERSION_SIZE; + return IMAGE_LAYOUT_TRIPPLE_VERSION_SIZE; +} + +void image_layout_TRIPPLE_VERSION_dump(const struct image_layout_TRIPPLE_VERSION* ptr_struct, FILE* fd) +{ + image_layout_TRIPPLE_VERSION_print(ptr_struct, fd, 0); +} + +void image_layout_file_public_keys_2_pack(const struct image_layout_file_public_keys_2* ptr_struct, u_int8_t* ptr_buff) +{ + u_int32_t offset; + int i; + + offset = 0; + image_layout_component_authentication_configuration_pack(&(ptr_struct->component_authentication_configuration), + ptr_buff + offset / 8); + offset = 96; + adb2c_push_integer_to_buff(ptr_buff, offset, 4, (u_int32_t)ptr_struct->keypair_exp); + for (i = 0; i < 4; ++i) + { + offset = adb2c_calc_array_field_address(128, 32, i, 4352, 1); + adb2c_push_integer_to_buff(ptr_buff, offset, 4, (u_int32_t)ptr_struct->keypair_uuid[i]); + } + for (i = 0; i < 128; ++i) + { + offset = adb2c_calc_array_field_address(256, 32, i, 4352, 1); + adb2c_push_integer_to_buff(ptr_buff, offset, 4, (u_int32_t)ptr_struct->key[i]); + } +} + +void image_layout_file_public_keys_2_unpack(struct image_layout_file_public_keys_2* ptr_struct, + const u_int8_t* ptr_buff) +{ + u_int32_t offset; + int i; + + offset = 0; + image_layout_component_authentication_configuration_unpack(&(ptr_struct->component_authentication_configuration), + ptr_buff + offset / 8); + offset = 96; + ptr_struct->keypair_exp = (u_int32_t)adb2c_pop_integer_from_buff(ptr_buff, offset, 4); + for (i = 0; i < 4; ++i) + { + offset = adb2c_calc_array_field_address(128, 32, i, 4352, 1); + ptr_struct->keypair_uuid[i] = (u_int32_t)adb2c_pop_integer_from_buff(ptr_buff, offset, 4); + } + for (i = 0; i < 128; ++i) + { + offset = adb2c_calc_array_field_address(256, 32, i, 4352, 1); + ptr_struct->key[i] = (u_int32_t)adb2c_pop_integer_from_buff(ptr_buff, offset, 4); + } +} + +void image_layout_file_public_keys_2_print(const struct image_layout_file_public_keys_2* ptr_struct, + FILE* fd, + int indent_level) +{ + int i; + + adb2c_add_indentation(fd, indent_level); + fprintf(fd, "======== image_layout_file_public_keys_2 ========\n"); + + adb2c_add_indentation(fd, indent_level); + fprintf(fd, "component_authentication_configuration:\n"); + image_layout_component_authentication_configuration_print(&(ptr_struct->component_authentication_configuration), fd, + indent_level + 1); + adb2c_add_indentation(fd, indent_level); + fprintf(fd, "keypair_exp : " U32H_FMT "\n", ptr_struct->keypair_exp); + for (i = 0; i < 4; ++i) + { + adb2c_add_indentation(fd, indent_level); + fprintf(fd, "keypair_uuid_%03d : " U32H_FMT "\n", i, ptr_struct->keypair_uuid[i]); + } + for (i = 0; i < 128; ++i) + { + adb2c_add_indentation(fd, indent_level); + fprintf(fd, "key_%03d : " U32H_FMT "\n", i, ptr_struct->key[i]); + } +} + +unsigned int image_layout_file_public_keys_2_size(void) +{ + return IMAGE_LAYOUT_FILE_PUBLIC_KEYS_2_SIZE; +} + +void image_layout_file_public_keys_2_dump(const struct image_layout_file_public_keys_2* ptr_struct, FILE* fd) +{ + image_layout_file_public_keys_2_print(ptr_struct, fd, 0); +} + +void image_layout_file_public_keys_3_pack(const struct image_layout_file_public_keys_3* ptr_struct, u_int8_t* ptr_buff) +{ + u_int32_t offset; + int i; + + offset = 0; + adb2c_push_integer_to_buff(ptr_buff, offset, 4, (u_int32_t)ptr_struct->keypair_exp); + for (i = 0; i < 4; ++i) + { + offset = adb2c_calc_array_field_address(32, 32, i, 4352, 1); + adb2c_push_integer_to_buff(ptr_buff, offset, 4, (u_int32_t)ptr_struct->keypair_uuid[i]); + } + for (i = 0; i < 128; ++i) + { + offset = adb2c_calc_array_field_address(160, 32, i, 4352, 1); + adb2c_push_integer_to_buff(ptr_buff, offset, 4, (u_int32_t)ptr_struct->key[i]); + } + offset = 4256; + image_layout_component_authentication_configuration_pack(&(ptr_struct->component_authentication_configuration), + ptr_buff + offset / 8); +} + +void image_layout_file_public_keys_3_unpack(struct image_layout_file_public_keys_3* ptr_struct, + const u_int8_t* ptr_buff) +{ + u_int32_t offset; + int i; + + offset = 0; + ptr_struct->keypair_exp = (u_int32_t)adb2c_pop_integer_from_buff(ptr_buff, offset, 4); + for (i = 0; i < 4; ++i) + { + offset = adb2c_calc_array_field_address(32, 32, i, 4352, 1); + ptr_struct->keypair_uuid[i] = (u_int32_t)adb2c_pop_integer_from_buff(ptr_buff, offset, 4); + } + for (i = 0; i < 128; ++i) + { + offset = adb2c_calc_array_field_address(160, 32, i, 4352, 1); + ptr_struct->key[i] = (u_int32_t)adb2c_pop_integer_from_buff(ptr_buff, offset, 4); + } + offset = 4256; + image_layout_component_authentication_configuration_unpack(&(ptr_struct->component_authentication_configuration), + ptr_buff + offset / 8); +} + +void image_layout_file_public_keys_3_print(const struct image_layout_file_public_keys_3* ptr_struct, + FILE* fd, + int indent_level) +{ + int i; + + adb2c_add_indentation(fd, indent_level); + fprintf(fd, "======== image_layout_file_public_keys_3 ========\n"); + + adb2c_add_indentation(fd, indent_level); + fprintf(fd, "keypair_exp : " U32H_FMT "\n", ptr_struct->keypair_exp); + for (i = 0; i < 4; ++i) + { + adb2c_add_indentation(fd, indent_level); + fprintf(fd, "keypair_uuid_%03d : " U32H_FMT "\n", i, ptr_struct->keypair_uuid[i]); + } + for (i = 0; i < 128; ++i) + { + adb2c_add_indentation(fd, indent_level); + fprintf(fd, "key_%03d : " U32H_FMT "\n", i, ptr_struct->key[i]); + } + adb2c_add_indentation(fd, indent_level); + fprintf(fd, "component_authentication_configuration:\n"); + image_layout_component_authentication_configuration_print(&(ptr_struct->component_authentication_configuration), fd, + indent_level + 1); +} + +unsigned int image_layout_file_public_keys_3_size(void) +{ + return IMAGE_LAYOUT_FILE_PUBLIC_KEYS_3_SIZE; } -void image_layout_TRIPPLE_VERSION_dump(const struct image_layout_TRIPPLE_VERSION* ptr_struct, FILE* fd) +void image_layout_file_public_keys_3_dump(const struct image_layout_file_public_keys_3* ptr_struct, FILE* fd) { - image_layout_TRIPPLE_VERSION_print(ptr_struct, fd, 0); + image_layout_file_public_keys_3_print(ptr_struct, fd, 0); } void image_layout_guids_pack(const struct image_layout_guids* ptr_struct, u_int8_t* ptr_buff) @@ -1503,7 +1455,7 @@ void image_layout_hw_pointers_carmel_pack(const struct image_layout_hw_pointers_ offset = 640; image_layout_hw_pointer_entry_pack(&(ptr_struct->image_info_section_pointer), ptr_buff + offset / 8); offset = 704; - image_layout_hw_pointer_entry_pack(&(ptr_struct->hmac_end_pointer), ptr_buff + offset / 8); + image_layout_hw_pointer_entry_pack(&(ptr_struct->image_signature_pointer), ptr_buff + offset / 8); offset = 768; image_layout_hw_pointer_entry_pack(&(ptr_struct->public_key_pointer), ptr_buff + offset / 8); offset = 832; @@ -1542,7 +1494,7 @@ void image_layout_hw_pointers_carmel_unpack(struct image_layout_hw_pointers_carm offset = 640; image_layout_hw_pointer_entry_unpack(&(ptr_struct->image_info_section_pointer), ptr_buff + offset / 8); offset = 704; - image_layout_hw_pointer_entry_unpack(&(ptr_struct->hmac_end_pointer), ptr_buff + offset / 8); + image_layout_hw_pointer_entry_unpack(&(ptr_struct->image_signature_pointer), ptr_buff + offset / 8); offset = 768; image_layout_hw_pointer_entry_unpack(&(ptr_struct->public_key_pointer), ptr_buff + offset / 8); offset = 832; @@ -1594,8 +1546,8 @@ void image_layout_hw_pointers_carmel_print(const struct image_layout_hw_pointers fprintf(fd, "image_info_section_pointer:\n"); image_layout_hw_pointer_entry_print(&(ptr_struct->image_info_section_pointer), fd, indent_level + 1); adb2c_add_indentation(fd, indent_level); - fprintf(fd, "hmac_end_pointer:\n"); - image_layout_hw_pointer_entry_print(&(ptr_struct->hmac_end_pointer), fd, indent_level + 1); + fprintf(fd, "image_signature_pointer:\n"); + image_layout_hw_pointer_entry_print(&(ptr_struct->image_signature_pointer), fd, indent_level + 1); adb2c_add_indentation(fd, indent_level); fprintf(fd, "public_key_pointer:\n"); image_layout_hw_pointer_entry_print(&(ptr_struct->public_key_pointer), fd, indent_level + 1); @@ -1625,6 +1577,8 @@ void image_layout_image_info_pack(const struct image_layout_image_info* ptr_stru u_int32_t offset; int i; + offset = 30; + adb2c_push_bits_to_buff(ptr_buff, offset, 1, (u_int32_t)ptr_struct->toc_header_duplication); offset = 29; adb2c_push_bits_to_buff(ptr_buff, offset, 1, (u_int32_t)ptr_struct->secure_boot); offset = 27; @@ -1683,6 +1637,8 @@ void image_layout_image_info_pack(const struct image_layout_image_info* ptr_stru image_layout_image_size_pack(&(ptr_struct->image_size), ptr_buff + offset / 8); offset = 2200; adb2c_push_bits_to_buff(ptr_buff, offset, 8, (u_int32_t)ptr_struct->synced_reset_downtime); + offset = 2176; + adb2c_push_bits_to_buff(ptr_buff, offset, 16, (u_int32_t)ptr_struct->toc_copy_ofst); for (i = 0; i < 4; ++i) { offset = adb2c_calc_array_field_address(2240, 32, i, 8192, 1); @@ -1723,6 +1679,8 @@ void image_layout_image_info_unpack(struct image_layout_image_info* ptr_struct, u_int32_t offset; int i; + offset = 30; + ptr_struct->toc_header_duplication = (u_int8_t)adb2c_pop_bits_from_buff(ptr_buff, offset, 1); offset = 29; ptr_struct->secure_boot = (u_int8_t)adb2c_pop_bits_from_buff(ptr_buff, offset, 1); offset = 27; @@ -1783,6 +1741,8 @@ void image_layout_image_info_unpack(struct image_layout_image_info* ptr_struct, image_layout_image_size_unpack(&(ptr_struct->image_size), ptr_buff + offset / 8); offset = 2200; ptr_struct->synced_reset_downtime = (u_int8_t)adb2c_pop_bits_from_buff(ptr_buff, offset, 8); + offset = 2176; + ptr_struct->toc_copy_ofst = (u_int16_t)adb2c_pop_bits_from_buff(ptr_buff, offset, 16); for (i = 0; i < 4; ++i) { offset = adb2c_calc_array_field_address(2240, 32, i, 8192, 1); @@ -1829,6 +1789,8 @@ void image_layout_image_info_print(const struct image_layout_image_info* ptr_str adb2c_add_indentation(fd, indent_level); fprintf(fd, "======== image_layout_image_info ========\n"); + adb2c_add_indentation(fd, indent_level); + fprintf(fd, "toc_header_duplication : " UH_FMT "\n", ptr_struct->toc_header_duplication); adb2c_add_indentation(fd, indent_level); fprintf(fd, "secure_boot : " UH_FMT "\n", ptr_struct->secure_boot); adb2c_add_indentation(fd, indent_level); @@ -1882,6 +1844,8 @@ void image_layout_image_info_print(const struct image_layout_image_info* ptr_str image_layout_image_size_print(&(ptr_struct->image_size), fd, indent_level + 1); adb2c_add_indentation(fd, indent_level); fprintf(fd, "synced_reset_downtime : " UH_FMT "\n", ptr_struct->synced_reset_downtime); + adb2c_add_indentation(fd, indent_level); + fprintf(fd, "toc_copy_ofst : " UH_FMT "\n", ptr_struct->toc_copy_ofst); for (i = 0; i < 4; ++i) { adb2c_add_indentation(fd, indent_level); @@ -1913,6 +1877,86 @@ void image_layout_image_info_dump(const struct image_layout_image_info* ptr_stru image_layout_image_info_print(ptr_struct, fd, 0); } +void image_layout_image_signature_2_pack(const struct image_layout_image_signature_2* ptr_struct, u_int8_t* ptr_buff) +{ + u_int32_t offset; + int i; + + for (i = 0; i < 4; ++i) + { + offset = adb2c_calc_array_field_address(0, 32, i, 4608, 1); + adb2c_push_integer_to_buff(ptr_buff, offset, 4, (u_int32_t)ptr_struct->signature_uuid[i]); + } + for (i = 0; i < 4; ++i) + { + offset = adb2c_calc_array_field_address(128, 32, i, 4608, 1); + adb2c_push_integer_to_buff(ptr_buff, offset, 4, (u_int32_t)ptr_struct->keypair_uuid[i]); + } + for (i = 0; i < 128; ++i) + { + offset = adb2c_calc_array_field_address(256, 32, i, 4608, 1); + adb2c_push_integer_to_buff(ptr_buff, offset, 4, (u_int32_t)ptr_struct->signature[i]); + } +} + +void image_layout_image_signature_2_unpack(struct image_layout_image_signature_2* ptr_struct, const u_int8_t* ptr_buff) +{ + u_int32_t offset; + int i; + + for (i = 0; i < 4; ++i) + { + offset = adb2c_calc_array_field_address(0, 32, i, 4608, 1); + ptr_struct->signature_uuid[i] = (u_int32_t)adb2c_pop_integer_from_buff(ptr_buff, offset, 4); + } + for (i = 0; i < 4; ++i) + { + offset = adb2c_calc_array_field_address(128, 32, i, 4608, 1); + ptr_struct->keypair_uuid[i] = (u_int32_t)adb2c_pop_integer_from_buff(ptr_buff, offset, 4); + } + for (i = 0; i < 128; ++i) + { + offset = adb2c_calc_array_field_address(256, 32, i, 4608, 1); + ptr_struct->signature[i] = (u_int32_t)adb2c_pop_integer_from_buff(ptr_buff, offset, 4); + } +} + +void image_layout_image_signature_2_print(const struct image_layout_image_signature_2* ptr_struct, + FILE* fd, + int indent_level) +{ + int i; + + adb2c_add_indentation(fd, indent_level); + fprintf(fd, "======== image_layout_image_signature_2 ========\n"); + + for (i = 0; i < 4; ++i) + { + adb2c_add_indentation(fd, indent_level); + fprintf(fd, "signature_uuid_%03d : " U32H_FMT "\n", i, ptr_struct->signature_uuid[i]); + } + for (i = 0; i < 4; ++i) + { + adb2c_add_indentation(fd, indent_level); + fprintf(fd, "keypair_uuid_%03d : " U32H_FMT "\n", i, ptr_struct->keypair_uuid[i]); + } + for (i = 0; i < 128; ++i) + { + adb2c_add_indentation(fd, indent_level); + fprintf(fd, "signature_%03d : " U32H_FMT "\n", i, ptr_struct->signature[i]); + } +} + +unsigned int image_layout_image_signature_2_size(void) +{ + return IMAGE_LAYOUT_IMAGE_SIGNATURE_2_SIZE; +} + +void image_layout_image_signature_2_dump(const struct image_layout_image_signature_2* ptr_struct, FILE* fd) +{ + image_layout_image_signature_2_print(ptr_struct, fd, 0); +} + void image_layout_itoc_entry_pack(const struct image_layout_itoc_entry* ptr_struct, u_int8_t* ptr_buff) { u_int32_t offset; @@ -2091,6 +2135,186 @@ void image_layout_itoc_header_dump(const struct image_layout_itoc_header* ptr_st image_layout_itoc_header_print(ptr_struct, fd, 0); } +void image_layout_public_keys_2_pack(const struct image_layout_public_keys_2* ptr_struct, u_int8_t* ptr_buff) +{ + u_int32_t offset; + int i; + + for (i = 0; i < 8; ++i) + { + offset = adb2c_calc_array_field_address(0, 4352, i, 34816, 1); + image_layout_file_public_keys_2_pack(&(ptr_struct->file_public_keys_2[i]), ptr_buff + offset / 8); + } +} + +void image_layout_public_keys_2_unpack(struct image_layout_public_keys_2* ptr_struct, const u_int8_t* ptr_buff) +{ + u_int32_t offset; + int i; + + for (i = 0; i < 8; ++i) + { + offset = adb2c_calc_array_field_address(0, 4352, i, 34816, 1); + image_layout_file_public_keys_2_unpack(&(ptr_struct->file_public_keys_2[i]), ptr_buff + offset / 8); + } +} + +void image_layout_public_keys_2_print(const struct image_layout_public_keys_2* ptr_struct, FILE* fd, int indent_level) +{ + int i; + + adb2c_add_indentation(fd, indent_level); + fprintf(fd, "======== image_layout_public_keys_2 ========\n"); + + for (i = 0; i < 8; ++i) + { + adb2c_add_indentation(fd, indent_level); + fprintf(fd, "file_public_keys_2_%03d:\n", i); + image_layout_file_public_keys_2_print(&(ptr_struct->file_public_keys_2[i]), fd, indent_level + 1); + } +} + +unsigned int image_layout_public_keys_2_size(void) +{ + return IMAGE_LAYOUT_PUBLIC_KEYS_2_SIZE; +} + +void image_layout_public_keys_2_dump(const struct image_layout_public_keys_2* ptr_struct, FILE* fd) +{ + image_layout_public_keys_2_print(ptr_struct, fd, 0); +} + +void image_layout_public_keys_3_pack(const struct image_layout_public_keys_3* ptr_struct, u_int8_t* ptr_buff) +{ + u_int32_t offset; + int i; + + for (i = 0; i < 8; ++i) + { + offset = adb2c_calc_array_field_address(0, 4352, i, 34816, 1); + image_layout_file_public_keys_3_pack(&(ptr_struct->file_public_keys_3[i]), ptr_buff + offset / 8); + } +} + +void image_layout_public_keys_3_unpack(struct image_layout_public_keys_3* ptr_struct, const u_int8_t* ptr_buff) +{ + u_int32_t offset; + int i; + + for (i = 0; i < 8; ++i) + { + offset = adb2c_calc_array_field_address(0, 4352, i, 34816, 1); + image_layout_file_public_keys_3_unpack(&(ptr_struct->file_public_keys_3[i]), ptr_buff + offset / 8); + } +} + +void image_layout_public_keys_3_print(const struct image_layout_public_keys_3* ptr_struct, FILE* fd, int indent_level) +{ + int i; + + adb2c_add_indentation(fd, indent_level); + fprintf(fd, "======== image_layout_public_keys_3 ========\n"); + + for (i = 0; i < 8; ++i) + { + adb2c_add_indentation(fd, indent_level); + fprintf(fd, "file_public_keys_3_%03d:\n", i); + image_layout_file_public_keys_3_print(&(ptr_struct->file_public_keys_3[i]), fd, indent_level + 1); + } +} + +unsigned int image_layout_public_keys_3_size(void) +{ + return IMAGE_LAYOUT_PUBLIC_KEYS_3_SIZE; +} + +void image_layout_public_keys_3_dump(const struct image_layout_public_keys_3* ptr_struct, FILE* fd) +{ + image_layout_public_keys_3_print(ptr_struct, fd, 0); +} + +void image_layout_secure_boot_signatures_pack(const struct image_layout_secure_boot_signatures* ptr_struct, + u_int8_t* ptr_buff) +{ + u_int32_t offset; + int i; + + for (i = 0; i < 128; ++i) + { + offset = adb2c_calc_array_field_address(0, 32, i, 12288, 1); + adb2c_push_integer_to_buff(ptr_buff, offset, 4, (u_int32_t)ptr_struct->boot_signature[i]); + } + for (i = 0; i < 128; ++i) + { + offset = adb2c_calc_array_field_address(4096, 32, i, 12288, 1); + adb2c_push_integer_to_buff(ptr_buff, offset, 4, (u_int32_t)ptr_struct->critical_signature[i]); + } + for (i = 0; i < 128; ++i) + { + offset = adb2c_calc_array_field_address(8192, 32, i, 12288, 1); + adb2c_push_integer_to_buff(ptr_buff, offset, 4, (u_int32_t)ptr_struct->non_critical_signature[i]); + } +} + +void image_layout_secure_boot_signatures_unpack(struct image_layout_secure_boot_signatures* ptr_struct, + const u_int8_t* ptr_buff) +{ + u_int32_t offset; + int i; + + for (i = 0; i < 128; ++i) + { + offset = adb2c_calc_array_field_address(0, 32, i, 12288, 1); + ptr_struct->boot_signature[i] = (u_int32_t)adb2c_pop_integer_from_buff(ptr_buff, offset, 4); + } + for (i = 0; i < 128; ++i) + { + offset = adb2c_calc_array_field_address(4096, 32, i, 12288, 1); + ptr_struct->critical_signature[i] = (u_int32_t)adb2c_pop_integer_from_buff(ptr_buff, offset, 4); + } + for (i = 0; i < 128; ++i) + { + offset = adb2c_calc_array_field_address(8192, 32, i, 12288, 1); + ptr_struct->non_critical_signature[i] = (u_int32_t)adb2c_pop_integer_from_buff(ptr_buff, offset, 4); + } +} + +void image_layout_secure_boot_signatures_print(const struct image_layout_secure_boot_signatures* ptr_struct, + FILE* fd, + int indent_level) +{ + int i; + + adb2c_add_indentation(fd, indent_level); + fprintf(fd, "======== image_layout_secure_boot_signatures ========\n"); + + for (i = 0; i < 128; ++i) + { + adb2c_add_indentation(fd, indent_level); + fprintf(fd, "boot_signature_%03d : " U32H_FMT "\n", i, ptr_struct->boot_signature[i]); + } + for (i = 0; i < 128; ++i) + { + adb2c_add_indentation(fd, indent_level); + fprintf(fd, "critical_signature_%03d : " U32H_FMT "\n", i, ptr_struct->critical_signature[i]); + } + for (i = 0; i < 128; ++i) + { + adb2c_add_indentation(fd, indent_level); + fprintf(fd, "non_critical_signature_%03d : " U32H_FMT "\n", i, ptr_struct->non_critical_signature[i]); + } +} + +unsigned int image_layout_secure_boot_signatures_size(void) +{ + return IMAGE_LAYOUT_SECURE_BOOT_SIGNATURES_SIZE; +} + +void image_layout_secure_boot_signatures_dump(const struct image_layout_secure_boot_signatures* ptr_struct, FILE* fd) +{ + image_layout_secure_boot_signatures_print(ptr_struct, fd, 0); +} + void image_layout_tools_area_pack(const struct image_layout_tools_area* ptr_struct, u_int8_t* ptr_buff) { u_int32_t offset; @@ -2158,12 +2382,12 @@ void image_layout_tools_area_dump(const struct image_layout_tools_area* ptr_stru void image_layout_image_layout_Nodes_pack(const union image_layout_image_layout_Nodes* ptr_struct, u_int8_t* ptr_buff) { - image_layout_hashes_table_pack(&(ptr_struct->hashes_table), ptr_buff); + image_layout_public_keys_3_pack(&(ptr_struct->public_keys_3), ptr_buff); } void image_layout_image_layout_Nodes_unpack(union image_layout_image_layout_Nodes* ptr_struct, const u_int8_t* ptr_buff) { - image_layout_hashes_table_unpack(&(ptr_struct->hashes_table), ptr_buff); + image_layout_public_keys_3_unpack(&(ptr_struct->public_keys_3), ptr_buff); } void image_layout_image_layout_Nodes_print(const union image_layout_image_layout_Nodes* ptr_struct, @@ -2174,26 +2398,38 @@ void image_layout_image_layout_Nodes_print(const union image_layout_image_layout fprintf(fd, "======== image_layout_image_layout_Nodes ========\n"); adb2c_add_indentation(fd, indent_level); - fprintf(fd, "tools_area:\n"); - image_layout_tools_area_print(&(ptr_struct->tools_area), fd, indent_level + 1); + fprintf(fd, "device_info:\n"); + image_layout_device_info_print(&(ptr_struct->device_info), fd, indent_level + 1); + adb2c_add_indentation(fd, indent_level); + fprintf(fd, "public_keys_3:\n"); + image_layout_public_keys_3_print(&(ptr_struct->public_keys_3), fd, indent_level + 1); + adb2c_add_indentation(fd, indent_level); + fprintf(fd, "public_keys_2:\n"); + image_layout_public_keys_2_print(&(ptr_struct->public_keys_2), fd, indent_level + 1); adb2c_add_indentation(fd, indent_level); fprintf(fd, "itoc_entry:\n"); image_layout_itoc_entry_print(&(ptr_struct->itoc_entry), fd, indent_level + 1); adb2c_add_indentation(fd, indent_level); - fprintf(fd, "hashes_table:\n"); - image_layout_hashes_table_print(&(ptr_struct->hashes_table), fd, indent_level + 1); - adb2c_add_indentation(fd, indent_level); fprintf(fd, "image_info:\n"); image_layout_image_info_print(&(ptr_struct->image_info), fd, indent_level + 1); adb2c_add_indentation(fd, indent_level); - fprintf(fd, "hw_pointers_carmel:\n"); - image_layout_hw_pointers_carmel_print(&(ptr_struct->hw_pointers_carmel), fd, indent_level + 1); + fprintf(fd, "hashes_table:\n"); + image_layout_hashes_table_print(&(ptr_struct->hashes_table), fd, indent_level + 1); adb2c_add_indentation(fd, indent_level); fprintf(fd, "itoc_header:\n"); image_layout_itoc_header_print(&(ptr_struct->itoc_header), fd, indent_level + 1); adb2c_add_indentation(fd, indent_level); - fprintf(fd, "device_info:\n"); - image_layout_device_info_print(&(ptr_struct->device_info), fd, indent_level + 1); + fprintf(fd, "secure_boot_signatures:\n"); + image_layout_secure_boot_signatures_print(&(ptr_struct->secure_boot_signatures), fd, indent_level + 1); + adb2c_add_indentation(fd, indent_level); + fprintf(fd, "image_signature_2:\n"); + image_layout_image_signature_2_print(&(ptr_struct->image_signature_2), fd, indent_level + 1); + adb2c_add_indentation(fd, indent_level); + fprintf(fd, "hw_pointers_carmel:\n"); + image_layout_hw_pointers_carmel_print(&(ptr_struct->hw_pointers_carmel), fd, indent_level + 1); + adb2c_add_indentation(fd, indent_level); + fprintf(fd, "tools_area:\n"); + image_layout_tools_area_print(&(ptr_struct->tools_area), fd, indent_level + 1); } unsigned int image_layout_image_layout_Nodes_size(void) diff --git a/tools_layouts/image_layout_layouts.h b/tools_layouts/image_layout_layouts.h index 188185e5..27cbcf26 100644 --- a/tools_layouts/image_layout_layouts.h +++ b/tools_layouts/image_layout_layouts.h @@ -31,7 +31,7 @@ */ /*** - *** This file was generated at "2022-02-06 17:27:46" + *** This file was generated at "2022-08-02 16:49:25" *** by: *** > /mswg/release/tools/a-me/last_stable/adabe_plugins/adb2c/adb2pack.py --input adb/image_layout/image_layout.adb *--file-prefix image_layout --prefix image_layout_ --no-adb-utils @@ -45,6 +45,16 @@ extern "C" #endif #include "adb_to_c_utils.h" + /* Description - */ + /* Size in bytes - 8 */ + struct image_layout_uint64 + { + /*---------------- DWORD[0] (Offset 0x0) ----------------*/ + /* Description - */ + /* 0x0.0 - 0x4.31 */ + u_int64_t uint64; + }; + /* Description - */ /* Size in bytes - 4 */ struct image_layout_component_authentication_configuration @@ -53,58 +63,32 @@ extern "C" /* Description - 0-NULL, 1-SHA256Digest, 3-2048 bit RSA */ /* 0x0.0 - 0x0.7 */ u_int8_t auth_type; + /*---------------- DWORD[0] (Offset 0x0) ----------------*/ /* Description - used for authenticating Back to commissioning tokens */ /* 0x0.26 - 0x0.26 */ u_int8_t btc_token_en; + /*---------------- DWORD[0] (Offset 0x0) ----------------*/ /* Description - used for authenticating Factory Re-COnfiguration Responses */ /* 0x0.27 - 0x0.27 */ u_int8_t frc_en; + /*---------------- DWORD[0] (Offset 0x0) ----------------*/ /* Description - used for signing NVCONFIG at MLNX level */ /* 0x0.28 - 0x0.28 */ u_int8_t mlnx_nvconfig_en; + /*---------------- DWORD[0] (Offset 0x0) ----------------*/ /* Description - used for authenticating NVCONFIG at OEM level */ /* 0x0.29 - 0x0.29 */ u_int8_t vendor_nvconfig_en; + /*---------------- DWORD[0] (Offset 0x0) ----------------*/ /* Description - used for authenticating CS tokens at OEM level */ /* 0x0.30 - 0x0.30 */ u_int8_t cs_token_en; + /*---------------- DWORD[0] (Offset 0x0) ----------------*/ /* Description - Used for authenticating firmware, DBG_FW, DBG Tokens */ /* 0x0.31 - 0x0.31 */ u_int8_t fw_en; }; - /* Description - */ - /* Size in bytes - 544 */ - struct image_layout_file_public_keys_3 - { - /*---------------- DWORD[0] (Offset 0x0) ----------------*/ - /* Description - public key exponent, FW should use an exponent of 65537 */ - /* 0x0.0 - 0x0.31 */ - u_int32_t keypair_exp; - /*---------------- DWORD[1] (Offset 0x4) ----------------*/ - /* Description - UUID of this key created by server when it generates a keypair */ - /* 0x4.0 - 0x10.31 */ - u_int32_t keypair_uuid[4]; - /*---------------- DWORD[5] (Offset 0x14) ----------------*/ - /* Description - 4096 bit public-key */ - /* 0x14.0 - 0x210.31 */ - u_int32_t key[128]; - /*---------------- DWORD[133] (Offset 0x214) ----------------*/ - /* Description - configuration bits to enable authentication for each component */ - /* 0x214.0 - 0x214.31 */ - struct image_layout_component_authentication_configuration component_authentication_configuration; - }; - - /* Description - */ - /* Size in bytes - 8 */ - struct image_layout_uint64 - { - /*---------------- DWORD[0] (Offset 0x0) ----------------*/ - /* Description - */ - /* 0x0.0 - 0x4.31 */ - u_int64_t uint64; - }; - /* Description - */ /* Size in bytes - 8 */ struct image_layout_htoc_entry @@ -159,16 +143,6 @@ extern "C" u_int16_t major; }; - /* Description - */ - /* Size in bytes - 4352 */ - struct image_layout_public_keys_3 - { - /*---------------- DWORD[0] (Offset 0x0) ----------------*/ - /* Description - */ - /* 0x0.0 - 0x10fc.31 */ - struct image_layout_file_public_keys_3 file_public_keys_3[8]; - }; - /* Description - */ /* Size in bytes - 4 */ struct image_layout_reset_capabilities @@ -202,24 +176,6 @@ extern "C" u_int8_t minor; }; - /* Description - */ - /* Size in bytes - 1536 */ - struct image_layout_secure_boot_signatures - { - /*---------------- DWORD[0] (Offset 0x0) ----------------*/ - /* Description - boot signature of data: image signature, hw pointers, boot record, table of content, boot2 */ - /* 0x0.0 - 0x1fc.31 */ - u_int32_t boot_signature[128]; - /*---------------- DWORD[128] (Offset 0x200) ----------------*/ - /* Description - fw critical signature of itcos: HW_BOOT_INI, PCIE_PHY_UC_COMMANDS, PCIE_LINK_CODE */ - /* 0x200.0 - 0x3fc.31 */ - u_int32_t critical_signature[128]; - /*---------------- DWORD[256] (Offset 0x400) ----------------*/ - /* Description - fw non critical signatures of all other itocs */ - /* 0x400.0 - 0x5fc.31 */ - u_int32_t non_critical_signature[128]; - }; - /* Description - */ /* Size in bytes - 16 */ struct image_layout_uid_entry @@ -299,6 +255,50 @@ See struct description */ u_int16_t MINOR; }; + /* Description - */ + /* Size in bytes - 544 */ + struct image_layout_file_public_keys_2 + { + /*---------------- DWORD[0] (Offset 0x0) ----------------*/ + /* Description - configuration bits to enable authentication for each component */ + /* 0x0.0 - 0x0.31 */ + struct image_layout_component_authentication_configuration component_authentication_configuration; + /*---------------- DWORD[3] (Offset 0xc) ----------------*/ + /* Description - public key exponent, FW should use an exponent of 65537 */ + /* 0xc.0 - 0xc.31 */ + u_int32_t keypair_exp; + /*---------------- DWORD[4] (Offset 0x10) ----------------*/ + /* Description - UUID of this key created by server when it generates a keypair */ + /* 0x10.0 - 0x1c.31 */ + u_int32_t keypair_uuid[4]; + /*---------------- DWORD[8] (Offset 0x20) ----------------*/ + /* Description - 4096 bit public-key */ + /* 0x20.0 - 0x21c.31 */ + u_int32_t key[128]; + }; + + /* Description - */ + /* Size in bytes - 544 */ + struct image_layout_file_public_keys_3 + { + /*---------------- DWORD[0] (Offset 0x0) ----------------*/ + /* Description - public key exponent, FW should use an exponent of 65537 */ + /* 0x0.0 - 0x0.31 */ + u_int32_t keypair_exp; + /*---------------- DWORD[1] (Offset 0x4) ----------------*/ + /* Description - UUID of this key created by server when it generates a keypair */ + /* 0x4.0 - 0x10.31 */ + u_int32_t keypair_uuid[4]; + /*---------------- DWORD[5] (Offset 0x14) ----------------*/ + /* Description - 4096 bit public-key */ + /* 0x14.0 - 0x210.31 */ + u_int32_t key[128]; + /*---------------- DWORD[133] (Offset 0x214) ----------------*/ + /* Description - configuration bits to enable authentication for each component */ + /* 0x214.0 - 0x214.31 */ + struct image_layout_component_authentication_configuration component_authentication_configuration; + }; + /* Description - */ /* Size in bytes - 64 */ struct image_layout_guids @@ -612,7 +612,7 @@ be used for multiple virtual guests, multi host and managment */ /*---------------- DWORD[22] (Offset 0x58) ----------------*/ /* Description - */ /* 0x58.0 - 0x5c.31 */ - struct image_layout_hw_pointer_entry hmac_end_pointer; + struct image_layout_hw_pointer_entry image_signature_pointer; /*---------------- DWORD[24] (Offset 0x60) ----------------*/ /* Description - */ /* 0x60.0 - 0x64.31 */ @@ -635,6 +635,10 @@ be used for multiple virtual guests, multi host and managment */ /* Size in bytes - 1024 */ struct image_layout_image_info { + /*---------------- DWORD[0] (Offset 0x0) ----------------*/ + /* Description - */ + /* 0x0.1 - 0x0.1 */ + u_int8_t toc_header_duplication; /*---------------- DWORD[0] (Offset 0x0) ----------------*/ /* Description - Indicate that this binary intended for secure boot enabled devices */ /* 0x0.2 - 0x0.2 */ @@ -740,6 +744,10 @@ be used for multiple virtual guests, multi host and managment */ /* Description - The needed 10’s of ms timeout between the PCI link disable and PCI link enable. */ /* 0x110.0 - 0x110.7 */ u_int8_t synced_reset_downtime; + /*---------------- DWORD[68] (Offset 0x110) ----------------*/ + /* Description - indication for tool where to locate toc header copy */ + /* 0x110.16 - 0x110.31 */ + u_int16_t toc_copy_ofst; /*---------------- DWORD[70] (Offset 0x118) ----------------*/ /* Description - HW device(s) supported by this FW image. 0 means invalid entry. @@ -784,6 +792,24 @@ or FW only. */ char prs_name[129]; }; + /* Description - */ + /* Size in bytes - 576 */ + struct image_layout_image_signature_2 + { + /*---------------- DWORD[0] (Offset 0x0) ----------------*/ + /* Description - time based UUID for this signature */ + /* 0x0.0 - 0xc.31 */ + u_int32_t signature_uuid[4]; + /*---------------- DWORD[4] (Offset 0x10) ----------------*/ + /* Description - The UUID of the keypair used for signing this file */ + /* 0x10.0 - 0x1c.31 */ + u_int32_t keypair_uuid[4]; + /*---------------- DWORD[8] (Offset 0x20) ----------------*/ + /* Description - The signature itself */ + /* 0x20.0 - 0x21c.31 */ + u_int32_t signature[128]; + }; + /* Description - */ /* Size in bytes - 32 */ struct image_layout_itoc_entry @@ -897,6 +923,44 @@ dtoc_header: Represents the layout version depicted by the dTOC: 1. */ u_int16_t itoc_entry_crc; }; + /* Description - */ + /* Size in bytes - 4352 */ + struct image_layout_public_keys_2 + { + /*---------------- DWORD[0] (Offset 0x0) ----------------*/ + /* Description - */ + /* 0x0.0 - 0x10fc.31 */ + struct image_layout_file_public_keys_2 file_public_keys_2[8]; + }; + + /* Description - */ + /* Size in bytes - 4352 */ + struct image_layout_public_keys_3 + { + /*---------------- DWORD[0] (Offset 0x0) ----------------*/ + /* Description - */ + /* 0x0.0 - 0x10fc.31 */ + struct image_layout_file_public_keys_3 file_public_keys_3[8]; + }; + + /* Description - */ + /* Size in bytes - 1536 */ + struct image_layout_secure_boot_signatures + { + /*---------------- DWORD[0] (Offset 0x0) ----------------*/ + /* Description - boot signature of data: image signature, hw pointers, boot record, table of content, boot2 */ + /* 0x0.0 - 0x1fc.31 */ + u_int32_t boot_signature[128]; + /*---------------- DWORD[128] (Offset 0x200) ----------------*/ + /* Description - fw critical signature of itcos: HW_BOOT_INI, PCIE_PHY_UC_COMMANDS, PCIE_LINK_CODE */ + /* 0x200.0 - 0x3fc.31 */ + u_int32_t critical_signature[128]; + /*---------------- DWORD[256] (Offset 0x400) ----------------*/ + /* Description - fw non critical signatures of all other itocs */ + /* 0x400.0 - 0x5fc.31 */ + u_int32_t non_critical_signature[128]; + }; + /* Description - tools speific section */ /* Size in bytes - 64 */ struct image_layout_tools_area @@ -928,34 +992,53 @@ dtoc_header: Represents the layout version depicted by the dTOC: 1. */ }; /* Description - */ - /* Size in bytes - 2052 */ + /* Size in bytes - 4352 */ union image_layout_image_layout_Nodes { /*---------------- DWORD[0] (Offset 0x0) ----------------*/ /* Description - */ - /* 0x0.0 - 0x3c.31 */ - struct image_layout_tools_area tools_area; + /* 0x0.0 - 0x1fc.31 */ + struct image_layout_device_info device_info; + /* Description - */ + /* 0x0.0 - 0x10fc.31 */ + struct image_layout_public_keys_3 public_keys_3; + /* Description - */ + /* 0x0.0 - 0x10fc.31 */ + struct image_layout_public_keys_2 public_keys_2; /* Description - */ /* 0x0.0 - 0x1c.31 */ struct image_layout_itoc_entry itoc_entry; /* Description - */ - /* 0x0.0 - 0x800.31 */ - struct image_layout_hashes_table hashes_table; - /* Description - */ /* 0x0.0 - 0x3fc.31 */ struct image_layout_image_info image_info; /* Description - */ - /* 0x0.0 - 0x7c.31 */ - struct image_layout_hw_pointers_carmel hw_pointers_carmel; + /* 0x0.0 - 0x800.31 */ + struct image_layout_hashes_table hashes_table; /* Description - */ /* 0x0.0 - 0x1c.31 */ struct image_layout_itoc_header itoc_header; /* Description - */ - /* 0x0.0 - 0x1fc.31 */ - struct image_layout_device_info device_info; + /* 0x0.0 - 0x5fc.31 */ + struct image_layout_secure_boot_signatures secure_boot_signatures; + /* Description - */ + /* 0x0.0 - 0x23c.31 */ + struct image_layout_image_signature_2 image_signature_2; + /* Description - */ + /* 0x0.0 - 0x7c.31 */ + struct image_layout_hw_pointers_carmel hw_pointers_carmel; + /* Description - */ + /* 0x0.0 - 0x3c.31 */ + struct image_layout_tools_area tools_area; }; /*================= PACK/UNPACK/PRINT FUNCTIONS ======================*/ + /* uint64 */ + void image_layout_uint64_pack(const u_int64_t* ptr_struct, u_int8_t* ptr_buff); + void image_layout_uint64_unpack(u_int64_t* ptr_struct, const u_int8_t* ptr_buff); + void image_layout_uint64_print(const u_int64_t* ptr_struct, FILE* fd, int indent_level); + unsigned int image_layout_uint64_size(void); +#define IMAGE_LAYOUT_UINT64_SIZE (0x8) + void image_layout_uint64_dump(const u_int64_t* ptr_struct, FILE* fd); /* component_authentication_configuration */ void image_layout_component_authentication_configuration_pack( const struct image_layout_component_authentication_configuration* ptr_struct, @@ -972,24 +1055,6 @@ dtoc_header: Represents the layout version depicted by the dTOC: 1. */ void image_layout_component_authentication_configuration_dump( const struct image_layout_component_authentication_configuration* ptr_struct, FILE* fd); - /* file_public_keys_3 */ - void image_layout_file_public_keys_3_pack(const struct image_layout_file_public_keys_3* ptr_struct, - u_int8_t* ptr_buff); - void image_layout_file_public_keys_3_unpack(struct image_layout_file_public_keys_3* ptr_struct, - const u_int8_t* ptr_buff); - void image_layout_file_public_keys_3_print(const struct image_layout_file_public_keys_3* ptr_struct, - FILE* fd, - int indent_level); - unsigned int image_layout_file_public_keys_3_size(void); -#define IMAGE_LAYOUT_FILE_PUBLIC_KEYS_3_SIZE (0x220) - void image_layout_file_public_keys_3_dump(const struct image_layout_file_public_keys_3* ptr_struct, FILE* fd); - /* uint64 */ - void image_layout_uint64_pack(const u_int64_t* ptr_struct, u_int8_t* ptr_buff); - void image_layout_uint64_unpack(u_int64_t* ptr_struct, const u_int8_t* ptr_buff); - void image_layout_uint64_print(const u_int64_t* ptr_struct, FILE* fd, int indent_level); - unsigned int image_layout_uint64_size(void); -#define IMAGE_LAYOUT_UINT64_SIZE (0x8) - void image_layout_uint64_dump(const u_int64_t* ptr_struct, FILE* fd); /* htoc_entry */ void image_layout_htoc_entry_pack(const struct image_layout_htoc_entry* ptr_struct, u_int8_t* ptr_buff); void image_layout_htoc_entry_unpack(struct image_layout_htoc_entry* ptr_struct, const u_int8_t* ptr_buff); @@ -1013,14 +1078,6 @@ dtoc_header: Represents the layout version depicted by the dTOC: 1. */ unsigned int image_layout_module_version_size(void); #define IMAGE_LAYOUT_MODULE_VERSION_SIZE (0x4) void image_layout_module_version_dump(const struct image_layout_module_version* ptr_struct, FILE* fd); - /* public_keys_3 */ - void image_layout_public_keys_3_pack(const struct image_layout_public_keys_3* ptr_struct, u_int8_t* ptr_buff); - void image_layout_public_keys_3_unpack(struct image_layout_public_keys_3* ptr_struct, const u_int8_t* ptr_buff); - void - image_layout_public_keys_3_print(const struct image_layout_public_keys_3* ptr_struct, FILE* fd, int indent_level); - unsigned int image_layout_public_keys_3_size(void); -#define IMAGE_LAYOUT_PUBLIC_KEYS_3_SIZE (0x1100) - void image_layout_public_keys_3_dump(const struct image_layout_public_keys_3* ptr_struct, FILE* fd); /* reset_capabilities */ void image_layout_reset_capabilities_pack(const struct image_layout_reset_capabilities* ptr_struct, u_int8_t* ptr_buff); @@ -1040,18 +1097,6 @@ dtoc_header: Represents the layout version depicted by the dTOC: 1. */ unsigned int image_layout_reset_version_size(void); #define IMAGE_LAYOUT_RESET_VERSION_SIZE (0x4) void image_layout_reset_version_dump(const struct image_layout_reset_version* ptr_struct, FILE* fd); - /* secure_boot_signatures */ - void image_layout_secure_boot_signatures_pack(const struct image_layout_secure_boot_signatures* ptr_struct, - u_int8_t* ptr_buff); - void image_layout_secure_boot_signatures_unpack(struct image_layout_secure_boot_signatures* ptr_struct, - const u_int8_t* ptr_buff); - void image_layout_secure_boot_signatures_print(const struct image_layout_secure_boot_signatures* ptr_struct, - FILE* fd, - int indent_level); - unsigned int image_layout_secure_boot_signatures_size(void); -#define IMAGE_LAYOUT_SECURE_BOOT_SIGNATURES_SIZE (0x600) - void image_layout_secure_boot_signatures_dump(const struct image_layout_secure_boot_signatures* ptr_struct, - FILE* fd); /* uid_entry */ void image_layout_uid_entry_pack(const struct image_layout_uid_entry* ptr_struct, u_int8_t* ptr_buff); void image_layout_uid_entry_unpack(struct image_layout_uid_entry* ptr_struct, const u_int8_t* ptr_buff); @@ -1075,6 +1120,28 @@ dtoc_header: Represents the layout version depicted by the dTOC: 1. */ unsigned int image_layout_TRIPPLE_VERSION_size(void); #define IMAGE_LAYOUT_TRIPPLE_VERSION_SIZE (0x8) void image_layout_TRIPPLE_VERSION_dump(const struct image_layout_TRIPPLE_VERSION* ptr_struct, FILE* fd); + /* file_public_keys_2 */ + void image_layout_file_public_keys_2_pack(const struct image_layout_file_public_keys_2* ptr_struct, + u_int8_t* ptr_buff); + void image_layout_file_public_keys_2_unpack(struct image_layout_file_public_keys_2* ptr_struct, + const u_int8_t* ptr_buff); + void image_layout_file_public_keys_2_print(const struct image_layout_file_public_keys_2* ptr_struct, + FILE* fd, + int indent_level); + unsigned int image_layout_file_public_keys_2_size(void); +#define IMAGE_LAYOUT_FILE_PUBLIC_KEYS_2_SIZE (0x220) + void image_layout_file_public_keys_2_dump(const struct image_layout_file_public_keys_2* ptr_struct, FILE* fd); + /* file_public_keys_3 */ + void image_layout_file_public_keys_3_pack(const struct image_layout_file_public_keys_3* ptr_struct, + u_int8_t* ptr_buff); + void image_layout_file_public_keys_3_unpack(struct image_layout_file_public_keys_3* ptr_struct, + const u_int8_t* ptr_buff); + void image_layout_file_public_keys_3_print(const struct image_layout_file_public_keys_3* ptr_struct, + FILE* fd, + int indent_level); + unsigned int image_layout_file_public_keys_3_size(void); +#define IMAGE_LAYOUT_FILE_PUBLIC_KEYS_3_SIZE (0x220) + void image_layout_file_public_keys_3_dump(const struct image_layout_file_public_keys_3* ptr_struct, FILE* fd); /* guids */ void image_layout_guids_pack(const struct image_layout_guids* ptr_struct, u_int8_t* ptr_buff); void image_layout_guids_unpack(struct image_layout_guids* ptr_struct, const u_int8_t* ptr_buff); @@ -1182,6 +1249,17 @@ dtoc_header: Represents the layout version depicted by the dTOC: 1. */ unsigned int image_layout_image_info_size(void); #define IMAGE_LAYOUT_IMAGE_INFO_SIZE (0x400) void image_layout_image_info_dump(const struct image_layout_image_info* ptr_struct, FILE* fd); + /* image_signature_2 */ + void image_layout_image_signature_2_pack(const struct image_layout_image_signature_2* ptr_struct, + u_int8_t* ptr_buff); + void image_layout_image_signature_2_unpack(struct image_layout_image_signature_2* ptr_struct, + const u_int8_t* ptr_buff); + void image_layout_image_signature_2_print(const struct image_layout_image_signature_2* ptr_struct, + FILE* fd, + int indent_level); + unsigned int image_layout_image_signature_2_size(void); +#define IMAGE_LAYOUT_IMAGE_SIGNATURE_2_SIZE (0x240) + void image_layout_image_signature_2_dump(const struct image_layout_image_signature_2* ptr_struct, FILE* fd); /* itoc_entry */ void image_layout_itoc_entry_pack(const struct image_layout_itoc_entry* ptr_struct, u_int8_t* ptr_buff); void image_layout_itoc_entry_unpack(struct image_layout_itoc_entry* ptr_struct, const u_int8_t* ptr_buff); @@ -1196,6 +1274,34 @@ dtoc_header: Represents the layout version depicted by the dTOC: 1. */ unsigned int image_layout_itoc_header_size(void); #define IMAGE_LAYOUT_ITOC_HEADER_SIZE (0x20) void image_layout_itoc_header_dump(const struct image_layout_itoc_header* ptr_struct, FILE* fd); + /* public_keys_2 */ + void image_layout_public_keys_2_pack(const struct image_layout_public_keys_2* ptr_struct, u_int8_t* ptr_buff); + void image_layout_public_keys_2_unpack(struct image_layout_public_keys_2* ptr_struct, const u_int8_t* ptr_buff); + void + image_layout_public_keys_2_print(const struct image_layout_public_keys_2* ptr_struct, FILE* fd, int indent_level); + unsigned int image_layout_public_keys_2_size(void); +#define IMAGE_LAYOUT_PUBLIC_KEYS_2_SIZE (0x1100) + void image_layout_public_keys_2_dump(const struct image_layout_public_keys_2* ptr_struct, FILE* fd); + /* public_keys_3 */ + void image_layout_public_keys_3_pack(const struct image_layout_public_keys_3* ptr_struct, u_int8_t* ptr_buff); + void image_layout_public_keys_3_unpack(struct image_layout_public_keys_3* ptr_struct, const u_int8_t* ptr_buff); + void + image_layout_public_keys_3_print(const struct image_layout_public_keys_3* ptr_struct, FILE* fd, int indent_level); + unsigned int image_layout_public_keys_3_size(void); +#define IMAGE_LAYOUT_PUBLIC_KEYS_3_SIZE (0x1100) + void image_layout_public_keys_3_dump(const struct image_layout_public_keys_3* ptr_struct, FILE* fd); + /* secure_boot_signatures */ + void image_layout_secure_boot_signatures_pack(const struct image_layout_secure_boot_signatures* ptr_struct, + u_int8_t* ptr_buff); + void image_layout_secure_boot_signatures_unpack(struct image_layout_secure_boot_signatures* ptr_struct, + const u_int8_t* ptr_buff); + void image_layout_secure_boot_signatures_print(const struct image_layout_secure_boot_signatures* ptr_struct, + FILE* fd, + int indent_level); + unsigned int image_layout_secure_boot_signatures_size(void); +#define IMAGE_LAYOUT_SECURE_BOOT_SIGNATURES_SIZE (0x600) + void image_layout_secure_boot_signatures_dump(const struct image_layout_secure_boot_signatures* ptr_struct, + FILE* fd); /* tools_area */ void image_layout_tools_area_pack(const struct image_layout_tools_area* ptr_struct, u_int8_t* ptr_buff); void image_layout_tools_area_unpack(struct image_layout_tools_area* ptr_struct, const u_int8_t* ptr_buff); @@ -1212,7 +1318,7 @@ dtoc_header: Represents the layout version depicted by the dTOC: 1. */ FILE* fd, int indent_level); unsigned int image_layout_image_layout_Nodes_size(void); -#define IMAGE_LAYOUT_IMAGE_LAYOUT_NODES_SIZE (0x804) +#define IMAGE_LAYOUT_IMAGE_LAYOUT_NODES_SIZE (0x1100) void image_layout_image_layout_Nodes_dump(const union image_layout_image_layout_Nodes* ptr_struct, FILE* fd); #ifdef __cplusplus From b2743f33939231fe6bd53ef9b296527c57ea62b8 Mon Sep 17 00:00:00 2001 From: Matan Eliyahu Date: Mon, 8 Aug 2022 13:48:46 +0300 Subject: [PATCH 20/63] Support SW CRC calculation for HW pointers CRC Description: ROM will start using SW CRC calculation instead of HW CRC calculation. As a result, HW pointers might have a SW CRC and we have no indication for that in image. In order to support this change, we'll calculate both CRC types (SW, HW) and as long as one of them match we'll treat it as verified CRC Tested OS: Linux Tested devices: N/A Tested flows: generate image from mlx file with SW CRC calc for HW pointers && flint query Known gaps (with RM ticket): N/A Issue: 3170787 Change-Id: I29ea9b8c509d79d11ef77957e1d815687b6a4f43 Signed-off-by: Matan Eliyahu --- mlxfwops/lib/fs4_ops.cpp | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/mlxfwops/lib/fs4_ops.cpp b/mlxfwops/lib/fs4_ops.cpp index 095bb2e8..dff35a42 100644 --- a/mlxfwops/lib/fs4_ops.cpp +++ b/mlxfwops/lib/fs4_ops.cpp @@ -277,12 +277,25 @@ bool Fs4Operations::getExtendedHWAravaPtrs(VerifyCallBack verifyCallBackFunc, for (unsigned int k = 0; k < s; k += 2) { u_int32_t* tempBuff = (u_int32_t*)buff; - // Calculate HW CRC: - u_int32_t calcPtrCRC = calc_hw_crc((u_int8_t*)((u_int32_t*)tempBuff + k), 6); + // Actual CRC: u_int32_t ptrCRC = tempBuff[k + 1]; - u_int32_t ptr = tempBuff[k]; - TOCPUn(&ptr, 1); TOCPUn(&ptrCRC, 1); + + // Compare with SW CRC: + u_int32_t calcPtrCRC; + u_int32_t calcPtrSWCRC = CalcImageCRC((u_int32_t*)tempBuff + k, 1); + if (ptrCRC == calcPtrSWCRC) + { + // Some devices (QT3) uses SW CRC calculation for HW pointers + // and since we don't have an indication for that, we'll just check + // if SW CRC calculation matches the actual CRC + calcPtrCRC = calcPtrSWCRC; + } + else + { + // Calculate HW CRC: + calcPtrCRC = calc_hw_crc((u_int8_t*)((u_int32_t*)tempBuff + k), 6); + } if (!DumpFs3CRCCheck(FS4_HW_PTR, physAddr + 4 * k, IMAGE_LAYOUT_HW_POINTER_ENTRY_SIZE, calcPtrCRC, ptrCRC, false, verifyCallBackFunc)) { From 446d208be4ef4e24008f928bd4b1f63a138d658b Mon Sep 17 00:00:00 2001 From: Matan Eliyahu Date: Tue, 9 Aug 2022 18:58:21 +0300 Subject: [PATCH 21/63] Fix rsa_sign for secure boot version 1 devices Description: ITOC wasn't initialized in case secure-boot version 1 (prior to CX7) Tested OS: Linux Tested devices: CX6DX, CX7 Tested flows: flint rsa_sign Known gaps (with RM ticket): N/A Issue: 3171441 Change-Id: Ic7e44f4f52b914f46957fdb0bd5ebff4ae5328fd Signed-off-by: Matan Eliyahu --- mlxfwops/lib/fs4_ops.cpp | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/mlxfwops/lib/fs4_ops.cpp b/mlxfwops/lib/fs4_ops.cpp index dff35a42..31f5aba6 100644 --- a/mlxfwops/lib/fs4_ops.cpp +++ b/mlxfwops/lib/fs4_ops.cpp @@ -3118,6 +3118,10 @@ bool Fs4Operations::Fs4UpdateVsdSection(std::vector section_data, bool Fs4Operations::Init() { + if (!initHwPtrs()) + { + return false; + } fw_info_t fwInfo; if (!FwQuery(&fwInfo, false, false, false)) { @@ -4602,9 +4606,11 @@ bool Fs4Operations::GetFreeSlotInPublicKeys2(fs4_toc_info* itocEntry, u_int32_t& for (u_int32_t ii = 0; ii < num_of_key_slots; ii++) { u_int32_t key_start_offset = ii * image_layout_file_public_keys_2_size(); - u_int32_t key_end_offset = key_start_offset + image_layout_file_public_keys_2_size(); - if (all_of(itocEntry->section_data.begin() + key_start_offset, itocEntry->section_data.begin() + key_end_offset, - [](u_int8_t val) { return val == 0; })) + image_layout_file_public_keys_2 public_key; + memset(&public_key, 0, sizeof(public_key)); + image_layout_file_public_keys_2_unpack(&public_key, itocEntry->section_data.data() + key_start_offset); + if (all_of(public_key.keypair_uuid, public_key.keypair_uuid + 4, + [](u_int32_t val) { return val == 0; })) { idx = ii; DPRINTF(("free slot at index = %d\n", idx)); @@ -4929,9 +4935,9 @@ bool Fs4Operations::signForSecureBoot(const char* private_key_file, const char* { return errmsg("signForSecureBoot not allowed for devices"); } - if (!initHwPtrs()) + if (!Init()) { - return errmsg("signForSecureBoot failed - Error: HW pointers not found\n"); + return errmsg("signForSecureBoot failed - Error: %s\n", err()); } SecureBootSignVersion secure_boot_version = getSecureBootSignVersion(); From 746a2595245f35e395264e83b3a8c2bdbdb8a0ec Mon Sep 17 00:00:00 2001 From: Matan Eliyahu Date: Wed, 10 Aug 2022 16:49:05 +0300 Subject: [PATCH 22/63] adding life_cycle cr space addr for SPEC4 in case of livefish Description: N/A Tested OS: Linux Tested devices: SPEC4 Tested flows: flint query on SPEC4 in livefish Known gaps (with RM ticket): N/A Issue: 3173206 Change-Id: I727a38acefb3a7ea844fb0c5b739df2251266ceb Signed-off-by: Matan Eliyahu --- mlxfwops/lib/fw_ops.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/mlxfwops/lib/fw_ops.cpp b/mlxfwops/lib/fw_ops.cpp index 456fbb99..a86562e7 100644 --- a/mlxfwops/lib/fw_ops.cpp +++ b/mlxfwops/lib/fw_ops.cpp @@ -2902,6 +2902,7 @@ life_cycle_t CRSpaceRegisters::getLifeCycle() case CT_QUANTUM3: case CT_BLUEFIELD3: case CT_BLUEFIELD4: + case CT_SPECTRUM4: lifeCycleAddress = 0xf0000; firstBit = 4; bitLen = 2; From 31d8cb26786193288536f1257ce357c3b25ae792 Mon Sep 17 00:00:00 2001 From: ashargorodsk Date: Wed, 10 Aug 2022 18:11:00 +0300 Subject: [PATCH 23/63] check --ffv flag broken in windows Description: This reverts coverity fixes from commit d98bdce526afc4199b251c1488b99ef93d8816f4 Tested OS: None Tested devices: None Tested flows: None Known gaps (with RM ticket): N/A Issue: 3171778 Change-Id: I18e653de0732a412d441f350ce30d67958cbd902 Signed-off-by: Matan Eliyahu --- mlxfwupdate/output_fmts.cpp | 6 ------ 1 file changed, 6 deletions(-) diff --git a/mlxfwupdate/output_fmts.cpp b/mlxfwupdate/output_fmts.cpp index ffe5c778..fb4269e4 100644 --- a/mlxfwupdate/output_fmts.cpp +++ b/mlxfwupdate/output_fmts.cpp @@ -135,8 +135,6 @@ int OutputFmts::createInventoryXML(vector& devs, xmlFreeDoc(doc); xmlCleanupParser(); - xmlUnlinkNode(root_node); - xmlFreeNode(root_node); #endif return res; } @@ -273,8 +271,6 @@ int OutputFmts::createBurnXML(vector& devs, (void)node; xmlFreeDoc(doc); xmlCleanupParser(); - xmlUnlinkNode(root_node); - xmlFreeNode(root_node); #endif return res; } @@ -335,8 +331,6 @@ int OutputFmts::createFailXML(int result, int update_query_, string& buffer, int (void)node; xmlFreeDoc(doc); xmlCleanupParser(); - xmlUnlinkNode(root_node); - xmlFreeNode(root_node); #endif return res; } From 6b8b0799dc07a2bf76894fcc1be5de09f6afc394 Mon Sep 17 00:00:00 2001 From: Tomer Tubi Date: Mon, 12 Sep 2022 11:46:12 +0300 Subject: [PATCH 24/63] update mlxconfig and tools layout with MFT 4.22 changes --- mlxconfig/mlxcfg_generic_commander.cpp | 2 +- mlxconfig/mlxcfg_tlv.cpp | 2 +- mlxconfig/mlxcfg_ui.cpp | 12 +- mlxconfig/mlxcfg_utils.cpp | 10 +- mlxconfig/mlxconfig_dbs/mlxconfig_host.db | Bin 293888 -> 291840 bytes mlxconfig/mlxconfig_dbs/mlxconfig_switch.db | Bin 36864 -> 36864 bytes .../adb/prm/hca/ext/register_access_table.adb | 2936 ++++------ .../prm/switch/ext/register_access_table.adb | 5192 ++++++++--------- tools_layouts/reg_access_hca_layouts.c | 219 + tools_layouts/reg_access_hca_layouts.h | 146 +- tools_layouts/reg_access_switch_layouts.c | 96 + tools_layouts/reg_access_switch_layouts.h | 85 + 12 files changed, 4081 insertions(+), 4619 deletions(-) diff --git a/mlxconfig/mlxcfg_generic_commander.cpp b/mlxconfig/mlxcfg_generic_commander.cpp index b53cb50c..c1cda483 100644 --- a/mlxconfig/mlxcfg_generic_commander.cpp +++ b/mlxconfig/mlxcfg_generic_commander.cpp @@ -1696,7 +1696,7 @@ void GenericCommander::checkConfTlvs(const vector& tlvs, FwComponent:: foundApplicableTLV = true; } - if ((type & (MST_USB | MST_USB_DIMAX)) && (compsId == FwComponent::COMPID_UNKNOWN)) + if ((type & (MST_USB_DIMAX)) && (compsId == FwComponent::COMPID_UNKNOWN)) { // MST_USB tlv's must have component throw MlxcfgException("MTUSB device is not supported."); } diff --git a/mlxconfig/mlxcfg_tlv.cpp b/mlxconfig/mlxcfg_tlv.cpp index 4b5fc524..127c6cda 100644 --- a/mlxconfig/mlxcfg_tlv.cpp +++ b/mlxconfig/mlxcfg_tlv.cpp @@ -868,7 +868,7 @@ void substituteVarsValues(string orgExpr, } if (var[0] == '_' && isTempVars) { - tempVar = var.substr(1); // don't take first char(because of exprtk) + tempVar = var.substr(1); expr += tempVar; } else diff --git a/mlxconfig/mlxcfg_ui.cpp b/mlxconfig/mlxcfg_ui.cpp index d32353c0..3d13a9a1 100644 --- a/mlxconfig/mlxcfg_ui.cpp +++ b/mlxconfig/mlxcfg_ui.cpp @@ -323,11 +323,11 @@ void MlxCfg::printSingleParam(const char* name, QueryOutputItem& queryOutItem, u if ((showDefault && queryOutItem.nextVal != queryOutItem.defVal) || (showCurrent && queryOutItem.nextVal != queryOutItem.currVal)) { - printf("* %-36s", fieldName.c_str()); + printf("* %-44s", fieldName.c_str()); } else { - printf(" %-36s", fieldName.c_str()); + printf(" %-44s", fieldName.c_str()); } if (showDefault) { @@ -407,22 +407,22 @@ void MlxCfg::printConfHeader(bool showDefualt, bool showNew, bool showCurrent) { if (showCurrent) { - printf("%-16s%36s%16s%18s", "Configurations:", "Default", "Current", NEXT_STR); + printf("%-16s%44s%16s%18s", "Configurations:", "Default", "Current", NEXT_STR); } else { - printf("%-16s%36s%18s", "Configurations:", "Default", NEXT_STR); + printf("%-16s%44s%18s", "Configurations:", "Default", NEXT_STR); } } else { if (showCurrent) { - printf("%-16s%36s%18s", "Configurations:", "Current", NEXT_STR); + printf("%-16s%46s%18s", "Configurations:", "Current", NEXT_STR); } else { - printf("%-16s%38s", "Configurations:", NEXT_STR); + printf("%-16s%46s", "Configurations:", NEXT_STR); } } if (showNew) diff --git a/mlxconfig/mlxcfg_utils.cpp b/mlxconfig/mlxcfg_utils.cpp index d8ecb96b..b8de9d97 100644 --- a/mlxconfig/mlxcfg_utils.cpp +++ b/mlxconfig/mlxcfg_utils.cpp @@ -170,18 +170,20 @@ bool strToNum(string str, u_int32_t& num, int base) { char* endp; char* numStr = strcpy(new char[str.size() + 1], str.c_str()); - num = strtoul(numStr, &endp, base); + unsigned long tmpNum = strtoul(numStr, &endp, base); + if (*endp) { delete[] numStr; return false; } delete[] numStr; - // check errno - if (errno == ERANGE) + //errno will only be set in 32bit arch, in 64bit it can parse much larger numbers, which will be cought on the second part + if (errno == ERANGE || (tmpNum > 0xFFFFFFFF)) { - return false; + throw MlxcfgException("value is out of range"); } + num = tmpNum; return true; } diff --git a/mlxconfig/mlxconfig_dbs/mlxconfig_host.db b/mlxconfig/mlxconfig_dbs/mlxconfig_host.db index f1077d6070c612ca4d13cc6c3962f6e881ece7a7..00ed053e217d8f2ce234abe4181ef24fdb932bec 100644 GIT binary patch delta 37696 zcma%k2V7Lg_VArEmj!p1dMQ#?7U{i-fQYyPB2uN;bwyYZ>BWMGcy|{yi80X|oy1gM zig}6A7!pZhn&~}iqA4btUQMETDKFLU%w0fCdEcKO9`2nvcjinxbLNzB<9|Ije(rg7 zFfkl7enm;(pk92QPIHxg1%bH8;{-uCzX8Fk?FfbzBIqbUP(BI4gfIjKPoT#IO0U9a z;!HoGSJAr$Jv}zk;3{95Oj=i)TUWQ#o4ac|8!X-C+M4zvM0_%o7P9R>L7<_vro|#$ zhDj3s`_oV5;1{}yB7K7Xf(4$XahUzMO$T&>;0nwe-(I3S=@sx9mFYx!A26Cl-=n4Q zDjbCK_{Acags9QOh2mrQ#q$5-L*t<+Kfm0ZUp32ITv%FUt}cfah`^W}LZ#&Lva(`$ z3Eww)(^#m;FU>D7mzA1xXPHV1@?kG#w z<~{03!(m2QS(SNiv8mLYUkaybBc>CL8x4li>JoF=Omq26;oq3{wl7VD^4vo6jOxnC z=8F8vs*1wgDl&`yOTb^B?I!QZOL(O;3X!Av6IqW>QT$1`g}#f=f(Hjg;{?>5{3vbvFk>;N~*;u=xrn9ED+tS&UAa{TinjGlwZ*5S@BRUX4`6VJH zsH?lPv9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qpP8W)?l;b38YDKf8~bp@9-{^ z$jGB~qc3NpF%M36nqhrt-{$5*x>>2)y+s!<+}%IU(3=6OP2Co49F(~ZzImX%Vq1;8 zIU3PymA#=yH1cfGXg7_hhstjMc3RcuXhq}wFQkLBAwT2i>$k3k^abrma}oaykDzx^ zdq#E}m4YVXYJ4cLQ3v<>R4JIihDIW)AQM=fWr1+1VGnVr4+Z#3fBdo9I2$bX#`~S& zf{O>QF$z>4!+gD&wAyTf3}f|WtCXU?vjRTuajYHEYYX2(8kt+?qWDd`1HF}zUxmX% zgF2_5=A(_g8~!}>ppo5AQQEYT>*4&-`;BZ=w5>!?sj=p$0_SjG+v0OAq*8U=Xb^ht zwc$sKU(ifEstaq7I+)z3%O|~Jfr2z0+*y1FN05?{liBdGQH^+5eY86 zV1$oHyV=2=PyY$NI{40NL|;kP4Gu84m=Iu{>1=#>8+TO`OYc2K*iLGvvwytVU&LAF1<+ zfMw~+^1ZGE5jFXFZwAulaY_ZjgwuxX^yXBdT`WLUfQf z4dfu}HUjyRA;zI^lA?!l(PjegZ=kzk6g`-OCMo*8Sg1JSk54CNMx^~AX)-x4O^l7l zquzX2KGC^0rPo&3k!F_iyuv+=e}%t{{*AK8uFf5$=ouQX>;cP<;vW|3v1qVM7BYrpi z-8f$fw-w<(S=frewLIs zstG$iJ2tL-SUge+PrjrURC(!n{b|H4;?vjUX>451lZnm2=2jk@zjTE~v9C0;q=PGO G;Qs?dtnVxU diff --git a/tools_layouts/adb/prm/hca/ext/register_access_table.adb b/tools_layouts/adb/prm/hca/ext/register_access_table.adb index 4cc9e66d..0c56f0c4 100644 --- a/tools_layouts/adb/prm/hca/ext/register_access_table.adb +++ b/tools_layouts/adb/prm/hca/ext/register_access_table.adb @@ -35,62 +35,62 @@ - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + @@ -101,24 +101,24 @@ - - + + - + - - - + + + - + @@ -126,7 +126,7 @@ - + @@ -137,6 +137,7 @@ + @@ -179,7 +180,6 @@ - @@ -188,6 +188,11 @@ + + + + + @@ -196,7 +201,6 @@ - @@ -217,7 +221,6 @@ - @@ -271,11 +274,6 @@ - - - - - @@ -332,15 +330,15 @@ - + - - - - - + + + + + @@ -356,12 +354,12 @@ - + - + @@ -377,12 +375,12 @@ - - - - - - + + + + + + @@ -392,36 +390,36 @@ - - - - + + + + - + - + - + - + - - + + @@ -430,42 +428,42 @@ - + - - - + + + - + - + - + - - + + - - + + - - - + + + @@ -475,13 +473,13 @@ - + - - - + + + @@ -491,7 +489,7 @@ - + @@ -504,43 +502,43 @@ - + - + - - + + - - - + + + - - - - + + + + - - - + + + - - - - - + + + + + @@ -548,153 +546,153 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -704,8 +702,8 @@ - - + + @@ -718,165 +716,123 @@ - - + + - - - - - - + + + + + + - - - - - - + + + + + + - - - - + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - + + + + + + - - - - - - - - + + + + + + + + - - - - - - - - - - - + + + + + + - - - - + + + + - - - - + + + + - + - - - + + + - + - - - + + + - - - - + + + + @@ -884,89 +840,74 @@ - - - - + + + + - + - + - - + + - - - - - - - - - - - - - - - - + - - - + + + - + - + - - + + - - - - - - - - - - + + + + + + + + + + - + - - + + - + @@ -982,62 +923,63 @@ - + - - + + - - - - + + + + + - + - + - - + + - - + + - - - - - - - + + + + + + + - - + + - - - + + + - - + + - + @@ -1048,8 +990,8 @@ - - + + @@ -1061,50 +1003,50 @@ - - - + + + - - - + + + - - + + - - + + - - - - - - - + + + + + + + - - + + - + - + @@ -1116,7 +1058,7 @@ - + @@ -1128,13 +1070,13 @@ - - + + - + - - + + @@ -1143,7 +1085,7 @@ - + @@ -1155,7 +1097,7 @@ - + @@ -1173,29 +1115,29 @@ - - - + + + - + - + - + - + - + @@ -1203,8 +1145,8 @@ - - + + @@ -1213,33 +1155,33 @@ - + - - + + - - + + - + - + @@ -1251,18 +1193,18 @@ - - - - + + + + - - - - - + + + + + @@ -1270,18 +1212,18 @@ - - + + - + - - + + @@ -1290,13 +1232,13 @@ - + - - - + + + @@ -1304,41 +1246,41 @@ - - - - + + + + - - + + - - - + + + - + - + - - - + + + - + - + @@ -1347,13 +1289,13 @@ - - + + - - - + + + @@ -1362,13 +1304,13 @@ - + - + - + - + @@ -1376,27 +1318,22 @@ - - + + - + - + - + - - - - - - + @@ -1415,60 +1352,60 @@ - + - + - + - + - - + + - + - + - - + + - + - + - + - + - + @@ -1486,27 +1423,27 @@ - - + + - + - + - + - - + + @@ -1515,7 +1452,7 @@ - + @@ -1538,24 +1475,22 @@ - - - + + + - - - + - - + + @@ -1565,15 +1500,15 @@ - + - + - + @@ -1583,8 +1518,8 @@ - - + + @@ -1603,23 +1538,16 @@ - - - - - - - - + - + - + @@ -1635,18 +1563,18 @@ - - - + + + - + - - + + @@ -1654,7 +1582,7 @@ - + @@ -1668,9 +1596,9 @@ - - - + + + @@ -1680,69 +1608,69 @@ - + - + - + - - + + - + - - + + - + - + - + - + - + - + - + - - + + - + - - - - - - - + + + + + + + - - + + @@ -1751,6 +1679,8 @@ + + @@ -1759,88 +1689,73 @@ - - + + - - + + - - - - - - - - - - - - - - - - - - + + + + + - + - - - - + + + + - - + + - + - + - - + + - + - - - + - + - + - + - + @@ -1853,11 +1768,11 @@ - + - - - + + + @@ -1870,27 +1785,29 @@ - - + + - + - - - + + + + + - - - - + + + + - - + + @@ -1901,181 +1818,75 @@ - + - - + + - - - - - - - - - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + - - - - - - - - - - - - + + + + + + + + + + + + - - - - - - - + + + - + - - + + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + @@ -2083,109 +1894,22 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + - + - + - - + + @@ -2198,8 +1922,8 @@ - - + + @@ -2240,13 +1964,13 @@ - + - - + + @@ -2264,7 +1988,7 @@ - + @@ -2277,7 +2001,7 @@ - + @@ -2292,19 +2016,19 @@ - - + + - - - - - - - - - - + + + + + + + + + + @@ -2318,203 +2042,90 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + - + - - - + + + - + - - - - - - - - - - - + + - - - - - - + + + + + - + - - - - - - - - - - - + + + + + + + + + + + + - - + + + - - + + - - + + - + - + - + @@ -2523,198 +2134,200 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + - + - + - + - - + + - - + + - - - + + + + + - + - + - + - + - + - + - + - + - + - + - - - + + + - - - + + + - - - - + + + + - + - + - + - - - - - - - - - + + + + + + + + + @@ -2728,136 +2341,100 @@ - + - - - - + + + + - + - - + + - - + + - - + + - - + + - - - + + + - + - + - - - + + + - - - + + + - + - - - + + + - - - + + + - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - - + + + + @@ -2866,10 +2443,10 @@ - - - - + + + + @@ -2879,39 +2456,33 @@ - - - - - - - + - - + + - - + + - - + + - + @@ -2920,127 +2491,133 @@ - + - - + + - - + + - + - + + - + - + - - - - - + + + + + - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + - - + + - - + + - + - - + + - + - - - + + + - + - - - - - + + + + + + + - - + + - - - - - - - - - - - - + + + + + + + + + + + + - + - - + + - + - + + - - - - - + + + + + + + @@ -3049,22 +2626,22 @@ - + - - - - - - + + + + + + - + @@ -3074,22 +2651,22 @@ - + - + - + - + - + @@ -3098,22 +2675,22 @@ - + - - - - + + + + - - - - - + + + + + @@ -3122,17 +2699,10 @@ - - - - - - - - - - - + + + + @@ -3143,45 +2713,45 @@ - - + + - + - - - - - - - - - - + + + + + + + + + + - - - - - + + + + + - + @@ -3192,49 +2762,55 @@ + + + + + + - + - + - - - + + + - - + + - + - - - - + + + + @@ -3243,11 +2819,11 @@ - + - + @@ -3261,20 +2837,20 @@ - - - - - - - - - - - - - - + + + + + + + + + + + + + + @@ -3286,8 +2862,8 @@ - - + + @@ -3300,119 +2876,119 @@ - + - + - + - + - + - - - + + + - + - - - + + + - + - + - + - + - - + + - - + + - - + + - - - + + + - + - + - + - + - - + + - - - - - - + + + + + + - + @@ -3424,12 +3000,12 @@ - + - - + + - + @@ -3439,60 +3015,60 @@ - + - + - + - + - - - + + + - - + + - + - - - + + + - - + + - - - - - + + + + + @@ -3501,13 +3077,13 @@ - + - - - + + + @@ -3523,37 +3099,37 @@ - - - - - - + + + + + + - + - + - + - + - - + + - - + + - + @@ -3563,20 +3139,20 @@ - + - - - - - - - - - - - - + + + + + + + + + + + + @@ -3592,14 +3168,6 @@ - - - - - - - - @@ -3610,65 +3178,38 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - + + - + - - - - - - - + + + + + - + - - - + + + @@ -3679,103 +3220,32 @@ - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + - - - - + + + + - + - + - + - @@ -3784,7 +3254,7 @@ - + @@ -3793,47 +3263,9 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + diff --git a/tools_layouts/adb/prm/switch/ext/register_access_table.adb b/tools_layouts/adb/prm/switch/ext/register_access_table.adb index 13250ce9..903829b9 100644 --- a/tools_layouts/adb/prm/switch/ext/register_access_table.adb +++ b/tools_layouts/adb/prm/switch/ext/register_access_table.adb @@ -35,32 +35,37 @@ - + + + + + + - + - - + + - + - - - - - - + + + + + + - + @@ -69,21 +74,21 @@ - - + + - - + + - + - - + + @@ -115,81 +120,81 @@ - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + - - + + - - - - - + + + + + @@ -200,65 +205,69 @@ - - + + - + - - - + + + - + + + + + - - - + + + - - - + + + - - + + - + - - - - - - - - + + + + + + + + - + @@ -274,13 +283,18 @@ - + + + + + + @@ -328,6 +342,7 @@ + @@ -347,6 +362,7 @@ + @@ -411,7 +427,6 @@ - @@ -433,7 +448,6 @@ - @@ -487,11 +501,6 @@ - - - - - @@ -509,10 +518,11 @@ - + + - + @@ -623,6 +633,7 @@ + @@ -727,17 +738,17 @@ - + - + - + - + @@ -783,11 +794,11 @@ - - - - - + + + + + @@ -798,17 +809,17 @@ - + - - + + - + @@ -830,18 +841,18 @@ - + + - - + @@ -878,13 +889,13 @@ - - - - - - - + + + + + + + @@ -908,12 +919,12 @@ - + - + @@ -929,12 +940,12 @@ - - - - - - + + + + + + @@ -944,15 +955,15 @@ - - - - + + + + - + @@ -960,7 +971,7 @@ - + @@ -977,19 +988,19 @@ - - - - - - + + + + + + - - - + + + @@ -1000,13 +1011,13 @@ - + - - - + + + @@ -1017,40 +1028,40 @@ - + - - - - - - - + + + + + + + - - - + + + - - - - - + + + + + - - - + + + @@ -1062,153 +1073,153 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -1223,8 +1234,8 @@ - - + + @@ -1237,162 +1248,120 @@ - - + + - - - - - - + + + + + + - - - - - - + + + + + + - - - - + + + + - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - - - - + + + + + + - - - - - - - - + + + + + + + + - - - - - - - - - - - + + + + + + - - - - + + + + - - - - + + + + - - - + + + - + - - - + + + @@ -1403,25 +1372,25 @@ - + - + - + - - - + + + - + - + @@ -1434,7 +1403,7 @@ - + @@ -1448,12 +1417,12 @@ - + - + @@ -1464,107 +1433,111 @@ + + + + + - + - + - - - + + + - + - - - + + + - - + + - - + + - - - - - + + + + + - - + - - - + + - + - + - + - - + + + - - - - + + + + - - - - + + + + - - - - + + + + - - + + - + @@ -1572,20 +1545,20 @@ - - - - - + + + + + - - + + - + @@ -1594,15 +1567,15 @@ - - - + + + - + @@ -1611,16 +1584,16 @@ - + - - - + + + @@ -1628,25 +1601,35 @@ - + - + + + + + + - + + + + + + @@ -1663,24 +1646,17 @@ - - - - - - - - + - + - - + + @@ -1692,7 +1668,7 @@ - + @@ -1700,20 +1676,20 @@ - + - + - + @@ -1735,42 +1711,42 @@ - + - - - - - + + + + + - + - + - + - + - + - + - - - + + + @@ -1778,38 +1754,38 @@ - - - + + + - - + + - + - - + + - - - - - - - - + + + + + + + + @@ -1829,9 +1805,9 @@ - - - + + + @@ -1846,7 +1822,7 @@ - + @@ -1856,67 +1832,67 @@ - + - + - + - - + + - + - + - - - + + + - - - - - + + + + + - - - - - - + + + + + + - - - - - - - + + + + + + + @@ -1925,32 +1901,32 @@ - - - + + + - + - + - - + + - + - + @@ -1967,14 +1943,19 @@ + + + + + - + - + - + - + @@ -1988,18 +1969,18 @@ - + - - + + - + @@ -2008,7 +1989,7 @@ - + @@ -2019,7 +2000,7 @@ - + @@ -2032,11 +2013,11 @@ - + - + @@ -2049,32 +2030,17 @@ - - - - - - - - - - - - - - - - + - + - + @@ -2082,9 +2048,9 @@ - + - + @@ -2092,7 +2058,7 @@ - + @@ -2102,7 +2068,7 @@ - + @@ -2110,18 +2076,18 @@ - + - + - + @@ -2129,10 +2095,10 @@ - - + + - + @@ -2142,11 +2108,11 @@ - + - + @@ -2155,43 +2121,43 @@ - - - + + + - + - + - - + + - - - - - - + + + + + + - - - + + + - + - - + + - + @@ -2207,62 +2173,63 @@ - + - - + + - - - - + + + + + - + - + - - + + - - + + - - - - - - - + + + + + + + - - + + - - - + + + - + - + @@ -2273,8 +2240,8 @@ - - + + @@ -2286,50 +2253,50 @@ - - - + + + - - - + + + - - + + - - + + - - - - + + + + - - + + - - + + - + - + @@ -2341,7 +2308,7 @@ - + @@ -2353,13 +2320,13 @@ - - + + - + - - + + @@ -2368,7 +2335,7 @@ - + @@ -2380,7 +2347,7 @@ - + @@ -2398,42 +2365,42 @@ - - - + + + - + - - - - + + + + - + - + - + - + - + @@ -2441,24 +2408,35 @@ - - + + + + + + + + + + + + + - + - - + + @@ -2471,18 +2449,18 @@ - + - + - + @@ -2491,19 +2469,19 @@ - - + + - + - + @@ -2515,18 +2493,18 @@ - - - - + + + + - - - - - + + + + + @@ -2534,17 +2512,18 @@ - + + - + - - + + @@ -2553,13 +2532,13 @@ - + - - - + + + @@ -2567,41 +2546,41 @@ - - - - + + + + - - + + - - - + + + - + - + - - - + + + - + - + @@ -2609,14 +2588,14 @@ - - - + + + - - - + + + @@ -2625,13 +2604,13 @@ - + - + - + - + @@ -2639,28 +2618,28 @@ - - + + - + - + - - - + + + - + - + @@ -2669,7 +2648,7 @@ - + @@ -2678,8 +2657,8 @@ - - + + @@ -2702,55 +2681,55 @@ - + - + - + - + - - + + - + - + - - + + - + - + - + - + @@ -2768,38 +2747,38 @@ - - + + - + - + - + - - + + - + - + @@ -2816,16 +2795,16 @@ - + - - + + - + - + @@ -2839,17 +2818,17 @@ - + - + - + @@ -2898,7 +2877,7 @@ - + @@ -2921,28 +2900,28 @@ - - + + - - - + + + - + - + - + @@ -2955,26 +2934,26 @@ - + - - + + - + - + - + @@ -2982,13 +2961,13 @@ - - + + - + @@ -2999,7 +2978,7 @@ - + @@ -3007,40 +2986,40 @@ - - - + + + - + - + - - - + + + - + - + - - + + @@ -3048,7 +3027,7 @@ - + @@ -3062,63 +3041,62 @@ - - + + - - - - - + + + + + - - - - - - - - - + + + + + + + + + + - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + - - - + - - + + @@ -3128,15 +3106,15 @@ - + - + - + @@ -3146,8 +3124,8 @@ - - + + @@ -3157,15 +3135,15 @@ - - - + + + - + - + @@ -3174,23 +3152,23 @@ - + - - - - - - + + + + + + - - + + - + @@ -3199,17 +3177,10 @@ - - - - - - - - - + + @@ -3221,27 +3192,27 @@ - + - - + + - + - - + + - + - + - + @@ -3250,23 +3221,23 @@ - - + + - + - + - + - - + + - - - + + + @@ -3281,12 +3252,12 @@ - - - + + + - + @@ -3294,30 +3265,30 @@ - - - - - - + + + + + + - + - + - - - - - - + + + + + + - + @@ -3325,19 +3296,19 @@ - + - + - - - + + + - - - + + + @@ -3354,22 +3325,22 @@ - - - - - + + + + + - + - - - + + + @@ -3380,18 +3351,18 @@ - - - + + + - + - - + + @@ -3404,7 +3375,7 @@ - + @@ -3418,9 +3389,9 @@ - - - + + + @@ -3430,71 +3401,71 @@ - + - + - + - - + + - + - - + + - - + + - + - + - + - + - + - + - - + + - + - - - - - - - + + + + + + + - - + + @@ -3504,15 +3475,15 @@ - - + + - - + + @@ -3527,22 +3498,20 @@ - + - - + + - - - - + + - - + + @@ -3552,93 +3521,80 @@ - - + + - - - - - - - - - - - - - - + - + - + - - - - + + + + - - + + - + - + - - + + - - - + + + - + - + - - + + - - - + + + - + - + @@ -3651,47 +3607,49 @@ - - + + - - - + + + - + - + - + - - + + - + - - - + + + + + - - - - + + + + - - + + @@ -3702,167 +3660,68 @@ - - - - - - - - - - - - - - - - - - - - + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + - - - - - - - - - - - - + + + + + + + + + + + + - - - - - - - + + + - + - - + + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + @@ -3870,109 +3729,22 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + - + - + - - + + @@ -3985,8 +3757,8 @@ - - + + @@ -4027,13 +3799,13 @@ - + - - + + @@ -4051,7 +3823,7 @@ - + @@ -4064,7 +3836,7 @@ - + @@ -4079,19 +3851,19 @@ - - + + - - - - - - - - - - + + + + + + + + + + @@ -4105,160 +3877,45 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + - + - - - + + + - + - - - - - - - - - - - + + - - + @@ -4273,14 +3930,14 @@ - + - - - - + + + + @@ -4292,8 +3949,8 @@ - - + + @@ -4301,75 +3958,75 @@ - - + + - + - - - - + + + + - - - - - - - - - - + + + + + + + + + + - - + + - - + + - - - - + + + + - - + + - + - + - + - - + + @@ -4381,37 +4038,37 @@ - + - + - + - - + + - - - + + + - - - + + + - + - - + + @@ -4423,16 +4080,16 @@ - + - - - + + + - + @@ -4440,11 +4097,11 @@ - + - - + + @@ -4462,59 +4119,61 @@ - + - - + + - + - - - - + + + + + - + + - - + + - + - + - - + + - - + + - + - + @@ -4528,7 +4187,7 @@ - + @@ -4542,8 +4201,8 @@ - - + + @@ -4552,124 +4211,124 @@ - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + - - - - + + + + - - - - + + + + - - - + + + @@ -4679,7 +4338,7 @@ - + @@ -4690,7 +4349,7 @@ - + @@ -4699,121 +4358,123 @@ - + - + - + - - + + - - + + - - - + + + + + - + - + - + - + - + - + - + - + - + - + - + - + - - - + + + - - + + - - - + + + - - - - + + + + - + - + - + - - - - - - - - - + + + + + + + + + @@ -4822,7 +4483,7 @@ - + @@ -4831,23 +4492,23 @@ - + - - - - + + + + - + - + @@ -4861,132 +4522,132 @@ - + - - + + - - + + - - + + - + - - + + - - + + - + - + - + - + - + - + - + - - - + + + - - + + - - - + + + - + - - - + + + - - - + + + - + - + - - - + + + - + - + - + - - - + + + - + - + - - + + @@ -5007,9 +4668,9 @@ - + - + @@ -5023,49 +4684,13 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + @@ -5074,10 +4699,10 @@ - - - - + + + + @@ -5087,39 +4712,33 @@ - - - - - - - + - - + + - - + + - - + + - + @@ -5128,70 +4747,71 @@ - + - - + + - - + + - + - + + - + - + - - - - - + + + + + - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + - - + + - - + + - - - - + + + + @@ -5200,94 +4820,99 @@ - - + + - + - - + + - + - - - + + + - + - - - - - + + + + + + + - + - + - + - - + + - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + - + - - + + - + - + + - - - - - + + + + + + + @@ -5300,11 +4925,11 @@ - + - + - + @@ -5313,28 +4938,28 @@ - + - - - - - - + + + + + + - - - + + + - + @@ -5346,71 +4971,71 @@ - - - - - + + + + + - + - - + + - - + + - - - - + + + + - - + + - - + + - - - + + + - + - + - - + + - - - + + + - + - + - + @@ -5420,22 +5045,22 @@ - + - + - + - + - + @@ -5444,22 +5069,22 @@ - + - - - - + + + + - - - - - + + + + + @@ -5468,23 +5093,23 @@ - - - - + + + + - + - + - + @@ -5506,14 +5131,14 @@ - + - - + + @@ -5523,7 +5148,7 @@ - + @@ -5532,17 +5157,17 @@ - - - - - - - - - - - + + + + + + + + + + + @@ -5550,67 +5175,67 @@ - + - + - - + + - + - + - + - + - + - - + + - + - + - - - - - - - - - - + + + + + + + + + + @@ -5631,25 +5256,25 @@ - + - + - + - + @@ -5657,7 +5282,7 @@ - + @@ -5677,9 +5302,9 @@ - - - + + + @@ -5696,26 +5321,26 @@ - - + + - + - + - + @@ -5723,44 +5348,41 @@ - - - - + - + - - + + - + - + - - - - + + + + - - - + + + @@ -5777,18 +5399,18 @@ - - + + - + - - + + @@ -5798,6 +5420,7 @@ + @@ -5808,11 +5431,11 @@ - + - + @@ -5824,27 +5447,27 @@ - - + + - - - - - - - - + + + + + + + + - - - - + + + + @@ -5854,11 +5477,11 @@ - + - + - + @@ -5882,23 +5505,23 @@ - + - - + + - + - + - + @@ -5920,8 +5543,8 @@ - - + + @@ -5934,40 +5557,39 @@ - - - - - + + + + - + - + - - - - + + + + - + - + - + - - - + + + @@ -5982,65 +5604,65 @@ - - - - - + + + + + - - + + - - + + - - + + - - - + + + - - + + - + - - + + - + - - - - + + + + - - - + + + @@ -6050,121 +5672,121 @@ - + - + - - + + - + - - + + - - + + - + - + - - - - - - - + + + + + + + - - - - + + + + - - - + + + - + - + - + - + - - + + - - - - + + + + - + - + - + - + - + - + - + - - - - - - + + + + + + @@ -6172,7 +5794,7 @@ - + @@ -6187,48 +5809,59 @@ - - - + + + - + - + + + + + + + + + + + + - - - + + + - - + + - + - - - + + + - - - - - - - + + + + + + + - - - - + + + + @@ -6242,21 +5875,21 @@ - + - + - - - - - + + + + + @@ -6268,7 +5901,7 @@ - + @@ -6280,15 +5913,15 @@ - + - - - - - + + + + + @@ -6297,51 +5930,51 @@ - + - + - - - + + + - + - + - - + + - - + + - - + + - - - - - + + + + + @@ -6353,9 +5986,9 @@ - + - + @@ -6363,15 +5996,15 @@ - + - + - + @@ -6380,14 +6013,14 @@ - + - - + + @@ -6397,23 +6030,23 @@ - - + + - - + + - + - - + + - + @@ -6426,58 +6059,58 @@ - + - - + + - + - + - + - + - - - - - - + + + + + + - + - - - + + + - + - + @@ -6489,48 +6122,48 @@ - - + + - - - + + + - + - + - + - + - + - - + + - - - + + + - + - + - + @@ -6538,7 +6171,7 @@ - + @@ -6549,8 +6182,8 @@ - - + + @@ -6573,7 +6206,7 @@ - + @@ -6584,8 +6217,8 @@ - - + + @@ -6599,227 +6232,227 @@ - + - + - - + + - + - + - + - - - - + + + + - + - - - + + + - + - + - + - - + + - - - + + + - - + + - - + + - + - - + + - + - + - + - + - + - + - - - - - - + + + + + + - + - + - + - - + + - + - + - + - - + + - + - + - + - + - - - + + + - - - - + + + + - + - - - + + + - - + + - - - - - + + + + + - - + + - - + + - - - - + + + + @@ -6828,47 +6461,47 @@ - + - - - - + + + + - - - + + + - + - - + + - - - + + + - - + + - - + + @@ -6884,58 +6517,62 @@ - - - + + + - - - + + + + + + + - - + + - - - - - - + + + + + + - + - - - - - - - - + + + + + + + + - - - - - - + + + + + + - + @@ -6943,71 +6580,75 @@ - + - + - + - - - - + + + + - + - - - - + + + + - - - - + + + - + - - + + - - + + - - - + + + - + + + + + + - - - + + + @@ -7023,37 +6664,37 @@ - - - - - - + + + + + + - + - + - + - + - - + + - - + + - + @@ -7063,20 +6704,20 @@ - + - - - - - - - - - - - - + + + + + + + + + + + + @@ -7102,64 +6743,38 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - + + - + - + - - - - - - + + + + + - + - - - + + + @@ -7170,103 +6785,32 @@ - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + - - - - + + + + - + - + - + - @@ -7275,29 +6819,29 @@ - + - + - - + + - + - + - - + + - + @@ -7307,9 +6851,9 @@ - + - + @@ -7318,26 +6862,26 @@ - + - + - - - - + + + + - + @@ -7347,22 +6891,22 @@ - - - - + + + + - + - + @@ -7370,90 +6914,90 @@ - + - + - - - - - - - + + + + + + + - + - - + + - + - - - + + + - + - + - - - - - - - - - - - - + + + + + + + + + + + + - - - - - - - - - - + + + + + + + + + + - + - - + + @@ -7462,7 +7006,7 @@ - + @@ -7473,17 +7017,17 @@ - - - + + + - - - - + + + + @@ -7492,7 +7036,7 @@ - + @@ -7502,20 +7046,20 @@ - + - - + + - + - - - + + + @@ -7550,37 +7094,37 @@ - + - + - + - + - + - - - + + + - - + + - - + + @@ -7593,63 +7137,63 @@ - - - - - - - - + + + + + + + + - - - - + + + + - - + + - + - + - - + + - + - - - - - - - - - + + + + + + + + + - - - + + + - - - + + + @@ -7658,23 +7202,23 @@ - + - + - + - - - - + + + + - + @@ -7684,33 +7228,33 @@ - + - - + + - - + + - + - + - + @@ -7728,13 +7272,13 @@ - - + + - - - + + + @@ -7746,11 +7290,11 @@ - + - + - + @@ -7765,15 +7309,15 @@ - + - + - + @@ -7806,32 +7350,32 @@ - - + + - - + + - + - - + + - - - - + + + + @@ -7840,16 +7384,16 @@ - + - + - + @@ -7862,7 +7406,7 @@ - + @@ -7873,8 +7417,8 @@ - - + + @@ -7882,8 +7426,8 @@ - - + + @@ -7901,7 +7445,7 @@ - + @@ -7914,13 +7458,13 @@ - - - - - - - + + + + + + + @@ -7935,7 +7479,7 @@ - + @@ -7945,7 +7489,7 @@ - + @@ -7953,8 +7497,8 @@ - - + + @@ -7963,7 +7507,7 @@ - + @@ -7975,7 +7519,7 @@ - + @@ -7986,7 +7530,7 @@ - + @@ -8004,7 +7548,7 @@ - + @@ -8013,48 +7557,10 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + @@ -8078,10 +7584,10 @@ - - + + - + @@ -8089,10 +7595,10 @@ - - - - + + + + @@ -8100,8 +7606,8 @@ - - + + @@ -8110,10 +7616,10 @@ - + - + @@ -8121,15 +7627,15 @@ - + - - + + @@ -8139,7 +7645,7 @@ - + @@ -8149,14 +7655,14 @@ - + - + - - - + + + diff --git a/tools_layouts/reg_access_hca_layouts.c b/tools_layouts/reg_access_hca_layouts.c index b096130d..8e1b6d6b 100644 --- a/tools_layouts/reg_access_hca_layouts.c +++ b/tools_layouts/reg_access_hca_layouts.c @@ -2813,6 +2813,213 @@ void reg_access_hca_mtrc_stdb_reg_dump(const struct reg_access_hca_mtrc_stdb_reg { reg_access_hca_mtrc_stdb_reg_print(ptr_struct, fd, 0); } +void reg_access_hca_nic_cap_ext_reg_pack(const struct reg_access_hca_nic_cap_ext_reg *ptr_struct, u_int8_t *ptr_buff) +{ + u_int32_t offset; + int i; + offset = 0; + adb2c_push_bits_to_buff(ptr_buff, offset, 16, (u_int32_t)ptr_struct->cap_group); + for (i = 0; i < 28; ++i) { + offset = adb2c_calc_array_field_address(128, 32, i, 1024, 1); + adb2c_push_integer_to_buff(ptr_buff, offset, 4, (u_int32_t)ptr_struct->cap_data[i]); + } +} +void reg_access_hca_nic_cap_ext_reg_unpack(struct reg_access_hca_nic_cap_ext_reg *ptr_struct, const u_int8_t *ptr_buff) +{ + u_int32_t offset; + int i; + offset = 0; + ptr_struct->cap_group = (u_int16_t)adb2c_pop_bits_from_buff(ptr_buff, offset, 16); + for (i = 0; i < 28; ++i) { + offset = adb2c_calc_array_field_address(128, 32, i, 1024, 1); + ptr_struct->cap_data[i] = (u_int32_t)adb2c_pop_integer_from_buff(ptr_buff, offset, 4); + } +} +void reg_access_hca_nic_cap_ext_reg_print(const struct reg_access_hca_nic_cap_ext_reg *ptr_struct, FILE *fd, int indent_level) +{ + int i; + adb2c_add_indentation(fd, indent_level); + fprintf(fd, "======== reg_access_hca_nic_cap_ext_reg ========\n"); + adb2c_add_indentation(fd, indent_level); + fprintf(fd, "cap_group : " UH_FMT "\n", ptr_struct->cap_group); + for (i = 0; i < 28; ++i) { + adb2c_add_indentation(fd, indent_level); + fprintf(fd, "cap_data_%03d : " U32H_FMT "\n", i, ptr_struct->cap_data[i]); + } +} +unsigned int reg_access_hca_nic_cap_ext_reg_size(void) +{ + return REG_ACCESS_HCA_NIC_CAP_EXT_REG_SIZE; +} +void reg_access_hca_nic_cap_ext_reg_dump(const struct reg_access_hca_nic_cap_ext_reg *ptr_struct, FILE *fd) +{ + reg_access_hca_nic_cap_ext_reg_print(ptr_struct, fd, 0); +} +void reg_access_hca_nic_dpa_hart_group_reg_pack(const struct reg_access_hca_nic_dpa_hart_group_reg *ptr_struct, u_int8_t *ptr_buff) +{ + u_int32_t offset; + int i; + offset = 16; + adb2c_push_bits_to_buff(ptr_buff, offset, 16, (u_int32_t)ptr_struct->hart_group_id); + offset = 1; + adb2c_push_bits_to_buff(ptr_buff, offset, 3, (u_int32_t)ptr_struct->operation); + for (i = 0; i < 4; ++i) { + offset = adb2c_calc_array_field_address(128, 32, i, 2048, 1); + adb2c_push_integer_to_buff(ptr_buff, offset, 4, (u_int32_t)ptr_struct->hart_group_name[i]); + } + for (i = 0; i < 32; ++i) { + offset = adb2c_calc_array_field_address(512, 32, i, 2048, 1); + adb2c_push_integer_to_buff(ptr_buff, offset, 4, (u_int32_t)ptr_struct->group_member_mask[i]); + } +} +void reg_access_hca_nic_dpa_hart_group_reg_unpack(struct reg_access_hca_nic_dpa_hart_group_reg *ptr_struct, const u_int8_t *ptr_buff) +{ + u_int32_t offset; + int i; + offset = 16; + ptr_struct->hart_group_id = (u_int16_t)adb2c_pop_bits_from_buff(ptr_buff, offset, 16); + offset = 1; + ptr_struct->operation = (u_int8_t)adb2c_pop_bits_from_buff(ptr_buff, offset, 3); + for (i = 0; i < 4; ++i) { + offset = adb2c_calc_array_field_address(128, 32, i, 2048, 1); + ptr_struct->hart_group_name[i] = (u_int32_t)adb2c_pop_integer_from_buff(ptr_buff, offset, 4); + } + for (i = 0; i < 32; ++i) { + offset = adb2c_calc_array_field_address(512, 32, i, 2048, 1); + ptr_struct->group_member_mask[i] = (u_int32_t)adb2c_pop_integer_from_buff(ptr_buff, offset, 4); + } +} + +void reg_access_hca_nic_dpa_hart_group_reg_print(const struct reg_access_hca_nic_dpa_hart_group_reg *ptr_struct, FILE *fd, int indent_level) +{ + int i; + + adb2c_add_indentation(fd, indent_level); + fprintf(fd, "======== reg_access_hca_nic_dpa_hart_group_reg ========\n"); + + adb2c_add_indentation(fd, indent_level); + fprintf(fd, "hart_group_id : " UH_FMT "\n", ptr_struct->hart_group_id); + adb2c_add_indentation(fd, indent_level); + fprintf(fd, "operation : " UH_FMT "\n", ptr_struct->operation); + for (i = 0; i < 4; ++i) { + adb2c_add_indentation(fd, indent_level); + fprintf(fd, "hart_group_name_%03d : " U32H_FMT "\n", i, ptr_struct->hart_group_name[i]); + } + for (i = 0; i < 32; ++i) { + adb2c_add_indentation(fd, indent_level); + fprintf(fd, "group_member_mask_%03d : " U32H_FMT "\n", i, ptr_struct->group_member_mask[i]); + } +} + +unsigned int reg_access_hca_nic_dpa_hart_group_reg_size(void) +{ + return REG_ACCESS_HCA_NIC_DPA_HART_GROUP_REG_SIZE; +} + +void reg_access_hca_nic_dpa_hart_group_reg_dump(const struct reg_access_hca_nic_dpa_hart_group_reg *ptr_struct, FILE *fd) +{ + reg_access_hca_nic_dpa_hart_group_reg_print(ptr_struct, fd, 0); +} + +void reg_access_hca_nic_dpa_perf_ctrl_reg_pack(const struct reg_access_hca_nic_dpa_perf_ctrl_reg *ptr_struct, u_int8_t *ptr_buff) +{ + u_int32_t offset; + + offset = 0; + adb2c_push_integer_to_buff(ptr_buff, offset, 4, (u_int32_t)ptr_struct->dpa_process_handle); + offset = 32; + adb2c_push_bits_to_buff(ptr_buff, offset, 2, (u_int32_t)ptr_struct->count_state); +} + +void reg_access_hca_nic_dpa_perf_ctrl_reg_unpack(struct reg_access_hca_nic_dpa_perf_ctrl_reg *ptr_struct, const u_int8_t *ptr_buff) +{ + u_int32_t offset; + + offset = 0; + ptr_struct->dpa_process_handle = (u_int32_t)adb2c_pop_integer_from_buff(ptr_buff, offset, 4); + offset = 32; + ptr_struct->count_state = (u_int8_t)adb2c_pop_bits_from_buff(ptr_buff, offset, 2); +} + +void reg_access_hca_nic_dpa_perf_ctrl_reg_print(const struct reg_access_hca_nic_dpa_perf_ctrl_reg *ptr_struct, FILE *fd, int indent_level) +{ + adb2c_add_indentation(fd, indent_level); + fprintf(fd, "======== reg_access_hca_nic_dpa_perf_ctrl_reg ========\n"); + + adb2c_add_indentation(fd, indent_level); + fprintf(fd, "dpa_process_handle : " U32H_FMT "\n", ptr_struct->dpa_process_handle); + adb2c_add_indentation(fd, indent_level); + fprintf(fd, "count_state : " UH_FMT "\n", ptr_struct->count_state); +} + +unsigned int reg_access_hca_nic_dpa_perf_ctrl_reg_size(void) +{ + return REG_ACCESS_HCA_NIC_DPA_PERF_CTRL_REG_SIZE; +} + +void reg_access_hca_nic_dpa_perf_ctrl_reg_dump(const struct reg_access_hca_nic_dpa_perf_ctrl_reg *ptr_struct, FILE *fd) +{ + reg_access_hca_nic_dpa_perf_ctrl_reg_print(ptr_struct, fd, 0); +} + +void reg_access_hca_nic_dpa_perf_reg_pack(const struct reg_access_hca_nic_dpa_perf_reg *ptr_struct, u_int8_t *ptr_buff) +{ + u_int32_t offset; + + offset = 0; + adb2c_push_integer_to_buff(ptr_buff, offset, 4, (u_int32_t)ptr_struct->dpa_process_num); + offset = 32; + adb2c_push_integer_to_buff(ptr_buff, offset, 4, (u_int32_t)ptr_struct->dpa_timer_frequency); + offset = 128; + adb2c_push_integer_to_buff(ptr_buff, offset, 4, (u_int32_t)ptr_struct->mkey); + offset = 160; + adb2c_push_integer_to_buff(ptr_buff, offset, 4, (u_int32_t)ptr_struct->size); + offset = 192; + adb2c_push_integer_to_buff(ptr_buff, offset, 8, ptr_struct->address); +} + +void reg_access_hca_nic_dpa_perf_reg_unpack(struct reg_access_hca_nic_dpa_perf_reg *ptr_struct, const u_int8_t *ptr_buff) +{ + u_int32_t offset; + + offset = 0; + ptr_struct->dpa_process_num = (u_int32_t)adb2c_pop_integer_from_buff(ptr_buff, offset, 4); + offset = 32; + ptr_struct->dpa_timer_frequency = (u_int32_t)adb2c_pop_integer_from_buff(ptr_buff, offset, 4); + offset = 128; + ptr_struct->mkey = (u_int32_t)adb2c_pop_integer_from_buff(ptr_buff, offset, 4); + offset = 160; + ptr_struct->size = (u_int32_t)adb2c_pop_integer_from_buff(ptr_buff, offset, 4); + offset = 192; + ptr_struct->address = adb2c_pop_integer_from_buff(ptr_buff, offset, 8); +} + +void reg_access_hca_nic_dpa_perf_reg_print(const struct reg_access_hca_nic_dpa_perf_reg *ptr_struct, FILE *fd, int indent_level) +{ + adb2c_add_indentation(fd, indent_level); + fprintf(fd, "======== reg_access_hca_nic_dpa_perf_reg ========\n"); + + adb2c_add_indentation(fd, indent_level); + fprintf(fd, "dpa_process_num : " U32H_FMT "\n", ptr_struct->dpa_process_num); + adb2c_add_indentation(fd, indent_level); + fprintf(fd, "dpa_timer_frequency : " U32H_FMT "\n", ptr_struct->dpa_timer_frequency); + adb2c_add_indentation(fd, indent_level); + fprintf(fd, "mkey : " U32H_FMT "\n", ptr_struct->mkey); + adb2c_add_indentation(fd, indent_level); + fprintf(fd, "size : " U32H_FMT "\n", ptr_struct->size); + adb2c_add_indentation(fd, indent_level); + fprintf(fd, "address : " U64H_FMT "\n", ptr_struct->address); +} + +unsigned int reg_access_hca_nic_dpa_perf_reg_size(void) +{ + return REG_ACCESS_HCA_NIC_DPA_PERF_REG_SIZE; +} + +void reg_access_hca_nic_dpa_perf_reg_dump(const struct reg_access_hca_nic_dpa_perf_reg *ptr_struct, FILE *fd) +{ + reg_access_hca_nic_dpa_perf_reg_print(ptr_struct, fd, 0); +} void reg_access_hca_pcnr_reg_pack(const struct reg_access_hca_pcnr_reg* ptr_struct, u_int8_t* ptr_buff) { @@ -3374,14 +3581,23 @@ void reg_access_hca_reg_access_hca_Nodes_print(const union reg_access_hca_reg_ac fprintf(fd, "mcc_reg:\n"); reg_access_hca_mcc_reg_print(&(ptr_struct->mcc_reg), fd, indent_level + 1); adb2c_add_indentation(fd, indent_level); + fprintf(fd, "nic_dpa_hart_group_reg:\n"); + reg_access_hca_nic_dpa_hart_group_reg_print(&(ptr_struct->nic_dpa_hart_group_reg), fd, indent_level + 1); + adb2c_add_indentation(fd, indent_level); fprintf(fd, "strs_mini_flow_reg:\n"); reg_access_hca_strs_mini_flow_reg_print(&(ptr_struct->strs_mini_flow_reg), fd, indent_level + 1); adb2c_add_indentation(fd, indent_level); + fprintf(fd, "nic_dpa_perf_ctrl_reg:\n"); + reg_access_hca_nic_dpa_perf_ctrl_reg_print(&(ptr_struct->nic_dpa_perf_ctrl_reg), fd, indent_level + 1); + adb2c_add_indentation(fd, indent_level); fprintf(fd, "mcqi_cap:\n"); reg_access_hca_mcqi_cap_print(&(ptr_struct->mcqi_cap), fd, indent_level + 1); adb2c_add_indentation(fd, indent_level); fprintf(fd, "mqis_reg:\n"); reg_access_hca_mqis_reg_print(&(ptr_struct->mqis_reg), fd, indent_level + 1); + adb2c_add_indentation(fd, indent_level); + fprintf(fd, "nic_cap_ext_reg:\n"); + reg_access_hca_nic_cap_ext_reg_print(&(ptr_struct->nic_cap_ext_reg), fd, indent_level + 1); adb2c_add_indentation(fd, indent_level); fprintf(fd, "mpcir_ext:\n"); reg_access_hca_mpcir_ext_print(&(ptr_struct->mpcir_ext), fd, indent_level + 1); @@ -3394,6 +3610,9 @@ void reg_access_hca_reg_access_hca_Nodes_print(const union reg_access_hca_reg_ac adb2c_add_indentation(fd, indent_level); fprintf(fd, "mgir:\n"); reg_access_hca_mgir_print(&(ptr_struct->mgir), fd, indent_level + 1); + adb2c_add_indentation(fd, indent_level); + fprintf(fd, "nic_dpa_perf_reg:\n"); + reg_access_hca_nic_dpa_perf_reg_print(&(ptr_struct->nic_dpa_perf_reg), fd, indent_level + 1); adb2c_add_indentation(fd, indent_level); fprintf(fd, "mcqi_version:\n"); reg_access_hca_mcqi_version_print(&(ptr_struct->mcqi_version), fd, indent_level + 1); diff --git a/tools_layouts/reg_access_hca_layouts.h b/tools_layouts/reg_access_hca_layouts.h index c406ab14..a003b4d6 100644 --- a/tools_layouts/reg_access_hca_layouts.h +++ b/tools_layouts/reg_access_hca_layouts.h @@ -1779,8 +1779,90 @@ read_size */ /* Description - */ /* Size in bytes - 12 */ - struct reg_access_hca_pcnr_reg - { +struct reg_access_hca_nic_cap_ext_reg { +/*---------------- DWORD[0] (Offset 0x0) ----------------*/ + /* Description - Indicates which capabiltiy group is accessed. +0x1: DPA_CAP */ + /* 0x0.16 - 0x0.31 */ + u_int16_t cap_group; +/*---------------- DWORD[4] (Offset 0x10) ----------------*/ + /* Description - Capability information according to cap_group. +For DPA_CAP See Table 1195, "DPA_CAP Capability Layout," on page 1486 */ + /* 0x10.0 - 0x7c.31 */ + u_int32_t cap_data[28]; +}; + +/* Description - */ +/* Size in bytes - 256 */ +struct reg_access_hca_nic_dpa_hart_group_reg { +/*---------------- DWORD[0] (Offset 0x0) ----------------*/ + /* Description - DPA HART group id +For WRITE method with operation CREATE this field is RO and provides the newly created HART group. +For other method/operation, this field is an index to a valid HART group */ + /* 0x0.0 - 0x0.15 */ + u_int16_t hart_group_id; + /* Description - Operation performed for WRITE method: +0x0: CRETAE - create a new DPA HART group +0x1: MODIFY - change the members of an existing DPA HART group +0x2: DESTROY - destroy an existing DPA HART group +other values are reserved. */ + /* 0x0.28 - 0x0.30 */ + u_int8_t operation; +/*---------------- DWORD[4] (Offset 0x10) ----------------*/ + /* Description - HART group name (ASCII string) */ + /* 0x10.0 - 0x1c.31 */ + u_int32_t hart_group_name[4]; +/*---------------- DWORD[16] (Offset 0x40) ----------------*/ + /* Description - Bitmask indicating which HARTs are members of the group. Set bit indicates the respective HART is a member. HART groups may not overlap, and HARTs beyond NIC_CAP_EXT_REG.max_num_dpa_hart are reserved. */ + /* 0x40.0 - 0xbc.31 */ + u_int32_t group_member_mask[32]; +}; + +/* Description - */ +/* Size in bytes - 64 */ +struct reg_access_hca_nic_dpa_perf_ctrl_reg { +/*---------------- DWORD[0] (Offset 0x0) ----------------*/ + /* Description - DPA process handle, as appears in the report provided by NIC_DPA_PERF_REG */ + /* 0x0.0 - 0x0.31 */ + u_int32_t dpa_process_handle; +/*---------------- DWORD[1] (Offset 0x4) ----------------*/ + /* Description - Process performance counting state +0x0: UNCHANGED +0x1: ACTIVE +0x2: INACTIVE +Other values are reserved */ + /* 0x4.30 - 0x4.31 */ + u_int8_t count_state; +}; + +/* Description - */ +/* Size in bytes - 64 */ +struct reg_access_hca_nic_dpa_perf_reg { +/*---------------- DWORD[0] (Offset 0x0) ----------------*/ + /* Description - Number of active DPA processes */ + /* 0x0.0 - 0x0.31 */ + u_int32_t dpa_process_num; +/*---------------- DWORD[1] (Offset 0x4) ----------------*/ + /* Description - The DPA timer ticks frequency, given in kHZ. +Using this frequency, timer ticks can be converted to running clock by +clock_time = ticks/dpa_timer_frequency */ + /* 0x4.0 - 0x4.31 */ + u_int32_t dpa_timer_frequency; +/*---------------- DWORD[4] (Offset 0x10) ----------------*/ + /* Description - Memory Key for holding the performance report. */ + /* 0x10.0 - 0x10.31 */ + u_int32_t mkey; +/*---------------- DWORD[5] (Offset 0x14) ----------------*/ + /* Description - The size of the buffer allocated for the performance report, given in Bytes, */ + /* 0x14.0 - 0x14.31 */ + u_int32_t size; +/*---------------- DWORD[6] (Offset 0x18) ----------------*/ + /* Description - Address of memory where to DPA performance report starts */ + /* 0x18.0 - 0x1c.31 */ + u_int64_t address; +}; + +struct reg_access_hca_pcnr_reg { /*---------------- DWORD[0] (Offset 0x0) ----------------*/ /* Description - When Set, port will override tuning process upon fol lowing link-up command (PAOS.admin_status = UP) @@ -2243,15 +2325,24 @@ gle Modifier Layout," on page 1390 */ /* 0x0.0 - 0x1c.31 */ struct reg_access_hca_mcc_reg mcc_reg; /* Description - */ - /* 0x0.0 - 0x3c.31 */ - struct reg_access_hca_strs_mini_flow_reg strs_mini_flow_reg; - /* Description - */ - /* 0x0.0 - 0x78.31 */ - struct reg_access_hca_mcqi_cap mcqi_cap; - /* Description - */ - /* 0x0.0 - 0x14.31 */ - struct reg_access_hca_mqis_reg mqis_reg; - /* Description - */ + /* 0x0.0 - 0xfc.31 */ + struct reg_access_hca_nic_dpa_hart_group_reg nic_dpa_hart_group_reg; + /* Description - */ + /* 0x0.0 - 0x3c.31 */ + struct reg_access_hca_strs_mini_flow_reg strs_mini_flow_reg; + /* Description - */ + /* 0x0.0 - 0x3c.31 */ + struct reg_access_hca_nic_dpa_perf_ctrl_reg nic_dpa_perf_ctrl_reg; + /* Description - */ + /* 0x0.0 - 0x78.31 */ + struct reg_access_hca_mcqi_cap mcqi_cap; + /* Description - */ + /* 0x0.0 - 0x14.31 */ + struct reg_access_hca_mqis_reg mqis_reg; + /* Description - */ + /* 0x0.0 - 0x7c.31 */ + struct reg_access_hca_nic_cap_ext_reg nic_cap_ext_reg; + /* Description - */ /* 0x0.0 - 0xc.31 */ struct reg_access_hca_mpcir_ext mpcir_ext; /* Description - */ @@ -2264,6 +2355,9 @@ gle Modifier Layout," on page 1390 */ /* 0x0.0 - 0x9c.31 */ struct reg_access_hca_mgir mgir; /* Description - */ + /* 0x0.0 - 0x3c.31 */ + struct reg_access_hca_nic_dpa_perf_reg nic_dpa_perf_reg; + /* Description - */ /* 0x0.0 - 0x78.31 */ struct reg_access_hca_mcqi_version mcqi_version; /* Description - */ @@ -2566,7 +2660,35 @@ void reg_access_hca_lock_source_stop_toggle_modifier_category_modifier_auto_prin unsigned int reg_access_hca_mtrc_stdb_reg_size(void); #define REG_ACCESS_HCA_MTRC_STDB_REG_SIZE (0x8) void reg_access_hca_mtrc_stdb_reg_dump(const struct reg_access_hca_mtrc_stdb_reg* ptr_struct, FILE* fd); - /* pcnr_reg */ +/* nic_cap_ext_reg */ +void reg_access_hca_nic_cap_ext_reg_pack(const struct reg_access_hca_nic_cap_ext_reg *ptr_struct, u_int8_t *ptr_buff); +void reg_access_hca_nic_cap_ext_reg_unpack(struct reg_access_hca_nic_cap_ext_reg *ptr_struct, const u_int8_t *ptr_buff); +void reg_access_hca_nic_cap_ext_reg_print(const struct reg_access_hca_nic_cap_ext_reg *ptr_struct, FILE *fd, int indent_level); +unsigned int reg_access_hca_nic_cap_ext_reg_size(void); +#define REG_ACCESS_HCA_NIC_CAP_EXT_REG_SIZE (0x80) +void reg_access_hca_nic_cap_ext_reg_dump(const struct reg_access_hca_nic_cap_ext_reg *ptr_struct, FILE *fd); +/* nic_dpa_hart_group_reg */ +void reg_access_hca_nic_dpa_hart_group_reg_pack(const struct reg_access_hca_nic_dpa_hart_group_reg *ptr_struct, u_int8_t *ptr_buff); +void reg_access_hca_nic_dpa_hart_group_reg_unpack(struct reg_access_hca_nic_dpa_hart_group_reg *ptr_struct, const u_int8_t *ptr_buff); +void reg_access_hca_nic_dpa_hart_group_reg_print(const struct reg_access_hca_nic_dpa_hart_group_reg *ptr_struct, FILE *fd, int indent_level); +unsigned int reg_access_hca_nic_dpa_hart_group_reg_size(void); +#define REG_ACCESS_HCA_NIC_DPA_HART_GROUP_REG_SIZE (0x100) +void reg_access_hca_nic_dpa_hart_group_reg_dump(const struct reg_access_hca_nic_dpa_hart_group_reg *ptr_struct, FILE *fd); +/* nic_dpa_perf_ctrl_reg */ +void reg_access_hca_nic_dpa_perf_ctrl_reg_pack(const struct reg_access_hca_nic_dpa_perf_ctrl_reg *ptr_struct, u_int8_t *ptr_buff); +void reg_access_hca_nic_dpa_perf_ctrl_reg_unpack(struct reg_access_hca_nic_dpa_perf_ctrl_reg *ptr_struct, const u_int8_t *ptr_buff); +void reg_access_hca_nic_dpa_perf_ctrl_reg_print(const struct reg_access_hca_nic_dpa_perf_ctrl_reg *ptr_struct, FILE *fd, int indent_level); +unsigned int reg_access_hca_nic_dpa_perf_ctrl_reg_size(void); +#define REG_ACCESS_HCA_NIC_DPA_PERF_CTRL_REG_SIZE (0x40) +void reg_access_hca_nic_dpa_perf_ctrl_reg_dump(const struct reg_access_hca_nic_dpa_perf_ctrl_reg *ptr_struct, FILE *fd); +/* nic_dpa_perf_reg */ +void reg_access_hca_nic_dpa_perf_reg_pack(const struct reg_access_hca_nic_dpa_perf_reg *ptr_struct, u_int8_t *ptr_buff); +void reg_access_hca_nic_dpa_perf_reg_unpack(struct reg_access_hca_nic_dpa_perf_reg *ptr_struct, const u_int8_t *ptr_buff); +void reg_access_hca_nic_dpa_perf_reg_print(const struct reg_access_hca_nic_dpa_perf_reg *ptr_struct, FILE *fd, int indent_level); +unsigned int reg_access_hca_nic_dpa_perf_reg_size(void); +#define REG_ACCESS_HCA_NIC_DPA_PERF_REG_SIZE (0x40) +void reg_access_hca_nic_dpa_perf_reg_dump(const struct reg_access_hca_nic_dpa_perf_reg *ptr_struct, FILE *fd); +/* pcnr_reg */ void reg_access_hca_pcnr_reg_pack(const struct reg_access_hca_pcnr_reg* ptr_struct, u_int8_t* ptr_buff); void reg_access_hca_pcnr_reg_unpack(struct reg_access_hca_pcnr_reg* ptr_struct, const u_int8_t* ptr_buff); void reg_access_hca_pcnr_reg_print(const struct reg_access_hca_pcnr_reg* ptr_struct, FILE* fd, int indent_level); diff --git a/tools_layouts/reg_access_switch_layouts.c b/tools_layouts/reg_access_switch_layouts.c index f4a0e607..d1af8235 100644 --- a/tools_layouts/reg_access_switch_layouts.c +++ b/tools_layouts/reg_access_switch_layouts.c @@ -1160,6 +1160,99 @@ void reg_access_switch_mtcq_reg_ext_dump(const struct reg_access_switch_mtcq_reg { reg_access_switch_mtcq_reg_ext_print(ptr_struct, fd, 0); } +void reg_access_switch_pmaos_reg_ext_pack(const struct reg_access_switch_pmaos_reg_ext *ptr_struct, u_int8_t *ptr_buff) +{ + u_int32_t offset; + offset = 28; + adb2c_push_bits_to_buff(ptr_buff, offset, 4, (u_int32_t)ptr_struct->oper_status); + offset = 20; + adb2c_push_bits_to_buff(ptr_buff, offset, 4, (u_int32_t)ptr_struct->admin_status); + offset = 8; + adb2c_push_bits_to_buff(ptr_buff, offset, 8, (u_int32_t)ptr_struct->module); + offset = 4; + adb2c_push_bits_to_buff(ptr_buff, offset, 4, (u_int32_t)ptr_struct->slot_index); + offset = 0; + adb2c_push_bits_to_buff(ptr_buff, offset, 1, (u_int32_t)ptr_struct->rst); + offset = 62; + adb2c_push_bits_to_buff(ptr_buff, offset, 2, (u_int32_t)ptr_struct->e); + offset = 52; + adb2c_push_bits_to_buff(ptr_buff, offset, 4, (u_int32_t)ptr_struct->error_type); + offset = 44; + adb2c_push_bits_to_buff(ptr_buff, offset, 4, (u_int32_t)ptr_struct->operational_notification); + offset = 35; + adb2c_push_bits_to_buff(ptr_buff, offset, 1, (u_int32_t)ptr_struct->rev_incompatible); + offset = 34; + adb2c_push_bits_to_buff(ptr_buff, offset, 1, (u_int32_t)ptr_struct->secondary); + offset = 33; + adb2c_push_bits_to_buff(ptr_buff, offset, 1, (u_int32_t)ptr_struct->ee); + offset = 32; + adb2c_push_bits_to_buff(ptr_buff, offset, 1, (u_int32_t)ptr_struct->ase); +} +void reg_access_switch_pmaos_reg_ext_unpack(struct reg_access_switch_pmaos_reg_ext *ptr_struct, const u_int8_t *ptr_buff) +{ + u_int32_t offset; + offset = 28; + ptr_struct->oper_status = (u_int8_t)adb2c_pop_bits_from_buff(ptr_buff, offset, 4); + offset = 20; + ptr_struct->admin_status = (u_int8_t)adb2c_pop_bits_from_buff(ptr_buff, offset, 4); + offset = 8; + ptr_struct->module = (u_int8_t)adb2c_pop_bits_from_buff(ptr_buff, offset, 8); + offset = 4; + ptr_struct->slot_index = (u_int8_t)adb2c_pop_bits_from_buff(ptr_buff, offset, 4); + offset = 0; + ptr_struct->rst = (u_int8_t)adb2c_pop_bits_from_buff(ptr_buff, offset, 1); + offset = 62; + ptr_struct->e = (u_int8_t)adb2c_pop_bits_from_buff(ptr_buff, offset, 2); + offset = 52; + ptr_struct->error_type = (u_int8_t)adb2c_pop_bits_from_buff(ptr_buff, offset, 4); + offset = 44; + ptr_struct->operational_notification = (u_int8_t)adb2c_pop_bits_from_buff(ptr_buff, offset, 4); + offset = 35; + ptr_struct->rev_incompatible = (u_int8_t)adb2c_pop_bits_from_buff(ptr_buff, offset, 1); + offset = 34; + ptr_struct->secondary = (u_int8_t)adb2c_pop_bits_from_buff(ptr_buff, offset, 1); + offset = 33; + ptr_struct->ee = (u_int8_t)adb2c_pop_bits_from_buff(ptr_buff, offset, 1); + offset = 32; + ptr_struct->ase = (u_int8_t)adb2c_pop_bits_from_buff(ptr_buff, offset, 1); +} +void reg_access_switch_pmaos_reg_ext_print(const struct reg_access_switch_pmaos_reg_ext *ptr_struct, FILE *fd, int indent_level) +{ + adb2c_add_indentation(fd, indent_level); + fprintf(fd, "======== reg_access_switch_pmaos_reg_ext ========\n"); + adb2c_add_indentation(fd, indent_level); + fprintf(fd, "oper_status : %s (" UH_FMT ")\n", (ptr_struct->oper_status == 0 ? ("initializing") : ((ptr_struct->oper_status == 1 ? ("plugged_enabled") : ((ptr_struct->oper_status == 2 ? ("unplugged") : ((ptr_struct->oper_status == 3 ? ("module_plugged_with_error") : ((ptr_struct->oper_status == 5 ? ("unknown") : ("unknown")))))))))), ptr_struct->oper_status); + adb2c_add_indentation(fd, indent_level); + fprintf(fd, "admin_status : %s (" UH_FMT ")\n", (ptr_struct->admin_status == 1 ? ("enabled") : ((ptr_struct->admin_status == 2 ? ("disabled_by_configuration") : ((ptr_struct->admin_status == 3 ? ("enabled_once") : ("unknown")))))), ptr_struct->admin_status); + adb2c_add_indentation(fd, indent_level); + fprintf(fd, "module : " UH_FMT "\n", ptr_struct->module); + adb2c_add_indentation(fd, indent_level); + fprintf(fd, "slot_index : " UH_FMT "\n", ptr_struct->slot_index); + adb2c_add_indentation(fd, indent_level); + fprintf(fd, "rst : " UH_FMT "\n", ptr_struct->rst); + adb2c_add_indentation(fd, indent_level); + fprintf(fd, "e : %s (" UH_FMT ")\n", (ptr_struct->e == 0 ? ("Do_not_generate_event") : ((ptr_struct->e == 1 ? ("Generate_Event") : ((ptr_struct->e == 2 ? ("Generate_Single_Event") : ("unknown")))))), ptr_struct->e); + adb2c_add_indentation(fd, indent_level); + fprintf(fd, "error_type : %s (" UH_FMT ")\n", (ptr_struct->error_type == 0 ? ("Power_Budget_Exceeded") : ((ptr_struct->error_type == 1 ? ("Long_Range_for_non_MLNX_cable_or_module") : ((ptr_struct->error_type == 2 ? ("Bus_stuck") : ((ptr_struct->error_type == 3 ? ("bad_or_unsupported_EEPROM") : ((ptr_struct->error_type == 4 ? ("Enforce_part_number_list") : ((ptr_struct->error_type == 5 ? ("unsupported_cable") : ((ptr_struct->error_type == 6 ? ("High_Temperature") : ((ptr_struct->error_type == 7 ? ("bad_cable") : ((ptr_struct->error_type == 8 ? ("PMD_type_is_not_enabled") : ((ptr_struct->error_type == 12 ? ("pcie_system_power_slot_Exceeded") : ("unknown")))))))))))))))))))), ptr_struct->error_type); + adb2c_add_indentation(fd, indent_level); + fprintf(fd, "operational_notification : " UH_FMT "\n", ptr_struct->operational_notification); + adb2c_add_indentation(fd, indent_level); + fprintf(fd, "rev_incompatible : " UH_FMT "\n", ptr_struct->rev_incompatible); + adb2c_add_indentation(fd, indent_level); + fprintf(fd, "secondary : " UH_FMT "\n", ptr_struct->secondary); + adb2c_add_indentation(fd, indent_level); + fprintf(fd, "ee : " UH_FMT "\n", ptr_struct->ee); + adb2c_add_indentation(fd, indent_level); + fprintf(fd, "ase : " UH_FMT "\n", ptr_struct->ase); +} +unsigned int reg_access_switch_pmaos_reg_ext_size(void) +{ + return REG_ACCESS_SWITCH_PMAOS_REG_EXT_SIZE; +} +void reg_access_switch_pmaos_reg_ext_dump(const struct reg_access_switch_pmaos_reg_ext *ptr_struct, FILE *fd) +{ + reg_access_switch_pmaos_reg_ext_print(ptr_struct, fd, 0); +} void reg_access_switch_reg_access_switch_Nodes_pack(const union reg_access_switch_reg_access_switch_Nodes* ptr_struct, u_int8_t* ptr_buff) { @@ -1182,6 +1275,9 @@ void reg_access_switch_reg_access_switch_Nodes_print(const union reg_access_swit adb2c_add_indentation(fd, indent_level); fprintf(fd, "icam_reg_ext:\n"); reg_access_switch_icam_reg_ext_print(&(ptr_struct->icam_reg_ext), fd, indent_level + 1); + adb2c_add_indentation(fd, indent_level); + fprintf(fd, "pmaos_reg_ext:\n"); + reg_access_switch_pmaos_reg_ext_print(&(ptr_struct->pmaos_reg_ext), fd, indent_level + 1); adb2c_add_indentation(fd, indent_level); fprintf(fd, "mdsr_reg_ext:\n"); reg_access_switch_mdsr_reg_ext_print(&(ptr_struct->mdsr_reg_ext), fd, indent_level + 1); diff --git a/tools_layouts/reg_access_switch_layouts.h b/tools_layouts/reg_access_switch_layouts.h index e423ec03..132dd4aa 100644 --- a/tools_layouts/reg_access_switch_layouts.h +++ b/tools_layouts/reg_access_switch_layouts.h @@ -569,6 +569,81 @@ replay-protection. */ /* 0x48.0 - 0x64.31 */ u_int32_t challenge[8]; }; +/* Description - */ +/* Size in bytes - 16 */ +struct reg_access_switch_pmaos_reg_ext { +/*---------------- DWORD[0] (Offset 0x0) ----------------*/ + /* Description - Module state (reserved while admin_status is disabled): +0: initializing +1: plugged_enabled +2: unplugged +3: module_plugged_with_error - (details in error_type). +5: unknown */ + /* 0x0.0 - 0x0.3 */ + u_int8_t oper_status; + /* Description - Module administrative state (the desired state of the module): +1: enabled +2: disabled_by_configuration +3: enabled_once - if the module is active and then unplugged, or module experienced an error event, the operational status should go to "disabled" and can only be enabled upon explicit enable command. + +Note - To disable a module, all ports associated with the port must be disabled first. + */ + /* 0x0.8 - 0x0.11 */ + u_int8_t admin_status; + /* Description - Module number. */ + /* 0x0.16 - 0x0.23 */ + u_int8_t module; + /* Description - Reserved for HCA +Slot_index +Slot_index = 0 represent the onboard (motherboard). +In case of non modular system only slot_index = 0 is available. */ + /* 0x0.24 - 0x0.27 */ + u_int8_t slot_index; + /* Description - Module Reset toggle +NOTE: setting reset while module is plugged-in will result in transition of oper_status to initialization. */ + /* 0x0.31 - 0x0.31 */ + u_int8_t rst; +/*---------------- DWORD[1] (Offset 0x4) ----------------*/ + /* Description - Event Generation on operational state change: +0: Do_not_generate_event +1: Generate_Event +2: Generate_Single_Event */ + /* 0x4.0 - 0x4.1 */ + u_int8_t e; + /* Description - Module error details: +0x0: Power_Budget_Exceeded +0x1: Long_Range_for_non_MLNX_cable_or_module +0x2: Bus_stuck - (I2C Data or clock shorted) +0x3: bad_or_unsupported_EEPROM +0x4: Enforce_part_number_list +0x5: unsupported_cable +0x6: High_Temperature +0x7: bad_cable - (Module/Cable is shorted) +0x8: PMD_type_is_not_enabled - (see PMTPS). +0xc: pcie_system_power_slot_Exceeded +Valid only when oper_status = 4'b0011. */ + /* 0x4.8 - 0x4.11 */ + u_int8_t error_type; + /* Description - This notification can occur only if module passed initialization process +0x0: No notifications. +0x1: Speed degradation - the module is not enabled in its full speed due to incompatible transceiver/cable +Valid only when oper_status = 4'b0001. */ + /* 0x4.16 - 0x4.19 */ + u_int8_t operational_notification; + /* Description - When in multi ASIC module sharing systems, +This flag will be asserted in case primary and secondary FW versions are not compatible. */ + /* 0x4.28 - 0x4.28 */ + u_int8_t rev_incompatible; + /* Description - Indicates whether the ASIC serves as a the modules secondary (=1) or primary (=0) device. */ + /* 0x4.29 - 0x4.29 */ + u_int8_t secondary; + /* Description - Event update enable. If this bit is set, event generation will be updated based on the e field. Only relevant on Set operations. */ + /* 0x4.30 - 0x4.30 */ + u_int8_t ee; + /* Description - Admin state update enable. If this bit is set, admin state will be updated based on admin_state field. Only relevant on Set() operations. */ + /* 0x4.31 - 0x4.31 */ + u_int8_t ase; +}; /* Description - */ /* Size in bytes - 1040 */ @@ -582,6 +657,9 @@ replay-protection. */ /* 0x0.0 - 0x14.31 */ struct reg_access_switch_icam_reg_ext icam_reg_ext; /* Description - */ + /* 0x0.0 - 0xc.31 */ + struct reg_access_switch_pmaos_reg_ext pmaos_reg_ext; + /* Description - */ /* 0x0.0 - 0x2c.31 */ struct reg_access_switch_mdsr_reg_ext mdsr_reg_ext; /* Description - */ @@ -711,6 +789,13 @@ replay-protection. */ unsigned int reg_access_switch_mtcq_reg_ext_size(void); #define REG_ACCESS_SWITCH_MTCQ_REG_EXT_SIZE (0x70) void reg_access_switch_mtcq_reg_ext_dump(const struct reg_access_switch_mtcq_reg_ext* ptr_struct, FILE* fd); + /* pmaos_reg_ext */ + void reg_access_switch_pmaos_reg_ext_pack(const struct reg_access_switch_pmaos_reg_ext *ptr_struct, u_int8_t *ptr_buff); + void reg_access_switch_pmaos_reg_ext_unpack(struct reg_access_switch_pmaos_reg_ext *ptr_struct, const u_int8_t *ptr_buff); + void reg_access_switch_pmaos_reg_ext_print(const struct reg_access_switch_pmaos_reg_ext *ptr_struct, FILE *fd, int indent_level); + unsigned int reg_access_switch_pmaos_reg_ext_size(void); +#define REG_ACCESS_SWITCH_PMAOS_REG_EXT_SIZE (0x10) + void reg_access_switch_pmaos_reg_ext_dump(const struct reg_access_switch_pmaos_reg_ext *ptr_struct, FILE *fd); /* reg_access_switch_Nodes */ void reg_access_switch_reg_access_switch_Nodes_pack(const union reg_access_switch_reg_access_switch_Nodes* ptr_struct, u_int8_t* ptr_buff); void reg_access_switch_reg_access_switch_Nodes_unpack(union reg_access_switch_reg_access_switch_Nodes* ptr_struct, const u_int8_t* ptr_buff); From 63cc85ae8d203bbfe2bbfebb18b66f5bc78e18e5 Mon Sep 17 00:00:00 2001 From: Matan Eliyahu Date: Mon, 12 Sep 2022 22:53:23 +0300 Subject: [PATCH 25/63] [flint][mlxsign_lib] mlxsign_lib refactor Description: Using Signer interface in subcommands.cpp to merge similar code with different Signer derived classes Tested OS: Linux Tested devices: N/A Tested flows: sign/rsa_sign with given private key Known gaps (with RM ticket): N/A Issue: 3086706 Change-Id: Ic3d9886b5462fb2a6c38ee60e8790264542b0ae7 --- flint/cmd_line_parser.cpp | 107 +++--- flint/err_msgs.h | 28 +- flint/flint.cpp | 3 +- flint/flint_params.cpp | 6 - flint/flint_params.h | 9 - flint/subcommands.cpp | 424 ++++++++--------------- flint/subcommands.h | 13 +- mlxfwops/lib/fs3_ops.cpp | 122 ++++--- mlxfwops/lib/fs3_ops.h | 11 +- mlxfwops/lib/fs4_ops.cpp | 165 +-------- mlxfwops/lib/fs4_ops.h | 6 +- mlxfwops/lib/fw_ops.cpp | 21 +- mlxfwops/lib/fw_ops.h | 27 +- mlxsign_lib/Makefile.am | 5 +- mlxsign_lib/mlxsign_com_def.h | 5 - mlxsign_lib/mlxsign_lib.cpp | 4 +- mlxsign_lib/mlxsign_lib.h | 18 +- mlxsign_lib/mlxsign_openssl_engine.cpp | 6 +- mlxsign_lib/mlxsign_openssl_engine.h | 6 +- mlxsign_lib/mlxsign_signer_interface.cpp | 10 +- mlxsign_lib/mlxsign_signer_interface.h | 21 +- 21 files changed, 343 insertions(+), 674 deletions(-) diff --git a/flint/cmd_line_parser.cpp b/flint/cmd_line_parser.cpp index 62bd9b37..3d5f3463 100644 --- a/flint/cmd_line_parser.cpp +++ b/flint/cmd_line_parser.cpp @@ -124,7 +124,6 @@ SubCmdMetaData::SubCmdMetaData() _sCmds.push_back(new SubCmd("ir", "image_reactivation", SC_Image_Reactivation)); _sCmds.push_back(new SubCmd("bc", "binary_compare", SC_Binary_Compare)); _sCmds.push_back(new SubCmd("", "rsa_sign", SC_RSA_Sign)); - _sCmds.push_back(new SubCmd("", "import_hsm_key", SC_Import_Hsm_Key)); _sCmds.push_back(new SubCmd("", "export_public_key", SC_Export_Public_Key)); } @@ -232,11 +231,6 @@ FlagMetaData::FlagMetaData() _flags.push_back(new Flag("", "activate_delay_sec", 1)); _flags.push_back(new Flag("", "downstream_device_ids", 1)); _flags.push_back(new Flag("", "download_transfer", 0)); -#ifndef __WIN__ - _flags.push_back(new Flag("", "private_key_label", 1)); - _flags.push_back(new Flag("", "public_key_label", 1)); - _flags.push_back(new Flag("", "hsm", 0)); -#endif _flags.push_back(new Flag("", "openssl_engine", 1)); _flags.push_back(new Flag("", "openssl_key_id", 1)); #ifdef __WIN__ @@ -784,8 +778,6 @@ void Flint::initCmdParser() AddOptions("ocr", ' ', "", "another flag for override cache replacement", true); - AddOptions("hsm", ' ', "", "flag for the sign command", true); - AddOptions("private_key", ' ', "", "path to PEM formatted private key to be used by the sign command"); AddOptions("public_key", ' ', "", "path to PEM formatted public key to be used by the sign command"); @@ -821,65 +813,61 @@ void Flint::initCmdParser() AddOptions("linkx_auto_update", ' ', "", "Use this flag while burning all cable devices connected to host.", false, false, 1); - AddOptions( - "activate", - ' ', - "", - "Use this flag to apply the activation of all cable devices connected to host. By default, the activation is not performed.", - false, - false, - 1); + AddOptions("activate", + ' ', + "", + "Use this flag to apply the activation of all cable devices connected to host. By default, the " + "activation is not performed.", + false, + false, + 1); AddOptions( "activate_delay_sec", ' ', "", - "Use this flag to activate all cable devices connected to host with delay, acceptable values are between 0 and 255 (default - 1). Important: 'activate' flag must be set. This flag is relevant only for cable components.", + "Use this flag to activate all cable devices connected to host with delay, acceptable values are between 0 and " + "255 (default - 1). Important: 'activate' flag must be set. This flag is relevant only for cable components.", false, false, 1); - AddOptions( - "download_transfer", - ' ', - "", - "Use this flag to perform the download and transfer of all cable data for cables. By default, the download and transfer are not performed . This flag is relevant only for cable components.", - false, - false, - 1); - - AddOptions( - "downstream_device_ids", - ' ', - "", - "Use this flag to specify the LNKX ports to perform query. List must be only comma-separated numbers, without spaces.", - false, - false, - 1); + AddOptions("download_transfer", + ' ', + "", + "Use this flag to perform the download and transfer of all cable data for cables. By default, the " + "download and transfer are not performed . This flag is relevant only for cable components.", + false, + false, + 1); -#ifndef __WIN__ - AddOptions("public_key_label", ' ', "", "public key label to be used by the sign --hsm command"); + AddOptions("downstream_device_ids", + ' ', + "", + "Use this flag to specify the LNKX ports to perform query. List must be only comma-separated numbers, " + "without spaces.", + false, + false, + 1); - AddOptions("private_key_label", ' ', "", "private key label to be used by the sign --hsm command"); -#endif AddOptions( "openssl_engine", ' ', "", "Name of the OpenSSL engine to used by the sign/rsa_sign commands to work with the HSM hardware via OpenSSL API"); - AddOptions( - "openssl_key_id", - ' ', - "", - "Key identification string to be used by the sign/rsa_sign commands to work with the HSM hardware via OpenSSL API"); + AddOptions("openssl_key_id", + ' ', + "", + "Key identification string to be used by the sign/rsa_sign commands to work with the HSM hardware via " + "OpenSSL API"); AddOptions("output_file", ' ', "", "output file name for exporting the public key from PEM/BIN"); AddOptions("user_password", ' ', "", "the HSM user password string in order to work with HSM device"); #ifdef __WIN__ - AddOptions( - "cpu_util", - ' ', - "", - "Use this flag to reduce CPU utilization while burning, Windows only. Legal values are from 1 (lowest CPU) to 5 (highest CPU)"); + AddOptions("cpu_util", + ' ', + "", + "Use this flag to reduce CPU utilization while burning, Windows only. Legal values are from 1 (lowest " + "CPU) to 5 (highest CPU)"); #endif AddOptions( "cert_chain_index", @@ -906,9 +894,9 @@ void Flint::initCmdParser() AddOptionalSectionData("RETURN VALUES", "0", "Successful completion."); AddOptionalSectionData("RETURN VALUES", "1", "An error has occurred."); - AddOptionalSectionData( - "RETURN VALUES", "7", - "For burn command - burning new firmware option was not chosen by the user when prompted, thus the firmware burning process was aborted."); + AddOptionalSectionData("RETURN VALUES", "7", + "For burn command - burning new firmware option was not chosen by the user when prompted, " + "thus the firmware burning process was aborted."); for (map_sub_cmd_t_to_subcommand::iterator it = _subcommands.begin(); it != _subcommands.end(); it++) { @@ -1207,17 +1195,14 @@ ParseStatus Flint::HandleOption(string name, string value) } else if (name == "private_key") { - _flintParams.privkey_specified = true; _flintParams.privkey_file = value; } else if (name == "public_key") { - _flintParams.pubkey_specified = true; _flintParams.pubkey_file = value; } else if (name == "key_uuid") { - _flintParams.uuid_specified = true; _flintParams.privkey_uuid = value; } else if (name == "hmac_key") @@ -1263,10 +1248,6 @@ ParseStatus Flint::HandleOption(string name, string value) } _flintParams.cpu_percent = (int)cpu_percent; } - else if (name == "hsm") - { - _flintParams.hsm_specified = true; - } else if (name == "openssl_engine") { _flintParams.openssl_engine_usage_specified = true; @@ -1277,16 +1258,6 @@ ParseStatus Flint::HandleOption(string name, string value) _flintParams.openssl_engine_usage_specified = true; _flintParams.openssl_key_id = value; } - else if (name == "private_key_label") - { - _flintParams.private_key_label_specified = true; - _flintParams.private_key_label = value; - } - else if (name == "public_key_label") - { - _flintParams.public_key_label_specified = true; - _flintParams.public_key_label = value; - } else if (name == "output_file") { _flintParams.output_file_specified = true; diff --git a/flint/err_msgs.h b/flint/err_msgs.h index f2555922..2e7b23f1 100644 --- a/flint/err_msgs.h +++ b/flint/err_msgs.h @@ -59,7 +59,6 @@ typedef enum #define FLINT_CLEAR_SEM_CMD_ERROR "No command is allowed when -clear_semaphore flag is given.\n" #define FLINT_COMMAND_FLAGS_ERROR "For %s command, Please specify %s.\n" #define FLINT_COMMAND_INCORRECT_FLAGS_ERROR "For %s command, %s.\n" -#define FLINT_PARSE_MEM_ERROR "Failed to allocate memory for parsing.\n " #define FLINT_NO_OPTIONS_FOUND_ERROR "No options found. " #define FLINT_INVALID_COMMAD_ERROR "Invalid command: %s\n" #define FLINT_TOO_MANY_ARGS_ERROR "Too many arguments. Expected: %d , Received: %d\n" @@ -85,8 +84,9 @@ typedef enum #define FLINT_INVALID_FLAG_WITHOUT_FLAG_ERROR "\"%s\" flag must be specified with \"%s\" flag.\n" #define FLINT_INVALID_FLAG_WITH_CMD_ERROR "Cannot specify flag: %s with Command: %s\n" #define FLINT_CMD_VERIFY_ERROR "FW image verification failed: %s. AN HCA DEVICE CAN NOT BOOT FROM THIS IMAGE.\n" -#define FLINT_CMD_VERIFY_ERROR_1 \ - "FW image verification failed: No valid FS4 image found.Check the flash parameters, if specified..AN HCA DEVICE CAN NOT BOOT FROM THIS IMAGE" +#define FLINT_CMD_VERIFY_ERROR_1 \ + "FW image verification failed: No valid FS4 image found.Check the flash parameters, if specified..AN HCA DEVICE " \ + "CAN NOT BOOT FROM THIS IMAGE" #define FLINT_FAILED_QUERY_ERROR "Failed to query %s: %s. %s\n" #define FLINT_COMMAND_DEVICE_IMAGE_ERROR "Command \"%s\" requires both image and device to be specified.\n" #define FLINT_COMMAND_DEVICE_ERROR "Command \"%s\" requires device, but an image file was given.\n" @@ -109,7 +109,6 @@ typedef enum #define FLINT_IMAGE_READ_ERROR "Failed to read image. %s\n" #define FLINT_READ_ERROR "Failed to read from %s. %s\n" #define FLINT_READ_FILE_ERROR "Failed to read from %s.\n" -#define FLINT_WIN_NOT_SUPP_ERROR "Command \"%s\" is not supported in windows.\n" #define FLINT_WIN_ONLY_SUPP_ERROR "Command \"%s\" is supported only in windows.\n" #define FLINT_GEN_COMMAND_ERROR "Failed to execute command %s. %s\n" #define FLINT_FS3_BB_ERROR \ @@ -138,14 +137,12 @@ typedef enum #define FLINT_WB_FILE_ERROR "failed to open file: %s. %s\n" #define FLINT_WB_ERROR "write Block Failed. %s\n" #define FLINT_NO_ZLIB_ERROR "Executable was compiled with \"dump files\" option disabled.\n" -#define FLINT_FLAG_WITH_FLAG_ERROR "\"%s\" flag must be specified with \"%s\" flag.\n" #define FLINT_INVALID_PASSWORD "Invalid Password.\n" #define FLINT_NO_GUID_MAC_FLAGS_ERROR "Can not set GUIDs/MACs: please run with -uid/-guid/-mac flag.\n" #define FLINT_NOT_SUPP_UID_FLAG_ERROR \ "Can not set GUIDs/MACs: %s flag is not supported for this device.\nPlease run with -uid/-guid/-mac flag.\n" #define FLINT_NO_UID_FLAG_ERROR "Can not set GUIDs/MACs: uid is not specified, please run with -uid flag.\n" #define FLINT_CHECKSUM_ERROR "Failed to calculate checksum on %s: %s\n" -#define FLINT_CHECKSUM_MISMATCH_ERROR "Given checksum: %s does not match the checksum calculated on device FW: %s.\n" #define FLINT_CHECKSUM_PARSE_ERROR "Failed to parse given checksum.\n" #define FLINT_CHECKSUM_LEN_ERROR "MD5 checksum should be exactly 16 bytes long.\n" #define FLINT_CHECKSUM_HEX_ERROR "MD5 checksum should contain only hexadecimal digits.\n" @@ -169,34 +166,21 @@ typedef enum #define UNCOMPRESSS_ERROR "Failed uncompressing FW configuration section. uncompress returns %d" #define OPEN_WRITE_FILE_ERROR "Can not open file %s for write: %s." #define IMAGE_SIGN_TYPE_ERROR "Image signing is applicable only for selected FW images. Please check your image type.\n" -#define HSM_INIT_ERROR "HSM init has failed! Please check if the HSM card installed and configured properly.\n" -#define HSM_PRIVATE_KEY_DUPLICATE "Creating HSM signature has failed - the private key label is duplicated.\n" -#define HSM_PUBLIC_KEY_DUPLICATE "Creating HSM signature has failed - the public key label is duplicated.\n" -#define HSM_SIGNATURE_CREATION_FAILED "Creating HSM signature has failed\n" -#define HSM_UUID_MISSING "To Sign the image with RSA you must provide UUID with HSM sign.\n" -#define HSM_PRIVATE_KEY_LABEL_MISSING "Must supply private key label for sign with HSM sign.\n" -#define HSM_PASSWORD_MISSING "Must supply HSM user password for sign with HSM sign.\n" #define SIGN_PRIVATE_KEY_NOT_FOUND "Can't find private key file %s \n" #define SIGN_PUBLIC_KEY_NOT_FOUND "Can't find public key file %s \n" -#define HSM_BOOT_SIGNATURE_CREATION_FAILED "Creating HSM BOOT signature has failed\n" -#define HSM_CRITICAL_SIGNATURE_CREATION_FAILED "Creating HSM critical signature has failed\n" -#define HSM_NON_CRITICAL_SIGNATURE_CREATION_FAILED "Creating HSM non-critical signature has failed\n" -#define HSM_SECURE_BOOT_SIGNATURE_FAILED "Inserting secure BOOT signatures has failed : %s.\n" -#define HSM_SECURE_FW_SIGNATURE_FAILED "Creation secured FW signatures has failed.\n" #define LINKX_QUERY_DEVICE_NOT_SUPPORTED "Linkx query for device %s is not supported.\n" #define LINKX_BURN_DEVICE_NOT_SUPPORTED "Linkx burn for device %s is not supported.\n" /************************** * Flint Warning Messages *************************/ -#define FLINT_QQ_WARRNING "-W- Running quick query - Skipping full image integrity checks.\n" #define FLINT_NOT_MLNX_FW_WARNING "-W- Not a Mellanox FW image (vendor_id = 0x%04x). VSD and PSID are not displayed.\n" #define FLINT_BLANK_GUIDS_WARNING "-W- GUIDs/MACs values and their CRC are not set.\n" #define FLINT_MULTI_BIT_WARNING "Multicast bit (bit 40) is set." #define FLINT_MORE_48_BITS_WARNING "More than 48 bits are used." #define FLINT_BAD_MAC_ADRESS_WARNING "\n-W- Bad mac address ( %4.4x%8.8x ): %s\n" -#define FLINT_MAC_ENTRIES_WARNING \ - "-W- Cannot get MAC address: Expecting %d entries in guid section, got %d. Probably an old FW image. Please update.\n" -#define FLINT_INTERRUPT_WARRNING "\n-W- An internal error occurred. This program cannot be interrupted.\n" +#define FLINT_MAC_ENTRIES_WARNING \ + "-W- Cannot get MAC address: Expecting %d entries in guid section, got %d. Probably an old FW image. Please " \ + "update.\n" #define FLINT_SET_GUIDS_WARRNING "-W- GUIDs are already set, re-burning image with the new GUIDs ...\n" #define FLINT_OCR_WARRNING \ "\n-W- Firmware flash cache access is enabled. Running in this mode may cause the firmware to hang.\n" diff --git a/flint/flint.cpp b/flint/flint.cpp index 503c25be..2048aacf 100644 --- a/flint/flint.cpp +++ b/flint/flint.cpp @@ -185,7 +185,6 @@ map_sub_cmd_t_to_subcommand Flint::initSubcommandMap() cmdMap[SC_Image_Reactivation] = new ImageReactivationSubCommand(); cmdMap[SC_RSA_Sign] = new SignRSASubCommand(); cmdMap[SC_Binary_Compare] = new BinaryCompareSubCommand(); - cmdMap[SC_Import_Hsm_Key] = new ImportHsmKeySubCommand(); #ifndef NO_OPEN_SSL cmdMap[SC_Export_Public_Key] = new ExportPublicSubCommand(); #endif @@ -271,7 +270,7 @@ FlintStatus Flint::run(int argc, char* argv[]) if (_subcommands.count(_flintParams.cmd) == 0) { // should not be reached - printf("-E- FATAL: command object not found."); + printf("-E- FATAL: command object not found.\n"); return FLINT_FAILED; } _subcommands[_flintParams.cmd]->setParams(_flintParams); diff --git a/flint/flint_params.cpp b/flint/flint_params.cpp index 5795eceb..05f4eab6 100644 --- a/flint/flint_params.cpp +++ b/flint/flint_params.cpp @@ -92,10 +92,7 @@ FlintParams::FlintParams() hexdump_format = false; skip_ci_req = false; use_dev_rom = false; - privkey_specified = false; - pubkey_specified = false; privkey2_specified = false; - uuid_specified = false; uuid2_specified = false; no_fw_ctrl = false; image_reactivation = false; @@ -104,9 +101,6 @@ FlintParams::FlintParams() use_psid = false; congestion_control = false; use_cpu_utilization = false; - public_key_label_specified = false; - private_key_label_specified = false; - hsm_specified = false; hsm_password_specified = false; linkx_control = false; cableDeviceIndex = -1; diff --git a/flint/flint_params.h b/flint/flint_params.h index 28ff3caa..53c10a01 100644 --- a/flint/flint_params.h +++ b/flint/flint_params.h @@ -91,7 +91,6 @@ typedef enum SC_Image_Reactivation, SC_RSA_Sign, SC_Binary_Compare, - SC_Import_Hsm_Key, SC_Export_Public_Key } sub_cmd_t; @@ -157,12 +156,9 @@ class FlintParams bool hexdump_format; bool skip_ci_req; bool use_dev_rom; - bool privkey_specified; - bool pubkey_specified; string privkey_file; string pubkey_file; - bool uuid_specified; string privkey_uuid; bool privkey2_specified; bool key_specified; @@ -180,11 +176,6 @@ class FlintParams string congestion_control_param; bool use_cpu_utilization; int cpu_percent; - bool hsm_specified; - string private_key_label; - string public_key_label; - bool private_key_label_specified; - bool public_key_label_specified; bool output_file_specified; string output_file; bool hsm_password_specified; diff --git a/flint/subcommands.cpp b/flint/subcommands.cpp index 1a778cd3..df653fd7 100644 --- a/flint/subcommands.cpp +++ b/flint/subcommands.cpp @@ -53,9 +53,6 @@ #endif #if !defined(NO_OPEN_SSL) #include -#if !defined(NO_DYNAMIC_ENGINE) -#include -#endif #endif #include "hex64.h" #define MAX_IMG_TYPE_LEN 20 @@ -1698,8 +1695,8 @@ SignSubCommand::SignSubCommand() _flagLong = "sign"; _flagShort = ""; _paramExp = "None"; - _example = FLINT_NAME - " -i fw_image.bin [--private_key file.pem --key_uuid uuid_string] OR [--openssl_engine engine --openssl_key_id identifier --key_uuid uuid_string] sign"; + _example = FLINT_NAME " -i fw_image.bin [--private_key file.pem --key_uuid uuid_string] OR [--openssl_engine " + "engine --openssl_key_id identifier --key_uuid uuid_string] sign"; _v = Wtv_Img; _maxCmdParamNum = 0; _cmdType = SC_Sign; @@ -1721,85 +1718,67 @@ FlintStatus SignSubCommand::executeCommand() if (_flintParams.openssl_engine_usage_specified) { #if !defined(NO_OPEN_SSL) && !defined(NO_DYNAMIC_ENGINE) - MlxSign::OpensslEngineSigner engineSigner(_flintParams.openssl_engine, _flintParams.openssl_key_id); - int rc = engineSigner.init(); + //* Init Signer + MlxSign::MlxSignRSAViaHSM signer(_flintParams.openssl_engine, _flintParams.openssl_key_id); + int rc = signer.Init(); if (rc) { - reportErr(true, "Failed to initialize %s engine (rc = 0x%x)\n", _flintParams.openssl_engine.c_str(), rc); + reportErr(true, "Open SSL dynamic engine functionality is not supported.\n"); return FLINT_FAILED; } - // flint sign over openssl only allow for 4K key size - int keySize = engineSigner.getPrivateKeySize(); - if (keySize != KEY_SIZE_512) - { - reportErr(true, "The HSM key has to be 4096 bit!\n"); - return FLINT_FAILED; - } - vector fourMbImage; - vector signature; - vector sha; - if (!_imgOps->FwCalcSHA(MlxSign::SHA512, sha, fourMbImage)) - { - reportErr(true, FLINT_IMAGE_READ_ERROR, _imgOps->err()); - return FLINT_FAILED; - } - rc = engineSigner.sign(fourMbImage, signature); - if (rc) - { - reportErr(true, "Failed to set private key from engine (rc = 0x%x)\n", rc); - return FLINT_FAILED; - } - if (!_imgOps->InsertSecureFWSignature(signature, _flintParams.privkey_uuid.c_str(), &verifyCbFunc)) + if (!_imgOps->SignForFwUpdate(_flintParams.privkey_uuid.c_str(), signer, MlxSign::SHA512, &verifyCbFunc)) { reportErr(true, FLINT_SIGN_ERROR, _imgOps->err()); return FLINT_FAILED; } - return FLINT_SUCCESS; #else reportErr(true, "Open SSL functionality is not supported.\n"); return FLINT_FAILED; #endif } - if (_flintParams.hsm_specified) + else if (!_flintParams.privkey_file.empty() && !_flintParams.privkey_uuid.empty()) { - // Luna HSM not supported - reportErr(true, FLINT_NO_HSM); - return FLINT_FAILED; - } - else - { - if (_flintParams.privkey_specified && _flintParams.uuid_specified) + if (_flintParams.privkey2_specified && _flintParams.uuid2_specified) { - if (_flintParams.privkey2_specified && _flintParams.uuid2_specified) + if (!_imgOps->FwSignWithTwoRSAKeys(_flintParams.privkey_file.c_str(), + _flintParams.privkey_uuid.c_str(), + _flintParams.privkey2_file.c_str(), + _flintParams.privkey2_uuid.c_str(), + &verifyCbFunc)) { - if (!_imgOps->FwSignWithTwoRSAKeys(_flintParams.privkey_file.c_str(), - _flintParams.privkey_uuid.c_str(), - _flintParams.privkey2_file.c_str(), - _flintParams.privkey2_uuid.c_str(), - &verifyCbFunc)) - { - reportErr(true, FLINT_SIGN_ERROR, _imgOps->err()); - return FLINT_FAILED; - } - } - else - { - if (!_imgOps->signForFwUpdate(_flintParams.privkey_file.c_str(), _flintParams.privkey_uuid.c_str(), - &verifyCbFunc)) - { - reportErr(true, FLINT_SIGN_ERROR, _imgOps->err()); - return FLINT_FAILED; - } + reportErr(true, FLINT_SIGN_ERROR, _imgOps->err()); + return FLINT_FAILED; } } else { - if (!_imgOps->FwInsertSHA256(&verifyCbFunc)) +#if !defined(NO_OPEN_SSL) && !defined(NO_DYNAMIC_ENGINE) + //* Init Signer + MlxSign::MlxSignRSAViaOpenssl signer(_flintParams.privkey_file.c_str()); + int rc = signer.Init(); + if (rc) + { + return FLINT_FAILED; + } + + if (!_imgOps->SignForFwUpdate(_flintParams.privkey_uuid.c_str(), signer, signer.GetShaType(), &verifyCbFunc)) { reportErr(true, FLINT_SIGN_ERROR, _imgOps->err()); return FLINT_FAILED; } +#else + reportErr(true, "Open SSL functionality is not supported.\n"); + return FLINT_FAILED; +#endif + } + } + else + { + if (!_imgOps->FwInsertSHA256(&verifyCbFunc)) + { + reportErr(true, FLINT_SIGN_ERROR, _imgOps->err()); + return FLINT_FAILED; } } return FLINT_SUCCESS; @@ -1824,48 +1803,29 @@ bool SignSubCommand::verifyParams() reportErr(true, "The Sign command with --openssl_key_id flag does not accept public keys\n"); return false; } - if (_flintParams.privkey_specified) - { - reportErr( - true, - "The Sign command does not accept --private_key flag with the following flags: --openssl_engine, --openssl_key_id\n"); - return false; - } - } - else if (_flintParams.hsm_specified) - { - if (_flintParams.uuid_specified == false) - { - reportErr(true, HSM_UUID_MISSING); - return false; - } - if (_flintParams.private_key_label_specified == false) + if (!_flintParams.privkey_file.empty()) { - reportErr(true, HSM_PRIVATE_KEY_LABEL_MISSING); - return false; - } - if (_flintParams.hsm_password_specified == false) - { - reportErr(true, HSM_PASSWORD_MISSING); + reportErr(true, "The Sign command does not accept --private_key flag with the following flags: " + "--openssl_engine, --openssl_key_id\n"); return false; } } else { - if (_flintParams.privkey_specified ^ _flintParams.uuid_specified) + if (_flintParams.privkey_file.empty() != _flintParams.privkey_uuid.empty()) { reportErr(true, "To Sign the image with RSA you must provide " "private key and uuid.\n"); return false; } - if (!_flintParams.privkey_specified && _flintParams.privkey2_specified) + if (_flintParams.privkey_file.empty() && _flintParams.privkey2_specified) { reportErr(true, "Use --private_key if you want to sign with only one key.\n"); return false; } - if (_flintParams.privkey2_specified ^ _flintParams.uuid2_specified) + if (_flintParams.privkey2_specified != _flintParams.uuid2_specified) { reportErr(true, "To Sign the image with two RSA keys you must provide " "two private keys and two uuid.\n"); @@ -1897,7 +1857,6 @@ BinaryCompareSubCommand::BinaryCompareSubCommand() _maxCmdParamNum = 1; _minCmdParamNum = 0; _cmdType = SC_Binary_Compare; - _fwType = 0; _devQueryRes = 0; _mccSupported = false; memset(&_devInfo, 0, sizeof(_devInfo)); @@ -2033,7 +1992,6 @@ FlintStatus BinaryCompareSubCommand::executeCommand() { _flintParams.override_cache_replacement = true; } - _fwType = _fwOps->FwType(); // query both image and device if (!_fwOps->FwQuery(&_devInfo, true, false, true, false, (_flintParams.silent == false))) { @@ -2112,8 +2070,8 @@ SignRSASubCommand::SignRSASubCommand() _flagLong = "rsa_sign"; _flagShort = ""; _paramExp = "None"; - _example = FLINT_NAME - " -i fw_image.bin [--private_key file.pem] OR [--private_key_label @@ -1019,8 +1021,8 @@ - - + + @@ -1042,7 +1044,7 @@ - + @@ -1076,7 +1078,7 @@ - + @@ -1085,7 +1087,7 @@ - + @@ -1256,9 +1258,9 @@ - - - + + + @@ -1328,7 +1330,7 @@ - + @@ -1352,7 +1354,7 @@ - + @@ -1372,7 +1374,7 @@ - + @@ -1436,11 +1438,11 @@ - + - + @@ -1485,7 +1487,7 @@ - + @@ -1506,6 +1508,21 @@ + + + + + + + + + + + + + + + @@ -1528,6 +1545,20 @@ + + + + + + + + + + + + + + @@ -1608,14 +1639,14 @@ - + - + From e27727479cad8b68d515b5008bde0e0951f6f33f Mon Sep 17 00:00:00 2001 From: Alon Strutsovsky Date: Wed, 21 Sep 2022 10:45:33 +0300 Subject: [PATCH 39/63] [mstregdump] bugfix - csv-file-path arrives NULL Description: Tested OS: Tested devices: Tested flows: Known gaps (with RM ticket): Issue: 3213932 --- mstdump/crd_main/mstdump.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mstdump/crd_main/mstdump.c b/mstdump/crd_main/mstdump.c index 663891e3..1168b908 100644 --- a/mstdump/crd_main/mstdump.c +++ b/mstdump/crd_main/mstdump.c @@ -165,7 +165,7 @@ int main(int argc, char* argv[]) } } rc = CRD_OK; - rc = crd_init(&context, mf, full, cause_addr, cause_off, NULL, NULL); + rc = crd_init(&context, mf, full, cause_addr, cause_off, NULL, ""); if (rc) { mclose(mf); From d61a6b19a38654927369ad598ac15602bfca2756 Mon Sep 17 00:00:00 2001 From: Matan Eliyahu Date: Wed, 21 Sep 2022 12:09:38 +0300 Subject: [PATCH 40/63] Fix compilation when openssl lib is missing (with configure flag --disable-openssl) Description: N/A Tested OS: Linux Tested devices: N/A Tested flows: ./autogen.sh && ./configure --disable-openssl && make -j16 Known gaps (with RM ticket): N/A Issue: 3213043 --- flint/subcommands.h | 1 + mlxsign_lib/mlxsign_signer_interface.h | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/flint/subcommands.h b/flint/subcommands.h index dfc5ce94..0424f09d 100644 --- a/flint/subcommands.h +++ b/flint/subcommands.h @@ -43,6 +43,7 @@ #define MAX_PASSWORD_LEN 256 #include +#include #include diff --git a/mlxsign_lib/mlxsign_signer_interface.h b/mlxsign_lib/mlxsign_signer_interface.h index 6009abe1..325e6cb0 100644 --- a/mlxsign_lib/mlxsign_signer_interface.h +++ b/mlxsign_lib/mlxsign_signer_interface.h @@ -34,7 +34,7 @@ #define USER_MLXSIGN_LIB_MLXSIGN_SIGNER_INTERFACE_H_ #include "mlxsign_lib.h" -#if !defined(NO_DYNAMIC_ENGINE) +#if !defined(UEFI_BUILD) && !defined(NO_OPEN_SSL) && !defined(NO_DYNAMIC_ENGINE) #include "mlxsign_openssl_engine.h" #endif From ff12d9079d7c28a9dcc04b1e792c32807898eb3f Mon Sep 17 00:00:00 2001 From: Mustafa Dalloul Date: Tue, 27 Sep 2022 15:12:34 +0300 Subject: [PATCH 41/63] [mstlink] Fixing amber fields issues Description: Fixing amber fields issues Issue: 3170527 Signed-off-by: Mustafa Dalloul --- mlxlink/modules/amber_field.cpp | 16 +++++++++++++--- mlxlink/modules/mlxlink_amBER_collector.cpp | 16 +++++++++------- mlxlink/modules/mlxlink_commander.cpp | 5 +++-- 3 files changed, 25 insertions(+), 12 deletions(-) diff --git a/mlxlink/modules/amber_field.cpp b/mlxlink/modules/amber_field.cpp index 28000076..4df42d47 100644 --- a/mlxlink/modules/amber_field.cpp +++ b/mlxlink/modules/amber_field.cpp @@ -77,13 +77,19 @@ string AmberField::getValueFromFields(const vector& fields, const st { string value = ""; bool found = false; + for (auto it = fields.begin(); it != fields.end(); it++) { if (it->getUiField().find(uiField) != string::npos) { - if (matchUiField && it->getUiField() != uiField) + if (matchUiField) { - continue; + if (it->getUiField() == uiField) + { + value = it->getUiValue(); + found = true; + break; + } } else { @@ -92,12 +98,16 @@ string AmberField::getValueFromFields(const vector& fields, const st } } } + if (!found) { throw MlxRegException("Requested field does not exist: %s", uiField.c_str()); } - value = deleteLastChar(value); + if (!matchUiField) + { + value = deleteLastChar(value); + } return value; } diff --git a/mlxlink/modules/mlxlink_amBER_collector.cpp b/mlxlink/modules/mlxlink_amBER_collector.cpp index cc5e2678..6018e348 100644 --- a/mlxlink/modules/mlxlink_amBER_collector.cpp +++ b/mlxlink/modules/mlxlink_amBER_collector.cpp @@ -80,7 +80,7 @@ MlxlinkAmBerCollector::MlxlinkAmBerCollector(Json::Value& jsonRoot) : _jsonRoot( _baseSheetsList[AMBER_SHEET_MODULE_STATUS] = FIELDS_COUNT{110, 110, 0}; _baseSheetsList[AMBER_SHEET_SYSTEM] = FIELDS_COUNT{16, 21, 11}; _baseSheetsList[AMBER_SHEET_SERDES_16NM] = FIELDS_COUNT{376, 736, 0}; - _baseSheetsList[AMBER_SHEET_SERDES_7NM] = FIELDS_COUNT{206, 374, 499}; + _baseSheetsList[AMBER_SHEET_SERDES_7NM] = FIELDS_COUNT{206, 374, 502}; _baseSheetsList[AMBER_SHEET_PORT_COUNTERS] = FIELDS_COUNT{35, 0, 35}; _baseSheetsList[AMBER_SHEET_TROUBLESHOOTING] = FIELDS_COUNT{2, 2, 0}; _baseSheetsList[AMBER_SHEET_PHY_OPERATION_INFO] = FIELDS_COUNT{18, 18, 15}; @@ -683,12 +683,10 @@ void MlxlinkAmBerCollector::getPpcntBer(u_int32_t portType, vector& to_string(getFieldValue("effective_ber_coef")) + "E-" + to_string(getFieldValue("effective_ber_magnitude")); fields.push_back(AmberField(preTitle + "Effective_BER", berStr)); - if (_isPortETH) + if (_isPortETH && (portType == NETWORK_PORT_TYPE_NEAR || portType == NETWORK_PORT_TYPE_FAR)) { - string effErrorsStr = (portType == NETWORK_PORT_TYPE_NEAR || portType == NETWORK_PORT_TYPE_FAR) ? - to_string(add32BitTo64(getFieldValue("phy_effective_errors_high"), - getFieldValue("phy_effective_errors_low"))) : - "N/A"; + string effErrorsStr = to_string( + add32BitTo64(getFieldValue("phy_effective_errors_high"), getFieldValue("phy_effective_errors_low"))); fields.push_back(AmberField(preTitle + "Effective_Errors", effErrorsStr)); } @@ -835,7 +833,7 @@ vector MlxlinkAmBerCollector::getLinkStatus() getFieldValue("phy_raw_errors_lane" + to_string(lane) + "_low")); val = to_string(rawError); } - fields.push_back(AmberField("Raw_Errors_Lane" + to_string(lane), val)); + fields.push_back(AmberField("Raw_Errors_lane" + to_string(lane), val)); } resetLocalParser(ACCESS_REG_PPCNT); updateField("local_port", _localPort); @@ -2260,6 +2258,10 @@ void MlxlinkAmBerCollector::exportToCSV() // Preparing CSV header line if (!ifile.good()) { + if (!berFile.good()) + { + throw MlxRegException("The provided file path does not exist!"); + } // Going over all groups inside _amberCollection and getting the field name for each one for (const auto& sheet : _sheetsList) { diff --git a/mlxlink/modules/mlxlink_commander.cpp b/mlxlink/modules/mlxlink_commander.cpp index 3e645437..ae7c627c 100644 --- a/mlxlink/modules/mlxlink_commander.cpp +++ b/mlxlink/modules/mlxlink_commander.cpp @@ -1977,11 +1977,12 @@ void MlxlinkCommander::prepareBerInfo() ANSI_COLOR_RESET, true, _linkUP); } setPrintVal(_berInfoCmd, "Effective Physical Errors", - AmberField::getValueFromFields(_ppcntFields, "Effective_Errors"), ANSI_COLOR_RESET, true, _linkUP); + AmberField::getValueFromFields(_ppcntFields, "Effective_Errors", true), ANSI_COLOR_RESET, true, + _linkUP); setPrintVal(_berInfoCmd, "Effective Physical BER", AmberField::getValueFromFields(_ppcntFields, "Effective_BER"), ANSI_COLOR_RESET, true, _linkUP); - string phyRawErr = AmberField::getValueFromFields(_ppcntFields, "Raw_Errors_Lane", false); + string phyRawErr = AmberField::getValueFromFields(_ppcntFields, "Raw_Errors_lane", false); findAndReplace(phyRawErr, "_", ","); phyRawErr = getValuesOfActiveLanes(phyRawErr); From 20d7542b79ec0d69d306790aff328d23431886e5 Mon Sep 17 00:00:00 2001 From: Mustafa Dalloul Date: Tue, 27 Sep 2022 15:19:43 +0300 Subject: [PATCH 42/63] [mstlink] Fixing missing loopback configuration in the help menu Description: Adding missing loopback configuration to the help menu (LL loopback) Issue: 3147128 Signed-off-by: Mustafa Dalloul --- mlxlink/modules/mlxlink_ui.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mlxlink/modules/mlxlink_ui.cpp b/mlxlink/modules/mlxlink_ui.cpp index 244e21c5..cb33aeab 100644 --- a/mlxlink/modules/mlxlink_ui.cpp +++ b/mlxlink/modules/mlxlink_ui.cpp @@ -108,7 +108,7 @@ void MlxlinkUi::printSynopsisCommands() MlxlinkRecord::printFlagLine( PPLR_FLAG_SHORT, PPLR_FLAG, "loopback", "Configure Loopback Mode [NO(no loopback)/RM(phy remote Rx-to-Tx loopback)/PH(internal phy Tx-to-Rx " - "loopback)/EX(external loopback connector needed)/EX(external Tx-to-Rx loopback)]"); + "loopback)/EX(external loopback connector needed)/LL(link layer local loopback)]"); MlxlinkRecord::printFlagLine( PPLM_FLAG_SHORT, PPLM_FLAG, "fec_override", "Configure FEC [AU(Auto)/NF(No-FEC)/FC(FireCode " From 7992d56d64173a25b99d654f8e23b77c2bc93fed Mon Sep 17 00:00:00 2001 From: Mustafa Dalloul Date: Tue, 27 Sep 2022 15:25:39 +0300 Subject: [PATCH 43/63] [mstlink][PCIE] Gen2 servers does not support eye info Description: PCIe Gen2 servers does not support eye information Issue: 3142236 Signed-off-by: Mustafa Dalloul --- mlxlink/modules/mlxlink_commander.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/mlxlink/modules/mlxlink_commander.cpp b/mlxlink/modules/mlxlink_commander.cpp index 3e645437..2b63a1c6 100644 --- a/mlxlink/modules/mlxlink_commander.cpp +++ b/mlxlink/modules/mlxlink_commander.cpp @@ -2279,6 +2279,13 @@ void MlxlinkCommander::showEye() if (_userInput._pcie) { checkPCIeValidity(); + + sendPrmReg(ACCESS_REG_MPEIN, GET, "depth=%d,pcie_index=%d,node=%d", _dpn.depth, _dpn.pcieIndex, _dpn.node); + + if (getFieldValue("link_speed_active") < GEN3) + { + throw MlxRegException("Eye information available for Gen3 and above"); + } } try { From c38a4d3ef843a50e410fa7bfb0d816d321762e4c Mon Sep 17 00:00:00 2001 From: Mustafa Dalloul Date: Thu, 29 Sep 2022 15:11:39 +0300 Subject: [PATCH 44/63] [mstlink] Updating amber to 2.08 and porting some fixes Description: Updating amber to 2.08 and porting some fixes Issue: 3195622 Signed-off-by: Mustafa Dalloul --- mlxlink/modules/mlxlink_amBER_collector.cpp | 2 +- mlxlink/modules/mlxlink_enums.h | 2 +- mlxlink/modules/mlxlink_err_inj_commander.cpp | 4 ++-- mlxlink/modules/mlxlink_maps.cpp | 2 +- mlxlink/modules/mlxlink_ui.cpp | 4 ++-- mlxlink/modules/mlxlink_utils.cpp | 7 ++++--- 6 files changed, 11 insertions(+), 10 deletions(-) diff --git a/mlxlink/modules/mlxlink_amBER_collector.cpp b/mlxlink/modules/mlxlink_amBER_collector.cpp index 6018e348..be2da33f 100644 --- a/mlxlink/modules/mlxlink_amBER_collector.cpp +++ b/mlxlink/modules/mlxlink_amBER_collector.cpp @@ -81,7 +81,7 @@ MlxlinkAmBerCollector::MlxlinkAmBerCollector(Json::Value& jsonRoot) : _jsonRoot( _baseSheetsList[AMBER_SHEET_SYSTEM] = FIELDS_COUNT{16, 21, 11}; _baseSheetsList[AMBER_SHEET_SERDES_16NM] = FIELDS_COUNT{376, 736, 0}; _baseSheetsList[AMBER_SHEET_SERDES_7NM] = FIELDS_COUNT{206, 374, 502}; - _baseSheetsList[AMBER_SHEET_PORT_COUNTERS] = FIELDS_COUNT{35, 0, 35}; + _baseSheetsList[AMBER_SHEET_PORT_COUNTERS] = FIELDS_COUNT{35, 0, 50}; _baseSheetsList[AMBER_SHEET_TROUBLESHOOTING] = FIELDS_COUNT{2, 2, 0}; _baseSheetsList[AMBER_SHEET_PHY_OPERATION_INFO] = FIELDS_COUNT{18, 18, 15}; _baseSheetsList[AMBER_SHEET_LINK_UP_INFO] = FIELDS_COUNT{9, 9, 0}; diff --git a/mlxlink/modules/mlxlink_enums.h b/mlxlink/modules/mlxlink_enums.h index 9dda6376..191bfdbf 100644 --- a/mlxlink/modules/mlxlink_enums.h +++ b/mlxlink/modules/mlxlink_enums.h @@ -34,7 +34,7 @@ #define MLXLINK_ENUMS_H // Common definitions -#define AMBER_VERSION "2.05" +#define AMBER_VERSION "2.08" #define ACCESS_REG_MCIA "MCIA" #define ACCESS_REG_MDDQ "MDDQ" diff --git a/mlxlink/modules/mlxlink_err_inj_commander.cpp b/mlxlink/modules/mlxlink_err_inj_commander.cpp index 9b550d70..b00b2ac0 100644 --- a/mlxlink/modules/mlxlink_err_inj_commander.cpp +++ b/mlxlink/modules/mlxlink_err_inj_commander.cpp @@ -350,8 +350,8 @@ void MlxlinkErrInjCommander::startPcieErrInj(const DPN& dpn, try { sendPrmReg(ACCESS_REG_MPEINJ, SET, - "depth=%d,pcie_index=%d,node=%d,error_type=%d,error_duration=%d," - "start_delay=%d,dbdf=%d,err_params[0]=%d,err_params[1]=%d,err_params[2]=%d,err_params[3]=%d", + "depth=%d,pcie_index=%d,node=%d,error_type=%d,error_duration=%d,start_delay=%d,dest_bdf=%d," + "error_params_0=%d,error_params_1=%d,error_params_2=%d,error_params_3=%d", dpn.depth, dpn.pcieIndex, dpn.node, req.errorType, req.errorDuration, req.injectionDelay, req.dbdf, req.parameters[0], req.parameters[1], req.parameters[2], req.parameters[3]); } diff --git a/mlxlink/modules/mlxlink_maps.cpp b/mlxlink/modules/mlxlink_maps.cpp index 512933b6..b7f848e8 100644 --- a/mlxlink/modules/mlxlink_maps.cpp +++ b/mlxlink/modules/mlxlink_maps.cpp @@ -637,7 +637,7 @@ void MlxlinkMaps::cimsCableBreakoutMapping() _cimsCableBreakout[CMIS_CABLE_BREAKOUT_UNSPECIFIED] = "Unspecified"; _cimsCableBreakout[CMIS_CABLE_BREAKOUT_QSFPDD_to_QSFPDD] = "X to X"; _cimsCableBreakout[CMIS_CABLE_BREAKOUT_QSFPDD_to_2QSFP_or_2QSFPDD] = "X to 2xQSFP or 2xX (depopulated / 4 lanes)"; - _cimsCableBreakout[CMIS_CABLE_BREAKOUT_QSFPDD_to_4SFPDD_or_4QSFP] = "X to 4xSFP-DD or 4xX (depopulated / 2 lanes)"; + _cimsCableBreakout[CMIS_CABLE_BREAKOUT_QSFPDD_to_4SFPDD_or_4QSFP] = "X to 4xDSFP or 4xQSFP (depopulated / 2 lanes)"; _cimsCableBreakout[CMIS_CABLE_BREAKOUT_QSFPDD_to_8SFP] = "X to 8xSFP"; _cimsCableBreakout[CMIS_CABLE_BREAKOUT_QSFPDD_to_QSFP_or_QSFPDD] = "X (depopulated / 4 lanes) to QSFP or X (depopulated / 4 lanes)"; diff --git a/mlxlink/modules/mlxlink_ui.cpp b/mlxlink/modules/mlxlink_ui.cpp index cb33aeab..f481ce96 100644 --- a/mlxlink/modules/mlxlink_ui.cpp +++ b/mlxlink/modules/mlxlink_ui.cpp @@ -309,8 +309,8 @@ void MlxlinkUi::printSynopsisCommands() "Start/show PCIe error injection"); printf(IDENT); MlxlinkRecord::printFlagLine(MPEINJ_ERR_TYPE_FLAG_SHORT, MPEINJ_ERR_TYPE_FLAG, "type", - "PCIe error type [BAD_DLLP_LCRC(1),BAD_TLP_LCRC(2),BAD_TLP_ECRC(3),ERR_MSG(4)," - "MALFORMED_TLP(5),POISONED_TLP(6),UNEXPECTED_CPL(7),ACS_VIOLATION(8)," + "PCIe error type [ABORT(0),BAD_DLLP_LCRC(1),BAD_TLP_LCRC(2),BAD_TLP_ECRC(3)," + "ERR_MSG(4),MALFORMED_TLP(5),POISONED_TLP(6),UNEXPECTED_CPL(7),ACS_VIOLATION(8)," "SURPRISE_LINK_DOWN(9),RECEIVER_ERROR(10)]"); printf(IDENT); MlxlinkRecord::printFlagLine(MPEINJ_ERR_DURATION_FLAG_SHORT, MPEINJ_ERR_DURATION_FLAG, "duration", diff --git a/mlxlink/modules/mlxlink_utils.cpp b/mlxlink/modules/mlxlink_utils.cpp index 3ae4894c..e1198d39 100644 --- a/mlxlink/modules/mlxlink_utils.cpp +++ b/mlxlink/modules/mlxlink_utils.cpp @@ -1499,8 +1499,11 @@ int getBDFInt(const string& bdfStr) return -1; } + // parse the port function par xx:00.0, split the sec + auto funcStr = MlxlinkRecord::split(pfStr[1], "."); + // make sure that there it's matching this format xx:xx.x - if (pfStr[0].size() > 2 || pfStr[1].size() > 4) + if (pfStr[0].size() > 2 || pfStr[1].size() > 4 || funcStr.size() != 2) { return -1; } @@ -1517,8 +1520,6 @@ int getBDFInt(const string& bdfStr) return -1; } - // parse the port function par xx:00.0, split the sec - auto funcStr = MlxlinkRecord::split(pfStr[1], "."); u_int32_t tmp = stoi(funcStr[0], &sz, 16); tmp <<= 3; bdf |= tmp; From eddaab8970375373f8c0c113df93fe6c78694318 Mon Sep 17 00:00:00 2001 From: Mustafa Dalloul Date: Mon, 3 Oct 2022 10:40:12 +0300 Subject: [PATCH 45/63] [mstlink] Fixing recommendation message in the troubleshooting info section Description: Fixing recommendation message in the troubleshooting info section Issue: 3223773 Signed-off-by: Mustafa Dalloul --- mlxlink/modules/mlxlink_commander.cpp | 3 ++- mlxlink/modules/mlxlink_commander.h | 1 + mlxlink/modules/mlxlink_enums.h | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/mlxlink/modules/mlxlink_commander.cpp b/mlxlink/modules/mlxlink_commander.cpp index bff22405..6cd3f7c0 100644 --- a/mlxlink/modules/mlxlink_commander.cpp +++ b/mlxlink/modules/mlxlink_commander.cpp @@ -95,6 +95,7 @@ MlxlinkCommander::MlxlinkCommander() : _userInput() _amberCollector = NULL; _uniqueCableCmds = 0; _uniquePcieCmds = 0; + _groupOpcode = MONITOR_OPCODE; } MlxlinkCommander::~MlxlinkCommander() @@ -1776,7 +1777,7 @@ void MlxlinkCommander::troubInfoPage() try { sendPrmReg(ACCESS_REG_PDDR, GET, "page_select=%d,group_opcode=%d", PDDR_TROUBLESHOOTING_INFO_PAGE, - MONITOR_OPCODE); + _groupOpcode); u_int32_t monitorOpcode = getFieldValue("monitor_opcode"); string color = status2Color(monitorOpcode); diff --git a/mlxlink/modules/mlxlink_commander.h b/mlxlink/modules/mlxlink_commander.h index 9fd043de..f5e107cb 100644 --- a/mlxlink/modules/mlxlink_commander.h +++ b/mlxlink/modules/mlxlink_commander.h @@ -593,6 +593,7 @@ class MlxlinkCommander : public MlxlinkRegParser u_int32_t _moduleNumber; u_int32_t _slotIndex; u_int32_t _linkSpeed; + u_int32_t _groupOpcode; string _extAdbFile; string _device; string _fwVersion; diff --git a/mlxlink/modules/mlxlink_enums.h b/mlxlink/modules/mlxlink_enums.h index 9dda6376..e4f055a1 100644 --- a/mlxlink/modules/mlxlink_enums.h +++ b/mlxlink/modules/mlxlink_enums.h @@ -581,6 +581,7 @@ enum PDDR_PAGES enum GROUP_OPCODE { MONITOR_OPCODE = 0, + ADVANCED_OPCODE = 1 }; enum PPCNT_GROUPS From c7bf2dff52b92f5e7f0d7faeaeae647474481491 Mon Sep 17 00:00:00 2001 From: Mustafa Dalloul Date: Tue, 4 Oct 2022 10:56:16 +0300 Subject: [PATCH 46/63] [mstlink] Pushing amber collection fixes Description: Pushing amber collection fixes Issue: 3225092 Signed-off-by: Mustafa Dalloul --- mlxlink/modules/mlxlink_amBER_collector.cpp | 17 +++++++++++------ mlxlink/modules/mlxlink_amBER_collector.h | 5 ++++- 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/mlxlink/modules/mlxlink_amBER_collector.cpp b/mlxlink/modules/mlxlink_amBER_collector.cpp index 6018e348..476dc4ba 100644 --- a/mlxlink/modules/mlxlink_amBER_collector.cpp +++ b/mlxlink/modules/mlxlink_amBER_collector.cpp @@ -76,14 +76,14 @@ MlxlinkAmBerCollector::MlxlinkAmBerCollector(Json::Value& jsonRoot) : _jsonRoot( _baseSheetsList[AMBER_SHEET_GENERAL] = FIELDS_COUNT{4, 4, 4}; _baseSheetsList[AMBER_SHEET_INDEXES] = FIELDS_COUNT{2, 2, 4}; - _baseSheetsList[AMBER_SHEET_LINK_STATUS] = FIELDS_COUNT{48, 141, 6}; + _baseSheetsList[AMBER_SHEET_LINK_STATUS] = FIELDS_COUNT{49, 142, 6}; _baseSheetsList[AMBER_SHEET_MODULE_STATUS] = FIELDS_COUNT{110, 110, 0}; _baseSheetsList[AMBER_SHEET_SYSTEM] = FIELDS_COUNT{16, 21, 11}; _baseSheetsList[AMBER_SHEET_SERDES_16NM] = FIELDS_COUNT{376, 736, 0}; _baseSheetsList[AMBER_SHEET_SERDES_7NM] = FIELDS_COUNT{206, 374, 502}; _baseSheetsList[AMBER_SHEET_PORT_COUNTERS] = FIELDS_COUNT{35, 0, 35}; _baseSheetsList[AMBER_SHEET_TROUBLESHOOTING] = FIELDS_COUNT{2, 2, 0}; - _baseSheetsList[AMBER_SHEET_PHY_OPERATION_INFO] = FIELDS_COUNT{18, 18, 15}; + _baseSheetsList[AMBER_SHEET_PHY_OPERATION_INFO] = FIELDS_COUNT{17, 17, 15}; _baseSheetsList[AMBER_SHEET_LINK_UP_INFO] = FIELDS_COUNT{9, 9, 0}; _baseSheetsList[AMBER_SHEET_LINK_DOWN_INFO] = FIELDS_COUNT{5, 5, 0}; _baseSheetsList[AMBER_SHEET_TEST_MODE_INFO] = FIELDS_COUNT{68, 136, 0}; @@ -475,7 +475,7 @@ vector MlxlinkAmBerCollector::getSystemInfo() resetLocalParser(ACCESS_REG_MSGI); sendRegister(ACCESS_REG_MSGI, MACCESS_REG_METHOD_GET); - fields.push_back(AmberField("Device_PartNumber", getAscii("part_number", 20))); + fields.push_back(AmberField("Device_Part_Number", getAscii("part_number", 20))); resetLocalParser(ACCESS_REG_MGIR); sendRegister(ACCESS_REG_MGIR, MACCESS_REG_METHOD_GET); @@ -610,7 +610,7 @@ vector MlxlinkAmBerCollector::getPhyOperationInfo() "-1"; u_int32_t fecModeRequest = (u_int32_t)log2((float)getFieldValue("fec_mode_request")); fields.push_back(AmberField("loopback_mode", loopbackMode, !_isPortPCIE)); - fields.push_back(AmberField("fec_mode_request ", _mlxlinkMaps->_fecModeActive[fecModeRequest], !_isPortPCIE)); + fields.push_back(AmberField("fec_mode_request", _mlxlinkMaps->_fecModeActive[fecModeRequest], !_isPortPCIE)); if (_isPortPCIE) { @@ -722,6 +722,7 @@ vector MlxlinkAmBerCollector::getLinkStatus() fields.push_back(AmberField("Phy_Manager_State", _mlxlinkMaps->_pmFsmState[getFieldValue("phy_mngr_fsm_" "state")])); fields.push_back(AmberField("Protocol", _mlxlinkMaps->_networkProtocols[_protoActive])); + resetLocalParser(ACCESS_REG_PTYS); updateField("local_port", _localPort); updateField("proto_mask", _protoActive); @@ -735,6 +736,7 @@ vector MlxlinkAmBerCollector::getLinkStatus() fields.push_back(AmberField("Ethernet_Protocol_Active", ethLinkActive ? _mlxlinkMaps->_EthExtSpeed2Str[ethLinkActive] : "N/A", _isPortETH)); + resetLocalParser(ACCESS_REG_PDDR); updateField("local_port", _localPort); updateField("page_select", PDDR_OPERATIONAL_INFO_PAGE); @@ -1235,7 +1237,10 @@ string MlxlinkAmBerCollector::getCableBreakoutStr(u_int32_t cableBreakout, u_int return cableBreakoutStr; } -void MlxlinkAmBerCollector::pushModulePerLaneField(vector& fields, string fieldName, float valueCorrection) +void MlxlinkAmBerCollector::pushModulePerLaneField(vector& fields, + string fieldName, + float valueCorrection, + string laneSep) { float value = 0; for (u_int32_t lane = 0; lane < MAX_NETWORK_LANES; lane++) @@ -1245,7 +1250,7 @@ void MlxlinkAmBerCollector::pushModulePerLaneField(vector& fields, s { value = getPower(value); } - fields.push_back(AmberField(fieldName + "_" + to_string(lane), to_string(value / valueCorrection))); + fields.push_back(AmberField(fieldName + laneSep + to_string(lane), to_string(value / valueCorrection))); } } diff --git a/mlxlink/modules/mlxlink_amBER_collector.h b/mlxlink/modules/mlxlink_amBER_collector.h index 6d3248fd..4352a2f4 100644 --- a/mlxlink/modules/mlxlink_amBER_collector.h +++ b/mlxlink/modules/mlxlink_amBER_collector.h @@ -153,7 +153,10 @@ class MlxlinkAmBerCollector : public MlxlinkRegParser void sendLocalPrmReg(const string& regName, maccess_reg_method_t method, const char* fields, ...); string getBitmaskPerLaneStr(u_int32_t bitmask); void fillParamsToFields(const string& title, const vector& values, vector& fields); - void pushModulePerLaneField(vector& fields, string fieldName, float valueCorrection = 1.0); + void pushModulePerLaneField(vector& fields, + string fieldName, + float valueCorrection = 1.0, + string laneSep = "_"); void pushModuleDpPerLane(vector& fields, const string str); // Helper functions From 5cccc3b29fbd35cb0ed301344fa7546fdd0e0245 Mon Sep 17 00:00:00 2001 From: Mustafa Dalloul Date: Tue, 4 Oct 2022 15:26:19 +0300 Subject: [PATCH 47/63] [mstlink] Fixing fw version in tool info section Description: Fixing fw version in tool info section Issue: 3196169 Signed-off-by: Mustafa Dalloul --- mlxlink/modules/mlxlink_commander.cpp | 2 +- mlxlink/modules/mlxlink_commander.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/mlxlink/modules/mlxlink_commander.cpp b/mlxlink/modules/mlxlink_commander.cpp index bff22405..40b95456 100644 --- a/mlxlink/modules/mlxlink_commander.cpp +++ b/mlxlink/modules/mlxlink_commander.cpp @@ -1671,7 +1671,7 @@ void MlxlinkCommander::strToInt32(char* str, u_int32_t& value) void MlxlinkCommander::runningVersion() { setPrintTitle(_toolInfoCmd, "Tool Information", TOOL_INFORMAITON_INFO_LAST, !_prbsTestMode); - setPrintVal(_toolInfoCmd, "Firmware Version", _fwVersion, ANSI_COLOR_GREEN, true, !_prbsTestMode); + setPrintVal(_toolInfoCmd, "Firmware Version", getFwVersion(), ANSI_COLOR_GREEN, true, !_prbsTestMode); setPrintVal(_toolInfoCmd, "amBER Version", AMBER_VERSION, ANSI_COLOR_GREEN, _productTechnology >= PRODUCT_16NM, !_prbsTestMode); setPrintVal(_toolInfoCmd, PKG_NAME " Version", PKG_VER, ANSI_COLOR_GREEN, true, !_prbsTestMode); diff --git a/mlxlink/modules/mlxlink_commander.h b/mlxlink/modules/mlxlink_commander.h index 9fd043de..9142c3ab 100644 --- a/mlxlink/modules/mlxlink_commander.h +++ b/mlxlink/modules/mlxlink_commander.h @@ -395,7 +395,7 @@ class MlxlinkCommander : public MlxlinkRegParser // Mlxlink query functions virtual void showModuleInfo(); void prepareBerModuleInfoNdr(bool valid); - virtual void runningVersion(); + void runningVersion(); virtual void operatingInfoPage(); virtual void supportedInfoPage(); virtual void troubInfoPage(); From a38efb613ce8650129fd9240a6ac1c47776c1d9c Mon Sep 17 00:00:00 2001 From: Izabela Bakollari Date: Thu, 22 Sep 2022 17:29:36 +0200 Subject: [PATCH 48/63] Eliminate memory allocation in calc_hw_crc It is not necessary to create a copy of the input array just to invert the first two bytes. We can invert these bytes on the fly during the crc calculation. This way a memory allocation is avoided and we do not need to worry about malloc failing. --- mft_utils/calc_hw_crc.c | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/mft_utils/calc_hw_crc.c b/mft_utils/calc_hw_crc.c index 0028454d..e9f20971 100644 --- a/mft_utils/calc_hw_crc.c +++ b/mft_utils/calc_hw_crc.c @@ -30,10 +30,6 @@ * SOFTWARE. */ -#include -#include "string.h" -#include - #include "calc_hw_crc.h" u_int16_t crc16table2[256] = { @@ -60,20 +56,15 @@ u_int16_t crc16table2[256] = { u_int16_t calc_hw_crc(u_int8_t* d, int size) { int i; - u_int8_t* data = (u_int8_t*)malloc(sizeof(u_int8_t) * size); - - memcpy(data, d, size); - data[0] = ~data[0]; - data[1] = ~data[1]; unsigned crc = 0xffff; for (i = 0; i < size; i++) { - int table_index = ((crc ^ data[i]) & 0xff); + u_int8_t data = i > 1 ? d[i] : ~d[i]; + int table_index = ((crc ^ data) & 0xff); crc = ((crc >> 8) ^ crc16table2[table_index]); }; crc = ((crc << 8) & 0xff00) | ((crc >> 8) & 0xff); - free(data); return crc; } From 7d9c75102ad40ff4a13d2e1c810e9c3ae26cbb78 Mon Sep 17 00:00:00 2001 From: Matan Eliyahu Date: Mon, 12 Sep 2022 23:14:11 +0300 Subject: [PATCH 49/63] Support TLV lifecycle Description: Support burning new MCC component for Vendor(OEM) NVconfig Tested OS: N/A Tested devices: N/A Tested flows: N/A Known gaps (with RM ticket): N/A Issue: 3208782 Change-Id: I84343d94ce2db2adb05ef704d7714aa645d883e2 Signed-off-by: Matan Eliyahu --- mlxconfig/mlxcfg_generic_commander.cpp | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/mlxconfig/mlxcfg_generic_commander.cpp b/mlxconfig/mlxcfg_generic_commander.cpp index eb8a3074..0c83db26 100644 --- a/mlxconfig/mlxcfg_generic_commander.cpp +++ b/mlxconfig/mlxcfg_generic_commander.cpp @@ -133,6 +133,7 @@ const u_int8_t btcTokenId = 0x8; const u_int8_t rmcsTokenId = 0x10; const u_int8_t rmdtTokenId = 0x11; const u_int32_t idMlnxId = 0x10e; +const u_int32_t idVendorId = 0x10f; void GenericCommander::supportsNVData() { @@ -1654,6 +1655,7 @@ void GenericCommander::checkConfTlvs(const vector& tlvs, FwComponent:: bool csCompFound = false; bool foundApplicableTLV = false; bool idMlnxCompFound = false; + bool idVendorCompFound = false; compsId = FwComponent::COMPID_UNKNOWN; u_int32_t type = 0; mget_mdevs_type(_mf, &type); @@ -1691,6 +1693,11 @@ void GenericCommander::checkConfTlvs(const vector& tlvs, FwComponent:: idMlnxCompFound = true; compsId = FwComponent::COMPID_MLNX_NVCONFIG; } + else if (tlv->_tlvClass == 0x0 && tlv->_id == idVendorId) + { + idVendorCompFound = true; + compsId = FwComponent::COMPID_OEM_NVCONFIG; + } else if (tlv->_name == "file_applicable_to") { foundApplicableTLV = true; @@ -1702,14 +1709,16 @@ void GenericCommander::checkConfTlvs(const vector& tlvs, FwComponent:: } } - if (!dbgCompFound && !csCompFound && !idMlnxCompFound) + u_int32_t numOfCompsFound = + (dbgCompFound ? 1 : 0) + (csCompFound ? 1 : 0) + (idMlnxCompFound ? 1 : 0) + (idVendorCompFound ? 1 : 0); + if (numOfCompsFound == 0) { throw MlxcfgException("Unsupported device: No debug tokens or CS tokens or " - "MLNX ID Components were found for " + "MLNX/Vendor ID Components were found for " "this device"); } - if ((dbgCompFound && csCompFound) || (dbgCompFound && idMlnxCompFound) || (csCompFound && idMlnxCompFound)) + if (numOfCompsFound > 1) { throw MlxcfgException("Only one component is allowed"); } From f0548efe4aeecf8e0dd98b51b898ae13e4f1ecb5 Mon Sep 17 00:00:00 2001 From: ashargorodsk Date: Mon, 19 Sep 2022 13:35:43 +0300 Subject: [PATCH 50/63] Flint query on mfa2 image gives sig fault Description: prior to saving the compressed data, mlxarchive runs compression to calculated array size for output. Size calculation was being done using a different compression level, resulting in buffer size being too small in some cases. This causes CRC error while decompressing. Tested OS: Linux Tested devices: N/A Tested flows: mlxarchive with multiple images of the same psid -> flint query the mfa Known gaps (with RM ticket): N/A Issue: 3184209 Change-Id: Ic0e8f8441dcbb5ce40f1e2a9c32a71f8c13c1c04 Signed-off-by: Matan Eliyahu --- mlxarchive/mlxarchive_mfa2.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/mlxarchive/mlxarchive_mfa2.cpp b/mlxarchive/mlxarchive_mfa2.cpp index c582e338..f25b8bda 100644 --- a/mlxarchive/mlxarchive_mfa2.cpp +++ b/mlxarchive/mlxarchive_mfa2.cpp @@ -99,7 +99,7 @@ void MFA2::pack(vector& buff) (*it).packData(componentsBlockBuff); } u_int32_t zippedSize = componentsBlockBuff.size(); - zippedSize = xz_compress_crc32(8, componentsBlockBuff.data(), componentsBlockBuff.size(), NULL, 0); + zippedSize = xz_compress_crc32(9, componentsBlockBuff.data(), componentsBlockBuff.size(), NULL, 0); if (zippedSize <= 0) { // TODO throw exception @@ -108,9 +108,13 @@ void MFA2::pack(vector& buff) } _packageDescriptor.setComponentsBlockArchiveSize(zippedSize); vector zippedComponentBlockBuff(zippedSize); - xz_compress_crc32(9, componentsBlockBuff.data(), componentsBlockBuff.size(), zippedComponentBlockBuff.data(), - zippedSize); - + u_int32_t actualZippedSize = xz_compress_crc32(9, componentsBlockBuff.data(), componentsBlockBuff.size(), + zippedComponentBlockBuff.data(), zippedSize); + if (zippedSize != actualZippedSize) + { + printf("-E- zipped size not as expected\n"); + exit(1); + } // compute descriptors SHA256 vector descriptorsBuff; packDescriptors(descriptorsBuff); From 79f8e5a6f1458d8346445a9747c1a52aed730952 Mon Sep 17 00:00:00 2001 From: Matan Eliyahu Date: Wed, 21 Sep 2022 22:09:16 +0300 Subject: [PATCH 51/63] Reduce flash freq when higher than 90MHz Description: Working in high flash freq disables the support in flash read command (03h), only quad commands will work. Since new FW for CX7 and BF3 modify the freq to ~120MHz we need to reduce it in OCR mode Tested OS: Linux Tested devices: CX7 Tested flows: flint -ocr query Known gaps (with RM ticket): N/A Issue: 3157275 Change-Id: I8e828d771bdb365fd8304dd88357b7f396561be3 Signed-off-by: Matan Eliyahu --- mflash/mflash.c | 128 ++++++++++++++++++++++++++++++++++++- mflash/mflash.h | 1 + mflash/mflash_pack_layer.h | 8 +++ 3 files changed, 136 insertions(+), 1 deletion(-) diff --git a/mflash/mflash.c b/mflash/mflash.c index 255dc9db..e3bd1273 100644 --- a/mflash/mflash.c +++ b/mflash/mflash.c @@ -1527,6 +1527,121 @@ int restore_cache_replacemnt(mflash* mfl) return MFE_OK; } +void init_freq_configuration_fields(mflash* mfl) +{ + switch (mfl->dm_dev_id) + { + case DeviceConnectX7: + { + mfl->is_freq_handle_required = true; + mfl->core_clocks_per_usec_addr = 0x7f4; + mfl->flash_div_addr = 0xfe804; + break; + } + case DeviceBlueField3: + { + mfl->is_freq_handle_required = true; + mfl->core_clocks_per_usec_addr = 0x7f4; + mfl->flash_div_addr = 0x3409804; + break; + } + default: + { + break; + } + } +} + +int read_freq_configurations(mflash* mfl) +{ + if (!mfl->core_clocks_per_usec) // If field was already read then we skip + { + if (mread4(mfl->mf, mfl->core_clocks_per_usec_addr, &(mfl->core_clocks_per_usec)) != 4) + { + printf("-E- Failed to read core_clocks_per_usec\n"); + return MFE_CR_ERROR; + } + } + if (!mfl->orig_flash_div_reg) // If field was already read then we skip + { + if (mread4(mfl->mf, mfl->flash_div_addr, &(mfl->orig_flash_div_reg)) != 4) + { + printf("-E- Failed to read flash_div_register\n"); + return MFE_CR_ERROR; + } + } + return MFE_OK; +} + +int get_flash_freq(mflash* mfl, u_int32_t* freq) +{ + int rc = read_freq_configurations(mfl); + CHECK_RC(rc); + u_int32_t flash_div = EXTRACT(mfl->orig_flash_div_reg, 0, 4); // flash_div field is 4bits + *freq = mfl->core_clocks_per_usec / (2 * (flash_div + 1)); + return MFE_OK; +} + +int write_flash_div(mflash* mfl, u_int32_t new_flash_div) +{ + u_int32_t new_flash_div_register = MERGE(mfl->orig_flash_div_reg, new_flash_div, 0, 4); + FLASH_DPRINTF(("Setting new flash_div = %d\n", new_flash_div)); + if (mwrite4(mfl->mf, mfl->flash_div_addr, new_flash_div_register) != 4) + { + printf("-E- Writing 0x%08x to flash_div register failed\n", new_flash_div_register); + return MFE_CR_ERROR; + } + return MFE_OK; +} + +int decrease_flash_freq(mflash* mfl) +{ + int rc = MFE_OK; + if (mfl->is_freq_handle_required) + { + u_int32_t freq = 0; + rc = get_flash_freq(mfl, &freq); + CHECK_RC(rc); + if (freq <= MAX_FLASH_FREQ) + { + // Flash freq is already in a valid range for OCR operation + mfl->is_freq_handle_required = false; // Setting this will skip this logic next time we're here + } + else + { + // Calculate new flash_div value to decrease flash frequency to valid value for OCR operation + u_int32_t new_flash_div = EXTRACT(mfl->orig_flash_div_reg, 0, 4); // flash_div field is 4bits + FLASH_DPRINTF(( + "Flash freq (%dMHz) higher than allowed (%dMHz) for OCR operation: core_clocks_per_usec = %d, flash_div = %d\n", + freq, MAX_FLASH_FREQ, mfl->core_clocks_per_usec, new_flash_div)); + while (freq > MAX_FLASH_FREQ) + { + new_flash_div++; // Reducing freq by incrementing flash_div (incrementing by 1 should to be enough) + freq = mfl->core_clocks_per_usec / (2 * (new_flash_div + 1)); + } + FLASH_DPRINTF(("Reducing flash freq to %dMHz, using new flash_div = %d\n", freq, new_flash_div)); + rc = write_flash_div(mfl, new_flash_div); + CHECK_RC(rc); + mfl->is_freq_changed = true; + } + } + return rc; +} + +int restore_flash_freq(mflash* mfl) +{ + int rc = MFE_OK; + if (mfl->is_freq_changed) + { + u_int32_t orig_flash_div = EXTRACT(mfl->orig_flash_div_reg, 0, 4); // flash_div field is 4bits + FLASH_DPRINTF(("Restoring original flash_div = %d\n", orig_flash_div)); + rc = write_flash_div(mfl, orig_flash_div); + CHECK_RC(rc); + mfl->is_freq_changed = false; + } + return rc; +} + int sixth_gen_flash_lock(mflash* mfl, int lock_state) { int rc = 0; @@ -1538,13 +1653,18 @@ int sixth_gen_flash_lock(mflash* mfl, int lock_state) CHECK_RC(rc); rc = disable_cache_replacement(mfl); CHECK_RC(rc); + rc = decrease_flash_freq(mfl); + CHECK_RC(rc); rc = gw_wait_ready(mfl, "WAIT TO BUSY"); CHECK_RC(rc); } else { // unlock the flash + rc = restore_flash_freq(mfl); + CHECK_RC(rc); rc = restore_cache_replacemnt(mfl); CHECK_RC(rc); + // Restoring GCM is handled by FW rc = is4_flash_lock(mfl, lock_state); CHECK_RC(rc); } @@ -1824,10 +1944,16 @@ int sx_flash_init_direct_access(mflash* mfl, flash_params_t* flash_params) return gen4_flash_init_com(mfl, flash_params); } -int sixth_gen_init_direct_access(mflash* mfl, flash_params_t* flash_params) +void update_sixth_gen_addrs(mflash* mfl) { mfl->cache_repacement_en_addr = HCR_NEW_GW_CACHE_REPLACEMNT_EN_ADDR; mfl->gcm_en_addr = HCR_NEW_GW_GCM_EN_ADDR; + init_freq_configuration_fields(mfl); +} + +int sixth_gen_init_direct_access(mflash* mfl, flash_params_t* flash_params) +{ + update_sixth_gen_addrs(mfl); mfl->f_lock = sixth_gen_flash_lock; return gen6_flash_init_com(mfl, flash_params); diff --git a/mflash/mflash.h b/mflash/mflash.h index d86457ce..776806ff 100644 --- a/mflash/mflash.h +++ b/mflash/mflash.h @@ -120,6 +120,7 @@ EXTERN_C_START #define FLASH_ACCESS_DPRINTF(...) #endif +#define MAX_FLASH_FREQ 90 // MHz typedef struct gpio_toggle_conf_cx6 { u_int32_t lock_addr; diff --git a/mflash/mflash_pack_layer.h b/mflash/mflash_pack_layer.h index e9539145..a5b8fe86 100644 --- a/mflash/mflash_pack_layer.h +++ b/mflash/mflash_pack_layer.h @@ -255,6 +255,14 @@ struct mflash u_int32_t gw_cmd; u_int32_t cache_rep_offset; u_int32_t cache_rep_cmd; + + // Frequency related fields relevant for CX7 and BF3 + bool is_freq_handle_required; + bool is_freq_changed; + u_int32_t core_clocks_per_usec_addr; + u_int32_t flash_div_addr; + u_int32_t orig_flash_div_reg; // Whole register, not flash_div field only + u_int32_t core_clocks_per_usec; }; typedef struct mfpa_command_args From 3b144d2a4d315e545b9f2b88018ccd8d75e7232d Mon Sep 17 00:00:00 2001 From: Artur Hrytsenko Date: Sun, 25 Sep 2022 02:00:01 +0300 Subject: [PATCH 52/63] Fix reorder of NV_FILE_ID_VENDOR TLV in nvconfig component Description: NV_FILE_ID_VENDOR must be first in the file Tested OS: Linux Tested devices: CX6DX Tested flows: mlxconfig create_conf vendor_nvconfig.xml vendor_nvconfig.bin Known gaps (with RM ticket): N/A Issue: 3216912 Change-Id: I14bd4d6eee4a7cddc2ddda84f7e25f46b2f4cef3 Signed-off-by: Matan Eliyahu --- mlxconfig/mlxcfg_generic_commander.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mlxconfig/mlxcfg_generic_commander.cpp b/mlxconfig/mlxcfg_generic_commander.cpp index 0c83db26..3910df4e 100644 --- a/mlxconfig/mlxcfg_generic_commander.cpp +++ b/mlxconfig/mlxcfg_generic_commander.cpp @@ -1738,7 +1738,8 @@ void GenericCommander::orderConfTlvs(vector& tlvs) TLVConf* tlv = *it; if (((tlv->_tlvClass == NVFile) && (tlv->_id == debugTokenId || tlv->_id == csTokenId || tlv->_id == btcTokenId)) || - (tlv->_tlvClass == Global && tlv->_id == idMlnxId)) + ((tlv->_tlvClass == Global) && + (tlv->_id == idMlnxId || tlv->_id == idVendorId))) { *it = tlvs.front(); tlvs.front() = tlv; From 6f32447267057b8fe5424a4ba6ed6fa7c51d1245 Mon Sep 17 00:00:00 2001 From: Matan Eliyahu Date: Thu, 29 Sep 2022 16:43:45 +0300 Subject: [PATCH 53/63] query doesn't work on a livfish SPEC-4 device Description: Adding global_image_status addr for SPEC-4 device Tested OS: N/A Tested devices: N/A Tested flows: N/A Known gaps (with RM ticket): Test on PLD Issue: 3215339 Change-Id: I819ce069bcac4be6a198e0da4f5e1e07060f87a2 Signed-off-by: Matan Eliyahu --- mlxfwops/lib/fw_ops.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/mlxfwops/lib/fw_ops.cpp b/mlxfwops/lib/fw_ops.cpp index bf851203..f3a9c440 100644 --- a/mlxfwops/lib/fw_ops.cpp +++ b/mlxfwops/lib/fw_ops.cpp @@ -2920,6 +2920,7 @@ int CRSpaceRegisters::getGlobalImageStatus() break; case CT_QUANTUM2: case CT_QUANTUM3: + case CT_SPECTRUM4: global_image_status_address = 0xa1844; break; default: From d705605db6a02541389ed72a9bad8e382568c845 Mon Sep 17 00:00:00 2001 From: Matan Eliyahu Date: Mon, 3 Oct 2022 15:11:24 +0300 Subject: [PATCH 54/63] Enable TEMP directory to be defined by user env var for all platforms same as for Windows Description: Only Windows platform had this capability, now we enable it to all platforms Tested OS: Linux Tested devices: CX6 Tested flows: export TEMP=/tmp/test && mlxfwmanager -d /dev/mst/mt4123_pciconf0 --online -u Known gaps (with RM ticket): N/A Issue: 3226246 Change-Id: I677cadb96045f94c6f37e97a3f52e4e59b7832e4 Signed-off-by: Matan Eliyahu --- mlxfwupdate/mlxfwmanager_common.cpp | 6 ++++-- mlxfwupdate/mlxfwmanager_common.h | 5 ++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/mlxfwupdate/mlxfwmanager_common.cpp b/mlxfwupdate/mlxfwmanager_common.cpp index d044048a..c6e82dfb 100644 --- a/mlxfwupdate/mlxfwmanager_common.cpp +++ b/mlxfwupdate/mlxfwmanager_common.cpp @@ -39,17 +39,19 @@ #include #endif -#if defined(__WIN__) const char* SafeGetEnv(const char* var) { char* val = getenv(var); if (val == NULL) { +#if defined(__WIN__) return "."; // Local dir +#else + return "/tmp"; +#endif } return val; } -#endif int mapRetValue(int rc, mlxFWMSetupType::T setupType) { diff --git a/mlxfwupdate/mlxfwmanager_common.h b/mlxfwupdate/mlxfwmanager_common.h index 2c001b86..e2eb8184 100644 --- a/mlxfwupdate/mlxfwmanager_common.h +++ b/mlxfwupdate/mlxfwmanager_common.h @@ -65,15 +65,14 @@ #ifdef _MSC_VER typedef int mode_t; #endif -const char* SafeGetEnv(const char* var); -#define TMP_DIR SafeGetEnv("TEMP") #define PATH_SEPARATOR "\\" #define GetCurrDir(sz, buf) GetCurrentDirectory(sz, buf) #else -#define TMP_DIR "/tmp" #define PATH_SEPARATOR "/" #define GetCurrDir(sz, buf) getcwd(buf, sz) #endif +const char* SafeGetEnv(const char* var); +#define TMP_DIR SafeGetEnv("TEMP") using namespace std; From 0b28e720617cef52f1ee749a3d997b2fe40230ec Mon Sep 17 00:00:00 2001 From: Mustafa Dalloul Date: Thu, 13 Oct 2022 14:22:54 +0300 Subject: [PATCH 55/63] [mstlink] Fixing module info for QSFP_CMIS cables Description: Fixing module info for QSFP_CMIS cables Issue: 3228808 Signed-off-by: Mustafa Dalloul --- mlxlink/modules/mlxlink_amBER_collector.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/mlxlink/modules/mlxlink_amBER_collector.cpp b/mlxlink/modules/mlxlink_amBER_collector.cpp index fc65e203..588cb66e 100644 --- a/mlxlink/modules/mlxlink_amBER_collector.cpp +++ b/mlxlink/modules/mlxlink_amBER_collector.cpp @@ -1088,6 +1088,7 @@ void MlxlinkAmBerCollector::initCableIdentifier(u_int32_t cableIdentifier) case IDENTIFIER_QSFP_DD: case IDENTIFIER_OSFP: case IDENTIFIER_DSFP: + case IDENTIFIER_QSFP_CMIS: _isCmisCable = true; break; } @@ -1111,6 +1112,7 @@ void MlxlinkAmBerCollector::getCmisComplianceCode(u_int32_t ethComplianceCode, case ACTIVE: ethComplianceStr = _mlxlinkMaps->_activeCableCompliance[ethComplianceCode]; + ethComplianceStr = ethComplianceStr.empty() ? "N/A" : ethComplianceStr; extComplianceStr = _mlxlinkMaps->_cmisHostCompliance[extEthComplianceCode]; break; @@ -1456,8 +1458,8 @@ void MlxlinkAmBerCollector::getModuleInfoPage(vector& fields) if (_isCmisCable) { - activeSetHostComplianceCode = ethComplianceStr; - activeSetMediaComplianceCode = extComplianceStr; + activeSetHostComplianceCode = extComplianceStr; + activeSetMediaComplianceCode = ethComplianceStr; } fields.push_back(AmberField("Active_set_host_compliance_code", activeSetHostComplianceCode)); fields.push_back(AmberField("Active_set_media_compliance_code", activeSetMediaComplianceCode)); From 07ba8cac974c543f599ca7f2e3471665c95e4e18 Mon Sep 17 00:00:00 2001 From: Mustafa Dalloul Date: Thu, 13 Oct 2022 14:26:44 +0300 Subject: [PATCH 56/63] [mstlink] Validating error duration Description: Validating error duration Issue: 3228705 Signed-off-by: Mustafa Dalloul --- mlxlink/modules/mlxlink_err_inj_commander.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mlxlink/modules/mlxlink_err_inj_commander.cpp b/mlxlink/modules/mlxlink_err_inj_commander.cpp index b00b2ac0..96411614 100644 --- a/mlxlink/modules/mlxlink_err_inj_commander.cpp +++ b/mlxlink/modules/mlxlink_err_inj_commander.cpp @@ -257,7 +257,7 @@ ReqParms MlxlinkErrInjCommander::validateErrType(const string& type, } else if (duration != -1) { - if (((u_int32_t)duration) > errTypeSt.maxErrDuration && ((u_int32_t)duration) < errTypeSt.defaultErrDuration) + if (((u_int32_t)duration) > errTypeSt.maxErrDuration || ((u_int32_t)duration) < errTypeSt.defaultErrDuration) { throw MlxRegException("Invalid error duration value for %s: %d", errTypeSt.errorTypeStr.c_str(), duration); } From 94d91e9ffbe9ac123a28a78cc416b34dbf02fe5a Mon Sep 17 00:00:00 2001 From: Razi Shahbari Date: Thu, 20 Oct 2022 09:53:36 +0300 Subject: [PATCH 57/63] [mstresourcedump] Removing pyverbs and scapy dependencies Description: Tested OS: all Tested devices: n/a Tested flows: checked compilation Known gaps (with RM ticket): n/a Issue: 3178595 Please enter the commit message for your changes. Lines starting --- configure.ac | 4 +- mstflint.spec.in | 1 + resourcedump/Makefile.am | 4 + resourcedump/fetchers/ResourceDumpFetcher.py | 335 ++++-------------- resourcedump/resourcedump_lib/Makefile.am | 51 +++ resourcedump/resourcedump_lib/resource_dump.c | 291 +++++++++++++++ resourcedump/resourcedump_lib/resource_dump.h | 228 ++++++++++++ 7 files changed, 639 insertions(+), 275 deletions(-) create mode 100755 resourcedump/resourcedump_lib/Makefile.am create mode 100755 resourcedump/resourcedump_lib/resource_dump.c create mode 100755 resourcedump/resourcedump_lib/resource_dump.h diff --git a/configure.ac b/configure.ac index 61847f05..16f01b51 100644 --- a/configure.ac +++ b/configure.ac @@ -431,9 +431,11 @@ else AC_CONFIG_FILES(mtcr_ul/Makefile) fi +AM_CONDITIONAL(LINUX_BUILD, [test "x$OS" = "xLinux"]) +AC_SUBST(LINUX_BUILD) AC_OUTPUT( Makefile common/Makefile mft_utils/Makefile mft_utils/hsmclient/Makefile mtcr_py/Makefile ext_libs/Makefile ext_libs/sqlite/Makefile ext_libs/muparser/Makefile ext_libs/json/Makefile ext_libs/minixz/Makefile dev_mgt/Makefile \ tools_layouts/Makefile reg_access/Makefile cmdif/Makefile libmfa/Makefile pldmlib/Makefile tools_res_mgmt/Makefile mlxconfig/Makefile mlxconfig/mlxconfig_dbs/Makefile mflash/Makefile mlxfwops/Makefile mlxfwops/lib/Makefile cmdparser/Makefile \ flint/Makefile small_utils/Makefile small_utils/mlxfwresetlib/Makefile mstdump/Makefile mstdump/crd_lib/Makefile mstdump/crd_main/Makefile mstdump/mstdump_dbs/Makefile mvpd/Makefile \ - fw_comps_mgr/Makefile mad_ifc/Makefile tracers/Makefile tracers/fwtrace/Makefile resourcedump/Makefile resourceparse/Makefile ) + fw_comps_mgr/Makefile mad_ifc/Makefile tracers/Makefile tracers/fwtrace/Makefile resourcedump/Makefile resourcedump/resourcedump_lib/Makefile resourceparse/Makefile ) diff --git a/mstflint.spec.in b/mstflint.spec.in index 9488532b..0e2cb51e 100644 --- a/mstflint.spec.in +++ b/mstflint.spec.in @@ -205,6 +205,7 @@ rm -rf $RPM_BUILD_ROOT %{mstflint_python_tools}/mstresourcedump/filters/*.py %{mstflint_python_tools}/mstresourcedump/fetchers/*.py %{mstflint_python_tools}/mstresourcedump/commands/*.py +%{mstflint_python_tools}/mstresourcedump/resourcedump_lib/cresourcedump.so %{mstflint_python_tools}/mstresourceparse/*.py %{mstflint_python_tools}/mstresourceparse/parsers/*.py %{mstflint_python_tools}/mstresourceparse/utils/*.py diff --git a/resourcedump/Makefile.am b/resourcedump/Makefile.am index 446a385b..83fcc162 100755 --- a/resourcedump/Makefile.am +++ b/resourcedump/Makefile.am @@ -31,6 +31,10 @@ # Makefile.am -- Process this file with automake to produce Makefile.in +if LINUX_BUILD + SUBDIRS=resourcedump_lib +endif + USER_DIR = $(top_srcdir) bin_SCRIPTS=mstresourcedump diff --git a/resourcedump/fetchers/ResourceDumpFetcher.py b/resourcedump/fetchers/ResourceDumpFetcher.py index d30d0aa9..741af0f5 100755 --- a/resourcedump/fetchers/ResourceDumpFetcher.py +++ b/resourcedump/fetchers/ResourceDumpFetcher.py @@ -41,6 +41,7 @@ # ####################################################### +from codecs import utf_16_be_decode from resource_data.DataPrinter import DataPrinter from segments.SegmentCreator import SegmentCreator from utils import constants @@ -50,6 +51,8 @@ import math import struct import errno +import ctypes +import platform sys.path.append(os.path.join("mtcr_py")) sys.path.append(os.path.join("reg_access")) @@ -58,219 +61,13 @@ import regaccess # noqa -try: - import pyverbs.enums as e - from pyverbs.providers.mlx5.mlx5dv_objects import Mlx5DvObj - from pyverbs.providers.mlx5.mlx5dv import Mlx5DevxObj - from pyverbs.pd import PD - import pyverbs.providers.mlx5.mlx5_enums as dve - from pyverbs.providers.mlx5.mlx5dv import Mlx5Context, Mlx5DVContextAttr - from pyverbs.providers.mlx5.mlx5dv import Mlx5UMEM - from pyverbs.mem_alloc import read32, read - import resource - PYVERVBS_SUPPORT = True -except Exception as _: - PYVERVBS_SUPPORT = False - -try: - from scapy.fields import * - from scapy.packet import * - SCAPY_SUPPORT = True - MLX5_CMD_OP_CREATE_MKEY = 0x200 - - class SwMkc(Packet): - fields_desc = [ - BitField('reserved1', 0, 1), - BitField('free', 0, 1), # 0 - memory key is in use. It can be used for address translation - # 1 - memory key is free. Cannot be used for address translation - BitField('reserved2', 0, 1), - BitField('access_mode_4_2', 0, 3), # 3 MSB bits of access mode. See encoding in access_mode_1_0 field. - BitField('alter_pd_to_vhca_id', 0, 1), # replace pd check with cross_vhca check - BitField('crossed_side_mkey', 0, 1), # crossed side mkey. Valid if alter_pd_to_vhca_id==1 - BitField('reserved3', 0, 5), - BitField('relaxed_ordering_write', 0, 1), # If set - # , - # issue PCIe cycle with "relaxed ordering" attribute (allows - # write after write bypassing) for writes. - # Supported only when HCA_CAP.relaxed_oredering_write==1. - BitField('reserved4', 0, 1), - BitField('small_fence_on_rdma_read_response', 0, 1), # Responder will have one read request toward the PCIe (per QP). - BitField('umr_en', 0, 1), # Enable umr operation on this MKey - BitField('a', 0, 1), # If set, atomic operation is enabled - BitField('rw', 0, 1), # If set, remote write is enabled - BitField('rr', 0, 1), # If set, remote read is enabled - BitField('lw', 0, 1), # If set, local write is enabled - BitField('lr', 0, 1), # If set, local read is enabled. Must be set for all MKeys - BitField('access_mode_1_0', 0, 2), # 2 - # LSB bits of access mode. - # 0 - # x0: PA - (VA=PA, no translation needed) if set, no virtual to physi - # cal address translation is performed for this MKey. Not valid for, - # block mode MKey, replicated MTT MKey - # 0x1: MTT - (PA is needed) - # 0x2: KLMs - (Indirect access) - # 0x3: Fixed_Buffer_Size - used when KLMs are associated with fixed - # memory size. The fixed sized is determined by log_entity_size. Sup - # ported only if HCA_CAP.fixed_buffer_size==1. - # See Table 1013, - # " - # HCA Capabilities Layout - # ," on page 1122 - # 0x4: SW_ICM - # 0x5: MEMIC - Supported only when HCA_CAP.DEVICE_MEM - # ORY.memic==1. See - # Table 1051, " - # Device Memory Capabilities - # Layout - # ," on page 1182 - BitField('reserved5', 0, 1), - BitField('tunneled_atomic', 0, 1), # If set, part of the MSB"s of the address is set to - # in order to generate a - # command in the CPU and do atomic for RDMA WR operations in - # the memory controller instead of accessing the user"s memory - # (DMA). This is according to IBM p9 spec. - # Supported only when HCA_CAP. - # tunneled_atomic==1. - BitField('ma_translation_mode', 0, 2), # MA translation mode - # 0x0: None - no MA translation needed. - # 0x1: ATS - - # Supported only when HCA_CAP.ats==1, and valid only - # when access_mode==PA or MTT. - # 0x3: CAPI - valid when access_mode==PA. Then a CAPI translation - # can be performed. - BitField('reserved6', 0, 4), - BitField('qpn', 0, 24), # For type 2 memory window - indicates the QP number this memory - # window is attached to. - # otherwise - - # must be 0xffffff. - ByteField('mkey_7_0', 0), # Variant part of MKey specified by this MKey context - ByteField('reserved7', 0), - BitField('pasid', 0, 24), # PASID associated with MKEY. - # Valid when ma_translation_mode==CAPI - BitField('length64', 0, 1), # Enable registering 2 - # ^64 - # bytes per region - BitField('bsf_en', 0, 1), # Enable having bsf list on this MKey - BitField('sync_umr', 0, 1), # Memory region to be used by synchronous UMR process - BitField('reserved8', 0, 2), - BitField('expected_sigerr_count', 0, 1), # LSB of expected number of sigerr_cqes. (See - # Section 17.4.1, " - # Signa - # ture Handover Steps - # ," on page 696 - # ) - BitField('reserved9', 0, 1), - BitField('en_rinval', 0, 1), # Enable remote invalidation - BitField('pd', 0, 24), # Protection domain. Valid if alter_pd_to_vhca_id==0 - LongField('start_addr', 0), # Start Address - Virtual address where this region/window starts - # . - # For access_mode ==MEMIC, indicates the address of an allocated - # MEMIC buffer. - LongField('len', 0), # Region length. Reserved when length64 bit is set (in which case the - # region length is 2^64B). - # For access_mode ==MEMIC, indicates the size of an allocated - # MEMIC buffer. - IntField('bsf_octword_size', 0), # Size (in units of 16B) required for this MKey's BSFs - # Must be a multiple of 4 - StrFixedLenField('reserved10', None, length=12), - ShortField('crossing_target_vhca_id', 0), # crossing/crossed VHCA ID. Valid if access_mode==INTER_GVMI (crossing) or alter_pd_to_vhca_id==1 (crossed) - ShortField('reserved11', 0), - IntField('translations_octword_size', 0), # Size (in units of 16B) required for this MKey's physical buffer list or - # SGEs - # access_mode: MTT - each translation is 8B - # access_mode: KLM - # /Fixed - # - # Buffer Size - # - each SGE is 16B - # access_mode: PA - reserved - # Must be a multiple of 4 - BitField('reserved12', 0, 25), - BitField('relaxed_ordering_read', 0, 1), # Supported only when .relaxed_oredering_read==1. - BitField('reserved13', 0, 1), - BitField('log_entity_size', 0, 5), # When access_mode==MTT: log2 of Page size in bytes granularity. - # When access_mode==Fixed_Buffer_Size: - # determines the length of - # the memory buffers (KLMs) associated with the MKEY. - # otherwise: reserved. - # Must be >=12 - BitField('reserved14', 0, 3), - BitField('crypto_en', 0, 2), # Enable crypto. Non-UMRable. Implies one BSF of 64B or 128B must be present. - BitField('reserved15', 0, 27), - ] - - class CreateMkeyIn(Packet): - fields_desc = [ - ShortField('opcode', MLX5_CMD_OP_CREATE_MKEY), - ShortField('uid', 0), # Defines the user identifier for which the object was cre - # ated. - # See Section 8.24.1, " - # UCTX - User Context - # ," on page 501 - ShortField('reserved1', 0), - ShortField('op_mod', 0), - ByteField('reserved2', 0), - BitField('input_mkey_index', 0, 24), # mkey index of the created mkey. 0 means reserved and - # mkey index is returned by the device in command output. - # See Table 1309, " - # MKey Most Significant Bits Selection - # ," on - # page 1356 - # . - BitField('pg_access', 0, 1), # Per-page access rights. If set, the - # wr_en - # and - # rd_en - # fields - # of provided translation entries are valid and must specify - # the desired access rights. - # Can be set only when access_mode==MTT. - BitField('mkey_umem_valid', 0, 1), # Indicates if buffer is given directly by - # MTT - # list or by - # umem_id and umem_offset. - # When 0, - # MTT/KLM - # list. - # When 1, umem_offset and umem_offset ars valid - BitField('reserved3', 0, 30), - PacketField('sw_mkc', SwMkc(), SwMkc), # MKey context. - LongField('e_mtt_pointer', 0), # Pointer to MTTs in ICM. - # Used instead of - # pas - # when global - # e - # bit is set ( - # See - # Table 1165, " - # SET_HCA_CAP Input Structure Layout - # ," on - # page 1306 - # ). - # mtt index should be 64 byte aligned (mtt_index_l[2:0] - # should be 0x0). - LongField('e_bsf_pointer', 0), - IntField('translations_octword_actual_size', 0), # Actual number of octwords that contain translation - # entries. Can be 0 if no KLMs/MTTs are delivered. - IntField('mkey_umem_id', 0), - LongField('mkey_umem_offset', 0), - IntField('bsf_octword_actual_size', 0), # Actual number of octwords that contain translation - # entries. Can be 0 if no KLMs/MTTs are delivered. - StrFixedLenField('reserved4', None, length=156), - FieldListField('klm_pas_mtt', [0 for x in range(0)], IntField('', 0), count_from=lambda pkt:0), # Translation entries and BSFs. - ] - - class CreateMkeyOut(Packet): - fields_desc = [ - ByteField('status', 0), - BitField('reserved1', 0, 24), - IntField('syndrome', 0), - ByteField('reserved2', 0), - BitField('mkey_index', 0, 24), # MKey index - StrFixedLenField('reserved3', None, length=4), - ] -except Exception as _: - SCAPY_SUPPORT = False +class MKEY_PARAMS_ST(ctypes.Structure): + _fields_ = [("lkey", ctypes.c_uint32), + ("umem_addr", ctypes.c_uint64)] + + +class EXTRACTBITS_PARAMS_ST(ctypes.Structure): + _fields_ = [("val", ctypes.c_uint32)] class ResourceDumpFetcher: @@ -280,6 +77,8 @@ class ResourceDumpFetcher: INF_DEPTH = 4294967295 def __init__(self, device_name, bin_file=None): + + self._bin_file_h = None self._sequence_number = ResourceDumpFetcher._sequence_incrementor() self._device_name = device_name self._bin_file = bin_file @@ -292,7 +91,6 @@ def __init__(self, device_name, bin_file=None): except Exception as e: raise Exception("{0}".format(e)) - self._bin_file_h = None if self._bin_file: try: self._bin_file_h = open(self._bin_file, "wb") @@ -341,7 +139,6 @@ def fetch_data(self, **kwargs): self._retrieve_resource_dump_inline_data(seg.reference_type, index1=seg.index1, index2=seg.index2, numOfObj1=seg.num_of_obj1, numOfObj2=seg.num_of_obj2, vHCAid=kwargs["vHCAid"], mem=kwargs["mem"], fast_mode=kwargs["fast_mode"])) - segments_list_last_position = len(segments_list) segments_list.extend(self._create_segments(inner_inline_data)) @@ -364,6 +161,15 @@ def _sequence_incrementor(): yield cnt % 16 cnt += 1 + def initSourceDump(self): + source_dump_lib = None + try: + mft_py_dir = os.path.dirname(os.path.dirname(__file__)) + source_dump_lib = ctypes.CDLL(os.path.join(mft_py_dir, 'resourcedump_lib/cresourcedump.so'), use_errno=True) + except OSError: + raise Exception("resourcedump_lib/cresourcedump.so loading failed") + return source_dump_lib + def _retrieve_resource_dump_inline_data(self, segment_type, **kwargs): """call the resource dump access register and retrieve the inline data till more dump is '0' @@ -384,6 +190,8 @@ def _retrieve_resource_dump_inline_data(self, segment_type, **kwargs): mkey = 0 buf_size = 0 address = 0 + params_st = ctypes.pointer(MKEY_PARAMS_ST()) + extract_params_st = ctypes.pointer(EXTRACTBITS_PARAMS_ST()) if kwargs["vHCAid"] is None: vhca_id = 0 @@ -392,37 +200,42 @@ def _retrieve_resource_dump_inline_data(self, segment_type, **kwargs): vhca_id_valid = 1 if kwargs["mem"] is not None: + source_dump_lib = None try: - self._create_mr_devx(kwargs["mem"], cs.MKEY_BUF_SIZE) - except Exception as _: - if not SCAPY_SUPPORT: - raise Exception("Missing 'scapy' package, please install scapy") - elif PYVERVBS_SUPPORT == False: - raise Exception("Missing 'pyverbs' package, please install pyverbs") - elif _.args[0] != '': - raise Exception(_.args[0] + " Check the driver is up and the device's rdma name is correct.") - else: - raise Exception("mem mode is not supported, make sure rdma-core with devx package installed (part of ofed driver)") + if(platform.system() != 'Linux'): + raise Exception("This feature supported only on Linux") + source_dump_lib = self.initSourceDump() + gen_lkey_ret = source_dump_lib.generate_lkey(ctypes.c_char_p(bytes(kwargs["mem"], "utf-8")), params_st) + if gen_lkey_ret != 0: + raise Exception("Check the driver is up and the device's rdma name is correct") + mkey = params_st.contents.lkey + except Exception as e: + raise(e) + inline_dump = 0 - mkey = self.lkey buf_size = cs.MKEY_BUF_SIZE - address = self.umem.umem_addr + address = params_st.contents.umem_addr while call_res_dump: - results = self.reg_access_obj.sendResDump(segment, # "segment_type" - seg_number, # "seq_num" * need check - inline_dump, # "inline_dump" - more_dump, # "more_dump" * - vhca_id, # "vHCAid" - vhca_id_valid, # "vHCAid_valid" - index1, # "index_1" * - index2, # "index_2" * - num_of_obj_2, # "num_of_obj_2" * - num_of_obj_1, # "num_of_obj_1" * - device_opaque, # "device_opaque" * - mkey, # "mkey" 0 - buf_size, # "size" 0 - address) # "address" 0 + + try: + results = self.reg_access_obj.sendResDump(segment, # "segment_type" + seg_number, # "seq_num" * need check + inline_dump, # "inline_dump" + more_dump, # "more_dump" * + vhca_id, # "vHCAid" + vhca_id_valid, # "vHCAid_valid" + index1, # "index_1" * + index2, # "index_2" * + num_of_obj_2, # "num_of_obj_2" * + num_of_obj_1, # "num_of_obj_1" * + device_opaque, # "device_opaque" * + mkey, # "mkey" + buf_size, # "size" + address) # "address" + except Exception as _: + if _.args[0] != '': + raise Exception(_.args[0] + "\n Check the driver is up and the device's rdma name is correct.") more_dump = results["more_dump"] vhca_id = results["vhca_id"] @@ -438,9 +251,14 @@ def _retrieve_resource_dump_inline_data(self, segment_type, **kwargs): if not kwargs["fast_mode"] or segment_type == cs.RESOURCE_DUMP_SEGMENT_TYPE_MENU: # Read all dwords and change endianness for i in range(size): - inline_data.append(struct.unpack("I", read32(self.umem.umem_addr, i)))[0]) + ret = source_dump_lib.bit_extracted_32(ctypes.c_uint64(address), i, extract_params_st) + if(ret == 0): + inline_data.append(extract_params_st.contents.val) + else: + raise Exception("Extracting bits from c code failed!") else: - bin_data = read(self.umem.umem_addr, results["size"]) + bin_data = bytes(results["size"]) + ret = source_dump_lib.extrac_all(ctypes.c_uint64(address), ctypes.c_int32(results["size"]), bin_data) else: if not kwargs["fast_mode"] or segment_type == cs.RESOURCE_DUMP_SEGMENT_TYPE_MENU: inline_data.extend(results["inline_data"][:size]) @@ -459,35 +277,4 @@ def _retrieve_resource_dump_inline_data(self, segment_type, **kwargs): if more_dump == 0: call_res_dump = False - # Release the resorces if use mem mode - if kwargs["mem"] is not None: - self.mkey_obj.close() - self.umem.close() - return inline_data - - try: - def _create_umem(self, ctx, size, - access=e.IBV_ACCESS_LOCAL_WRITE, - alignment=resource.getpagesize()): - return Mlx5UMEM(ctx, size=size, alignment=alignment, access=access, pgsz_bitmap=alignment) - - def _create_mr_devx(self, rdma_device, buf_size): - """This method create mkey and memory buffer using devx (part of ofed driver). - """ - mlx5dv_attr = Mlx5DVContextAttr() - self.ctx = Mlx5Context(mlx5dv_attr, name=rdma_device) - self.my_pd = PD(self.ctx) - self.dv_pd = Mlx5DvObj(dve.MLX5DV_OBJ_PD, pd=self.my_pd).dvpd - self.umem = self._create_umem(self.ctx, buf_size) - self.mkey_ctx = SwMkc(umr_en=0, lr=1, lw=1, access_mode_1_0=0x1, pd=self.dv_pd.pdn, start_addr=self.umem.umem_addr, len=buf_size) - mkey_in = CreateMkeyIn(sw_mkc=self.mkey_ctx, mkey_umem_id=self.umem.umem_id, mkey_umem_valid=1) - self.mkey_obj = Mlx5DevxObj(self.ctx, mkey_in, len(CreateMkeyOut())) - mkey_out = CreateMkeyOut(self.mkey_obj.out_view) - if mkey_out.status: - raise PyverbsRDMAError("Failed to create mkey with syndrome {0}".format(mkey_out.syndrome)) - - mkey_index = mkey_out.mkey_index - self.lkey = mkey_index << 8 - except Exception as _: - pass diff --git a/resourcedump/resourcedump_lib/Makefile.am b/resourcedump/resourcedump_lib/Makefile.am new file mode 100755 index 00000000..6fd644c8 --- /dev/null +++ b/resourcedump/resourcedump_lib/Makefile.am @@ -0,0 +1,51 @@ +# +# Copyright © 2013-2021 NVIDIA CORPORATION & AFFILIATES. ALL RIGHTS RESERVED. +# +# This software product is a proprietary product of Nvidia Corporation and its affiliates +# (the "Company") and all right, title, and interest in and to the software +# product, including all associated intellectual property rights, are and +# shall remain exclusively with the Company. +# +# This software product is governed by the End User License Agreement +# provided with the software product. +# + +# Makefile.am -- Process this file with automake to produce Makefile.in + +if LINUX_BUILD +USER_DIR = $(top_srcdir) +COMMON_DIR = $(top_srcdir)/common +MTCR_DIR = $(top_srcdir)/${MTCR_CONF_DIR} +MTCR_INC_DIR = $(top_srcdir)/include/mtcr_ul +UTILS_DIR = $(top_srcdir)/mft_utils +LAYOUTS_DIR = $(top_srcdir)/tools_layouts +LAYOUTS_LIB = $(LAYOUTS_DIR)/libtools_layouts.la +REG_ACCESS_DIR = $(top_srcdir)/reg_access +RES_MGMT_DIR = $(top_srcdir)/tools_res_mgmt +DEV_MGT_DIR = $(top_srcdir)/dev_mgt +TOOLS_CRYPTO_DIR = $(top_srcdir)/tools_crypto +RES_DUMP_DIR= $(top_srcdir)/resourcedump/resourcedump_lib +INFINIBAND_INCLUDE = -isystem /auto/mswg/projects/mft/mft_build/external_libs/mft_ext_libs_inc/libibmad/linux/infiniband_new +INCLUDES = -I$(top_srcdir) -I$(COMMON_DIR) -I$(REG_ACCESS_DIR) -I$(LAYOUTS_DIR) -I$(MTCR_DIR) $(INFINIBAND_INCLUDE) -I$(MTCR_INC_DIR) + +AM_CXXFLAGS = -Wall -W -MP -H -MD -pipe -DMST_UL -g -std=c++11 $(COMPILER_FPIC) +AM_CPPFLAGS = $(AM_CXXFLAGS) + +lib_LTLIBRARIES = libresourcedump.la + + +libresourcedump_la_SOURCES = resource_dump.c resource_dump.h +libresourcedump_la_LIBADD = $(MTCR_DIR)/libmtcr_ul.a $(USER_DIR)/reg_access/libreg_access.a \ + $(DEV_MGT_DIR)/libdev_mgt.a -L$(USER_DIR)/tools_layouts/.libs -ltools_layouts + + +resourcedump_pylibdir = $(libdir)/mft/python_tools/resourcedump/resourcedump_lib/ +dist_resourcedump_pylib_DATA = cresourcedump.so + +cresourcedump.so: libresourcedump.la + $(CC) -Wall -pthread -fpic -shared ${CFLAGS} resource_dump.o -o cresourcedump.so $(MFT_CORE_LIB_LINK) \ + -L$(USER_DIR)/reg_access/.libs -lreg_access -L$(DEV_MGT_DIR)/.libs -ldev_mgt \ + -L$(MTCR_DIR)/.libs/ -lmtcr -L$(USER_DIR)/tools_layouts/.libs -ltools_layouts \ + $(MFT_CORE_LIB_LINK) + +endif diff --git a/resourcedump/resourcedump_lib/resource_dump.c b/resourcedump/resourcedump_lib/resource_dump.c new file mode 100755 index 00000000..5d4275a9 --- /dev/null +++ b/resourcedump/resourcedump_lib/resource_dump.c @@ -0,0 +1,291 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "resource_dump.h" + +/* to_mpd always returns the real mlx5_pd object ie the protection domain. */ +static inline struct mlx5_pd* to_mpd(struct ibv_pd* ibpd) +{ + struct mlx5_pd* mpd = to_mxxx(pd, pd); + + if (mpd->mprotection_domain) + return mpd->mprotection_domain; + + return mpd; +} + +struct ibv_context* init_my_device_c(char device_name[], void* handler, void* handler_2) +{ + struct ibv_device** d_list = NULL; + int n = 0; + int i = 0; + struct ibv_context* context; + struct mlx5dv_context_attr* my_context_attr; + my_context_attr = (struct mlx5dv_context_attr*)malloc(sizeof(struct mlx5dv_context_attr)); + memset(my_context_attr, 0, sizeof(struct mlx5dv_context_attr)); + + my_context_attr->flags = MLX5DV_CONTEXT_FLAGS_DEVX; + my_context_attr->comp_mask = 0; + f_ibv_get_device_list ibv_get_device_list_func = (f_ibv_get_device_list)dlsym(handler, GET_DEVICE_LIST_FUNC); + d_list = ibv_get_device_list_func(&n); + f_ibv_get_device_name ibv_get_device_name_func = (f_ibv_get_device_name)dlsym(handler, GET_DEVICE_NAME_FUNC); + f_mlx5dv_open_device mlx5dv_open_device_func = (f_mlx5dv_open_device)dlsym(handler_2, OPEN_DEVICE_FUNC); + + if (d_list) + { + for (i = 0; i < n; i++) + { + if (d_list[i] != NULL && strcmp(ibv_get_device_name_func(d_list[i]), device_name) == 0) + { + context = mlx5dv_open_device_func(d_list[i], my_context_attr); + if (!context) + { + ibv_get_device_name_func(d_list[i]); + return NULL; + } + return context; + } + } + } + else + { + printf("ibv_get_device_list failed\n"); + return NULL; + } + + f_ibv_free_device_list ibv_free_device_list_func = (f_ibv_free_device_list)dlsym(handler, FREE_DEVICE_LIST); + ibv_free_device_list_func(d_list); + free(my_context_attr); + + return NULL; +} + +struct mlx5dv_mkey* create_mkey_c(struct mlx5_mkey* mkey, + struct ibv_context* context, + uint32_t pdn, + uint32_t umem_id, + uint64_t addr, + uint32_t buff_size, + void* handler) +{ + uint32_t out[DEVX_ST_SZ_DW(create_mkey_out)] = {}; + uint32_t in[DEVX_ST_SZ_DW(create_mkey_in)] = {}; + void* mkc; + + DEVX_SET(create_mkey_in, in, opcode, MLX5_CMD_OP_CREATE_MKEY); + mkc = DEVX_ADDR_OF(create_mkey_in, in, memory_key_mkey_entry); + DEVX_SET(mkc, mkc, access_mode_1_0, 0x1); + DEVX_SET(mkc, mkc, umr_en, 0); + DEVX_SET(mkc, mkc, pd, pdn); + DEVX_SET(mkc, mkc, lr, 1); + DEVX_SET(mkc, mkc, lw, 1); + DEVX_SET(mkc, mkc, qpn, 0xffffff); + DEVX_SET64(mkc, mkc, start_addr, addr); + DEVX_SET64(mkc, mkc, len, buff_size); + + DEVX_SET(create_mkey_in, in, mkey_umem_valid, 1); + DEVX_SET(create_mkey_in, in, mkey_umem_id, umem_id); + + f_mlx5dv_devx_obj_create mlx5dv_devx_obj_create_func = + (f_mlx5dv_devx_obj_create)dlsym(handler, OBJECT_CREATE); + mkey->devx_obj = mlx5dv_devx_obj_create_func(context, in, sizeof(in), out, sizeof(out)); + + if (!mkey->devx_obj) + { + printf("mlx5dv_devx_obj_create failed\n"); + printf("status: %u\n", DEVX_GET(create_mkey_out, out, status)); + printf("syndrome: %u\n", DEVX_GET(create_mkey_out, out, syndrome)); + return NULL; + } + + // printf("MKEY_INDEX: %x\n", DEVX_GET(create_mkey_out, out, mkey_index)); + mkey->dv_mkey.lkey = (DEVX_GET(create_mkey_out, out, mkey_index) << 8) | 0; + mkey->dv_mkey.rkey = mkey->dv_mkey.lkey; + + return &mkey->dv_mkey; +} + +struct ibv_pd* ibv_allocate_pd(struct ibv_context* ctx, void* handler) +{ + f_ibv_alloc_pd ibv_alloc_pd_func = (f_ibv_alloc_pd)dlsym(handler, ALLOCATE_PD); + struct ibv_pd* st = ibv_alloc_pd_func(ctx); + + return st; +} + +struct mlx5dv_devx_umem* mlx5dv_devx_umem_register_ex(struct ibv_context* ctx, + void* buff, + uint32_t buff_al_size, + struct mlx5dv_devx_umem_in* umem_in, + void* handler) +{ + umem_in->addr = buff; + umem_in->size = buff_al_size; + umem_in->access = IBV_ACCESS_LOCAL_WRITE; + umem_in->pgsz_bitmap = sysconf(_SC_PAGESIZE); + f_mlx5dv_devx_umem_reg_ex mlx5dv_devx_umem_reg_ex_func = + (f_mlx5dv_devx_umem_reg_ex)dlsym(handler, UMEM_REG); + struct mlx5dv_devx_umem* umem = mlx5dv_devx_umem_reg_ex_func(ctx, umem_in); + + return umem; +} + +int generate_lkey(char device_name[], struct result* res) +{ + void* buff; + struct mlx5dv_mkey* mkey; + struct mlx5dv_devx_umem_in* umem_in; + umem_in = (struct mlx5dv_devx_umem_in*)malloc(sizeof(struct mlx5dv_devx_umem_in)); + memset(umem_in, 0, sizeof(struct mlx5dv_devx_umem_in)); + + int ret = -1; + void* handler = dlopen(LIB_VERBS_LINUX_PATH, RTLD_LOCAL | RTLD_LAZY); + if (!handler) + { + handler = dlopen(LIB_VERBS_UBUNTU_PATH, RTLD_LOCAL | RTLD_LAZY); + if (!handler) + { + printf("Failed to load the libibverbs shared library"); + return ret; + } + } + + void* handler_2 = dlopen(LIB_MLX5_LINUX_PATH, RTLD_LOCAL | RTLD_LAZY); + if (!handler_2) + { + handler_2 = dlopen(LIB_MLX5_UBUNTU_PATH, RTLD_LOCAL | RTLD_LAZY); + if (!handler_2) + { + printf("Failed to load the libmlx5 shared library"); + dlclose(handler); + return ret; + } + } + + struct ibv_context* context = init_my_device_c(device_name, handler, handler_2); + if (!context) + { + printf("init_my_device_c failed\n"); + dlclose(handler); + dlclose(handler_2); + return ret; + } + + f_ibv_close_device ibv_close_device_func = (f_ibv_close_device)dlsym(handler, CLOSE_DEVICE); + struct ibv_pd* pd = ibv_allocate_pd(context, handler); + if (!pd) + { + printf("ibv_alloc_pd failed\n"); + ibv_close_device_func(context); + dlclose(handler); + return ret; + } + + f_ibv_dealloc_pd ibv_dealloc_pd_func = (f_ibv_dealloc_pd)dlsym(handler, DEALLOCATE_PD); + uint32_t buff_al_size = align(BUFF_SIZE, sysconf(_SC_PAGESIZE)); + if (posix_memalign(&buff, sysconf(_SC_PAGESIZE), buff_al_size)) + { + printf("posix_memalign failed\n"); + ibv_dealloc_pd_func(pd); + dlclose(handler); + return ret; + } + + memset(buff, 0, buff_al_size); + + struct mlx5dv_devx_umem* umem = mlx5dv_devx_umem_register_ex(context, buff, buff_al_size, umem_in, handler_2); + if (!umem) + { + printf("mlx5dv_devx_umem_reg failed\n"); + free(buff); + dlclose(handler); + return ret; + } + + f_mlx5dv_devx_umem_dereg mlx5dv_devx_umem_dereg_func = + (f_mlx5dv_devx_umem_dereg)dlsym(handler, UMEM_DEREG); + struct mlx5_mkey* mmkey = calloc(1, sizeof(*mkey)); + if (!mmkey) + { + printf("calloc Failed\n"); + mlx5dv_devx_umem_dereg_func(umem); + dlclose(handler); + return ret; + } + + mkey = create_mkey_c(mmkey, context, to_mpd(pd)->pdn, umem->umem_id, (uint64_t)buff, buff_al_size, handler_2); + if (!mkey) + { + printf("create_mkey failed\n"); + free(mmkey); + dlclose(handler); + return ret; + } + else + { + // printf("Mkey: lkey: %u, rkey: %u\n", mkey->lkey, mkey->rkey); + // printf("%" PRIu64 "buff2-\n", (uint64_t)buff); + res->lkey = mkey->lkey; + res->umem_addr = (uint64_t)buff; + // printf("%d",res->lkey); + // printf("%" PRIu64 "\n", res->umem_addr); + + dlclose(handler); + } + + ret = 0; + free(umem_in); + return ret; +} + +int bit_extracted_32(uint64_t add, int offset, struct extract* ex) +{ + // FILE *fp; + // fp = fopen("/tmp/test.log", "w+"); + // fprintf(fp,"0x%llX\n", (long long unsigned int)add); + // fprintf(fp, "offset-%d\n",offset); + // fclose(fp); + + uint64_t* p; + p = (uint64_t*)add; + // printf("p=%zu\n", (size_t)p); + + p += offset / 2; + + u_int32_t* data = (u_int32_t*)p; + // printf("val=0x%016x\n",*p); + + // printf("1st-32: 0x%08x\n", __swab32(data[0])); + // printf("2nd-32: 0x%08x\n", __swab32(data[1])); + + uint32_t idx = (offset + 1) % 2 == 0 ? 1 : 0; + ex->val = __swab32(data[idx]); + + return 0; +} + +int extrac_all(uint64_t add, int size, char* list) +{ + // int i = 0; + // u_int8_t *p; + // p = (u_int8_t*)add; + + memcpy(list, (void*)add, sizeof(char) * size); + + // for( ; i < size; i++) + // { + // memcpy(list + i, p + i, sizeof(char)); + // } + + return 0; +} + diff --git a/resourcedump/resourcedump_lib/resource_dump.h b/resourcedump/resourcedump_lib/resource_dump.h new file mode 100755 index 00000000..213969a7 --- /dev/null +++ b/resourcedump/resourcedump_lib/resource_dump.h @@ -0,0 +1,228 @@ +#define u8 uint8_t + + +static inline unsigned long align(unsigned long val, unsigned long align) +{ + return (val + align - 1) & ~(align - 1); +} + +struct mlx5_ifc_mkc_bits { + u8 reserved_at_0[0x1]; + u8 free[0x1]; + u8 reserved_at_2[0x1]; + u8 access_mode_4_2[0x3]; + u8 reserved_at_6[0x7]; + u8 relaxed_ordering_write[0x1]; + u8 reserved_at_e[0x1]; + u8 small_fence_on_rdma_read_response[0x1]; + u8 umr_en[0x1]; + u8 a[0x1]; + u8 rw[0x1]; + u8 rr[0x1]; + u8 lw[0x1]; + u8 lr[0x1]; + u8 access_mode_1_0[0x2]; + u8 reserved_at_18[0x8]; + + u8 qpn[0x18]; + u8 mkey_7_0[0x8]; + + u8 reserved_at_40[0x20]; + + u8 length64[0x1]; + u8 bsf_en[0x1]; + u8 sync_umr[0x1]; + u8 reserved_at_63[0x2]; + u8 expected_sigerr_count[0x1]; + u8 reserved_at_66[0x1]; + u8 en_rinval[0x1]; + u8 pd[0x18]; + + u8 start_addr[0x40]; + + u8 len[0x40]; + + u8 bsf_octword_size[0x20]; + + u8 reserved_at_120[0x80]; + + u8 translations_octword_size[0x20]; + + u8 reserved_at_1c0[0x19]; + u8 relaxed_ordering_read[0x1]; + u8 reserved_at_1d9[0x1]; + u8 log_page_size[0x5]; + + u8 reserved_at_1e0[0x3]; + u8 crypto_en[0x2]; + u8 reserved_at_1e5[0x1b]; +}; + +struct mlx5_ifc_create_mkey_out_bits { + u8 status[0x8]; + u8 reserved_at_8[0x18]; + + u8 syndrome[0x20]; + + u8 reserved_at_40[0x8]; + u8 mkey_index[0x18]; + + u8 reserved_at_60[0x20]; +}; + +struct mlx5_ifc_create_mkey_in_bits { + u8 opcode[0x10]; + u8 reserved_at_10[0x10]; + + u8 reserved_at_20[0x10]; + u8 op_mod[0x10]; + + u8 reserved_at_40[0x20]; + + u8 pg_access[0x1]; + u8 mkey_umem_valid[0x1]; + u8 reserved_at_62[0x1e]; + + struct mlx5_ifc_mkc_bits memory_key_mkey_entry; + + u8 reserved_at_280[0x80]; + + u8 translations_octword_actual_size[0x20]; + + u8 mkey_umem_id[0x20]; + + u8 mkey_umem_offset[0x40]; + + u8 reserved_at_320[0x500]; + + u8 klm_pas_mtt[0][0x20]; +}; + +struct mlx5_ifc_destroy_mkey_out_bits { + u8 status[0x8]; + u8 reserved_at_8[0x18]; + + u8 syndrome[0x20]; + + u8 reserved_at_40[0x40]; +}; + +struct mlx5_ifc_destroy_mkey_in_bits { + u8 opcode[0x10]; + u8 uid[0x10]; + + u8 reserved_at_20[0x10]; + u8 op_mod[0x10]; + + u8 reserved_at_40[0x8]; + u8 mkey_index[0x18]; + + u8 reserved_at_60[0x20]; +}; + +#define BUFF_SIZE 1024 * 1024 +#define MLX5_CMD_OP_CREATE_MKEY 0x200 +#define MLX5_CMD_OP_DESTROY_MKEY 0x202 +#define LIB_VERBS_LINUX_PATH "/usr/lib64/libibverbs.so" +#define LIB_VERBS_UBUNTU_PATH "/usr/lib/x86_64-linux-gnu/libibverbs.so" +#define LIB_MLX5_LINUX_PATH "/usr/lib64/libmlx5.so" +#define LIB_MLX5_UBUNTU_PATH "/usr/lib/x86_64-linux-gnu/libmlx5.so" +#define GET_DEVICE_LIST_FUNC "ibv_get_device_list" +#define GET_DEVICE_NAME_FUNC "ibv_get_device_name" +#define OPEN_DEVICE_FUNC "mlx5dv_open_device" +#define FREE_DEVICE_LIST "ibv_free_device_list" +#define OBJECT_CREATE "mlx5dv_devx_obj_create" +#define ALLOCATE_PD "ibv_alloc_pd" +#define UMEM_REG "mlx5dv_devx_umem_reg_ex" +#define CLOSE_DEVICE "ibv_close_device" +#define DEALLOCATE_PD "ibv_dealloc_pd" +#define UMEM_DEREG "mlx5dv_devx_umem_dereg" + + +#define container_of(ptr, type, member) \ + ({ \ + const typeof(((type*)0)->member)* __mptr = (ptr); \ + (type*)((char*)__mptr - offsetof(type, member)); \ + }) +#define to_mxxx(xxx, type) container_of(ib##xxx, struct mlx5_##type, ibv_##xxx) + +typedef struct ibv_pd* (*f_ibv_alloc_pd)(struct ibv_context*); +typedef int (*f_ibv_close_device)(struct ibv_context*); +typedef struct ibv_device** (*f_ibv_get_device_list)(int*); +typedef void (*f_ibv_free_device_list)(struct ibv_device**); +typedef const char* (*f_ibv_get_device_name)(struct ibv_device*); +typedef struct ibv_context* (*f_mlx5dv_open_device)(struct ibv_device*, struct mlx5dv_context_attr*); +typedef int (*f_mlx5dv_devx_umem_dereg)(struct mlx5dv_devx_umem*); +typedef int (*f_ibv_dealloc_pd)(struct ibv_pd* pd); +typedef struct mlx5dv_devx_umem* (*f_mlx5dv_devx_umem_reg)(struct ibv_context* context, + void* addr, + size_t size, + uint32_t access); +typedef struct mlx5dv_devx_umem* (*f_mlx5dv_devx_umem_reg_ex)(struct ibv_context* ctx, + struct mlx5dv_devx_umem_in* umem_in); + +typedef struct mlx5dv_devx_obj* ( + *f_mlx5dv_devx_obj_create)(struct ibv_context*, uint32_t in[], uint32_t in_size, uint32_t out[], uint32_t out_size); +struct reg_access_info +{ + u_int16_t segment_type; + u_int8_t seq_num; + u_int8_t vhca_id_valid; + u_int8_t inline_dump; + u_int8_t more_dump; + u_int16_t vhca_id; + u_int32_t index1; + u_int32_t index2; + u_int16_t num_of_obj2; + u_int16_t num_of_obj1; + u_int64_t device_opaque; + u_int32_t mkey; + u_int32_t size; + u_int64_t address; + u_int32_t inline_data[52]; +}; + +struct mlx5_pd +{ + struct ibv_pd ibv_pd; + uint32_t pdn; + int refcount; + struct mlx5_pd* mprotection_domain; + struct + { + void* opaque_buf; + struct ibv_mr* opaque_mr; + pthread_mutex_t opaque_mr_mutex; + }; +}; + +struct mlx5_mkey +{ + struct mlx5dv_mkey dv_mkey; + struct mlx5dv_devx_obj* devx_obj; + uint16_t num_desc; + uint64_t length; + struct mlx5_sig_ctx* sig; + struct mlx5_crypto_attr* crypto; +}; + +struct result +{ + uint32_t lkey; + uint64_t umem_addr; +}; + +struct extract +{ + uint32_t val; +}; + +struct chars +{ + uint8_t char_val; +}; + +struct extractall +{ + struct chars* char_vals; +}; \ No newline at end of file From e471cded9607e17bc22ec2b3f8d1741b4ffee46c Mon Sep 17 00:00:00 2001 From: Alex Blago Date: Fri, 21 Oct 2022 01:34:20 +0300 Subject: [PATCH 58/63] Revert "Use pkg-config for muparser and sqlite3" This reverts commit f5a061769d06e41b20c44f2a19ee87b2119e443a. Reason for revert: change breaks compilation with all-static linkage (--enable-all-static) with: /usr/bin/ld: cannot find -lsqlite3 collect2: error: ld returned 1 exit status make[3]: *** [mstconfig] Error 1 make[3]: Leaving directory `/mstflint/mlxconfig' To be re-submitted after rework. --- configure.ac | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index 16f01b51..2fe1934d 100644 --- a/configure.ac +++ b/configure.ac @@ -288,7 +288,7 @@ PKG_CHECK_MODULES([JSON], [jsoncpp], [JSON_SYSTEM_AVAILABLE="yes"],[ ]) AM_CONDITIONAL([USE_LOCAL_JSON], [test "$JSON_SYSTEM_AVAILABLE" = no]) -PKG_CHECK_MODULES([MUPARSER], [muparser], [MUPARSER_SYSTEM_AVAILABLE="yes"],[ +AC_SEARCH_LIBS([mupCreateVar], [muparser], [MUPARSER_SYSTEM_AVAILABLE="yes"],[ MUPARSER_SYSTEM_AVAILABLE="no" MUPARSER_CFLAGS='-I$(top_srcdir)/ext_libs/muparser' AC_SUBST(MUPARSER_CFLAGS) @@ -297,7 +297,7 @@ PKG_CHECK_MODULES([MUPARSER], [muparser], [MUPARSER_SYSTEM_AVAILABLE="yes"],[ ]) AM_CONDITIONAL([USE_LOCAL_MUPARSER], [test "$MUPARSER_SYSTEM_AVAILABLE" = no]) -PKG_CHECK_MODULES([SQLITE], [sqlite3], [SQLITE_SYSTEM_AVAILABLE="yes"],[ +AC_SEARCH_LIBS([sqlite3_initialize], [sqlite3], [SQLITE_SYSTEM_AVAILABLE="yes"],[ SQLITE_SYSTEM_AVAILABLE="no" SQLITE_CFLAGS='-I$(top_srcdir)/ext_libs/sqlite' AC_SUBST(SQLITE_CFLAGS) From ba721c8c2d728fef9fb3d515004abf10f9efc285 Mon Sep 17 00:00:00 2001 From: Tomer Tubi Date: Sun, 23 Oct 2022 11:08:47 +0300 Subject: [PATCH 59/63] Update mlxconfig and tools layout with latest 4.22 PRM changes --- mlxconfig/mlxconfig_dbs/mlxconfig_host.db | Bin 291840 -> 356352 bytes .../adb/prm/hca/ext/register_access_table.adb | 175 ++-- .../prm/switch/ext/register_access_table.adb | 907 ++++++++++-------- tools_layouts/reg_access_switch_layouts.c | 37 + tools_layouts/reg_access_switch_layouts.h | 26 +- 5 files changed, 665 insertions(+), 480 deletions(-) diff --git a/mlxconfig/mlxconfig_dbs/mlxconfig_host.db b/mlxconfig/mlxconfig_dbs/mlxconfig_host.db index 00ed053e217d8f2ce234abe4181ef24fdb932bec..77690181d56d1574be37d3ecd62e5b2d29eb46d4 100644 GIT binary patch delta 88650 zcmeEv2Y6IP_x_!-y<8wbNJ7Ylkc1FYHkBSivOpk>BoL}=NP$q2KtdBCY$71oz^jge zy*EG%5F2*HieSM4cKs9u0lS}q|1-0@mxS!b=cnlR_j%;eH}}rHd*{sDnfIPEbLPyd zFS@S!u!pU9LT+_KrLC%V;ry}&Te8$eLP#2Evq_Rf;Q!K%w#@GF0}CzkPm+dyFPT1( zU!~uhc9~dLJzm;sn@zV8y z>$S?A5d)D%skhB(q2?x{d}NF11zG6fe@O%XWBGf2SS0@Ye3fb+dVvgRR^6k4qrSALNtr zQTcQEBl(d0ru?e>g8YoUTW*!N%lFB5$T!K?$%=fLyjFI}%jHFKtz0da%QNIsd4fD% zcE}m>U^!WilcVKuIYjOu%d$Zx)>GCWttYKtSwFLWAY0$DzHWWRy4U)Y^-=3iE9+W< zZ){sK_c4_3GTd0ab}2|TVQmFq!P)}A{Ix>>^VSXo%v~D-IDRd!gPb*ufMeIp2OP8J zJiyUw@&L2f3@?tNES7R!;>SvYOvHX!S6_^wp7oX{-4&QyVW@ z1bDXfj~ZMLc`^MZEzNn^ywHH_ru(Yn}!;u$ez7rkQ8izc~Rgx;YFmvbif@ zzh>T$BAOZi!<+asZA~SBVNDLeK22$WAx-@OgPM4I=+#tZfIoq*C4fC$m4H25Qvd^8 z*?`?#cEGN#7{D$rUNYHb0kpaRBomk1$m`8e1fWj@&;?_8ucVPL;BpLw7kx;+0AA+( z{@ROT>%~gp7rY3P6x*G|;=-&P=ctLriOJ5=oa~aZXdzrEZF3>X?z!+BTo@NXVsPPT z=cvr0B&Q=kb5yQFx}QHvlDcoq49E`cN$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git a/tools_layouts/adb/prm/hca/ext/register_access_table.adb b/tools_layouts/adb/prm/hca/ext/register_access_table.adb index 2f971901..b246cfb0 100644 --- a/tools_layouts/adb/prm/hca/ext/register_access_table.adb +++ b/tools_layouts/adb/prm/hca/ext/register_access_table.adb @@ -35,7 +35,7 @@ - + @@ -126,7 +126,7 @@ - + @@ -174,6 +174,7 @@ + @@ -313,6 +314,7 @@ + @@ -382,7 +384,7 @@ - + @@ -407,7 +409,7 @@ - + @@ -454,7 +456,7 @@ - + @@ -479,7 +481,7 @@ - + @@ -859,7 +861,7 @@ - + @@ -885,7 +887,7 @@ - + @@ -893,10 +895,10 @@ - + - - + + @@ -909,7 +911,7 @@ - + @@ -977,7 +979,7 @@ - + @@ -1013,7 +1015,7 @@ - + @@ -1021,8 +1023,8 @@ - - + + @@ -1032,7 +1034,7 @@ - + @@ -1044,7 +1046,7 @@ - + @@ -1078,7 +1080,7 @@ - + @@ -1087,7 +1089,7 @@ - + @@ -1225,7 +1227,7 @@ - + @@ -1258,9 +1260,9 @@ - - - + + + @@ -1330,7 +1332,7 @@ - + @@ -1354,7 +1356,7 @@ - + @@ -1367,14 +1369,14 @@ - + - + @@ -1438,11 +1440,11 @@ - + - + @@ -1492,7 +1494,7 @@ - + @@ -1546,17 +1548,17 @@ - + - + - - - - + + + + @@ -1639,14 +1641,14 @@ - + - + @@ -1736,7 +1738,7 @@ - + @@ -1767,10 +1769,10 @@ - + - + @@ -1837,8 +1839,8 @@ - - + + @@ -1849,7 +1851,7 @@ - + @@ -1902,6 +1904,13 @@ + + + + + + + @@ -2050,10 +2059,10 @@ - - - - + + + + @@ -2089,7 +2098,7 @@ - + @@ -2101,7 +2110,7 @@ - + @@ -2352,8 +2361,8 @@ - - + + @@ -2509,7 +2518,7 @@ - + @@ -2532,7 +2541,7 @@ - + @@ -2666,7 +2675,7 @@ - + @@ -2697,7 +2706,7 @@ - + @@ -2732,8 +2741,6 @@ - - @@ -2761,8 +2768,6 @@ - - @@ -2774,8 +2779,8 @@ - - + + @@ -2796,7 +2801,7 @@ - + @@ -2818,7 +2823,7 @@ - + @@ -2867,6 +2872,24 @@ + + + + + + + + + + + + + + + + + + @@ -2951,7 +2974,7 @@ - + @@ -2973,8 +2996,8 @@ - - + + @@ -2985,7 +3008,7 @@ - + @@ -3000,7 +3023,7 @@ - + @@ -3008,12 +3031,12 @@ - + - + @@ -3099,7 +3122,7 @@ - + @@ -3160,7 +3183,7 @@ - + @@ -3217,7 +3240,7 @@ - + @@ -3270,7 +3293,7 @@ - + diff --git a/tools_layouts/adb/prm/switch/ext/register_access_table.adb b/tools_layouts/adb/prm/switch/ext/register_access_table.adb index 903829b9..7d8e3a49 100644 --- a/tools_layouts/adb/prm/switch/ext/register_access_table.adb +++ b/tools_layouts/adb/prm/switch/ext/register_access_table.adb @@ -35,7 +35,7 @@ - + @@ -59,13 +59,13 @@ - + - + @@ -75,7 +75,7 @@ - + @@ -230,44 +230,44 @@ - + - + - + - - + + - + - + - + - + @@ -282,12 +282,15 @@ + + + @@ -399,6 +402,7 @@ + @@ -638,7 +642,7 @@ - + @@ -741,6 +745,7 @@ + @@ -841,7 +846,7 @@ - + @@ -945,7 +950,7 @@ - + @@ -968,10 +973,13 @@ - + - + + + + @@ -988,9 +996,9 @@ - + - + @@ -1015,7 +1023,7 @@ - + @@ -1059,9 +1067,9 @@ - - - + + + @@ -1442,13 +1450,13 @@ - + - + @@ -1473,7 +1481,7 @@ - + @@ -1484,7 +1492,7 @@ - + @@ -1507,10 +1515,10 @@ - - - - + + + + @@ -1523,21 +1531,21 @@ - - - + + + - + - + @@ -1545,11 +1553,11 @@ - - - - - + + + + + @@ -1601,7 +1609,7 @@ - + @@ -1615,7 +1623,7 @@ - + @@ -1625,6 +1633,16 @@ + + + + + + + + + + @@ -1655,8 +1673,8 @@ - - + + @@ -1724,7 +1742,7 @@ - + @@ -1734,7 +1752,7 @@ - + @@ -1754,19 +1772,27 @@ - + - + - - + + + + + + + + + + - + @@ -1780,11 +1806,11 @@ - - + + - + @@ -1806,8 +1832,8 @@ - - + + @@ -1832,27 +1858,27 @@ - + - + - + - + - + @@ -1876,13 +1902,13 @@ - - - + + + - + - + @@ -1902,16 +1928,16 @@ - + - + - + @@ -1919,14 +1945,14 @@ - + - + @@ -1949,13 +1975,13 @@ - + - + - + @@ -1974,7 +2000,7 @@ - + @@ -2000,7 +2026,7 @@ - + @@ -2013,11 +2039,11 @@ - + - + @@ -2048,7 +2074,7 @@ - + @@ -2058,7 +2084,7 @@ - + @@ -2076,13 +2102,13 @@ - + - + @@ -2098,7 +2124,7 @@ - + @@ -2108,11 +2134,11 @@ - + - + @@ -2133,7 +2159,7 @@ - + @@ -2157,7 +2183,7 @@ - + @@ -2261,7 +2287,7 @@ - + @@ -2269,8 +2295,8 @@ - - + + @@ -2292,7 +2318,7 @@ - + @@ -2326,7 +2352,7 @@ - + @@ -2335,7 +2361,7 @@ - + @@ -2456,7 +2482,7 @@ - + @@ -2523,7 +2549,7 @@ - + @@ -2556,9 +2582,9 @@ - - - + + + @@ -2588,7 +2614,7 @@ - + @@ -2628,8 +2654,8 @@ - - + + @@ -2639,7 +2665,7 @@ - + @@ -2648,7 +2674,7 @@ - + @@ -2681,7 +2707,7 @@ - + @@ -2701,7 +2727,7 @@ - + @@ -2760,11 +2786,11 @@ - + - + @@ -2778,7 +2804,7 @@ - + @@ -2795,12 +2821,12 @@ - + - + @@ -2828,7 +2854,7 @@ - + @@ -2905,8 +2931,8 @@ - - + + @@ -2921,7 +2947,7 @@ - + @@ -2934,11 +2960,11 @@ - + - + @@ -2947,7 +2973,7 @@ - + @@ -2995,7 +3021,7 @@ - + @@ -3014,7 +3040,7 @@ - + @@ -3027,7 +3053,7 @@ - + @@ -3042,10 +3068,10 @@ - + - + @@ -3053,10 +3079,10 @@ - - - - + + + + @@ -3091,12 +3117,12 @@ - + - + @@ -3112,6 +3138,21 @@ + + + + + + + + + + + + + + + @@ -3134,16 +3175,30 @@ + + + + + + + + + + + + + + - + - + @@ -3152,7 +3207,7 @@ - + @@ -3168,7 +3223,7 @@ - + @@ -3199,8 +3254,8 @@ - - + + @@ -3228,16 +3283,16 @@ - + - + - - - + + + @@ -3252,8 +3307,8 @@ - - + + @@ -3265,8 +3320,8 @@ - - + + @@ -3281,8 +3336,8 @@ - - + + @@ -3296,19 +3351,19 @@ - + - - - + + + - + @@ -3335,7 +3390,7 @@ - + @@ -3401,14 +3456,14 @@ - + - + @@ -3522,16 +3577,16 @@ - + - + - + @@ -3567,8 +3622,8 @@ - - + + @@ -3580,7 +3635,7 @@ - + @@ -3612,7 +3667,7 @@ - + @@ -3623,7 +3678,7 @@ - + @@ -3648,8 +3703,8 @@ - - + + @@ -3660,7 +3715,7 @@ - + @@ -3706,6 +3761,13 @@ + + + + + + + @@ -3854,10 +3916,10 @@ - - - - + + + + @@ -3893,7 +3955,7 @@ - + @@ -3905,7 +3967,7 @@ - + @@ -3915,7 +3977,7 @@ - + @@ -3936,7 +3998,7 @@ - + @@ -3950,7 +4012,7 @@ - + @@ -3958,8 +4020,8 @@ - - + + @@ -4004,14 +4066,14 @@ - + - + @@ -4041,14 +4103,58 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + - - - + @@ -4067,7 +4173,7 @@ - + @@ -4089,7 +4195,7 @@ - + @@ -4202,7 +4308,7 @@ - + @@ -4468,8 +4574,8 @@ - - + + @@ -4629,8 +4735,8 @@ - - + + @@ -4640,14 +4746,14 @@ - + - - + + @@ -4734,7 +4840,7 @@ - + @@ -4757,7 +4863,7 @@ - + @@ -4808,8 +4914,8 @@ - - + + @@ -4820,8 +4926,8 @@ - - + + @@ -4927,9 +5033,9 @@ - + - + @@ -4947,13 +5053,13 @@ - + - - - + + + @@ -4971,17 +5077,18 @@ - - + + + - + @@ -4990,9 +5097,9 @@ - + - + @@ -5006,10 +5113,10 @@ - - + + - + @@ -5017,8 +5124,8 @@ - - + + @@ -5035,7 +5142,7 @@ - + @@ -5060,7 +5167,7 @@ - + @@ -5148,7 +5255,7 @@ - + @@ -5163,8 +5270,6 @@ - - @@ -5182,13 +5287,13 @@ - + - - + + @@ -5256,25 +5361,25 @@ - + - + - + - + @@ -5304,7 +5409,7 @@ - + @@ -5363,7 +5468,7 @@ - + @@ -5381,7 +5486,7 @@ - + @@ -5431,7 +5536,7 @@ - + @@ -5447,7 +5552,7 @@ - + @@ -5455,11 +5560,11 @@ - + - - - + + + @@ -5521,7 +5626,7 @@ - + @@ -5561,35 +5666,35 @@ - + - + - - - + + + - + - + - + @@ -5606,21 +5711,21 @@ - - - + + + - + - - + + @@ -5640,7 +5745,7 @@ - + @@ -5657,12 +5762,12 @@ - + - + @@ -5672,7 +5777,7 @@ - + @@ -5728,15 +5833,15 @@ - + - + - + @@ -5750,8 +5855,8 @@ - - + + @@ -5760,9 +5865,9 @@ - + - + @@ -5770,7 +5875,7 @@ - + @@ -5785,7 +5890,7 @@ - + @@ -5794,7 +5899,7 @@ - + @@ -5810,20 +5915,20 @@ - - + + - + - + - + @@ -5855,13 +5960,13 @@ - + - - - - + + + + @@ -5887,9 +5992,9 @@ - - - + + + @@ -5919,9 +6024,9 @@ - - - + + + @@ -5930,7 +6035,7 @@ - + @@ -5974,7 +6079,7 @@ - + @@ -5986,7 +6091,7 @@ - + @@ -5996,7 +6101,7 @@ - + @@ -6019,7 +6124,7 @@ - + @@ -6046,7 +6151,7 @@ - + @@ -6073,9 +6178,9 @@ - + - + @@ -6091,7 +6196,7 @@ - + @@ -6099,18 +6204,18 @@ - + - + - + @@ -6139,7 +6244,7 @@ - + @@ -6163,7 +6268,7 @@ - + @@ -6232,7 +6337,7 @@ - + @@ -6278,17 +6383,17 @@ - + - + - - + + @@ -6301,8 +6406,8 @@ - - + + @@ -6311,10 +6416,10 @@ - + - + @@ -6322,28 +6427,28 @@ - + - + - + - + - + @@ -6403,8 +6508,8 @@ - - + + @@ -6416,7 +6521,7 @@ - + @@ -6431,7 +6536,7 @@ - + @@ -6443,7 +6548,7 @@ - + @@ -6452,7 +6557,7 @@ - + @@ -6461,7 +6566,7 @@ - + @@ -6472,9 +6577,9 @@ - + - + @@ -6485,12 +6590,12 @@ - + - - + + @@ -6501,7 +6606,7 @@ - + @@ -6517,15 +6622,15 @@ - + - + - - - + + + @@ -6544,9 +6649,9 @@ - - - + + + @@ -6559,17 +6664,17 @@ - + - - + + - + @@ -6582,7 +6687,7 @@ - + @@ -6591,7 +6696,7 @@ - + @@ -6601,13 +6706,13 @@ - + - + @@ -6694,7 +6799,7 @@ - + @@ -6751,7 +6856,7 @@ - + @@ -6804,7 +6909,7 @@ - + @@ -6819,22 +6924,22 @@ - + - + - + - + @@ -6853,7 +6958,7 @@ - + @@ -6862,7 +6967,7 @@ - + @@ -6881,7 +6986,7 @@ - + @@ -6893,7 +6998,7 @@ - + @@ -6914,7 +7019,7 @@ - + @@ -6938,7 +7043,7 @@ - + @@ -6948,14 +7053,14 @@ - + - + @@ -6964,7 +7069,7 @@ - + @@ -6997,7 +7102,7 @@ - + @@ -7025,8 +7130,8 @@ - - + + @@ -7053,13 +7158,13 @@ - + - - - + + + @@ -7098,7 +7203,7 @@ - + @@ -7111,19 +7216,19 @@ - + - + - - + + - + @@ -7161,7 +7266,7 @@ - + @@ -7170,7 +7275,7 @@ - + @@ -7178,16 +7283,16 @@ - + - + - + - - + + @@ -7202,17 +7307,17 @@ - + - - - - + + + + @@ -7228,7 +7333,7 @@ - + @@ -7250,11 +7355,11 @@ - + - + @@ -7272,12 +7377,12 @@ - - + + - + @@ -7290,11 +7395,11 @@ - + - + - + @@ -7309,12 +7414,12 @@ - + - + @@ -7357,11 +7462,11 @@ - + - + @@ -7384,7 +7489,7 @@ - + @@ -7406,7 +7511,7 @@ - + @@ -7548,7 +7653,7 @@ - + @@ -7585,9 +7690,9 @@ - + - + @@ -7616,10 +7721,10 @@ - + - + @@ -7635,7 +7740,7 @@ - + diff --git a/tools_layouts/reg_access_switch_layouts.c b/tools_layouts/reg_access_switch_layouts.c index d1af8235..0f3b6dd5 100644 --- a/tools_layouts/reg_access_switch_layouts.c +++ b/tools_layouts/reg_access_switch_layouts.c @@ -1020,6 +1020,40 @@ void reg_access_switch_mkdc_reg_ext_dump(const struct reg_access_switch_mkdc_reg reg_access_switch_mkdc_reg_ext_print(ptr_struct, fd, 0); } +void reg_access_switch_mrsr_ext_pack(const struct reg_access_switch_mrsr_ext *ptr_struct, u_int8_t *ptr_buff) +{ + u_int32_t offset; + + offset = 28; + adb2c_push_bits_to_buff(ptr_buff, offset, 4, (u_int32_t)ptr_struct->command); +} + +void reg_access_switch_mrsr_ext_unpack(struct reg_access_switch_mrsr_ext *ptr_struct, const u_int8_t *ptr_buff) +{ + u_int32_t offset; + + offset = 28; + ptr_struct->command = (u_int8_t)adb2c_pop_bits_from_buff(ptr_buff, offset, 4); +} + +void reg_access_switch_mrsr_ext_print(const struct reg_access_switch_mrsr_ext *ptr_struct, FILE *fd, int indent_level) +{ + adb2c_add_indentation(fd, indent_level); + fprintf(fd, "======== reg_access_switch_mrsr_ext ========\n"); + + adb2c_add_indentation(fd, indent_level); + fprintf(fd, "command : " UH_FMT "\n", ptr_struct->command); +} + +unsigned int reg_access_switch_mrsr_ext_size(void) +{ + return REG_ACCESS_SWITCH_MRSR_EXT_SIZE; +} + +void reg_access_switch_mrsr_ext_dump(const struct reg_access_switch_mrsr_ext *ptr_struct, FILE *fd) +{ + reg_access_switch_mrsr_ext_print(ptr_struct, fd, 0); +} void reg_access_switch_mtcq_reg_ext_pack(const struct reg_access_switch_mtcq_reg_ext* ptr_struct, u_int8_t* ptr_buff) { u_int32_t offset; @@ -1275,6 +1309,9 @@ void reg_access_switch_reg_access_switch_Nodes_print(const union reg_access_swit adb2c_add_indentation(fd, indent_level); fprintf(fd, "icam_reg_ext:\n"); reg_access_switch_icam_reg_ext_print(&(ptr_struct->icam_reg_ext), fd, indent_level + 1); + adb2c_add_indentation(fd, indent_level); + fprintf(fd, "mrsr_ext:\n"); + reg_access_switch_mrsr_ext_print(&(ptr_struct->mrsr_ext), fd, indent_level + 1); adb2c_add_indentation(fd, indent_level); fprintf(fd, "pmaos_reg_ext:\n"); reg_access_switch_pmaos_reg_ext_print(&(ptr_struct->pmaos_reg_ext), fd, indent_level + 1); diff --git a/tools_layouts/reg_access_switch_layouts.h b/tools_layouts/reg_access_switch_layouts.h index 132dd4aa..588a8500 100644 --- a/tools_layouts/reg_access_switch_layouts.h +++ b/tools_layouts/reg_access_switch_layouts.h @@ -496,8 +496,18 @@ sequence number of each keep-alive session. */ u_int32_t next_keep_alive_counter; }; - /* Description - */ - /* Size in bytes - 112 */ +/* Description - */ +/* Size in bytes - 8 */ +struct reg_access_switch_mrsr_ext { +/*---------------- DWORD[0] (Offset 0x0) ----------------*/ + /* Description - Reset/shutdown command +0: clear state of reset_at_pci_disable +1: software reset (switch soft reset) + +6: reset_at_pci_disable - reset will be done at PCI_DISABLE */ + /* 0x0.0 - 0x0.3 */ + u_int8_t command; +}; struct reg_access_switch_mtcq_reg_ext { /*---------------- DWORD[0] (Offset 0x0) ----------------*/ @@ -656,7 +666,10 @@ This flag will be asserted in case primary and secondary FW versions are not com /* Description - */ /* 0x0.0 - 0x14.31 */ struct reg_access_switch_icam_reg_ext icam_reg_ext; - /* Description - */ + /* Description - */ + /* 0x0.0 - 0x4.31 */ + struct reg_access_switch_mrsr_ext mrsr_ext; + /* Description - */ /* 0x0.0 - 0xc.31 */ struct reg_access_switch_pmaos_reg_ext pmaos_reg_ext; /* Description - */ @@ -782,6 +795,13 @@ This flag will be asserted in case primary and secondary FW versions are not com unsigned int reg_access_switch_mkdc_reg_ext_size(void); #define REG_ACCESS_SWITCH_MKDC_REG_EXT_SIZE (0x2c) void reg_access_switch_mkdc_reg_ext_dump(const struct reg_access_switch_mkdc_reg_ext* ptr_struct, FILE* fd); + /* mrsr_ext */ + void reg_access_switch_mrsr_ext_pack(const struct reg_access_switch_mrsr_ext *ptr_struct, u_int8_t *ptr_buff); + void reg_access_switch_mrsr_ext_unpack(struct reg_access_switch_mrsr_ext *ptr_struct, const u_int8_t *ptr_buff); + void reg_access_switch_mrsr_ext_print(const struct reg_access_switch_mrsr_ext *ptr_struct, FILE *fd, int indent_level); + unsigned int reg_access_switch_mrsr_ext_size(void); +#define REG_ACCESS_SWITCH_MRSR_EXT_SIZE (0x8) + void reg_access_switch_mrsr_ext_dump(const struct reg_access_switch_mrsr_ext *ptr_struct, FILE *fd); /* mtcq_reg_ext */ void reg_access_switch_mtcq_reg_ext_pack(const struct reg_access_switch_mtcq_reg_ext* ptr_struct, u_int8_t* ptr_buff); void reg_access_switch_mtcq_reg_ext_unpack(struct reg_access_switch_mtcq_reg_ext* ptr_struct, const u_int8_t* ptr_buff); From 6398bea4b371bfd123f94d1ba7066c15345074db Mon Sep 17 00:00:00 2001 From: Tomer Tubi Date: Sun, 23 Oct 2022 12:10:40 +0300 Subject: [PATCH 60/63] additional DB fix for previous commit --- mlxconfig/mlxconfig_dbs/mlxconfig_host.db | Bin 356352 -> 356352 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/mlxconfig/mlxconfig_dbs/mlxconfig_host.db b/mlxconfig/mlxconfig_dbs/mlxconfig_host.db index 77690181d56d1574be37d3ecd62e5b2d29eb46d4..fe170331be66ebeffb4c9ae2fd9096ad7728dcc9 100644 GIT binary patch delta 347 zcmZp8AlmRibi*%sM*imC^6kIn8G)E-`)_$>&I9$X409RykMU37kKtG1`^I;MZwX%! zp9$|f-b1|8d9!)#dAWJ6@~q}*&h-HgWoMYH%`h+~U~GQNiKJ!NY!ly`9~Iot5nvTR&R}nk^yTubk<0;&eAE9vViuo%N05bg`-cb2N<2JT z5nSd>!W{g(OdP_~6TdQxNEk8B^Ye5zU}W$KR?rGZl@*7m6%m~%QZNNAO zq)7p&r~S}d=Iw{xvN$Qp@$y77@Gs+cCdU>KZ3kq2B PY-f^TUCO*nfi(aC55Had delta 364 zcmZp8AlmRibi*%sM!x3X^6kIn8G)E-`)_$>&I9!>3?~`*kMU37kKtG1`^I;MZwX%! zp9$|f-b1_{yuQ3bJok83@YL~y@Tl@Ia$n_M$z9Fu&#lPynd>aqO0Gt(XfAEezns@O zH*>aehH@%#{N}jEv6iEa!<$2d{XY9-_9%8~wi|3S*^=1QS>LcOWldofV%fox#=^ur zi`kdy7ZdL?raUGA#(j)Aj4})-CkqN#ZvXax*^`IIGJ?yTNtlD5mx;r0dg51Rk?HYo znR%rB!W05RoqRl<6}(*|6^tyyQB{df?|IA2ji$=bA`GgE5o(r{0plD$PiF%KpI`-4 z6AjuAy=C5h=q-zrk^&zO69fNpeqX+~d^7o6c|Y^c<8|hF&a Date: Sun, 23 Oct 2022 16:41:28 +0300 Subject: [PATCH 61/63] Revert "additional DB fix for previous commit" --- mlxconfig/mlxconfig_dbs/mlxconfig_host.db | Bin 356352 -> 356352 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/mlxconfig/mlxconfig_dbs/mlxconfig_host.db b/mlxconfig/mlxconfig_dbs/mlxconfig_host.db index fe170331be66ebeffb4c9ae2fd9096ad7728dcc9..77690181d56d1574be37d3ecd62e5b2d29eb46d4 100644 GIT binary patch delta 364 zcmZp8AlmRibi*%sM!x3X^6kIn8G)E-`)_$>&I9!>3?~`*kMU37kKtG1`^I;MZwX%! zp9$|f-b1_{yuQ3bJok83@YL~y@Tl@Ia$n_M$z9Fu&#lPynd>aqO0Gt(XfAEezns@O zH*>aehH@%#{N}jEv6iEa!<$2d{XY9-_9%8~wi|3S*^=1QS>LcOWldofV%fox#=^ur zi`kdy7ZdL?raUGA#(j)Aj4})-CkqN#ZvXax*^`IIGJ?yTNtlD5mx;r0dg51Rk?HYo znR%rB!W05RoqRl<6}(*|6^tyyQB{df?|IA2ji$=bA`GgE5o(r{0plD$PiF%KpI`-4 z6AjuAy=C5h=q-zrk^&zO69fNpeqX+~d^7o6c|Y^c<8|hF&a&I9$X409RykMU37kKtG1`^I;MZwX%! zp9$|f-b1|8d9!)#dAWJ6@~q}*&h-HgWoMYH%`h+~U~GQNiKJ!NY!ly`9~Iot5nvTR&R}nk^yTubk<0;&eAE9vViuo%N05bg`-cb2N<2JT z5nSd>!W{g(OdP_~6TdQxNEk8B^Ye5zU}W$KR?rGZl@*7m6%m~%QZNNAO zq)7p&r~S}d=Iw{xvN$Qp@$y77@Gs+cCdU>KZ3kq2B PY-f^TUCO*nfi(aC55Had From 92d4ed5c092e3b15609ad753294563d24f766b72 Mon Sep 17 00:00:00 2001 From: root Date: Mon, 24 Oct 2022 13:04:13 +0300 Subject: [PATCH 62/63] [mstresourcedump] Removing pyverbs and scapy dependencies - Fixing make file Description: Tested OS: all Tested devices: n/a Tested flows: checked compilation Known gaps (with RM ticket): n/a Issue: 3178595 ~ --- resourcedump/resourcedump_lib/Makefile.am | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/resourcedump/resourcedump_lib/Makefile.am b/resourcedump/resourcedump_lib/Makefile.am index 6fd644c8..5361bc19 100755 --- a/resourcedump/resourcedump_lib/Makefile.am +++ b/resourcedump/resourcedump_lib/Makefile.am @@ -36,7 +36,7 @@ lib_LTLIBRARIES = libresourcedump.la libresourcedump_la_SOURCES = resource_dump.c resource_dump.h libresourcedump_la_LIBADD = $(MTCR_DIR)/libmtcr_ul.a $(USER_DIR)/reg_access/libreg_access.a \ - $(DEV_MGT_DIR)/libdev_mgt.a -L$(USER_DIR)/tools_layouts/.libs -ltools_layouts + $(DEV_MGT_DIR)/libdev_mgt.a -L$(USER_DIR)/tools_layouts -ltools_layouts resourcedump_pylibdir = $(libdir)/mft/python_tools/resourcedump/resourcedump_lib/ @@ -44,8 +44,8 @@ dist_resourcedump_pylib_DATA = cresourcedump.so cresourcedump.so: libresourcedump.la $(CC) -Wall -pthread -fpic -shared ${CFLAGS} resource_dump.o -o cresourcedump.so $(MFT_CORE_LIB_LINK) \ - -L$(USER_DIR)/reg_access/.libs -lreg_access -L$(DEV_MGT_DIR)/.libs -ldev_mgt \ - -L$(MTCR_DIR)/.libs/ -lmtcr -L$(USER_DIR)/tools_layouts/.libs -ltools_layouts \ + -L$(USER_DIR)/reg_access -lreg_access -L$(DEV_MGT_DIR) -ldev_mgt \ + -L$(MTCR_DIR) -lmtcr -L$(USER_DIR)/tools_layouts -ltools_layouts \ $(MFT_CORE_LIB_LINK) endif From 453cb8d26e2eb3920f21a24e160511670d9a2983 Mon Sep 17 00:00:00 2001 From: Razi Shahbari Date: Thu, 27 Oct 2022 10:04:20 +0300 Subject: [PATCH 63/63] [mstresourcedump] Removing pyverbs and scapy dependencies - Fixing rmp and debian building issues Description: Tested OS: Tested devices: Tested flows: Known gaps (with RM ticket): Issue: 3239736,3240921 --- resourcedump/resourcedump_lib/Makefile.am | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/resourcedump/resourcedump_lib/Makefile.am b/resourcedump/resourcedump_lib/Makefile.am index 5361bc19..a2ff8b43 100755 --- a/resourcedump/resourcedump_lib/Makefile.am +++ b/resourcedump/resourcedump_lib/Makefile.am @@ -30,7 +30,7 @@ INCLUDES = -I$(top_srcdir) -I$(COMMON_DIR) -I$(REG_ACCESS_DIR) -I$(LAYOUTS_DIR) AM_CXXFLAGS = -Wall -W -MP -H -MD -pipe -DMST_UL -g -std=c++11 $(COMPILER_FPIC) AM_CPPFLAGS = $(AM_CXXFLAGS) - +CRESOURCEDUMP_SO = cresourcedump.so lib_LTLIBRARIES = libresourcedump.la @@ -39,13 +39,13 @@ libresourcedump_la_LIBADD = $(MTCR_DIR)/libmtcr_ul.a $(USER_DIR)/reg_access/libr $(DEV_MGT_DIR)/libdev_mgt.a -L$(USER_DIR)/tools_layouts -ltools_layouts -resourcedump_pylibdir = $(libdir)/mft/python_tools/resourcedump/resourcedump_lib/ +resourcedump_pylibdir = $(libdir)/mstflint/python_tools/mstresourcedump/resourcedump_lib/ dist_resourcedump_pylib_DATA = cresourcedump.so -cresourcedump.so: libresourcedump.la - $(CC) -Wall -pthread -fpic -shared ${CFLAGS} resource_dump.o -o cresourcedump.so $(MFT_CORE_LIB_LINK) \ +${CRESOURCEDUMP_SO}: libresourcedump.la + $(CC) -Wall -pthread -fpic -shared ${CFLAGS} resource_dump.o -o ${CRESOURCEDUMP_SO} $(MFT_CORE_LIB_LINK) \ -L$(USER_DIR)/reg_access -lreg_access -L$(DEV_MGT_DIR) -ldev_mgt \ - -L$(MTCR_DIR) -lmtcr -L$(USER_DIR)/tools_layouts -ltools_layouts \ + -L$(MTCR_DIR) -L$(USER_DIR)/tools_layouts -ltools_layouts \ $(MFT_CORE_LIB_LINK) endif