Skip to contentSkip to conversation

isci: Add firmware blob and sources

RFC PATCH In review Ben Hutchings 3 participants 5 messages Dec 17, 2011 – Dec 29, 2011 SCSI

lore
Share & tools
lore
#0 lore raw

RFC PATCH 1/1 isci: Add firmware blob and sources

isci requires a parameter blob which is usually found in NVRAM, but it can fall back to loading with request_firmware(). These files are taken from the Linux source tree where they were wrongly added in Linux 3.0.
---
I'm a bit unclear on the purpose and use of isci_firmware.bin. Is it needed for production hardware? Does it need to be customised per-system, or are module parameters sufficient for that? (If not, why isn't it built into the driver?)

probe_roms.h is labelled with a dual BSD/GPLv2 licence but the other files had no licence header so I've treated them as GPLv2 by default.

Ben.

 WHENCE                 |   12 +++
 isci/Makefile          |   23 +++++
 isci/README            |   36 +++++++
 isci/create_fw.c       |   98 +++++++++++++++++++
 isci/create_fw.h       |   77 +++++++++++++++
 isci/isci_firmware.bin |  Bin 0 -> 232 bytes
 isci/probe_roms.h      |  249 ++++++++++++++++++++++++++++++++++++++++++++++++
 7 files changed, 495 insertions(+), 0 deletions(-)
 create mode 100644 isci/Makefile
 create mode 100644 isci/README
 create mode 100644 isci/create_fw.c
 create mode 100644 isci/create_fw.h
 create mode 100644 isci/isci_firmware.bin
 create mode 100644 isci/probe_roms.h
WHENCE +12 -0
index dfeac71..c40a3f2 100644
@@ -1844,3 +1844,15 @@ File: ene-ub6250/ms_rdwr.bin
 Licence: Redistributable. See LICENCE.ene_firmware for details.
 
 --------------------------------------------------------------------------
+
+Driver: isci -- Intel C600 SAS controller driver
+
+File: isci/isci_firmware.bin
+Source: isci/create_fw.c
+Source: isci/create_fw.h
+Source: isci/probe_roms.h
+Source: isci/Makefile
+
+Licence: GPLv2
+
+--------------------------------------------------------------------------
isci/Makefile new file +23 -0
new file mode 100644
index 0000000..3849373
@@ -0,0 +1,23 @@
+# Makefile for create_fw
+#
+CC=gcc
+CFLAGS=-c -Wall -O2 -g
+LDFLAGS=
+SOURCES=create_fw.c
+OBJECTS=$(SOURCES:.cpp=.o)
+EXECUTABLE=create_fw
+BLOB=isci_firmware.bin
+
+all: $(SOURCES) $(EXECUTABLE) $(BLOB)
+
+$(EXECUTABLE): $(OBJECTS)
+	$(CC) $(LDFLAGS) $(OBJECTS) -o $@
+
+.c.o:
+	$(CC) $(CFLAGS) $< -O $@
+
+$(BLOB): $(EXECUTABLE)
+	./$(EXECUTABLE) >$@
+
+clean:
+	rm -f *.o $(EXECUTABLE)
isci/README new file +36 -0
new file mode 100644
index 0000000..8056d2b
@@ -0,0 +1,36 @@
+This defines the temporary binary blow we are to pass to the SCU
+driver to emulate the binary firmware that we will eventually be
+able to access via NVRAM on the SCU controller.
+
+The current size of the binary blob is expected to be 149 bytes or larger
+
+Header Types:
+0x1: Phy Masks
+0x2: Phy Gens
+0x3: SAS Addrs
+0xff: End of Data
+
+ID string - u8[12]: "#SCU MAGIC#\0"
+Version - u8: 1
+SubVersion - u8: 0
+
+Header Type - u8: 0x1
+Size - u8: 8
+Phy Mask - u32[8]
+
+Header Type - u8: 0x2
+Size - u8: 8
+Phy Gen - u32[8]
+
+Header Type - u8: 0x3
+Size - u8: 8
+Sas Addr - u64[8]
+
+Header Type - u8: 0xf
+
+
+==============================================================================
+
+Place isci_firmware.bin in /lib/firmware
+Be sure to recreate the initramfs image to include the firmware.
+
isci/create_fw.c new file +98 -0

98 lines not on this page · raw message

isci/create_fw.h new file +77 -0

77 lines not on this page · raw message

isci/isci_firmware.bin new file binary +0 -0
new file mode 100644
index 0000000000000000000000000000000000000000..963b3793ebdfef3a311f4aaf1b275ac0e221874c
GIT binary patch
isci/probe_roms.h new file +249 -0

249 lines not on this page · raw message

Signature · 1 line
1.7.7.3
#1 lore raw
Quoted 4 lines · Ben Hutchings

isci requires a parameter blob which is usually found in NVRAM, but it can fall back to loading with request_firmware().  These files are taken from the Linux source tree where they were wrongly added in Linux 3.0.

Oh, I was of the impression that the external firmware tree was for license incompatible firmware images?

Quoted 3 lines

---
I'm a bit unclear on the purpose and use of isci_firmware.bin.  Is it needed for production hardware?

It's a stop gap for platforms with missing or broken oem parameters. It is meant to become vestigial once the platform revisions quiet down.

