fs: use kmem_cache_zalloc instead
[pv_ops_mirror.git] / drivers / net / myri10ge / myri10ge_mcp_gen_header.h
blob16a810dd6d515d4ed7a6f61ceb7b443131c34b9e
1 #ifndef __MYRI10GE_MCP_GEN_HEADER_H__
2 #define __MYRI10GE_MCP_GEN_HEADER_H__
4 /* this file define a standard header used as a first entry point to
5 * exchange information between firmware/driver and driver. The
6 * header structure can be anywhere in the mcp. It will usually be in
7 * the .data section, because some fields needs to be initialized at
8 * compile time.
9 * The 32bit word at offset MX_HEADER_PTR_OFFSET in the mcp must
10 * contains the location of the header.
12 * Typically a MCP will start with the following:
13 * .text
14 * .space 52 ! to help catch MEMORY_INT errors
15 * bt start ! jump to real code
16 * nop
17 * .long _gen_mcp_header
19 * The source will have a definition like:
21 * mcp_gen_header_t gen_mcp_header = {
22 * .header_length = sizeof(mcp_gen_header_t),
23 * .mcp_type = MCP_TYPE_XXX,
24 * .version = "something $Id: mcp_gen_header.h,v 1.2 2006/05/13 10:04:35 bgoglin Exp $",
25 * .mcp_globals = (unsigned)&Globals
26 * };
29 #define MCP_HEADER_PTR_OFFSET 0x3c
31 #define MCP_TYPE_MX 0x4d582020 /* "MX " */
32 #define MCP_TYPE_PCIE 0x70636965 /* "PCIE" pcie-only MCP */
33 #define MCP_TYPE_ETH 0x45544820 /* "ETH " */
34 #define MCP_TYPE_MCP0 0x4d435030 /* "MCP0" */
36 struct mcp_gen_header {
37 /* the first 4 fields are filled at compile time */
38 unsigned header_length;
39 __be32 mcp_type;
40 char version[128];
41 unsigned mcp_globals; /* pointer to mcp-type specific structure */
43 /* filled by the MCP at run-time */
44 unsigned sram_size;
45 unsigned string_specs; /* either the original STRING_SPECS or a superset */
46 unsigned string_specs_len;
48 /* Fields above this comment are guaranteed to be present.
50 * Fields below this comment are extensions added in later versions
51 * of this struct, drivers should compare the header_length against
52 * offsetof(field) to check wether a given MCP implements them.
54 * Never remove any field. Keep everything naturally align.
58 #endif /* __MYRI10GE_MCP_GEN_HEADER_H__ */