1 /* SPDX-License-Identifier: BSD-3-Clause
2 * Copyright(c) 2019-2021 Broadcom
6 #ifndef _TF_MSG_COMMON_H_
7 #define _TF_MSG_COMMON_H_
9 /* Communication Mailboxes */
13 /* Helper to fill in the parms structure */
14 #define MSG_PREP(parms, mb, type, subtype, req, resp) do { \
16 parms.tf_type = type; \
17 parms.tf_subtype = subtype; \
18 parms.req_size = sizeof(req); \
19 parms.req_data = (uint32_t *)&(req); \
20 parms.resp_size = sizeof(resp); \
21 parms.resp_data = (uint32_t *)&(resp); \
24 #define MSG_PREP_NO_REQ(parms, mb, type, subtype, resp) do { \
26 parms.tf_type = type; \
27 parms.tf_subtype = subtype; \
29 parms.req_data = NULL; \
30 parms.resp_size = sizeof(resp); \
31 parms.resp_data = (uint32_t *)&(resp); \
34 #define MSG_PREP_NO_RESP(parms, mb, type, subtype, req) do { \
36 parms.tf_type = type; \
37 parms.tf_subtype = subtype; \
38 parms.req_size = sizeof(req); \
39 parms.req_data = (uint32_t *)&(req); \
40 parms.resp_size = 0; \
41 parms.resp_data = NULL; \
44 #endif /* _TF_MSG_COMMON_H_ */