blob: 2cfc84376b9b2373dfdf84965085ae5600ca4dba (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
|
/*
* Copyright 2014-2017 Cavium, Inc.
* The contents of this file are subject to the terms of the Common Development
* and Distribution License, v.1, (the "License").
*
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the License at available
* at http://opensource.org/licenses/CDDL-1.0
*
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef _LICENSE_H
#define _LICENSE_H
#include "bcmtype.h"
#if !defined(LITTLE_ENDIAN) && !defined(BIG_ENDIAN)
#error "Missing either LITTLE_ENDIAN or BIG_ENDIAN definition."
#endif
#define HASH_VALUE_SIZE 12
/*
* license_key_b definition
*/
typedef struct _license_key_b
{
u8_t digest[HASH_VALUE_SIZE];
/* KEY_VALID_PATTERN is used when no actual digest is needed */
#define KEY_VALID_PATTERN_BYTE 0x5a
#define KEY_VALID_PATTERN_DWORD 0x5a5a5a5a
u8_t key_type;
#define KEY_TYPE_ENUM_BCM5706 0x0
#define KEY_TYPE_ENUM_BCM5710 0x2 /* Special modification for Everest */
u8_t version;
#define VERSION_CURRENT 0x0
u8_t dword_length; /* Not including the digest */
u8_t oem_id;
#define OEM_ID_BRCM 0
#define OEM_ID_HPQ 0x3c
u16_t capability;
#define CAP_RESERVED 0x0001 /* Xinan/Teton Only */
#define CAP_USER_RDMA 0x0002 /* Xinan/Teton Only */
#define CAP_TOE 0x0004 /* Xinan/Teton Only */
#define CAP_ISCSI_INIT 0x0008 /* Xinan/Teton Only */
#define CAP_ISCSI_TRGT 0x0010 /* Xinan/Teton Only */
#define CAP_ISER_INIT 0x0020 /* Xinan/Teton Only */
#define CAP_ISER_TRGT 0x0040 /* Xinan/Teton Only */
#define CAP_ISCSI_BOOT 0x0080 /* Xinan/Teton Only */
#define CAP_ISCSI_FULL_ACCL 0x0100 /* Xinan/Teton Only */
#define CAP_ISCSI_HDR_DGST 0x0200 /* Xinan/Teton Only */
#define CAP_ISCSI_BODY_DGST 0x0400 /* Xinan/Teton Only */
#define CAP_SERDES_2_5G 0x0800 /* Xinan/Teton Only */
#define CAP_SPEED_12G 0x0800 /* Everest Only */
#define CAP_SPEED_12_5G 0x1000
#define CAP_SPEED_13G 0x2000
#define CAP_SPEED_15G 0x4000
#define CAP_SPEED_16G 0x8000
u16_t max_toe_conn;
#define CONN_UNLIMITED 0xffff
u16_t reserved;
u16_t max_um_rdma_conn;
u16_t max_iscsi_init_conn;
u16_t max_iscsi_trgt_conn;
u16_t max_iser_init_conn;
u16_t max_iser_trgt_conn;
u32_t reserved_a[3];
u32_t sn;
u16_t reserved_b;
u16_t expiration;
#define EXPIRATION_NEVER 0xffff
} license_key_b_t;
/*
* license_key_l definition
*/
#define KEY_VALID_PATTERN_BYTE 0x5a
#define KEY_VALID_PATTERN_DWORD 0x5a5a5a5a
typedef struct _license_key_l
{
u8_t digest[HASH_VALUE_SIZE];
/* KEY_VALID_PATTERN is used when no actual digest is needed */
u8_t oem_id;
#define OEM_ID_BRCM 0
#define OEM_ID_HPQ 0x3c
u8_t dword_length; /* Not including the digest */
u8_t version;
#define VERSION_CURRENT 0x0
u8_t key_type;
#define KEY_TYPE_ENUM_BCM5706 0x0
#define KEY_TYPE_ENUM_BCM5710 0x2 /* Special modification for Everest */
u16_t max_toe_conn;
#define CONN_UNLIMITED 0xffff
u16_t capability;
#define CAP_RESERVED 0x0001 /* Xinan/Teton Only */
#define CAP_USER_RDMA 0x0002 /* Xinan/Teton Only */
#define CAP_TOE 0x0004 /* Xinan/Teton Only */
#define CAP_ISCSI_INIT 0x0008 /* Xinan/Teton Only */
#define CAP_ISCSI_TRGT 0x0010 /* Xinan/Teton Only */
#define CAP_ISER_INIT 0x0020 /* Xinan/Teton Only */
#define CAP_ISER_TRGT 0x0040 /* Xinan/Teton Only */
#define CAP_ISCSI_BOOT 0x0080 /* Xinan/Teton Only */
#define CAP_ISCSI_FULL_ACCL 0x0100 /* Xinan/Teton Only */
#define CAP_ISCSI_HDR_DGST 0x0200 /* Xinan/Teton Only */
#define CAP_ISCSI_BODY_DGST 0x0400 /* Xinan/Teton Only */
#define CAP_SERDES_2_5G 0x0800 /* Xinan/Teton Only */
#define CAP_SPEED_12G 0x0800 /* Everest Only */
#define CAP_SPEED_12_5G 0x1000
#define CAP_SPEED_13G 0x2000
#define CAP_SPEED_15G 0x4000
#define CAP_SPEED_16G 0x8000
u16_t max_um_rdma_conn;
u16_t reserved;
u16_t max_iscsi_trgt_conn;
u16_t max_iscsi_init_conn;
u16_t max_iser_trgt_conn;
u16_t max_iser_init_conn;
u32_t reserved_a[3];
u32_t sn;
u16_t expiration;
#define EXPIRATION_NEVER 0xffff
u16_t reserved_b;
} license_key_l_t;
#define FW_ENCODE_32BIT_PATTERN 0x1e1e1e1e
#define FW_ENCODE_16BIT_PATTERN 0x1e1e
#define FW_ENCODE_8BIT_PATTERN 0x1e
#if defined(BIG_ENDIAN)
typedef license_key_b_t license_key_t;
#elif defined(LITTLE_ENDIAN)
typedef license_key_l_t license_key_t;
#endif
#endif /* _LICENSE_H */
|