• Vladislav Zolotarov's avatar
    bnx2x: Separated FW from the source. · 94a78b79
    Vladislav Zolotarov authored
    >From now on FW will be downloaded from the binary file using request_firmware.
    
    There will be different files for every supported chip. Currently 57710 (e1) and
    57711 (e1h).
    
    File names have the following format: bnx2x-<chip version>-<FW version>.fw.
    ihex versions of current FW files are submitted in the next patch.
    
    Each binary file has a header in the following format:
    
    
    struct bnx2x_fw_file_section {
    	__be32 len;
    	__be32 offset;
    }
    
    struct bnx2x_fw_file_hdr {
    	struct bnx2x_fw_file_section init_ops;
    	struct bnx2x_fw_file_section init_ops_offsets;
    	struct bnx2x_fw_file_section init_data;
    	struct bnx2x_fw_file_section tsem_int_table_data;
    	struct bnx2x_fw_file_section tsem_pram_data;
    	struct bnx2x_fw_file_section usem_int_table_data;
    	struct bnx2x_fw_file_section usem_pram_data;
    	struct bnx2x_fw_file_section csem_int_table_data;
    	struct bnx2x_fw_file_section csem_pram_data;
    	struct bnx2x_fw_file_section xsem_int_table_data;
    	struct bnx2x_fw_file_section xsem_pram_data;
    	struct bnx2x_fw_file_section fw_version;
    }
    
    Each bnx2x_fw_file_section contains the length and the offset of the appropriate
    section in the binary file. Values are stored in the big endian format.
    
    Data types of arrays:
    
    init_data            __be32
    init_ops_offsets     __be16
    XXsem_pram_data         u8
    XXsem_int_table_data    u8
    init_ops             struct raw_op {
                              u8   op;
    			__be24 offset;
                            __be32 data;
    		     }
    fw_version              u8
    
    >From now boundaries of a specific initialization stage are stored in
    init_ops_offsets array instead of being defined by separate macroes. The index 
    in init_ops_offsets is calculated by BLOCK_OPS_IDX macro:
    
    #define BLOCK_OPS_IDX(block, stage, end) \
           (2*(((block)*STAGE_IDX_MAX) + (stage)) + (end))
    
    Security:
    
    In addition to sanity check of array boundaries bnx2x will check a FW version.
    Additional checks might be added in the future.
    Signed-off-by: 's avatarVladislav Zolotarov <vladz@broadcom.com>
    Signed-off-by: 's avatarEilon Greenstein <eilong@broadcom.com>
    Signed-off-by: 's avatarDavid S. Miller <davem@davemloft.net>
    94a78b79
Name
Last commit
Last update
..
3com Loading commit data...
acenic Loading commit data...
adaptec Loading commit data...
advansys Loading commit data...
av7110 Loading commit data...
bnx2 Loading commit data...
cis Loading commit data...
cpia2 Loading commit data...
cxgb3 Loading commit data...
dabusb Loading commit data...
dsp56k Loading commit data...
e100 Loading commit data...
edgeport Loading commit data...
emi26 Loading commit data...
emi62 Loading commit data...
ess Loading commit data...
kaweth Loading commit data...
keyspan Loading commit data...
keyspan_pda Loading commit data...
korg Loading commit data...
myricom Loading commit data...
ositech Loading commit data...
qlogic Loading commit data...
sb16 Loading commit data...
sun Loading commit data...
tehuti Loading commit data...
tigon Loading commit data...
ttusb-budget Loading commit data...
vicam Loading commit data...
yam Loading commit data...
yamaha Loading commit data...
.gitignore Loading commit data...
Makefile Loading commit data...
README.AddingFirmware Loading commit data...
WHENCE Loading commit data...
atmsar11.HEX Loading commit data...
bnx2x-e1-4.8.53.0.fw.ihex Loading commit data...
bnx2x-e1h-4.8.53.0.fw.ihex Loading commit data...
ihex2fw.c Loading commit data...
intelliport2.bin.ihex Loading commit data...
mts_cdma.fw.ihex Loading commit data...
mts_edge.fw.ihex Loading commit data...
mts_gsm.fw.ihex Loading commit data...
ti_3410.fw.ihex Loading commit data...
ti_5052.fw.ihex Loading commit data...
tr_smctr.bin.ihex Loading commit data...
whiteheat.HEX Loading commit data...
whiteheat_loader.HEX Loading commit data...
whiteheat_loader_debug.HEX Loading commit data...