1 /**********************************************************************
4 * Contact: support@cavium.com
5 * Please include "LiquidIO" in the subject.
7 * Copyright (c) 2003-2015 Cavium, Inc.
9 * This file is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License, Version 2, as
11 * published by the Free Software Foundation.
13 * This file is distributed in the hope that it will be useful, but
14 * AS-IS and WITHOUT ANY WARRANTY; without even the implied warranty
15 * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE, TITLE, or
16 * NONINFRINGEMENT. See the GNU General Public License for more
19 * This file may also be available under a different license from Cavium.
20 * Contact Cavium, Inc. for more information
21 **********************************************************************/
22 #ifndef _LIQUIDIO_IMAGE_H_
23 #define _LIQUIDIO_IMAGE_H_
25 #define LIO_MAX_FW_TYPE_LEN (8)
26 #define LIO_MAX_FW_FILENAME_LEN (256)
27 #define LIO_FW_DIR "liquidio/"
28 #define LIO_FW_BASE_NAME "lio_"
29 #define LIO_FW_NAME_SUFFIX ".bin"
30 #define LIO_FW_NAME_TYPE_NIC "nic"
31 #define LIO_FW_NAME_TYPE_NONE "none"
32 #define LIO_MAX_FIRMWARE_VERSION_LEN 16
34 #define LIO_MAX_BOOTCMD_LEN 1024
35 #define LIO_MAX_IMAGES 16
36 #define LIO_NIC_MAGIC 0x434E4943 /* "CNIC" */
37 struct octeon_firmware_desc {
40 __be32 crc32; /* crc32 of image */
43 /* Following the header is a list of 64-bit aligned binary images,
44 * as described by the desc field.
45 * Numeric fields are in network byte order.
47 struct octeon_firmware_file_header {
49 char version[LIO_MAX_FIRMWARE_VERSION_LEN];
50 char bootcmd[LIO_MAX_BOOTCMD_LEN];
52 struct octeon_firmware_desc desc[LIO_MAX_IMAGES];
54 __be32 crc32; /* header checksum */
57 #endif /* _LIQUIDIO_IMAGE_H_ */