18c2ecf20Sopenharmony_ci/********************************************************************** 28c2ecf20Sopenharmony_ci * Author: Cavium, Inc. 38c2ecf20Sopenharmony_ci * 48c2ecf20Sopenharmony_ci * Contact: support@cavium.com 58c2ecf20Sopenharmony_ci * Please include "LiquidIO" in the subject. 68c2ecf20Sopenharmony_ci * 78c2ecf20Sopenharmony_ci * Copyright (c) 2003-2016 Cavium, Inc. 88c2ecf20Sopenharmony_ci * 98c2ecf20Sopenharmony_ci * This file is free software; you can redistribute it and/or modify 108c2ecf20Sopenharmony_ci * it under the terms of the GNU General Public License, Version 2, as 118c2ecf20Sopenharmony_ci * published by the Free Software Foundation. 128c2ecf20Sopenharmony_ci * 138c2ecf20Sopenharmony_ci * This file is distributed in the hope that it will be useful, but 148c2ecf20Sopenharmony_ci * AS-IS and WITHOUT ANY WARRANTY; without even the implied warranty 158c2ecf20Sopenharmony_ci * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE, TITLE, or 168c2ecf20Sopenharmony_ci * NONINFRINGEMENT. See the GNU General Public License for more details. 178c2ecf20Sopenharmony_ci ***********************************************************************/ 188c2ecf20Sopenharmony_ci#ifndef _LIQUIDIO_IMAGE_H_ 198c2ecf20Sopenharmony_ci#define _LIQUIDIO_IMAGE_H_ 208c2ecf20Sopenharmony_ci 218c2ecf20Sopenharmony_ci#define LIO_MAX_FW_TYPE_LEN (8) 228c2ecf20Sopenharmony_ci#define LIO_MAX_FW_FILENAME_LEN (256) 238c2ecf20Sopenharmony_ci#define LIO_FW_DIR "liquidio/" 248c2ecf20Sopenharmony_ci#define LIO_FW_BASE_NAME "lio_" 258c2ecf20Sopenharmony_ci#define LIO_FW_NAME_SUFFIX ".bin" 268c2ecf20Sopenharmony_ci#define LIO_FW_NAME_TYPE_NIC "nic" 278c2ecf20Sopenharmony_ci#define LIO_FW_NAME_TYPE_AUTO "auto" 288c2ecf20Sopenharmony_ci#define LIO_FW_NAME_TYPE_NONE "none" 298c2ecf20Sopenharmony_ci#define LIO_MAX_FIRMWARE_VERSION_LEN 16 308c2ecf20Sopenharmony_ci 318c2ecf20Sopenharmony_ci#define LIO_MAX_BOOTCMD_LEN 1024 328c2ecf20Sopenharmony_ci#define LIO_MAX_IMAGES 16 338c2ecf20Sopenharmony_ci#define LIO_NIC_MAGIC 0x434E4943 /* "CNIC" */ 348c2ecf20Sopenharmony_cistruct octeon_firmware_desc { 358c2ecf20Sopenharmony_ci __be64 addr; 368c2ecf20Sopenharmony_ci __be32 len; 378c2ecf20Sopenharmony_ci __be32 crc32; /* crc32 of image */ 388c2ecf20Sopenharmony_ci}; 398c2ecf20Sopenharmony_ci 408c2ecf20Sopenharmony_ci/* Following the header is a list of 64-bit aligned binary images, 418c2ecf20Sopenharmony_ci * as described by the desc field. 428c2ecf20Sopenharmony_ci * Numeric fields are in network byte order. 438c2ecf20Sopenharmony_ci */ 448c2ecf20Sopenharmony_cistruct octeon_firmware_file_header { 458c2ecf20Sopenharmony_ci __be32 magic; 468c2ecf20Sopenharmony_ci char version[LIO_MAX_FIRMWARE_VERSION_LEN]; 478c2ecf20Sopenharmony_ci char bootcmd[LIO_MAX_BOOTCMD_LEN]; 488c2ecf20Sopenharmony_ci __be32 num_images; 498c2ecf20Sopenharmony_ci struct octeon_firmware_desc desc[LIO_MAX_IMAGES]; 508c2ecf20Sopenharmony_ci __be32 pad; 518c2ecf20Sopenharmony_ci __be32 crc32; /* header checksum */ 528c2ecf20Sopenharmony_ci}; 538c2ecf20Sopenharmony_ci 548c2ecf20Sopenharmony_ci#endif /* _LIQUIDIO_IMAGE_H_ */ 55