myri10ge_mcp_gen_header.h 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. #ifndef __MYRI10GE_MCP_GEN_HEADER_H__
  2. #define __MYRI10GE_MCP_GEN_HEADER_H__
  3. #define MCP_HEADER_PTR_OFFSET 0x3c
  4. #define MCP_TYPE_MX 0x4d582020 /* "MX " */
  5. #define MCP_TYPE_PCIE 0x70636965 /* "PCIE" pcie-only MCP */
  6. #define MCP_TYPE_ETH 0x45544820 /* "ETH " */
  7. #define MCP_TYPE_MCP0 0x4d435030 /* "MCP0" */
  8. #define MCP_TYPE_DFLT 0x20202020 /* " " */
  9. #define MCP_TYPE_ETHZ 0x4554485a /* "ETHZ" */
  10. struct mcp_gen_header {
  11. /* the first 4 fields are filled at compile time */
  12. unsigned header_length;
  13. __be32 mcp_type;
  14. char version[128];
  15. unsigned mcp_private; /* pointer to mcp-type specific structure */
  16. /* filled by the MCP at run-time */
  17. unsigned sram_size;
  18. unsigned string_specs; /* either the original STRING_SPECS or a superset */
  19. unsigned string_specs_len;
  20. /* Fields above this comment are guaranteed to be present.
  21. *
  22. * Fields below this comment are extensions added in later versions
  23. * of this struct, drivers should compare the header_length against
  24. * offsetof(field) to check wether a given MCP implements them.
  25. *
  26. * Never remove any field. Keep everything naturally align.
  27. */
  28. /* Specifies if the running mcp is mcp0, 1, or 2. */
  29. unsigned char mcp_index;
  30. unsigned char disable_rabbit;
  31. unsigned char unaligned_tlp;
  32. unsigned char pcie_link_algo;
  33. unsigned counters_addr;
  34. unsigned copy_block_info; /* for small mcps loaded with "lload -d" */
  35. unsigned short handoff_id_major; /* must be equal */
  36. unsigned short handoff_id_caps; /* bitfield: new mcp must have superset */
  37. unsigned msix_table_addr; /* start address of msix table in firmware */
  38. unsigned bss_addr; /* start of bss */
  39. unsigned features;
  40. unsigned ee_hdr_addr;
  41. /* 8 */
  42. };
  43. struct zmcp_info {
  44. unsigned info_len;
  45. unsigned zmcp_addr;
  46. unsigned zmcp_len;
  47. unsigned mcp_edata;
  48. };
  49. #endif /* __MYRI10GE_MCP_GEN_HEADER_H__ */