bios_table: Stabilise pldm_bios_table_append_pad_checksum_check()

pldm_bios_table_append_pad_checksum_check() is a replacement for
pldm_bios_table_append_pad_checksum(), which used assert() to sanitize
its arguments. pldm_bios_table_append_pad_checksum_check() instead
returns an error.

Use of pldm_bios_table_append_pad_checksum_check() is demonstrated in
the following patch:

https://gerrit.openbmc.org/c/openbmc/pldm/+/64626

Additionally, deprecate pldm_bios_table_append_pad_checksum() now that
there's a stable replacement.

Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
Change-Id: If9fc91ac60477cfb6ba96e377dbf5768a990bd69
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 079096c..29fd452 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -103,6 +103,12 @@
    out how to stop, or get in touch. This symbol will be marked static the
    release after deprecation.
 
+8. bios_table: Stabilise pldm_bios_table_append_pad_checksum_check()
+
+   pldm_bios_table_append_pad_checksum() is deprecated by this change. Users of
+   pldm_bios_table_append_pad_checksum() should migrate to
+   pldm_bios_table_append_pad_checksum_check()
+
 ### Removed
 
 1. bios_table: Remove deprecated APIs sanitized by assert():
diff --git a/abi/aarch64/gcc.dump b/abi/aarch64/gcc.dump
index b52816c..608b450 100644
--- a/abi/aarch64/gcc.dump
+++ b/abi/aarch64/gcc.dump
@@ -3740,6 +3740,25 @@
                                          'Return' => '47738',
                                          'ShortName' => 'pldm_bios_table_iter_create'
                                        },
+                            '50235' => {
+                                         'Header' => 'bios_table.h',
+                                         'Param' => {
+                                                      '0' => {
+                                                               'name' => 'table',
+                                                               'type' => '166'
+                                                             },
+                                                      '1' => {
+                                                               'name' => 'capacity',
+                                                               'type' => '123'
+                                                             },
+                                                      '2' => {
+                                                               'name' => 'size',
+                                                               'type' => '8822'
+                                                             }
+                                                    },
+                                         'Return' => '74',
+                                         'ShortName' => 'pldm_bios_table_append_pad_checksum_check'
+                                       },
                             '50639' => {
                                          'Header' => 'bios_table.h',
                                          'Param' => {
@@ -7575,6 +7594,7 @@
                                                  'is_transfer_flag_valid' => 1,
                                                  'pack_pldm_header' => 1,
                                                  'pldm_bios_table_append_pad_checksum' => 1,
+                                                 'pldm_bios_table_append_pad_checksum_check' => 1,
                                                  'pldm_bios_table_attr_entry_decode_attribute_handle' => 1,
                                                  'pldm_bios_table_attr_entry_decode_attribute_type' => 1,
                                                  'pldm_bios_table_attr_entry_decode_string_handle' => 1,
diff --git a/abi/x86_64/gcc.dump b/abi/x86_64/gcc.dump
index ba196a9..33df348 100644
--- a/abi/x86_64/gcc.dump
+++ b/abi/x86_64/gcc.dump
@@ -4122,6 +4122,25 @@
                                          'Return' => '48827',
                                          'ShortName' => 'pldm_bios_table_iter_create'
                                        },
+                            '51335' => {
+                                         'Header' => 'bios_table.h',
+                                         'Param' => {
+                                                      '0' => {
+                                                               'name' => 'table',
+                                                               'type' => '166'
+                                                             },
+                                                      '1' => {
+                                                               'name' => 'capacity',
+                                                               'type' => '123'
+                                                             },
+                                                      '2' => {
+                                                               'name' => 'size',
+                                                               'type' => '9084'
+                                                             }
+                                                    },
+                                         'Return' => '74',
+                                         'ShortName' => 'pldm_bios_table_append_pad_checksum_check'
+                                       },
                             '51739' => {
                                          'Header' => 'bios_table.h',
                                          'Param' => {
@@ -8070,6 +8089,7 @@
                                                  'is_transfer_flag_valid' => 1,
                                                  'pack_pldm_header' => 1,
                                                  'pldm_bios_table_append_pad_checksum' => 1,
+                                                 'pldm_bios_table_append_pad_checksum_check' => 1,
                                                  'pldm_bios_table_attr_entry_decode_attribute_handle' => 1,
                                                  'pldm_bios_table_attr_entry_decode_attribute_type' => 1,
                                                  'pldm_bios_table_attr_entry_decode_string_handle' => 1,
diff --git a/src/bios_table.c b/src/bios_table.c
index ec96b82..47c5bae 100644
--- a/src/bios_table.c
+++ b/src/bios_table.c
@@ -954,7 +954,7 @@
 	return size;
 }
 
-LIBPLDM_ABI_STABLE
+LIBPLDM_ABI_DEPRECATED
 size_t pldm_bios_table_append_pad_checksum(void *table, size_t capacity,
 					   size_t size)
 {
@@ -965,7 +965,7 @@
 	return size;
 }
 
-LIBPLDM_ABI_TESTING
+LIBPLDM_ABI_STABLE
 int pldm_bios_table_append_pad_checksum_check(void *table, size_t capacity,
 					      size_t *size)
 {