PLDM Message Structure Change

With this change, PLDM code is optimised. The PLDM payload message
structure previously consisted of a pointer to the payload message and
the payload length, this structure is removed with this commit and the
PLDM message structure now has the PLDM header structure and an array of
size 1 whose address is the starting byte of message payload. Therefore,
pldm msg struct can represent a request/response message in contiguous
memory, thereby enabling simple casts and avoiding memcpys to get from a
uint8_t* to pldm msg or vice versa.

This commit also introduces a change to have the response handlers allocate
memory for responses. This is aligned with the message struct change, and
enables varying length responses.

Change-Id: Ia46d852b8b16bfc7cf04f38435bd4079ad33c66b
Signed-off-by: vkaverap <vkaverap@in.ibm.com>
diff --git a/libpldm/bios.h b/libpldm/bios.h
index d173aeb..4bc00ed 100644
--- a/libpldm/bios.h
+++ b/libpldm/bios.h
@@ -34,6 +34,7 @@
 /** @brief Decode a GetDateTime response message
  *
  *  @param[in] msg - Response message payload
+ *  @param[in] payload_length - Length of response message payload
  *  @param[out] completion_code - Pointer to response msg's PLDM completion code
  *  @param[out] seconds - Seconds in BCD format
  *  @param[out] minutes - minutes in BCD format
@@ -43,7 +44,7 @@
  *  @param[out] year - year in BCD format
  *  @return pldm_completion_codes
  */
-int decode_get_date_time_resp(const struct pldm_msg_payload *msg,
+int decode_get_date_time_resp(const uint8_t *msg, size_t payload_length,
 			      uint8_t *completion_code, uint8_t *seconds,
 			      uint8_t *minutes, uint8_t *hours, uint8_t *day,
 			      uint8_t *month, uint16_t *year);