]> spindle.queued.net Git - linux-firmware/commitdiff
bnx2x: Separated FW from the source.
authorVladislav Zolotarov <vladz@broadcom.com>
Mon, 27 Apr 2009 10:27:43 +0000 (03:27 -0700)
committerDavid S. Miller <davem@davemloft.net>
Mon, 27 Apr 2009 10:27:43 +0000 (03:27 -0700)
>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>
WHENCE
bnx2x-e1-4.8.53.0.fw [new file with mode: 0644]
bnx2x-e1h-4.8.53.0.fw [new file with mode: 0644]

diff --git a/WHENCE b/WHENCE
index 4c52984a8319608aada4666325e3d3497f92643b..c1e9c5ab694c3e060fb7a394a932e4088af79f68 100644 (file)
--- a/WHENCE
+++ b/WHENCE
@@ -614,6 +614,26 @@ File: myricom/lanai.bin
 
 Licence: Unknown
 
+Found in hex form in kernel source.
+
+--------------------------------------------------------------------------
+
+Driver: bnx2x: Broadcom Everest
+
+File: bnx2x-e1-4.8.53.0.fw.ihex
+File: bnx2x-e1h-4.8.53.0.fw.ihex
+
+License:
+  Copyright (c) 2007-2009 Broadcom Corporation
+
+  This file contains firmware data derived from proprietary unpublished
+  source code, Copyright (c) 2007-2009 Broadcom Corporation.
+
+  Permission is hereby granted for the distribution of this firmware data
+  in hexadecimal or equivalent format, provided this copyright notice is
+  accompanying it.
+
+
 Found in hex form in kernel source.
 
 --------------------------------------------------------------------------
diff --git a/bnx2x-e1-4.8.53.0.fw b/bnx2x-e1-4.8.53.0.fw
new file mode 100644 (file)
index 0000000..37c0f38
Binary files /dev/null and b/bnx2x-e1-4.8.53.0.fw differ
diff --git a/bnx2x-e1h-4.8.53.0.fw b/bnx2x-e1h-4.8.53.0.fw
new file mode 100644 (file)
index 0000000..6fcd9f9
Binary files /dev/null and b/bnx2x-e1h-4.8.53.0.fw differ