blob: 69bdfe8d400fc146cd0bdf2bb71097fdeb976efb (
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
|
/****************************************************************************
* 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: append.h
*
* Description:
* This is a utility to append firmware and other images into a
* single file. The primary use of this is to combine two phases
* of the bootcode into a single file. It appends some header
* information (used for parsing the file) and the input image to
* the output file. (If the output file does not yet exist, it'll
* create one.)
* This header file defines the image header information.
*
* $Date: 2014/01/02 $ $Revision: #44 $
*
****************************************************************************/
#ifndef APPEND_H
#define APPEND_H
#include "bcmtype.h"
#pragma pack(push, 1)
typedef struct _image_header_t
{
u32_t magic;
#define FILE_MAGIC 0x669955aa
u32_t version;
#define FORMAT_VERSION_1 0x1
#define FORMAT_VERSION_2 0x2
#define LATEST_FORMAT_VERSION FORMAT_VERSION_2
u32_t type;
#define IMAGE_HDR_TYPE_BC1 0x31636200 /* -bc1 */
#define IMAGE_HDR_TYPE_BC2 0x32636200 /* -bc2 */
#define IMAGE_HDR_TYPE_NCSI_CMN 0x6d63636e /* -nccm */
#define IMAGE_HDR_TYPE_NCSI_LIB_XI 0x786c636e /* -nclx */
#define IMAGE_HDR_TYPE_NCSI_LIB_EV 0x656c636e /* -ncle */
#define IMAGE_HDR_TYPE_MODULES_PN 0x706d7500 /* -m_pn */
#define IMAGE_HDR_TYPE_IPMI 0x696d7069 /* -ipmi */
#define IMAGE_HDR_TYPE_MBA 0x61626d00 /* -mba */
#define IMAGE_HDR_TYPE_L2T 0x74326c00 /* -l2t */
#define IMAGE_HDR_TYPE_L2C 0x63326c00 /* -l2c */
#define IMAGE_HDR_TYPE_L2X 0x78326c00 /* -l2x */
#define IMAGE_HDR_TYPE_L2U 0x75326c00 /* -l2u */
#define IMAGE_HDR_TYPE_ISCSI_BOOT 0x62690000 /* -ib */
#define IMAGE_HDR_TYPE_ISCSI_BOOT_CFG 0x63626900 /* -ibc */
#define IMAGE_HDR_TYPE_ISCSI_BOOT_CPRG 0x65706269 /* -ibpe */
#define IMAGE_HDR_TYPE_ISCSI_BOOT_IPV6 0x36626900 /* -ib6 */
#define IMAGE_HDR_TYPE_ISCSI_BOOT_CFG_V2 0x36636269 /* -ibcv2 */
#define IMAGE_HDR_TYPE_ISCSI_BOOT_IPV4N6 0x6e346269 /* -ib4n6 */
#define IMAGE_HDR_TYPE_FCOE_BOOT 0x62656600 /* -feb */
#define IMAGE_HDR_TYPE_FCOE_BOOT_CFG 0x63626566 /* -febc */
#define IMAGE_HDR_TYPE_FCOE_BOOT_CPRG 0x70626566 /* -febp */
#define IMAGE_HDR_TYPE_FCOE_BOOT_CPRG_LGCY 0x6c706266 /* -febpl */
#define IMAGE_HDR_TYPE_FCOE_BOOT_CPRG_EVRST 0x65706266 /* -febpe */
#define IMAGE_HDR_TYPE_BOOT_CFG_SHADOW 0x6363caca /* -bootsh */
#define IMAGE_HDR_TYPE_NIC_PARTITION_CFG 0x7063696e /* -nicp */
#define IMAGE_HDR_TYPE_VPD_TABLE 0x44505600 /* -vpd */
#define IMAGE_HDR_TYPE_E3_WC 0x63773365 /* -e3wc */
#define IMAGE_HDR_TYPE_E3_PCIE 0x65703365 /* -e3pe */
#define IMAGE_HDR_TYPE_NIV_CFG 0x6e69760a /* -niv */
#define IMAGE_HDR_TYPE_NIV_PROFILES_CFG 0x6e6976bb /* -nivprofiles */
#define IMAGE_HDR_TYPE_CFG_EXTENDED_SHARED 0x73686172 /* -cfg_extended_shared */
#define IMAGE_HDR_TYPE_SWIM1 0x73776949 /* -swi1 */
#define IMAGE_HDR_TYPE_SWIM2 0x73776950 /* -swi2 */
#define IMAGE_HDR_TYPE_SWIM3 0x73776951 /* -swi3 */
#define IMAGE_HDR_TYPE_SWIM4 0x73776952 /* -swi4 */
#define IMAGE_HDR_TYPE_SWIM5 0x73776953 /* -swi5 */
#define IMAGE_HDR_TYPE_SWIM6 0x73776954 /* -swi6 */
#define IMAGE_HDR_TYPE_SWIM7 0x73776955 /* -swi7 */
#define IMAGE_HDR_TYPE_SWIM8 0x73776956 /* -swi8 */
#define IMAGE_HDR_TYPE_SWIM1_B 0x73776957 /* -swi1b */
#define IMAGE_HDR_TYPE_SWIM2_B 0x73776958 /* -swi2b */
#define IMAGE_HDR_TYPE_SWIM3_B 0x73776959 /* -swi3b */
#define IMAGE_HDR_TYPE_SWIM4_B 0x73776960 /* -swi4b */
#define IMAGE_HDR_TYPE_SWIM5_B 0x73776961 /* -swi5b */
#define IMAGE_HDR_TYPE_SWIM6_B 0x73776962 /* -swi6b */
#define IMAGE_HDR_TYPE_SWIM7_B 0x73776963 /* -swi7b */
#define IMAGE_HDR_TYPE_SWIM8_B 0x73776964 /* -swi8b */
#define IMAGE_HDR_TYPE_MFW1 0x3177666d /* -mfw1 */
#define IMAGE_HDR_TYPE_MFW2 0x3277666d /* -mfw2 */
#define IMAGE_HDR_TYPE_MFW2_A 0x3377666d /* -mfw2_a */
#define IMAGE_HDR_TYPE_OCNVM 0x766e636f /* -ocnv */
#define IMAGE_HDR_TYPE_E3_WCV2 0x32766377 /* -wcv2 */
#define IMAGE_HDR_TYPE_E3_PCIEV2 0x32766570 /* -pev2 */
#define IMAGE_HDR_TYPE_CCM 0x6d636300 /* -ccm */
#define IMAGE_HDR_TYPE_HW_SET 0x706d7501 /* -hw_set */
#define IMAGE_HDR_TYPE_USR_BLK 0x60627275 /* -usrblk */
#define IMAGE_HDR_TYPE_ISCSI_PERS 0x70657273 /* -ipers */
#define IMAGE_HDR_TYPE_BDN 0x6e646200 /* -bdn */
u32_t image_info;
/* not defined bits */
#define IMAGE_INFO_REVERSED_MASK 0xff00ffff
/* bit 23:16 define which devices it can support
* These are bit fields */
#define IMAGE_INFO_CHIP_MASK 0x00ff0000
#define IMAGE_INFO_CHIP_5706 0x00010000
#define IMAGE_INFO_CHIP_5708 0x00020000
#define IMAGE_INFO_CHIP_5709 0x00040000
#define IMAGE_INFO_CHIP_57710 0x00080000
#define IMAGE_INFO_CHIP_57711 0x00100000
#define IMAGE_INFO_CHIP_57712 0x00200000
#define IMAGE_INFO_CHIP_57840 0x00400000
u32_t byte_cnt;
} image_header_t;
#pragma pack(pop)
#endif /*APPEND_H*/
|