Quoted 3 lines

Does it need to be customised
per-system, or are module parameters sufficient for that?  (If not, why isn't it built into the driver?)

It is customized per system to meet EMI and signal integrity targets of a given platform.

Quoted 2 lines

probe_roms.h is labelled with a dual BSD/GPLv2 licence but the other files had no licence header so I've treated them as GPLv2 by default.

The latest version of probe_roms.h [1] supports the v1.3 oem parameter format, this patch appears to be v1.0 based.

Regards,
Dan

[1]: http://git.kernel.org/?p=linux/kernel/git/djbw/isci.git;a=blob;f=drivers/scsi/isci/probe_roms.h;hb=refs/heads/fixes
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#2 lore raw
Quoted 8 lines · Dan Williams
Quoted 4 lines · Ben Hutchings

isci requires a parameter blob which is usually found in NVRAM, but it can fall back to loading with request_firmware(). These files are taken from the Linux source tree where they were wrongly added in Linux 3.0.

Oh, I was of the impression that the external firmware tree was for license incompatible firmware images?

firmware/README.AddingFirmware doesn't say that the licence makes a difference.

Quoted 8 lines
Quoted 3 lines

---
I'm a bit unclear on the purpose and use of isci_firmware.bin. Is it needed for production hardware?

It's a stop gap for platforms with missing or broken oem parameters. It is meant to become vestigial once the platform revisions quiet down.

Quoted 6 lines
Quoted 3 lines

Does it need to be customised
per-system, or are module parameters sufficient for that? (If not, why isn't it built into the driver?)

It is customized per system to meet EMI and signal integrity targets of a given platform.

Given this, does it make sense to distribute a binary at all?

Ben.

Quoted 10 lines
Quoted 2 lines

probe_roms.h is labelled with a dual BSD/GPLv2 licence but the other files had no licence header so I've treated them as GPLv2 by default.

The latest version of probe_roms.h [1] supports the v1.3 oem parameter format, this patch appears to be v1.0 based.

Regards,
Dan

[1]: http://git.kernel.org/?p=linux/kernel/git/djbw/isci.git;a=blob;f=drivers/scsi/isci/probe_roms.h;hb=refs/heads/fixes

Signature · 2 lines
Ben Hutchings
Teamwork is essential - it allows you to blame someone else.
#3 lore raw
Quoted 7 lines · Ben Hutchings
Quoted 6 lines · Dan Williams
Quoted 4 lines · Ben Hutchings

isci requires a parameter blob which is usually found in NVRAM, but it can fall back to loading with request_firmware().  These files are taken from the Linux source tree where they were wrongly added in Linux 3.0.

Quoted 5 lines
Quoted 2 lines

Oh, I was of the impression that the external firmware tree was for license incompatible firmware images?

firmware/README.AddingFirmware doesn't say that the licence makes a difference.

Sorry, missed that readme. Yes, should have been added to firmware.git directly.

Quoted 8 lines
Quoted 8 lines
Quoted 3 lines

---
I'm a bit unclear on the purpose and use of isci_firmware.bin.  Is it needed for production hardware?

It's a stop gap for platforms with missing or broken oem parameters. It is meant to become vestigial once the platform revisions quiet down.

Quoted 9 lines
Quoted 6 lines
Quoted 3 lines

Does it need to be customised
per-system, or are module parameters sufficient for that?  (If not, why isn't it built into the driver?)

It is customized per system to meet EMI and signal integrity targets of a given platform.

Given this, does it make sense to distribute a binary at all?

It defaults to something that is reasonable for a reference platform and if you end up needing to customize it is easier to distribute a new binary then move all these settings to module parameters. That said, the intent was to start using WARN_TAINT_ONCE() if it ever got used and phase it out once the platform support stabilized. It was certainly convenient to have it in the same tree in the early days of the driver. Its use should be waning now.

--
Dan

#4 lore raw
Quoted 3 lines · Dan Williams
Quoted 2 lines · Ben Hutchings
Quoted 1 line · Dan Williams

On Sat, Dec 17, 2011 at 9:14 AM, Ben Hutchings <[email protected]> wrote:

[...]

Quoted 18 lines
Quoted 8 lines
Quoted 8 lines
Quoted 3 lines

---
I'm a bit unclear on the purpose and use of isci_firmware.bin. Is it needed for production hardware?

It's a stop gap for platforms with missing or broken oem parameters. It is meant to become vestigial once the platform revisions quiet down.

Quoted 9 lines
Quoted 6 lines
Quoted 3 lines

Does it need to be customised
per-system, or are module parameters sufficient for that? (If not, why isn't it built into the driver?)

It is customized per system to meet EMI and signal integrity targets of a given platform.

Given this, does it make sense to distribute a binary at all?

Quoted 7 lines

It defaults to something that is reasonable for a reference platform and if you end up needing to customize it is easier to distribute a new binary then move all these settings to module parameters. That said, the intent was to start using WARN_TAINT_ONCE() if it ever got used and phase it out once the platform support stabilized. It was certainly convenient to have it in the same tree in the early days of the driver. Its use should be waning now.

I have now applied and pushed this addition to linux-firmware.git.

Ben.

Signature · 2 lines
Ben Hutchings
Design a system any fool can use, and only a fool will want to use it.