1
linux/firmware
Vladislav Zolotarov 94a78b79cb bnx2x: Separated FW from the source.
>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: Vladislav Zolotarov <vladz@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-04-27 03:27:43 -07:00
..
3com 3C359: use request_firmware 2009-03-30 20:02:50 +05:30
acenic firmware: convert acenic driver to request_firmware() 2009-01-04 16:10:02 -08:00
adaptec starfire: use request_firmware() 2009-01-04 16:12:11 -08:00
advansys [SCSI] advansys: use request_firmware 2009-04-03 09:25:23 -05:00
av7110 firmware: convert av7110 driver to request_firmware() 2009-04-06 14:34:12 -07:00
bnx2 bnx2: Use request_firmware() 2009-04-04 16:51:14 -07:00
cis pcnet_cs: add cis(firmware) of the Allied Telesis LA-PCM 2009-04-21 02:06:14 -07:00
cpia2 cpia2: use request_firmware() 2008-07-14 14:43:28 -07:00
cxgb3 cxgb3: update FW 2009-03-13 11:30:48 -07:00
dabusb dabusb: use request_firmware() 2008-07-14 14:44:21 -07:00
dsp56k make firmware/dsp56k/bootstrap.asm buildable on a56 2009-01-06 15:59:29 -08:00
e100 firmware: convert e100 driver to request_firmware() 2009-01-07 12:59:17 -08:00
edgeport edgeport-ti: use request_firmware() 2008-07-14 14:44:39 -07:00
emi26 emi26: use request_firmware() 2008-07-10 14:49:12 +01:00
emi62 emi62: use request_firmware() 2008-07-10 14:49:14 +01:00
ess firmware: convert maestro3 driver to use firmware loader exclusively 2008-07-10 14:47:46 +01:00
kaweth kaweth: use request_firmware() 2008-07-10 14:47:51 +01:00
keyspan keyspan: use request_firmware() 2008-07-10 14:48:49 +01:00
keyspan_pda keyspan_pda: use request_firmware() 2008-07-10 14:49:09 +01:00
korg firmware: convert korg1212 driver to use firmware loader exclusively 2008-07-10 14:47:44 +01:00
myricom myri_sbus: use request_firmware 2009-04-04 16:38:42 -07:00
ositech smc91c92_cs: use request_firmware 2009-03-30 20:25:13 +05:30
qlogic [SCSI] qlogicpti: use request_firmware 2009-04-03 09:25:23 -05:00
sb16 firmware: convert sb16_csp driver to use firmware loader exclusively 2008-07-14 14:45:46 -07:00
sun cassini: use request_firmware 2008-09-22 19:27:10 -07:00
tehuti tehuti: Use request_firmware() 2009-02-26 23:20:56 -08:00
tigon firmware: convert tg3 driver to request_firmware() 2009-01-04 16:11:25 -08:00
ttusb-budget ttusb-budget: use request_firmware() 2008-07-10 14:47:53 +01:00
vicam vicam: use request_firmware() 2008-07-14 14:44:32 -07:00
yam yam: use request_firmware 2009-03-30 19:27:07 +05:30
yamaha ALSA: wavefront - Always use request_firmware() 2009-04-06 14:38:43 -07:00
.gitignore Revert "fix modules_install via NFS" 2009-04-06 14:27:17 -07:00
atmsar11.HEX firmware: convert Ambassador ATM driver to request_firmware() 2008-07-10 14:49:39 +01:00
bnx2x-e1-4.8.53.0.fw.ihex bnx2x: FW 4.8.53.0 2009-04-27 03:26:13 -07:00
bnx2x-e1h-4.8.53.0.fw.ihex bnx2x: FW 4.8.53.0 2009-04-27 03:26:13 -07:00
ihex2fw.c Revert "fix modules_install via NFS" 2009-04-06 14:27:17 -07:00
intelliport2.bin.ihex ip2: use request_firmware() 2008-07-10 14:49:41 +01:00
Makefile bnx2x: Separated FW from the source. 2009-04-27 03:27:43 -07:00
mts_cdma.fw.ihex ti_usb_3410_5052: add Multi-Tech firmware 2009-01-12 16:37:01 -08:00
mts_edge.fw.ihex ti_usb_3410_5052: add Multi-Tech firmware 2009-01-12 16:37:01 -08:00
mts_gsm.fw.ihex ti_usb_3410_5052: add Multi-Tech firmware 2009-01-12 16:37:01 -08:00
README.AddingFirmware Add README.AddingFirmware file. Basically telling people not to. 2009-04-06 21:04:17 -07:00
ti_3410.fw.ihex ti_usb_3410_5052: use request_firmware() 2008-07-10 14:49:34 +01:00
ti_5052.fw.ihex ti_usb_3410_5052: use request_firmware() 2008-07-10 14:49:34 +01:00
tr_smctr.bin.ihex smctr: use request_firmware() 2008-07-10 14:47:50 +01:00
WHENCE bnx2x: Separated FW from the source. 2009-04-27 03:27:43 -07:00
whiteheat_loader_debug.HEX whiteheat: use request_firmware() 2008-07-10 14:49:38 +01:00
whiteheat_loader.HEX whiteheat: use request_firmware() 2008-07-10 14:49:38 +01:00
whiteheat.HEX whiteheat: use request_firmware() 2008-07-10 14:49:38 +01:00

	DO NOT ADD FIRMWARE TO THIS DIRECTORY.
	======================================

This directory is only here to contain firmware images extracted from old
device drivers which predate the common use of request_firmware().

As we update those drivers to use request_firmware() and keep a clean
separation between code and firmware, we put the extracted firmware
here.

This directory is _NOT_ for adding arbitrary new firmware images. The
place to add those is the separate linux-firmware repository:

    git://git.kernel.org/pub/scm/linux/kernel/git/dwmw2/linux-firmware.git

That repository contains all these firmware images which have been
extracted from older drivers, as well various new firmware images which
we were never permitted to include in a GPL'd work, but which we _have_
been permitted to redistribute under separate cover.

To submit firmware to that repository, please send either a git binary
diff or preferably a git pull request to:
      David Woodhouse <dwmw2@infradead.org>

Your commit should include an update to the WHENCE file clearly
identifying the licence under which the firmware is available, and
that it is redistributable. If the licence is long and involved, it's
permitted to include it in a separate file and refer to it from the
WHENCE file.

Ideally, your commit should contain a Signed-Off-By: from someone
authoritative on the licensing of the firmware in question (i.e. from
within the company that owns the code).