Lines Matching full:table

35 void BIOSTable::store(const Table& table)  in store()  argument
38 stream.write(reinterpret_cast<const char*>(table.data()), table.size()); in store()
50 BIOSStringTable::BIOSStringTable(const Table& stringTable) : in BIOSStringTable()
67 return table::string::decodeString(stringEntry); in findString()
79 return table::string::decodeHandle(stringEntry); in findHandle()
82 namespace table namespace
84 void appendPadAndChecksum(Table& table) in appendPadAndChecksum() argument
86 size_t payloadSize = table.size(); in appendPadAndChecksum()
87 table.resize(payloadSize + pldm_bios_table_pad_checksum_size(payloadSize)); in appendPadAndChecksum()
89 pldm_bios_table_append_pad_checksum(table.data(), table.size(), in appendPadAndChecksum()
110 constructEntry(Table& table, const std::string& str) in constructEntry() argument
112 auto tableSize = table.size(); in constructEntry()
114 table.resize(tableSize + entryLength); in constructEntry()
116 pldm_bios_table_string_entry_encode(table.data() + tableSize, entryLength, in constructEntry()
119 table.data() + tableSize); in constructEntry()
135 findByHandle(const Table& table, uint16_t handle) in findByHandle() argument
137 return pldm_bios_table_attr_find_by_handle(table.data(), table.size(), in findByHandle()
142 findByStringHandle(const Table& table, uint16_t handle) in findByStringHandle() argument
144 return pldm_bios_table_attr_find_by_string_handle(table.data(), in findByStringHandle()
145 table.size(), handle); in findByStringHandle()
149 Table& table, pldm_bios_table_attr_entry_string_info* info) in constructStringEntry() argument
154 auto tableSize = table.size(); in constructStringEntry()
155 table.resize(tableSize + entryLength, 0); in constructStringEntry()
156 int rc = pldm_bios_table_attr_entry_string_encode(table.data() + tableSize, in constructStringEntry()
160 error("Failed to encode BIOS table string entry, response code '{RC}'", in constructStringEntry()
162 throw std::runtime_error("Failed to encode BIOS table string entry"); in constructStringEntry()
165 table.data() + tableSize); in constructStringEntry()
169 Table& table, pldm_bios_table_attr_entry_integer_info* info) in constructIntegerEntry() argument
172 auto tableSize = table.size(); in constructIntegerEntry()
173 table.resize(tableSize + entryLength, 0); in constructIntegerEntry()
174 int rc = pldm_bios_table_attr_entry_integer_encode(table.data() + tableSize, in constructIntegerEntry()
179 "Failed to encode BIOS attribute table integer entry, response code '{RC}'", in constructIntegerEntry()
182 "Failed to encode BIOS attribute table integer entry"); in constructIntegerEntry()
185 table.data() + tableSize); in constructIntegerEntry()
199 "Failed to decode BIOS table string definition length, response code '{RC}'", in decodeStringEntry()
202 "Failed to decode BIOS table string definitionlength"); in decodeStringEntry()
223 constructEnumEntry(Table& table, pldm_bios_table_attr_entry_enum_info* info) in constructEnumEntry() argument
228 auto tableSize = table.size(); in constructEnumEntry()
229 table.resize(tableSize + entryLength, 0); in constructEnumEntry()
231 pldm_bios_table_attr_entry_enum_encode(table.data() + tableSize, in constructEnumEntry()
235 table.data() + tableSize); in constructEnumEntry()
245 … "Failed to decode the number of possible values for BIOS table enum entry, response code '{RC}'", in decodeEnumEntry()
248 "Failed to decode the number of possible values for BIOS table enum entry"); in decodeEnumEntry()
299 Table& table, uint16_t attrHandle, uint8_t attrType, const std::string& str) in constructStringEntry() argument
304 auto tableSize = table.size(); in constructStringEntry()
305 table.resize(tableSize + entryLength); in constructStringEntry()
307 table.data() + tableSize, entryLength, attrHandle, attrType, strLen, in constructStringEntry()
312 "Failed to encode BIOS attribute table string entry, response code '{RC}'", in constructStringEntry()
315 "Failed to encode BIOS attribute table string entry"); in constructStringEntry()
318 table.data() + tableSize); in constructStringEntry()
322 Table& table, uint16_t attrHandle, uint8_t attrType, uint64_t value) in constructIntegerEntry() argument
326 auto tableSize = table.size(); in constructIntegerEntry()
327 table.resize(tableSize + entryLength); in constructIntegerEntry()
329 table.data() + tableSize, entryLength, attrHandle, attrType, value); in constructIntegerEntry()
333 "Failed to encode BIOS attribute table integer entry, response code '{RC}'", in constructIntegerEntry()
336 "Failed to encode BIOS attribute table integery entry"); in constructIntegerEntry()
339 table.data() + tableSize); in constructIntegerEntry()
343 constructEnumEntry(Table& table, uint16_t attrHandle, uint8_t attrType, in constructEnumEntry() argument
348 auto tableSize = table.size(); in constructEnumEntry()
349 table.resize(tableSize + entryLength); in constructEnumEntry()
351 table.data() + tableSize, entryLength, attrHandle, attrType, in constructEnumEntry()
356 "Failed to encode BIOS attribute table enum entry, response code '{RC}'", in constructEnumEntry()
359 "Failed to encode BIOS attribute table enum entry"); in constructEnumEntry()
362 table.data() + tableSize); in constructEnumEntry()
365 std::optional<Table> updateTable(const Table& table, const void* entry, in updateTable() argument
368 // Replace the old attribute with the new attribute, the size of table will in updateTable()
375 size_t destBufferLength = table.size() + size + 3; in updateTable()
376 Table destTable(destBufferLength); in updateTable()
379 table.data(), table.size(), destTable.data(), &destBufferLength, entry, in updateTable()
392 } // namespace table