Lines Matching +full:0 +full:x6e
38 EXPECT_EQ(enc->hdr.reserved, 0);
39 EXPECT_EQ(enc->hdr.datagram, 0);
40 EXPECT_EQ(enc->hdr.header_ver, 0);
49 0xf0, 0x18, 0x87, 0x8c, 0xcb, 0x7d, 0x49, 0x43,
50 0x98, 0x00, 0xa0, 0x2f, 0x05, 0x9a, 0xca, 0x02};
52 constexpr uint8_t pkgHeaderFormatRevision = 0x01;
57 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
58 0x00, 0x19, 0x0c, 0xe5, 0x07, 0x00};
61 constexpr std::string_view packageVersionStr{"OpenBMCv1.0"};
66 0xf0, 0x18, 0x87, 0x8c, 0xcb, 0x7d, 0x49, 0x43, 0x98, 0x00, 0xa0, 0x2f,
67 0x05, 0x9a, 0xca, 0x02, 0x01, 0x2f, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
68 0x00, 0x00, 0x00, 0x19, 0x0c, 0xe5, 0x07, 0x00, 0x08, 0x00, 0x01, 0x0b,
69 0x4f, 0x70, 0x65, 0x6e, 0x42, 0x4d, 0x43, 0x76, 0x31, 0x2e, 0x30};
101 int rc = 0;
102 constexpr std::string_view packageVersionStr{"OpenBMCv1.0"};
106 // Invalid Package Version String Type - 0x06
109 0xf0, 0x18, 0x87, 0x8c, 0xcb, 0x7d, 0x49, 0x43, 0x98, 0x00,
110 0xa0, 0x2f, 0x05, 0x9a, 0xca, 0x02, 0x02, 0x2f, 0x01, 0x00,
111 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x19, 0x0c, 0xe5,
112 0x07, 0x00, 0x08, 0x00, 0x06, 0x0b, 0x4f, 0x70, 0x65, 0x6e,
113 0x42, 0x4d, 0x43, 0x76, 0x31, 0x2e, 0x30};
144 // Invalid Package Version String Length - 0x00
147 0xf0, 0x18, 0x87, 0x8c, 0xcb, 0x7d, 0x49, 0x43, 0x98, 0x00,
148 0xa0, 0x2f, 0x05, 0x9a, 0xca, 0x02, 0x02, 0x2f, 0x01, 0x00,
149 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x19, 0x0c, 0xe5,
150 0x07, 0x00, 0x08, 0x00, 0x01, 0x00, 0x4f, 0x70, 0x65, 0x6e,
151 0x42, 0x4d, 0x43, 0x76, 0x31, 0x2e, 0x30};
160 0xf0, 0x18, 0x87, 0x8c, 0xcb, 0x7d, 0x49, 0x43, 0x98, 0x00,
161 0xa0, 0x2f, 0x05, 0x9a, 0xca, 0x02, 0x02, 0x2f, 0x01, 0x00,
162 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x19, 0x0c, 0xe5,
163 0x07, 0x00, 0x08, 0x00, 0x01, 0x0b, 0x4f, 0x70, 0x65, 0x6e,
164 0x42, 0x4d, 0x43, 0x76, 0x31, 0x2e};
173 0xf0, 0x18, 0x87, 0x8c, 0xcb, 0x7d, 0x49, 0x43, 0x98, 0x00,
174 0xa0, 0x2f, 0x05, 0x9a, 0xca, 0x02, 0x02, 0x2f, 0x01, 0x00,
175 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x19, 0x0c, 0xe5,
176 0x07, 0x00, 0x09, 0x00, 0x01, 0x0b, 0x4f, 0x70, 0x65, 0x6e,
177 0x42, 0x4d, 0x43, 0x76, 0x31, 0x2e, 0x30};
191 std::vector<std::bitset<8>> applicableComponentsBitfield{0x93, 0x01};
196 0x12, 0x44, 0xd2, 0x64, 0x8d, 0x7d, 0x47, 0x18,
197 0xa0, 0x30, 0xfc, 0x8a, 0x56, 0x58, 0x7d, 0x5b};
200 constexpr std::array<uint8_t, fwDevicePkgDataLen> fwDevicePkgData{0xab,
201 0xcd};
210 0x31, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x01, 0x0e, 0x02,
211 0x00, 0x93, 0x01, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e,
212 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x31, 0x02, 0x00, 0x10,
213 0x00, 0x12, 0x44, 0xd2, 0x64, 0x8d, 0x7d, 0x47, 0x18, 0xa0,
214 0x30, 0xfc, 0x8a, 0x56, 0x58, 0x7d, 0x5b, 0xab, 0xcd};
252 uint16_t descriptorType = 0;
253 uint16_t descriptorLen = 0;
283 std::vector<std::bitset<8>> applicableComponentsBitfield{0x03};
288 0x12, 0x44, 0xd2, 0x64, 0x8d, 0x7d, 0x47, 0x18,
289 0xa0, 0x30, 0xfc, 0x8a, 0x56, 0x58, 0x7d, 0x5b};
290 constexpr uint16_t fwDevicePkgDataLen = 0;
302 0x2e, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x01, 0x0e, 0x00, 0x00, 0x03,
303 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x72, 0x69, 0x6e,
304 0x67, 0x31, 0x02, 0x00, 0x10, 0x00, 0x12, 0x44, 0xd2, 0x64, 0x8d, 0x7d,
305 0x47, 0x18, 0xa0, 0x30, 0xfc, 0x8a, 0x56, 0x58, 0x7d, 0x5b};
327 EXPECT_EQ(deviceIdRecHeader.fw_device_pkg_data_length, 0);
343 uint16_t descriptorType = 0;
344 uint16_t descriptorLen = 0;
361 EXPECT_EQ(outFwDevicePkgData.length, 0);
369 0x0b, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x06, 0x0e, 0x00, 0x00};
371 int rc = 0;
434 0x0b, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00};
443 0x2e, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x01, 0x0e, 0x00, 0x00};
452 0x15, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x01, 0x0e, 0x02, 0x00};
461 0x31, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x01, 0x0e,
462 // FirmwareDevicePackageDataLength = 0xffff
463 0xff, 0xff,
465 0x93, 0x01, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x72,
466 0x69, 0x6e, 0x67, 0x31, 0x02, 0x00, 0x10, 0x00, 0x12, 0x44, 0xd2, 0x64,
467 0x8d, 0x7d, 0x47, 0x18, 0xa0, 0x30, 0xfc, 0x8a, 0x56, 0x58, 0x7d, 0x5b,
468 0xab, 0xcd};
481 0x0a, 0x0b, 0x0c, 0xd};
484 0x12, 0x44, 0xd2, 0x64, 0x8d, 0x7d, 0x47, 0x18,
485 0xa0, 0x30, 0xfc, 0x8a, 0x56, 0x58, 0x7d, 0x5b};
490 0x01, 0x02};
505 0x01, 0x00, 0x04, 0x00, 0x0a, 0x0b, 0x0c, 0x0d, 0x02, 0x00, 0x10,
506 0x00, 0x12, 0x44, 0xd2, 0x64, 0x8d, 0x7d, 0x47, 0x18, 0xa0, 0x30,
507 0xfc, 0x8a, 0x56, 0x58, 0x7d, 0x5b, 0xff, 0xff, 0x0b, 0x00, 0x01,
508 0x07, 0x4f, 0x70, 0x65, 0x6e, 0x42, 0x4d, 0x43, 0x01, 0x02};
512 int rc = 0;
516 uint16_t descriptorType = 0;
517 uint16_t descriptorLen = 0;
549 uint8_t descriptorTitleStrType = 0;
585 int rc = 0;
588 0x01, 0x00, 0x03, 0x00, 0x0a, 0x0b, 0x0c};
589 uint16_t descriptorType = 0;
618 std::array<uint8_t, 7> invalidIANADescriptor2{0x01, 0x00, 0x04, 0x00,
619 0x0a, 0x0b, 0x0c};
628 int rc = 0;
631 0x06, 0x07, 0x4f, 0x70, 0x65, 0x6e, 0x42, 0x4d, 0x43};
632 uint8_t descriptorStringType = 0;
675 // VendorDefinedDescriptorTitleStringLength is 0
677 0x01, 0x00, 0x4f, 0x70, 0x65, 0x6e, 0x42, 0x4d, 0x43};
686 0x01, 0x07, 0x4f, 0x70, 0x65, 0x6e, 0x42, 0x4d, 0x43};
699 constexpr uint32_t compComparisonStamp = 0xffffffff;
703 constexpr std::bitset<16> reqCompActivationMethod{0x0c};
714 0x10, 0x00, 0x2c, 0x01, 0xff, 0xff, 0xff, 0xff, 0x01, 0x00, 0x0c, 0x00,
715 0x65, 0x01, 0x00, 0x00, 0x1b, 0x00, 0x00, 0x00, 0x01, 0x0e, 0x56, 0x65,
716 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x31};
748 int rc = 0;
753 // Invalid ComponentVersionStringType - 0x06
755 0x10, 0x00, 0x2c, 0x01, 0xff, 0xff, 0xff, 0xff, 0x01, 0x00, 0x0c, 0x00,
756 0x65, 0x01, 0x00, 0x00, 0x1b, 0x00, 0x00, 0x00, 0x06, 0x0e, 0x56, 0x65,
757 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x31};
786 // Invalid ComponentVersionStringLength - 0x00
788 0x10, 0x00, 0x2c, 0x01, 0xff, 0xff, 0xff, 0xff, 0x01, 0x00, 0x0c, 0x00,
789 0x65, 0x01, 0x00, 0x00, 0x1b, 0x00, 0x00, 0x00, 0x01, 0x00, 0x56, 0x65,
790 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x31};
797 // is not 0xffffffff
799 0x10, 0x00, 0x2c, 0x01, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x00,
800 0x65, 0x01, 0x00, 0x00, 0x1b, 0x00, 0x00, 0x00, 0x01, 0x0e, 0x56, 0x65,
801 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x31};
813 // Invalid ComponentLocationOffset - 0
815 0x10, 0x00, 0x2c, 0x01, 0xff, 0xff, 0xff, 0xff, 0x01, 0x00, 0x0c, 0x00,
816 0x00, 0x00, 0x00, 0x00, 0x1b, 0x00, 0x00, 0x00, 0x01, 0x0e, 0x56, 0x65,
817 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x31};
823 // Invalid ComponentSize - 0
825 0x10, 0x00, 0x2c, 0x01, 0xff, 0xff, 0xff, 0xff, 0x01, 0x00, 0x0c, 0x00,
826 0x65, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x0e, 0x56, 0x65,
827 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x31};
840 uint8_t instanceId = 0x01;
870 descriptorDataLen, 0xff);
875 uint32_t deviceIdentifiersLen = 0;
876 uint8_t descriptorCount = 0;
915 EXPECT_EQ(rc, 0);
919 0x00,
921 0x0f,
922 0x00,
923 0x00,
924 0x00,
926 0x02,
927 // desc 0
928 0x01,
929 0x00,
930 0x04,
931 0x00,
932 0x61,
933 0x31,
934 0x32,
935 0x33,
937 0xff,
938 0xff,
939 0x03,
940 0x00,
941 0x39,
942 0x38,
943 0x37,
955 uint8_t instanceId = 0x01;
971 constexpr std::bitset<32> fdCapabilities{0x00000104};
979 // constexpr uint32_t activeCompComparisonStamp = 0xabcdefab;
981 // 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08};
982 // constexpr uint32_t pendingCompComparisonStamp = 0x12345678;
984 // 0x08, 0x07, 0x06, 0x05, 0x04, 0x03, 0x02, 0x01};
993 0x10, 0x00, 0x2c, 0x01, 0x14, 0xab, 0xef, 0xcd, 0xab, 0x01, 0x0e, 0x01,
994 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x78, 0x56, 0x34, 0x12, 0x01,
995 0x0e, 0x08, 0x07, 0x06, 0x05, 0x04, 0x03, 0x02, 0x01, 0x12, 0x00, 0x02,
996 0x00, 0x00, 0x00, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x53, 0x74,
997 0x72, 0x69, 0x6e, 0x67, 0x33, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e,
998 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x34};
1007 0x00, 0x00, 0x00, 0x00, 0x04, 0x01, 0x00, 0x00, 0x01, 0x00, 0x01,
1008 0x0e, 0x01, 0x0e, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x53,
1009 0x74, 0x72, 0x69, 0x6e, 0x67, 0x31, 0x56, 0x65, 0x72, 0x73, 0x69,
1010 0x6f, 0x6e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x32, 0x10, 0x00,
1011 0x2c, 0x01, 0x14, 0xab, 0xef, 0xcd, 0xab, 0x01, 0x0e, 0x01, 0x02,
1012 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x78, 0x56, 0x34, 0x12, 0x01,
1013 0x0e, 0x08, 0x07, 0x06, 0x05, 0x04, 0x03, 0x02, 0x01, 0x12, 0x00,
1014 0x02, 0x00, 0x00, 0x00, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e,
1015 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x33, 0x56, 0x65, 0x72, 0x73,
1016 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x34};
1063 constexpr std::bitset<32> fdCapabilities{0x06};
1064 constexpr uint16_t compCount = 0;
1074 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
1075 0x0e, 0x01, 0x0e, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x53,
1076 0x74, 0x72, 0x69, 0x6e, 0x67, 0x31, 0x56, 0x65, 0x72, 0x73, 0x69,
1077 0x6f, 0x6e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x32};
1113 EXPECT_EQ(outCompParameterTable.length, 0);
1122 constexpr std::bitset<32> fdCapabilities{0x06};
1123 constexpr uint16_t compCount = 0;
1131 getFwParamsResponse{0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00,
1132 0x00, 0x00, 0x00, 0x01, 0x0d, 0x00, 0x00,
1133 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e,
1134 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67};
1158 EXPECT_EQ(outResp.pending_comp_image_set_ver_str_len, 0);
1165 EXPECT_EQ(outPendingCompImageSetVersion.length, 0);
1167 EXPECT_EQ(outCompParameterTable.length, 0);
1173 getFwParamsResponse{0x00, 0x00, 0x00, 0x01};
1194 int rc = 0;
1197 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1198 0x00, 0x00, 0x00, 0x06, 0x0e, 0x00, 0x00};
1236 responseMsg, 0, &outResp, &outActiveCompImageSetVersion,
1254 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1255 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00};
1268 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00,
1269 0x00, 0x00, 0x00, 0x01, 0x0e, 0x01, 0x00};
1282 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00,
1283 0x00, 0x00, 0x00, 0x01, 0x0e, 0x06, 0x0e};
1295 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00,
1296 0x00, 0x00, 0x00, 0x01, 0x0e, 0x01, 0x0e};
1310 constexpr uint16_t compClassification = 0x0a0b;
1312 constexpr uint16_t compIdentifier = 0x0c0d;
1313 constexpr uint16_t compClassificationIndex = 0xf;
1315 constexpr uint32_t timestamp = 0x12345678;
1317 constexpr uint16_t compActivationMethods = 0xbbdd;
1319 constexpr uint32_t capabilitiesDuringUpdate = 0xbadbeefe;
1341 sizeof(inEntry->active_comp_release_date), 0xff);
1346 sizeof(inEntry->pending_comp_release_date), 0xff);
1352 std::fill_n(entry.data() + activeCompVerStrPos, activeCompVerStrLen, 0xaa);
1356 0xbb);
1377 EXPECT_EQ(0, memcmp(inEntry->active_comp_release_date,
1385 EXPECT_EQ(0, memcmp(inEntry->pending_comp_release_date,
1392 EXPECT_EQ(0, memcmp(outActiveCompVerStr.ptr,
1395 EXPECT_EQ(0, memcmp(outPendingCompVerStr.ptr,
1409 .comparison_stamp = 0x12345678,
1417 .comparison_stamp = 0x12345678,
1427 std::fill_n(entryFull.active_ver.str.str_data, activeCompVerStrLen, 0xaa);
1428 std::fill_n(entryFull.pending_ver.str.str_data, pendingCompVerStrLen, 0xbb);
1430 0xff);
1432 PLDM_FWUP_COMPONENT_RELEASE_DATA_LEN, 0xff);
1451 EXPECT_EQ(rc, 0);
1475 * FDP supports downstream devices dynamically attached [Bit position 0] &
1478 bitfield32_t capabilities_resp = {.value = 0x0002};
1486 rc = pldm_msgbuf_init_errno(buf, 0, responseMsg.data() + hdrSize,
1488 EXPECT_EQ(rc, 0);
1503 EXPECT_EQ(rc, 0);
1517 uint8_t downstream_device_update_supported_resp = 0xe; /*Undefined value*/
1521 * FDP supports downstream devices dynamically attached [Bit position 0] &
1524 bitfield32_t capabilities_resp = {.value = 0x0002};
1532 rc = pldm_msgbuf_init_errno(buf, 0, responseMsg.data() + hdrSize,
1534 EXPECT_EQ(rc, 0);
1560 * FDP supports downstream devices dynamically attached [Bit position 0] &
1563 bitfield32_t capabilities_resp = {.value = 0x0002};
1572 rc = pldm_msgbuf_init_errno(buf, 0, responseMsg.data() + hdrSize,
1574 EXPECT_EQ(rc, 0);
1599 0xFFFFFFFF, PLDM_GET_FIRSTPART};
1603 ASSERT_EQ(rc, 0);
1606 {0x81, 0x05, 0x04, 0xFF, 0xFF, 0xFF, 0xFF, 0x01}));
1613 0xFFFFFFFF, PLDM_GET_FIRSTPART};
1615 0xFFFFFFFF, PLDM_ACKNOWLEDGEMENT_ONLY};
1638 constexpr uint32_t next_data_transfer_handle_resp = 0x0;
1640 constexpr uint32_t downstream_devices_length_resp = 0;
1641 constexpr uint16_t number_of_downstream_devices_resp = 0;
1648 int rc = 0;
1650 rc = pldm_msgbuf_init_errno(buf, 0, response->payload,
1652 ASSERT_EQ(rc, 0);
1660 ASSERT_EQ(pldm_msgbuf_complete_consumed(buf), 0);
1666 ASSERT_EQ(rc, 0);
1680 constexpr uint32_t next_data_transfer_handle_resp = 0x0;
1682 constexpr uint32_t downstream_devices_length_resp = 0;
1691 int rc = 0;
1693 rc = pldm_msgbuf_init_errno(buf, 0, response->payload,
1695 ASSERT_EQ(rc, 0);
1703 ASSERT_EQ(pldm_msgbuf_complete_consumed(buf), 0);
1707 ASSERT_EQ(rc, 0);
1713 ASSERT_NE(rc, 0);
1720 constexpr uint32_t next_data_transfer_handle_resp = 0x0;
1734 int rc = 0;
1736 rc = pldm_msgbuf_init_errno(buf, 0, response->payload, payloadLen);
1737 ASSERT_EQ(rc, 0);
1754 ASSERT_EQ(pldm_msgbuf_complete_consumed(buf), 0);
1759 ASSERT_EQ(rc, 0);
1781 EXPECT_EQ(memcmp(desc.descriptor_data, &dmtf, sizeof(dmtf)), 0);
1783 ASSERT_EQ(rc, 0);
1785 ASSERT_EQ(rc, 0);
1788 constexpr const uint16_t descriptor_id_type_iana_pen = 0x1;
1789 constexpr const uint16_t descriptor_id_len_iana_pen = 0x4;
1796 {0, 1},
1809 constexpr uint32_t next_data_transfer_handle_resp = 0x0;
1823 int rc = 0;
1825 rc = pldm_msgbuf_init_errno(buf, 0, response->payload, payloadLen);
1826 ASSERT_EQ(rc, 0);
1835 pldm_msgbuf_insert_uint16(buf, 0);
1852 ASSERT_EQ(pldm_msgbuf_complete_consumed(buf), 0);
1857 ASSERT_EQ(rc, 0);
1861 size_t devIndex = 0;
1862 size_t descIndex = 0;
1889 0);
1893 ASSERT_EQ(rc, 0);
1898 ASSERT_EQ(rc, 0);
1905 {0, 2},
1920 constexpr uint32_t next_data_transfer_handle_resp = 0x0;
1934 int rc = 0;
1936 rc = pldm_msgbuf_init_errno(buf, 0, response->payload, payloadLen);
1937 ASSERT_EQ(rc, 0);
1946 pldm_msgbuf_insert_uint16(buf, 0);
1968 ASSERT_EQ(pldm_msgbuf_complete_consumed(buf), 0);
1973 ASSERT_EQ(rc, 0);
1977 size_t devIndex = 0;
1978 size_t descIndex = 0;
2005 0);
2009 ASSERT_EQ(rc, 0);
2013 ASSERT_EQ(rc, 0);
2021 {0, 1},
2036 constexpr uint32_t next_data_transfer_handle_resp = 0x0;
2050 int rc = 0;
2052 rc = pldm_msgbuf_init_errno(buf, 0, response->payload, payloadLen);
2053 ASSERT_EQ(rc, 0);
2062 pldm_msgbuf_insert_uint16(buf, 0);
2084 ASSERT_EQ(pldm_msgbuf_complete_consumed(buf), 0);
2089 ASSERT_EQ(rc, 0);
2093 size_t devIndex = 0;
2094 size_t descIndex = 0;
2121 0);
2125 ASSERT_EQ(rc, 0);
2129 ASSERT_EQ(rc, 0);
2148 response->payload[0] = PLDM_ERROR_UNSUPPORTED_PLDM_CMD;
2151 EXPECT_EQ(rc, 0);
2155 response->payload[0] = PLDM_SUCCESS;
2168 constexpr uint32_t next_data_transfer_handle_resp = 0x0;
2185 int rc = 0;
2187 rc = pldm_msgbuf_init_errno(buf, 0, response->payload, payloadLen);
2188 EXPECT_EQ(rc, 0);
2198 * is not checked in this test case so filling with 0xff
2201 0xff);
2205 0);
2210 constexpr uint32_t actualDownstreamDevicesLen = 0;
2213 constexpr uint32_t next_data_transfer_handle_resp = 0x0;
2226 int rc = 0;
2228 rc = pldm_msgbuf_init_errno(buf, 0, response->payload, payloadLen);
2229 ASSERT_EQ(rc, 0);
2248 0x0, PLDM_GET_FIRSTPART};
2257 EXPECT_EQ(rc, 0);
2261 expectedReq{0x81, 0x05, 0x05, 0x00, 0x00, 0x00, 0x00, 0x01};
2270 0x0, PLDM_ACKNOWLEDGEMENT_ONLY};
2287 0x0, PLDM_GET_FIRSTPART};
2311 constexpr uint32_t next_data_transfer_handle_resp = 0x0;
2313 constexpr bitfield32_t fdp_capabilities_during_update = {.value = 0x0002};
2321 int rc = 0;
2323 rc = pldm_msgbuf_init_errno(buf, 0, response->payload, payload_len);
2324 EXPECT_EQ(rc, 0);
2336 pldm_msgbuf_insert_uint16(buf, 0);
2339 pldm_msgbuf_insert_uint32(buf, 0);
2343 ASSERT_EQ(rc, 0);
2346 pldm_msgbuf_insert_uint32(buf, 0);
2350 ASSERT_EQ(rc, 0);
2354 pldm_msgbuf_insert_uint32(buf, 0);
2359 ASSERT_EQ(rc, 0);
2362 ASSERT_EQ(rc, 0);
2365 ASSERT_EQ(rc, 0);
2373 ASSERT_EQ(rc, 0);
2381 size_t entries = 0;
2384 EXPECT_EQ(entry.downstream_device_index, 0);
2385 EXPECT_EQ(entry.active_comp_comparison_stamp, 0);
2390 EXPECT_EQ(entry.pending_comp_comparison_stamp, 0);
2396 EXPECT_EQ(entry.capabilities_during_update.value, 0);
2403 EXPECT_EQ(rc, 0);
2421 constexpr uint32_t next_data_transfer_handle_resp = 0x0;
2423 constexpr bitfield32_t fdp_capabilities_during_update = {.value = 0x0002};
2431 int rc = 0;
2433 rc = pldm_msgbuf_init_errno(buf, 0, response->payload, payload_len);
2434 EXPECT_EQ(rc, 0);
2447 0,
2448 0,
2452 0,
2457 {0},
2463 0,
2467 0,
2472 {0},
2487 ASSERT_EQ(rc, 0);
2496 ASSERT_EQ(rc, 0);
2506 ASSERT_EQ(rc, 0);
2510 ASSERT_EQ(rc, 0);
2514 ASSERT_EQ(rc, 0);
2522 ASSERT_EQ(rc, 0);
2530 size_t entryIndex = 0;
2543 EXPECT_STREQ(&table[entryIndex].active_comp_release_date[0],
2544 &entry.active_comp_release_date[0]);
2551 EXPECT_STREQ(&table[entryIndex].pending_comp_release_date[0],
2552 &entry.pending_comp_release_date[0]);
2565 EXPECT_EQ(rc, 0);
2582 constexpr uint32_t next_data_transfer_handle_resp = 0x0;
2584 constexpr bitfield32_t fdp_capabilities_during_update = {.value = 0x0002};
2591 int rc = 0;
2595 rc = pldm_msgbuf_init_errno(buf, 0, responseMsg.data() + hdrSize,
2597 EXPECT_EQ(rc, 0);
2606 * is not checked in this test case so filling with 0xff
2611 0xff);
2620 EXPECT_EQ(rc, 0);
2636 constexpr uint16_t pkgDataLen = 0x1234;
2637 constexpr std::string_view compImgSetVerStr = "0penBmcv1.0";
2661 outRequest{0x81, 0x05, 0x10, 0x00, 0x02, 0x00, 0x00, 0x03, 0x00,
2662 0x02, 0x34, 0x12, 0x01, 0x0b, 0x30, 0x70, 0x65, 0x6e,
2663 0x42, 0x6d, 0x63, 0x76, 0x31, 0x2e, 0x30};
2673 constexpr uint16_t pkgDataLen = 0x1234;
2674 constexpr std::string_view compImgSetVerStr = "0penBmcv1.0";
2716 &compImgSetVerStrInfo, requestMsg, 0);
2719 compImgSetVerStrLen = 0;
2722 pkgDataLen, PLDM_STR_TYPE_ASCII, 0, &compImgSetVerStrInfo, nullptr,
2727 compImgSetVerStrInfo.length = 0xffff;
2768 requestUpdateResponse1{0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x01};
2773 uint8_t outCompletionCode = 0;
2774 uint16_t outFdMetaDataLen = 0;
2775 uint8_t outFdWillSendPkgData = 0;
2804 outCompletionCode = 0;
2805 outFdMetaDataLen = 0;
2806 outFdWillSendPkgData = 0;
2809 requestUpdateResponse2{0x00, 0x00, 0x00, 0x81};
2824 requestUpdateResponse{0x00, 0x00, 0x00, 0x00, 0x00, 0x04};
2829 uint8_t outCompletionCode = 0;
2830 uint16_t outFdMetaDataLen = 0;
2831 uint8_t outFdWillSendPkgData = 0;
2853 rc = decode_request_update_resp(responseMsg, 0, &outCompletionCode,
2868 constexpr uint32_t compComparisonStamp = 0x12345678;
2869 constexpr std::string_view compVerStr = "0penBmcv1.1";
2891 outRequest{0x81, 0x05, 0x13, 0x05, 0x0a, 0x00, 0x90, 0x01, 0x28,
2892 0x78, 0x56, 0x34, 0x12, 0x01, 0x0b, 0x30, 0x70, 0x65,
2893 0x6e, 0x42, 0x6d, 0x63, 0x76, 0x31, 0x2e, 0x31};
2903 ASSERT_EQ(rc, 0);
2923 constexpr uint32_t compComparisonStamp = 0x12345678;
2924 constexpr std::string_view compVerStr = "0penBmcv1.1";
2970 compClassificationIndex, compComparisonStamp, PLDM_STR_TYPE_ASCII, 0,
3001 passCompTableResponse1{0x00, 0x00, 0x00, 0x00, 0x00, 0x01};
3006 uint8_t completionCode = 0;
3007 uint8_t compResp = 0;
3008 uint8_t compRespCode = 0;
3021 passCompTableResponse2{0x00, 0x00, 0x00, 0x00, 0x00, 0xd0};
3036 passCompTableResponse3{0x00, 0x00, 0x00, 0x80};
3053 passCompTableResponse1{0x00, 0x00, 0x00, 0x00, 0x00};
3058 uint8_t completionCode = 0;
3059 uint8_t compResp = 0;
3060 uint8_t compRespCode = 0;
3082 rc = decode_pass_component_table_resp(responseMsg1, 0, &completionCode,
3093 passCompTableResponse2{0x00, 0x00, 0x00, 0x00, 0x02, 0x00};
3104 passCompTableResponse3{0x00, 0x00, 0x00, 0x00, 0x00, 0x0c};
3115 passCompTableResponse4{0x00, 0x00, 0x00, 0x00, 0x00, 0xf0};
3130 constexpr uint32_t compComparisonStamp = 0x89abcdef;
3155 outRequest{0x82, 0x05, 0x14, 0x0a, 0x00, 0xf4, 0x01, 0x32, 0xef,
3156 0xcd, 0xab, 0x89, 0x00, 0x10, 0x00, 0x00, 0x01, 0x00,
3157 0x00, 0x00, 0x01, 0x0b, 0x4f, 0x70, 0x65, 0x6e, 0x42,
3158 0x6d, 0x63, 0x76, 0x32, 0x2e, 0x32};
3167 ASSERT_EQ(rc, 0);
3188 constexpr uint32_t compComparisonStamp = 0x89abcdef;
3237 compComparisonStamp, 0, updateOptionFlags, PLDM_STR_TYPE_ASCII,
3245 PLDM_STR_TYPE_ASCII, 0, &compVerStrInfo, requestMsg,
3269 updateComponentResponse1{0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3270 0x01, 0x00, 0x00, 0x00, 0x64, 0x00};
3275 uint8_t completionCode = 0;
3276 uint8_t compCompatibilityResp = 0;
3277 uint8_t compCompatibilityRespCode = 0;
3279 uint16_t timeBeforeReqFWData = 0;
3294 constexpr uint16_t timeBeforeSendingReqFwData0s = 0;
3296 updateComponentResponse2{0x00, 0x00, 0x00, 0x00, 0x01, 0x09,
3297 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
3314 updateComponentResponse3{0x00, 0x00, 0x00, 0x80};
3332 updateComponentResponse1{0x00, 0x00, 0x00, 0x00, 0x01, 0x09,
3333 0x00, 0x00, 0x00, 0x00, 0x00};
3338 uint8_t completionCode = 0;
3339 uint8_t compCompatibilityResp = 0;
3340 uint8_t compCompatibilityRespCode = 0;
3342 uint16_t timeBeforeReqFWData = 0;
3381 responseMsg1, 0, &completionCode, &compCompatibilityResp,
3393 updateComponentResponse2{0x00, 0x00, 0x00, 0x00, 0x02, 0x00,
3394 0x01, 0x00, 0x00, 0x00, 0x64, 0x00};
3405 updateComponentResponse3{0x00, 0x00, 0x00, 0x00, 0x00, 0x0c,
3406 0x01, 0x00, 0x00, 0x00, 0x64, 0x00};
3417 updateComponentResponse4{0x00, 0x00, 0x00, 0x00, 0x00, 0xf0,
3418 0x01, 0x00, 0x00, 0x00, 0x64, 0x00};
3435 reqFWDataReq{0x00, 0x00, 0x00, 0x2c, 0x01, 0x00,
3436 0x00, 0xff, 0x00, 0x00, 0x00};
3440 uint32_t outOffset = 0;
3441 uint32_t outLength = 0;
3455 reqFWDataReq{0x00, 0x00, 0x00, 0x2c, 0x01, 0x00,
3456 0x00, 0x1f, 0x00, 0x00, 0x00};
3460 uint32_t outOffset = 0;
3461 uint32_t outLength = 0;
3494 outReqFwDataResponse1{0x03, 0x05, 0x15, 0x00, 0x01, 0x02, 0x03, 0x04,
3495 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c,
3496 0x0d, 0x0e, 0x0f, 0x10, 0x11, 0x12, 0x13, 0x14,
3497 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c,
3498 0x1d, 0x1e, 0x1f, 0x20};
3501 reqFwDataResponse1{0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x03, 0x04,
3502 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c,
3503 0x0d, 0x0e, 0x0f, 0x10, 0x11, 0x12, 0x13, 0x14,
3504 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c,
3505 0x1d, 0x1e, 0x1f, 0x20};
3515 outReqFwDataResponse2{0x03, 0x05, 0x15, 0x82};
3517 0x00, 0x00, 0x00, 0x00};
3529 std::array<uint8_t, hdrSize> reqFwDataResponse{0x00, 0x00, 0x00};
3532 auto rc = encode_request_firmware_data_resp(0, PLDM_SUCCESS, nullptr, 0);
3535 rc = encode_request_firmware_data_resp(0, PLDM_SUCCESS, responseMsg, 0);
3543 transferCompleteReq1{0x00, 0x00, 0x00, 0x00};
3547 uint8_t outTransferResult = 0;
3555 transferCompleteReq2{0x00, 0x00, 0x00, 0x02};
3567 constexpr std::array<uint8_t, hdrSize> transferCompleteReq{0x00, 0x00,
3568 0x00};
3572 uint8_t outTransferResult = 0;
3574 auto rc = decode_transfer_complete_req(nullptr, 0, &outTransferResult);
3577 rc = decode_transfer_complete_req(requestMsg, 0, nullptr);
3580 rc = decode_transfer_complete_req(requestMsg, 0, &outTransferResult);
3589 outTransferCompleteResponse1{0x04, 0x05, 0x16, 0x00};
3591 transferCompleteResponse1{0x00, 0x00, 0x00, 0x00};
3601 outTransferCompleteResponse2{0x04, 0x05, 0x16, 0x88};
3603 transferCompleteResponse2{0x00, 0x00, 0x00, 0x00};
3616 std::array<uint8_t, hdrSize> transferCompleteResponse{0x00, 0x00, 0x00};
3620 auto rc = encode_transfer_complete_resp(0, PLDM_SUCCESS, nullptr, 0);
3623 rc = encode_transfer_complete_resp(0, PLDM_SUCCESS, responseMsg, 0);
3631 verifyCompleteReq1{0x00, 0x00, 0x00, 0x00};
3635 uint8_t outVerifyResult = 0;
3643 verifyCompleteReq2{0x00, 0x00, 0x00, 0x03};
3655 constexpr std::array<uint8_t, hdrSize> verifyCompleteReq{0x00, 0x00, 0x00};
3659 uint8_t outVerifyResult = 0;
3661 auto rc = decode_verify_complete_req(nullptr, 0, &outVerifyResult);
3664 rc = decode_verify_complete_req(requestMsg, 0, nullptr);
3667 rc = decode_verify_complete_req(requestMsg, 0, &outVerifyResult);
3676 outVerifyCompleteResponse1{0x05, 0x05, 0x17, 0x00};
3678 verifyCompleteResponse1{0x00, 0x00, 0x00, 0x00};
3688 outVerifyCompleteResponse2{0x05, 0x05, 0x17, 0x88};
3690 verifyCompleteResponse2{0x00, 0x00, 0x00, 0x00};
3702 std::array<uint8_t, hdrSize> verifyCompleteResponse{0x00, 0x00, 0x00};
3706 auto rc = encode_verify_complete_resp(0, PLDM_SUCCESS, nullptr, 0);
3709 rc = encode_verify_complete_resp(0, PLDM_SUCCESS, responseMsg, 0);
3718 constexpr std::bitset<16> compActivationModification1{0x30};
3720 applyCompleteReq1{0x00, 0x00, 0x00, 0x01, 0x30, 0x00};
3724 uint8_t outApplyResult = 0;
3736 applyCompleteReq2{0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
3750 constexpr std::array<uint8_t, hdrSize> applyCompleteReq1{0x00, 0x00, 0x00};
3754 uint8_t outApplyResult = 0;
3770 rc = decode_apply_complete_req(requestMsg1, 0, &outApplyResult,
3775 applyCompleteReq2{0x00, 0x00, 0x00, 0x00, 0x01, 0x00};
3790 outApplyCompleteResponse1{0x06, 0x05, 0x18, 0x00};
3792 applyCompleteResponse1{0x00, 0x00, 0x00, 0x00};
3802 outApplyCompleteResponse2{0x06, 0x05, 0x18, 0x88};
3804 applyCompleteResponse2{0x00, 0x00, 0x00, 0x00};
3816 std::array<uint8_t, hdrSize> applyCompleteResponse{0x00, 0x00, 0x00};
3820 auto rc = encode_apply_complete_resp(0, PLDM_SUCCESS, nullptr, 0);
3823 rc = encode_apply_complete_resp(0, PLDM_SUCCESS, responseMsg, 0);
3841 outRequest{0x87, 0x05, 0x1a, 0x01};
3852 0, PLDM_ACTIVATE_SELF_CONTAINED_COMPONENTS, nullptr,
3857 0, PLDM_ACTIVATE_SELF_CONTAINED_COMPONENTS, requestMsg, 0);
3860 rc = encode_activate_firmware_req(0, 2, requestMsg,
3869 activateFirmwareResponse1{0x00, 0x00, 0x00, 0x00, 0x64, 0x00};
3874 uint8_t completionCode = 0;
3875 uint16_t estimatedTimeForActivation = 0;
3886 activateFirmwareResponse2{0x00, 0x00, 0x00, 0x85};
3902 activateFirmwareResponse{0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
3907 uint8_t completionCode = 0;
3908 uint16_t estimatedTimeForActivation = 0;
3925 rc = decode_activate_firmware_resp(responseMsg, 0, &completionCode,
3946 constexpr std::array<uint8_t, hdrSize> outRequest{0x88, 0x05, 0x1b};
3956 auto rc = encode_get_status_req(0, nullptr, PLDM_GET_STATUS_REQ_BYTES);
3959 rc = encode_get_status_req(0, requestMsg, PLDM_GET_STATUS_REQ_BYTES + 1);
3965 constexpr std::bitset<32> updateOptionFlagsEnabled1{0};
3967 getStatusResponse1{0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x03,
3968 0x09, 0x65, 0x05, 0x00, 0x00, 0x00, 0x00};
3973 uint8_t completionCode = 0;
3974 uint8_t currentState = 0;
3975 uint8_t previousState = 0;
3976 uint8_t auxState = 0;
3977 uint8_t auxStateStatus = 0;
3978 uint8_t progressPercent = 0;
3979 uint8_t reasonCode = 0;
3980 bitfield32_t updateOptionFlagsEnabled{0};
3997 // Bit position 0 - Force update of component – FD will perform a force
4002 getStatusResponse2{0x00, 0x00, 0x00, 0x00, 0x04, 0x03, 0x00,
4003 0x70, 0x32, 0x05, 0x01, 0x00, 0x00, 0x00};
4048 getStatusResponse3{0x00, 0x00, 0x00, 0x04};
4062 uint8_t completionCode = 0;
4063 uint8_t currentState = 0;
4064 uint8_t previousState = 0;
4065 uint8_t auxState = 0;
4066 uint8_t auxStateStatus = 0;
4067 uint8_t progressPercent = 0;
4068 uint8_t reasonCode = 0;
4069 bitfield32_t updateOptionFlagsEnabled{0};
4071 constexpr std::array<uint8_t, hdrSize> getStatusResponse1{0x00, 0x00, 0x00};
4137 getStatusResponse2{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4138 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
4149 getStatusResponse3{0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00,
4150 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
4161 getStatusResponse4{0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00,
4162 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
4173 getStatusResponse5{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04,
4174 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
4185 getStatusResponse6{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4186 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
4197 getStatusResponse7{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4198 0x00, 0x66, 0x00, 0x00, 0x00, 0x00, 0x00};
4209 getStatusResponse8{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4210 0x00, 0x00, 0xc7, 0x00, 0x00, 0x00, 0x00};
4223 getStatusResponse9{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
4224 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
4246 constexpr std::array<uint8_t, hdrSize> outRequest{0x89, 0x05, 0x1c};
4257 0, nullptr, PLDM_CANCEL_UPDATE_COMPONENT_REQ_BYTES);
4261 0, requestMsg, PLDM_CANCEL_UPDATE_COMPONENT_REQ_BYTES + 1);
4267 uint8_t completionCode = 0;
4269 cancelUpdateComponentResponse1{0x00, 0x00, 0x00, 0x00};
4280 cancelUpdateComponentResponse2{0x00, 0x00, 0x00, 0x86};
4293 uint8_t completionCode = 0;
4295 0x00, 0x00, 0x00};
4326 constexpr std::array<uint8_t, hdrSize> outRequest{0x8a, 0x05, 0x1d};
4337 encode_cancel_update_req(0, nullptr, PLDM_CANCEL_UPDATE_REQ_BYTES);
4340 rc = encode_cancel_update_req(0, requestMsg,
4347 constexpr std::bitset<64> nonFunctioningComponentBitmap1{0};
4349 cancelUpdateResponse1{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4350 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
4354 uint8_t completionCode = 0;
4355 bool8_t nonFunctioningComponentIndication = 0;
4356 bitfield64_t nonFunctioningComponentBitmap{0};
4367 constexpr std::bitset<64> nonFunctioningComponentBitmap2{0x0101};
4369 cancelUpdateResponse2{0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01,
4370 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
4385 cancelUpdateResponse3{0x00, 0x00, 0x00, 0x86};
4398 constexpr std::array<uint8_t, hdrSize> cancelUpdateResponse1{0x00, 0x00,
4399 0x00};
4403 uint8_t completionCode = 0;
4404 bool8_t nonFunctioningComponentIndication = 0;
4405 bitfield64_t nonFunctioningComponentBitmap{0};
4433 cancelUpdateResponse2{0x00, 0x00, 0x00, 0x00};
4443 cancelUpdateResponse3{0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00,
4444 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};