bnxt_fw_hdr.h 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  1. /* Broadcom NetXtreme-C/E network driver.
  2. *
  3. * Copyright (c) 2014-2016 Broadcom Corporation
  4. *
  5. * This program is free software; you can redistribute it and/or modify
  6. * it under the terms of the GNU General Public License as published by
  7. * the Free Software Foundation.
  8. */
  9. #ifndef __BNXT_FW_HDR_H__
  10. #define __BNXT_FW_HDR_H__
  11. #define BNXT_FIRMWARE_BIN_SIGNATURE 0x1a4d4342 /* "BCM"+0x1a */
  12. #define BNXT_UCODE_TRAILER_SIGNATURE 0x726c7254 /* "Trlr" */
  13. enum SUPPORTED_FAMILY {
  14. DEVICE_5702_3_4_FAMILY, /* 0 - Denali, Vinson, K2 */
  15. DEVICE_5705_FAMILY, /* 1 - Bachelor */
  16. DEVICE_SHASTA_FAMILY, /* 2 - 5751 */
  17. DEVICE_5706_FAMILY, /* 3 - Teton */
  18. DEVICE_5714_FAMILY, /* 4 - Hamilton */
  19. DEVICE_STANFORD_FAMILY, /* 5 - 5755 */
  20. DEVICE_STANFORD_ME_FAMILY, /* 6 - 5756 */
  21. DEVICE_SOLEDAD_FAMILY, /* 7 - 5761[E] */
  22. DEVICE_CILAI_FAMILY, /* 8 - 57780/60/90/91 */
  23. DEVICE_ASPEN_FAMILY, /* 9 - 57781/85/61/65/91/95 */
  24. DEVICE_ASPEN_PLUS_FAMILY, /* 10 - 57786 */
  25. DEVICE_LOGAN_FAMILY, /* 11 - Any device in the Logan family
  26. */
  27. DEVICE_LOGAN_5762, /* 12 - Logan Enterprise (aka Columbia)
  28. */
  29. DEVICE_LOGAN_57767, /* 13 - Logan Client */
  30. DEVICE_LOGAN_57787, /* 14 - Logan Consumer */
  31. DEVICE_LOGAN_5725, /* 15 - Logan Server (TruManage-enabled)
  32. */
  33. DEVICE_SAWTOOTH_FAMILY, /* 16 - 5717/18 */
  34. DEVICE_COTOPAXI_FAMILY, /* 17 - 5719 */
  35. DEVICE_SNAGGLETOOTH_FAMILY, /* 18 - 5720 */
  36. DEVICE_CUMULUS_FAMILY, /* 19 - Cumulus/Whitney */
  37. MAX_DEVICE_FAMILY
  38. };
  39. enum SUPPORTED_CODE {
  40. CODE_ASF1, /* 0 - ASF VERSION 1.03 <deprecated> */
  41. CODE_ASF2, /* 1 - ASF VERSION 2.00 <deprecated> */
  42. CODE_PASSTHRU, /* 2 - PassThru <deprecated> */
  43. CODE_PT_SEC, /* 3 - PassThru with security <deprecated> */
  44. CODE_UMP, /* 4 - UMP <deprecated> */
  45. CODE_BOOT, /* 5 - Bootcode */
  46. CODE_DASH, /* 6 - TruManage (DASH + ASF + PMCI)
  47. * Management firmwares
  48. */
  49. CODE_MCTP_PASSTHRU, /* 7 - NCSI / MCTP Passt-hrough firmware */
  50. CODE_PM_OFFLOAD, /* 8 - Power-Management Proxy Offload firmwares
  51. */
  52. CODE_MDNS_SD_OFFLOAD, /* 9 - Multicast DNS Service Discovery Proxys
  53. * Offload firmware
  54. */
  55. CODE_DISC_OFFLOAD, /* 10 - Discovery Offload firmware */
  56. CODE_MUSTANG, /* 11 - I2C Error reporting APE firmwares
  57. * <deprecated>
  58. */
  59. CODE_ARP_BATCH, /* 12 - ARP Batch firmware */
  60. CODE_SMASH, /* 13 - TruManage (SMASH + DCMI/IPMI + PMCI)
  61. * Management firmware
  62. */
  63. CODE_APE_DIAG, /* 14 - APE Test Diag firmware */
  64. CODE_APE_PATCH, /* 15 - APE Patch firmware */
  65. CODE_TANG_PATCH, /* 16 - TANG Patch firmware */
  66. CODE_KONG_FW, /* 17 - KONG firmware */
  67. CODE_KONG_PATCH, /* 18 - KONG Patch firmware */
  68. CODE_BONO_FW, /* 19 - BONO firmware */
  69. CODE_BONO_PATCH, /* 20 - BONO Patch firmware */
  70. CODE_CHIMP_PATCH, /* 21 - ChiMP Patch firmware */
  71. MAX_CODE_TYPE,
  72. };
  73. enum SUPPORTED_MEDIA {
  74. MEDIA_COPPER, /* 0 */
  75. MEDIA_FIBER, /* 1 */
  76. MEDIA_NONE, /* 2 */
  77. MEDIA_COPPER_FIBER, /* 3 */
  78. MAX_MEDIA_TYPE,
  79. };
  80. struct bnxt_fw_header {
  81. __le32 signature; /* constains the constant value of
  82. * BNXT_FIRMWARE_BIN_SIGNATURE
  83. */
  84. u8 flags; /* reserved for ChiMP use */
  85. u8 code_type; /* enum SUPPORTED_CODE */
  86. u8 device; /* enum SUPPORTED_FAMILY */
  87. u8 media; /* enum SUPPORTED_MEDIA */
  88. u8 version[16]; /* the null terminated version string to
  89. * indicate the version of the
  90. * file, this will be copied from the binary
  91. * file version string
  92. */
  93. u8 build;
  94. u8 revision;
  95. u8 minor_ver;
  96. u8 major_ver;
  97. };
  98. /* Microcode and pre-boot software/firmware trailer: */
  99. struct bnxt_ucode_trailer {
  100. u8 rsa_sig[256];
  101. __le16 flags;
  102. u8 version_format;
  103. u8 version_length;
  104. u8 version[16];
  105. __le16 dir_type;
  106. __le16 trailer_length;
  107. __le32 sig; /* BNXT_UCODE_TRAILER_SIGNATURE */
  108. __le32 chksum; /* CRC-32 */
  109. };
  110. #endif