10 char blob_name[] = "isci_firmware.bin";
11 char id[] = "#SCU MAGIC#";
12 unsigned char version = 1;
13 unsigned char sub_version = 0;
17 * For all defined arrays:
18 * elements 0-3 are for SCU0, ports 0-3
19 * elements 4-7 are for SCU1, ports 0-3
21 * valid configurations for one SCU are:
24 * 0xF,0x0,0x0,0x0 # 1 x4 port
25 * 0x3,0x0,0x4,0x8 # Phys 0 and 1 are a x2 port, phy 2 and phy 3 are each x1
27 * 0x1,0x2,0xC,0x0 # Phys 0 and 1 are each x1 ports, phy 2 and phy 3 are a x2
29 * 0x3,0x0,0xC,0x0 # Phys 0 and 1 are a x2 port, phy 2 and phy 3 are a x2 port
30 * 0x1,0x2,0x4,0x8 # Each phy is a x1 port (this is the default configuration)
32 * if there is a port/phy on which you do not wish to override the default
33 * values, use the value assigned to UNINIT_PARAM (255).
35 unsigned int phy_mask[] = { 1, 2, 4, 8, 1, 2, 4, 8 };
38 /* denotes SAS generation. i.e. 3: SAS Gen 3 6G */
39 unsigned int phy_gen[] = { 3, 3, 3, 3, 3, 3, 3, 3 };
42 * if there is a port/phy on which you do not wish to override the default
43 * values, use the value "0000000000000000". SAS address of zero's is
44 * considered invalid and will not be used.
46 unsigned long long sas_addr[] = { 0x5FCFFFFFF0000000ULL,
47 0x5FCFFFFFF1000000ULL,
48 0x5FCFFFFFF2000000ULL,
49 0x5FCFFFFFF3000000ULL,
50 0x5FCFFFFFF4000000ULL,
51 0x5FCFFFFFF5000000ULL,
52 0x5FCFFFFFF6000000ULL,
53 0x5FCFFFFFF7000000ULL };
60 fd = fopen(blob_name, "w+");
62 perror("Open file for write failed");
67 err = fwrite((void *)id, sizeof(char), strlen(id)+1, fd);
69 perror("write id failed");
74 err = fwrite((void *)&version, sizeof(version), 1, fd);
76 perror("write version failed");
80 /* write sub version */
81 err = fwrite((void *)&sub_version, sizeof(sub_version), 1, fd);
83 perror("write subversion failed");
87 /* write phy mask header */
90 perror("write phy mask header failed");
97 perror("write phy mask size failed");
101 /* write phy masks */
102 err = fwrite((void *)phy_mask, 1, sizeof(phy_mask), fd);
104 perror("write phy_mask failed");
108 /* write phy gen header */
109 err = fputc(0x2, fd);
111 perror("write phy gen header failed");
118 perror("write phy gen size failed");
123 err = fwrite((void *)phy_gen,
128 perror("write phy_gen failed");
132 /* write phy gen header */
133 err = fputc(0x3, fd);
135 perror("write sas addr header failed");
142 perror("write sas addr size failed");
147 err = fwrite((void *)sas_addr,
152 perror("write sas_addr failed");
156 /* write end header */
157 err = fputc(0xff, fd);
159 perror("write end header failed");