pldm: Add verify CRC value of the BIOS table

Add a checksum methods to the BIOS table and verify the integrity
of the BIOS table.

Tested: add the UTest method and pass the test.

Signed-off-by: George Liu <liuxiwei@inspur.com>
Change-Id: I57849714b0450b65fd894f767b15ab47de8cde89
diff --git a/libpldm/tests/libpldm_bios_table_test.cpp b/libpldm/tests/libpldm_bios_table_test.cpp
index aeb1ac3..a307264 100644
--- a/libpldm/tests/libpldm_bios_table_test.cpp
+++ b/libpldm/tests/libpldm_bios_table_test.cpp
@@ -1120,3 +1120,17 @@
                            0x66, 0x00, 0x6d, 0x81, 0x4a, 0xb6};
     EXPECT_EQ(attrValTable, expectedTable);
 }
+
+TEST(BIOSTableChecksum, testBIOSTableChecksum)
+{
+    std::vector<uint8_t> stringTable{
+        1,   0,                  /* string handle*/
+        5,   0,                  /* string length */
+        'T', 'a', 'b', 'l', 'e', /* string */
+    };
+
+    buildTable(stringTable);
+
+    EXPECT_EQ(true,
+              pldm_bios_table_checksum(stringTable.data(), stringTable.size()));
+}