162306a36Sopenharmony_ci/********************************************************************** 262306a36Sopenharmony_ci * Author: Cavium, Inc. 362306a36Sopenharmony_ci * 462306a36Sopenharmony_ci * Contact: support@cavium.com 562306a36Sopenharmony_ci * Please include "LiquidIO" in the subject. 662306a36Sopenharmony_ci * 762306a36Sopenharmony_ci * Copyright (c) 2003-2016 Cavium, Inc. 862306a36Sopenharmony_ci * 962306a36Sopenharmony_ci * This file is free software; you can redistribute it and/or modify 1062306a36Sopenharmony_ci * it under the terms of the GNU General Public License, Version 2, as 1162306a36Sopenharmony_ci * published by the Free Software Foundation. 1262306a36Sopenharmony_ci * 1362306a36Sopenharmony_ci * This file is distributed in the hope that it will be useful, but 1462306a36Sopenharmony_ci * AS-IS and WITHOUT ANY WARRANTY; without even the implied warranty 1562306a36Sopenharmony_ci * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE, TITLE, or 1662306a36Sopenharmony_ci * NONINFRINGEMENT. See the GNU General Public License for more details. 1762306a36Sopenharmony_ci ***********************************************************************/ 1862306a36Sopenharmony_ci#ifndef _LIQUIDIO_IMAGE_H_ 1962306a36Sopenharmony_ci#define _LIQUIDIO_IMAGE_H_ 2062306a36Sopenharmony_ci 2162306a36Sopenharmony_ci#define LIO_MAX_FW_TYPE_LEN (8) 2262306a36Sopenharmony_ci#define LIO_MAX_FW_FILENAME_LEN (256) 2362306a36Sopenharmony_ci#define LIO_FW_DIR "liquidio/" 2462306a36Sopenharmony_ci#define LIO_FW_BASE_NAME "lio_" 2562306a36Sopenharmony_ci#define LIO_FW_NAME_SUFFIX ".bin" 2662306a36Sopenharmony_ci#define LIO_FW_NAME_TYPE_NIC "nic" 2762306a36Sopenharmony_ci#define LIO_FW_NAME_TYPE_AUTO "auto" 2862306a36Sopenharmony_ci#define LIO_FW_NAME_TYPE_NONE "none" 2962306a36Sopenharmony_ci#define LIO_MAX_FIRMWARE_VERSION_LEN 16 3062306a36Sopenharmony_ci 3162306a36Sopenharmony_ci#define LIO_MAX_BOOTCMD_LEN 1024 3262306a36Sopenharmony_ci#define LIO_MAX_IMAGES 16 3362306a36Sopenharmony_ci#define LIO_NIC_MAGIC 0x434E4943 /* "CNIC" */ 3462306a36Sopenharmony_cistruct octeon_firmware_desc { 3562306a36Sopenharmony_ci __be64 addr; 3662306a36Sopenharmony_ci __be32 len; 3762306a36Sopenharmony_ci __be32 crc32; /* crc32 of image */ 3862306a36Sopenharmony_ci}; 3962306a36Sopenharmony_ci 4062306a36Sopenharmony_ci/* Following the header is a list of 64-bit aligned binary images, 4162306a36Sopenharmony_ci * as described by the desc field. 4262306a36Sopenharmony_ci * Numeric fields are in network byte order. 4362306a36Sopenharmony_ci */ 4462306a36Sopenharmony_cistruct octeon_firmware_file_header { 4562306a36Sopenharmony_ci __be32 magic; 4662306a36Sopenharmony_ci char version[LIO_MAX_FIRMWARE_VERSION_LEN]; 4762306a36Sopenharmony_ci char bootcmd[LIO_MAX_BOOTCMD_LEN]; 4862306a36Sopenharmony_ci __be32 num_images; 4962306a36Sopenharmony_ci struct octeon_firmware_desc desc[LIO_MAX_IMAGES]; 5062306a36Sopenharmony_ci __be32 pad; 5162306a36Sopenharmony_ci __be32 crc32; /* header checksum */ 5262306a36Sopenharmony_ci}; 5362306a36Sopenharmony_ci 5462306a36Sopenharmony_ci#endif /* _LIQUIDIO_IMAGE_H_ */ 55