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