bios_table: Deprecate APIs with arguments sanitized using assert()

C provides enough foot-guns without us encoding them into library APIs.
Specifically, deprecate the following in favour of their *_check()
variants which ensure assertions won't fail or otherwise invoke UB:

* pldm_bios_table_string_entry_encode()
* pldm_bios_table_string_entry_decode_string()
* pldm_bios_table_attr_entry_enum_encode()
* pldm_bios_table_attr_entry_enum_decode_pv_num()
* pldm_bios_table_attr_entry_enum_decode_def_num()
* pldm_bios_table_attr_entry_enum_decode_pv_hdls()
* pldm_bios_table_attr_entry_string_encode()
* pldm_bios_table_attr_entry_string_decode_def_string_length()

Change-Id: I752c27210d04209a4677ed5de26a10bbcaa0ec24
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 15dd472..89ad2f3 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -43,6 +43,23 @@
 4. bios_table: Relax pldm_bios_table_string_entry_decode_string_check()
 5. bios_table: Relax pldm_bios_table_attr_entry_enum_decode_pv_hdls_check()
 
+### Deprecated
+
+1. bios_table: Deprecate APIs with arguments sanitized using assert()
+
+   C provides enough foot-guns without us encoding them into library APIs.
+   Specifically, deprecate the following in favour of their `*_check()` variants
+   which ensure assertions won't fail or otherwise invoke UB:
+
+   - pldm_bios_table_string_entry_encode()
+   - pldm_bios_table_string_entry_decode_string()
+   - pldm_bios_table_attr_entry_enum_encode()
+   - pldm_bios_table_attr_entry_enum_decode_pv_num()
+   - pldm_bios_table_attr_entry_enum_decode_def_num()
+   - pldm_bios_table_attr_entry_enum_decode_pv_hdls()
+   - pldm_bios_table_attr_entry_string_encode()
+   - pldm_bios_table_attr_entry_string_decode_def_string_length()
+
 ### Removed
 
 1. libpldm: Remove the requester-api option
diff --git a/src/bios_table.c b/src/bios_table.c
index a861a87..9a64e57 100644
--- a/src/bios_table.c
+++ b/src/bios_table.c
@@ -51,7 +51,7 @@
 	       MEMBER_SIZE(pldm_bios_string_table_entry, name) + string_length;
 }
 
-LIBPLDM_ABI_STABLE
+LIBPLDM_ABI_DEPRECATED
 void pldm_bios_table_string_entry_encode(void *entry, size_t entry_length,
 					 const char *str, uint16_t str_length)
 {
@@ -94,7 +94,7 @@
 	return le16toh(entry->string_length);
 }
 
-LIBPLDM_ABI_STABLE
+LIBPLDM_ABI_DEPRECATED
 uint16_t pldm_bios_table_string_entry_decode_string(
 	const struct pldm_bios_string_table_entry *entry, char *buffer,
 	size_t size)
@@ -178,7 +178,7 @@
 	       def_num;
 }
 
-LIBPLDM_ABI_STABLE
+LIBPLDM_ABI_DEPRECATED
 void pldm_bios_table_attr_entry_enum_encode(
 	void *entry, size_t entry_length,
 	const struct pldm_bios_table_attr_entry_enum_info *info)
@@ -225,7 +225,7 @@
 			return PLDM_ERROR_INVALID_DATA;                        \
 	} while (0)
 
-LIBPLDM_ABI_STABLE
+LIBPLDM_ABI_DEPRECATED
 uint8_t pldm_bios_table_attr_entry_enum_decode_pv_num(
 	const struct pldm_bios_attr_table_entry *entry)
 {
@@ -243,7 +243,7 @@
 	return PLDM_SUCCESS;
 }
 
-LIBPLDM_ABI_STABLE
+LIBPLDM_ABI_DEPRECATED
 uint8_t pldm_bios_table_attr_entry_enum_decode_def_num(
 	const struct pldm_bios_attr_table_entry *entry)
 {
@@ -263,7 +263,7 @@
 	return PLDM_SUCCESS;
 }
 
-LIBPLDM_ABI_STABLE
+LIBPLDM_ABI_DEPRECATED
 uint8_t pldm_bios_table_attr_entry_enum_decode_pv_hdls(
 	const struct pldm_bios_attr_table_entry *entry, uint16_t *pv_hdls,
 	uint8_t pv_num)
@@ -334,7 +334,7 @@
 	       def_str_len;
 }
 
-LIBPLDM_ABI_STABLE
+LIBPLDM_ABI_DEPRECATED
 void pldm_bios_table_attr_entry_string_encode(
 	void *entry, size_t entry_length,
 	const struct pldm_bios_table_attr_entry_string_info *info)
@@ -414,7 +414,7 @@
 	return PLDM_SUCCESS;
 }
 
-LIBPLDM_ABI_STABLE
+LIBPLDM_ABI_DEPRECATED
 uint16_t pldm_bios_table_attr_entry_string_decode_def_string_length(
 	const struct pldm_bios_attr_table_entry *entry)
 {