TT-System-Firmware APIs 19.13.99
Tenstorrent Firmware
Loading...
Searching...
No Matches
pldm_base.h File Reference
#include <zephyr/device.h>
#include <libpldm/base.h>
#include <errno.h>
#include <stddef.h>
#include <stdint.h>
Include dependency graph for pldm_base.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

int pldm_cc_only_response (const struct pldm_header_info *req_hdr, uint8_t cc, struct pldm_msg *resp_msg, size_t *resp_pldm_len)
 Encode a completion-code-only PLDM response.
int pldm_base_build_response (uint8_t *tid, const struct device *mctp_dev, const struct pldm_header_info *req_hdr, const struct pldm_msg *req_msg, size_t req_payload_len, struct pldm_msg *resp_msg, size_t *resp_pldm_len)
 Build a response for a PLDM_BASE typed request.

Function Documentation

◆ pldm_base_build_response()

int pldm_base_build_response ( uint8_t * tid,
const struct device * mctp_dev,
const struct pldm_header_info * req_hdr,
const struct pldm_msg * req_msg,
size_t req_payload_len,
struct pldm_msg * resp_msg,
size_t * resp_pldm_len )

Build a response for a PLDM_BASE typed request.

Parameters
tidPointer to the local terminus ID. GetTID reads it; SetTID writes a new value to it.
mctp_devThe tenstorrent,pldm-mctp-responder device instance. Used to obtain the OEM handler (if any) for GetPLDMVersion / GetPLDMCommands / GetPLDMTypes.
req_hdrDecoded request header.
req_msgRaw request message (including header).
req_payload_lenPayload length (bytes after the PLDM header).
resp_msgOutput buffer for the response.
resp_pldm_lenSet to the response length on success.
Returns
0 on success, negative errno on failure.

◆ pldm_cc_only_response()

int pldm_cc_only_response ( const struct pldm_header_info * req_hdr,
uint8_t cc,
struct pldm_msg * resp_msg,
size_t * resp_pldm_len )

Encode a completion-code-only PLDM response.

Shared utility used by both BASE and PLATFORM response handlers.