Lines Matching full:table
34 void BIOSTable::store(const Table& table) in store() argument
37 stream.write(reinterpret_cast<const char*>(table.data()), table.size()); in store()
49 BIOSStringTable::BIOSStringTable(const Table& stringTable) : in BIOSStringTable()
66 return table::string::decodeString(stringEntry); in findString()
78 return table::string::decodeHandle(stringEntry); in findHandle()
81 namespace table namespace
83 void appendPadAndChecksum(Table& table) in appendPadAndChecksum() argument
85 size_t payloadSize = table.size(); in appendPadAndChecksum()
86 table.resize(payloadSize + pldm_bios_table_pad_checksum_size(payloadSize)); in appendPadAndChecksum()
88 pldm_bios_table_append_pad_checksum(table.data(), table.size(), in appendPadAndChecksum()
108 const pldm_bios_string_table_entry* constructEntry(Table& table, in constructEntry() argument
111 auto tableSize = table.size(); in constructEntry()
113 table.resize(tableSize + entryLength); in constructEntry()
115 pldm_bios_table_string_entry_encode(table.data() + tableSize, entryLength, in constructEntry()
118 table.data() + tableSize); in constructEntry()
133 const pldm_bios_attr_table_entry* findByHandle(const Table& table, in findByHandle() argument
136 return pldm_bios_table_attr_find_by_handle(table.data(), table.size(), in findByHandle()
140 const pldm_bios_attr_table_entry* findByStringHandle(const Table& table, in findByStringHandle() argument
143 return pldm_bios_table_attr_find_by_string_handle(table.data(), in findByStringHandle()
144 table.size(), handle); in findByStringHandle()
148 Table& table, pldm_bios_table_attr_entry_string_info* info) in constructStringEntry() argument
153 auto tableSize = table.size(); in constructStringEntry()
154 table.resize(tableSize + entryLength, 0); in constructStringEntry()
155 int rc = pldm_bios_table_attr_entry_string_encode(table.data() + tableSize, in constructStringEntry()
159 error("Failed to encode BIOS table string entry, response code '{RC}'", in constructStringEntry()
161 throw std::runtime_error("Failed to encode BIOS table string entry"); in constructStringEntry()
164 table.data() + tableSize); in constructStringEntry()
168 Table& table, pldm_bios_table_attr_entry_integer_info* info) in constructIntegerEntry() argument
171 auto tableSize = table.size(); in constructIntegerEntry()
172 table.resize(tableSize + entryLength, 0); in constructIntegerEntry()
173 int rc = pldm_bios_table_attr_entry_integer_encode(table.data() + tableSize, in constructIntegerEntry()
178 "Failed to encode BIOS attribute table integer entry, response code '{RC}'", in constructIntegerEntry()
181 "Failed to encode BIOS attribute table integer entry"); in constructIntegerEntry()
184 table.data() + tableSize); in constructIntegerEntry()
198 "Failed to decode BIOS table string definition length, response code '{RC}'", in decodeStringEntry()
201 "Failed to decode BIOS table string definitionlength"); in decodeStringEntry()
222 Table& table, pldm_bios_table_attr_entry_enum_info* info) in constructEnumEntry() argument
227 auto tableSize = table.size(); in constructEnumEntry()
228 table.resize(tableSize + entryLength, 0); in constructEnumEntry()
230 pldm_bios_table_attr_entry_enum_encode(table.data() + tableSize, in constructEnumEntry()
234 table.data() + tableSize); in constructEnumEntry()
244 … "Failed to decode the number of possible values for BIOS table enum entry, response code '{RC}'", in decodeEnumEntry()
247 "Failed to decode the number of possible values for BIOS table enum entry"); in decodeEnumEntry()
298 Table& table, uint16_t attrHandle, uint8_t attrType, const std::string& str) in constructStringEntry() argument
303 auto tableSize = table.size(); in constructStringEntry()
304 table.resize(tableSize + entryLength); in constructStringEntry()
306 table.data() + tableSize, entryLength, attrHandle, attrType, strLen, in constructStringEntry()
311 "Failed to encode BIOS attribute table string entry, response code '{RC}'", in constructStringEntry()
314 "Failed to encode BIOS attribute table string entry"); in constructStringEntry()
317 table.data() + tableSize); in constructStringEntry()
321 Table& table, uint16_t attrHandle, uint8_t attrType, uint64_t value) in constructIntegerEntry() argument
325 auto tableSize = table.size(); in constructIntegerEntry()
326 table.resize(tableSize + entryLength); in constructIntegerEntry()
328 table.data() + tableSize, entryLength, attrHandle, attrType, value); in constructIntegerEntry()
332 "Failed to encode BIOS attribute table integer entry, response code '{RC}'", in constructIntegerEntry()
335 "Failed to encode BIOS attribute table integery entry"); in constructIntegerEntry()
338 table.data() + tableSize); in constructIntegerEntry()
342 Table& table, uint16_t attrHandle, uint8_t attrType, in constructEnumEntry() argument
347 auto tableSize = table.size(); in constructEnumEntry()
348 table.resize(tableSize + entryLength); in constructEnumEntry()
350 table.data() + tableSize, entryLength, attrHandle, attrType, in constructEnumEntry()
355 "Failed to encode BIOS attribute table enum entry, response code '{RC}'", in constructEnumEntry()
358 "Failed to encode BIOS attribute table enum entry"); in constructEnumEntry()
361 table.data() + tableSize); in constructEnumEntry()
364 std::optional<Table> updateTable(const Table& table, const void* entry, in updateTable() argument
367 // Replace the old attribute with the new attribute, the size of table will in updateTable()
374 size_t destBufferLength = table.size() + size + 3; in updateTable()
375 Table destTable(destBufferLength); in updateTable()
378 table.data(), table.size(), destTable.data(), &destBufferLength, entry, in updateTable()
391 } // namespace table