blob: d6e7fda81192c13f8ef65655674cab1a7bfce384 (
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
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
|
/****************************************************************************
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolaris.org/os/licensing.
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*
* Copyright 2014 QLogic Corporation
* The contents of this file are subject to the terms of the
* QLogic End User License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the License at
* http://www.qlogic.com/Resources/Documents/DriverDownloadHelp/
* QLogic_End_User_Software_License.txt
* See the License for the specific language governing permissions
* and limitations under the License.
*
*
* Name: license.h
*
* Description: Definition of license key.
*
* Created: 07/21/2004 skeung
*
****************************************************************************/
#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, not used */
#define CAP_ISCSI_FULL_ACCL 0x0100 /* Xinan/Teton Only, not used */
#define CAP_ISCSI_HDR_DGST 0x0200 /* Xinan/Teton Only, not used */
#define CAP_ISCSI_BODY_DGST 0x0400 /* Xinan/Teton Only, not used */
#define CAP_SERDES_2_5G 0x0800 /* Xinan/Teton Only */
#define CAP_EVRST_RSVD 0x0800 /* Everest Only */
#define CAP_FCOE_INIT 0x1000 /* E2 and onward Only */
#define CAP_FCOE_TRGT 0x2000 /* E2 and onward Only */
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;
u16_t max_fcoe_init_conn;
u16_t max_fcoe_trgt_conn;
u32_t reserved_a[2];
u32_t sn;
u16_t reserved_b;
u16_t expiration;
#define EXPIRATION_NEVER 0xffff
} license_key_b_t;
/*
* license_key_l definition
*/
typedef struct _license_key_l
{
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 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, not used */
#define CAP_ISCSI_FULL_ACCL 0x0100 /* Xinan/Teton Only, not used */
#define CAP_ISCSI_HDR_DGST 0x0200 /* Xinan/Teton Only, not used */
#define CAP_ISCSI_BODY_DGST 0x0400 /* Xinan/Teton Only, not used */
#define CAP_SERDES_2_5G 0x0800 /* Xinan/Teton Only */
#define CAP_EVRST_RSVD 0x0800 /* Everest Only */
#define CAP_FCOE_INIT 0x1000 /* E2 and onward Only */
#define CAP_FCOE_TRGT 0x2000 /* E2 and onward Only */
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;
u16_t max_fcoe_trgt_conn;
u16_t max_fcoe_init_conn;
u32_t reserved_a[2];
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 */
|