AM263x MCU+ SDK  08.05.00
hsmclient_msg.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2022 Texas Instruments Incorporated
3  *
4  * Redistribution and use in source and binary forms, with or without
5  * modification, are permitted provided that the following conditions
6  * are met:
7  *
8  * Redistributions of source code must retain the above copyright
9  * notice, this list of conditions and the following disclaimer.
10  *
11  * Redistributions in binary form must reproduce the above copyright
12  * notice, this list of conditions and the following disclaimer in the
13  * documentation and/or other materials provided with the
14  * distribution.
15  *
16  * Neither the name of Texas Instruments Incorporated nor the names of
17  * its contributors may be used to endorse or promote products derived
18  * from this software without specific prior written permission.
19  *
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
23  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
24  * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
25  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
26  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
30  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31  */
32 
33 #ifndef HSM_CLIENT_MSG_H_
34 #define HSM_CLIENT_MSG_H_
35 
36 #ifdef __cplusplus
37 extern "C"
38 {
39 #endif
40 
41 #include <stdlib.h>
42 
53 #define HSM_MSG_GET_VERSION (0x0002)
54 
55 #define HSM_MSG_BOOT_NOTIFY (0x000A)
56 
57 #define HSM_MSG_GET_UID (0x9021)
58 
59 #define HSM_MSG_OPEN_DBG_FIREWALLS (0x900C)
60 
61 
62 /* message flags */
68 #define HSM_FLAG_AOP (0x11)
69 
70 
77 #define HSM_FLAG_NAOP (0x22)
78 
85 #define HSM_FLAG_ACK (0xAA)
86 
91 #define HSM_FLAG_NACK (0x55)
92 
94 #define HSM_CLIENT_ID (0x01)
95 
101 #define HSM_UID_SIZE (64U)
102 
108 #define HSM_DBG_CERT_SIZE (4096U)
109 
115 typedef struct HsmMsg_t_
116 {
117  uint8_t destClientId; /*< destination client Id */
118  uint8_t srcClientId; /*< current task client Id */
119  uint8_t flags; /*< flags */
120  uint16_t serType ; /*< service type */
121  void* args ; /*< pointer to args */
122  uint16_t crcArgs; /*< args integirty check */
123  uint16_t crcMsg ; /*< message integrity check */
124 } __attribute__((packed)) HsmMsg_t;
125 
126 typedef enum HSM_ClientIds_
127 {
133 } HSM_ClientIds_t ;
134 
137 #ifdef __cplusplus
138 }
139 #endif
140 
141 #endif /* HSM_CLIENT_MSG_H_ */
HSM_CLIENT_ID_2
@ HSM_CLIENT_ID_2
Definition: hsmclient_msg.h:130
HSM_ClientIds_t
HSM_ClientIds_t
Definition: hsmclient_msg.h:127
HsmMsg_t_::crcMsg
uint16_t crcMsg
Definition: hsmclient_msg.h:123
__attribute__
union HsmVer_t_ __attribute__((packed)) HsmVer_t
type for reading HSMRt version.
HsmMsg_t_::serType
uint16_t serType
Definition: hsmclient_msg.h:120
HsmMsg_t_
HSM client / server message format struct.
Definition: hsmclient_msg.h:116
HSM_CLIENT_ID_1
@ HSM_CLIENT_ID_1
Definition: hsmclient_msg.h:129
HSM_CLIENT_ID_4
@ HSM_CLIENT_ID_4
Definition: hsmclient_msg.h:132
HsmMsg_t_::flags
uint8_t flags
Definition: hsmclient_msg.h:119
HsmMsg_t_::crcArgs
uint16_t crcArgs
Definition: hsmclient_msg.h:122
HsmMsg_t_::destClientId
uint8_t destClientId
Definition: hsmclient_msg.h:117
HsmMsg_t_::srcClientId
uint8_t srcClientId
Definition: hsmclient_msg.h:118
HSM_BOOT_NOTIFY_CLIENT_ID
@ HSM_BOOT_NOTIFY_CLIENT_ID
Definition: hsmclient_msg.h:128
HSM_CLIENT_ID_3
@ HSM_CLIENT_ID_3
Definition: hsmclient_msg.h:131
HsmMsg_t_::args
void * args
Definition: hsmclient_msg.h:121