45 #define SYM_GEN_A(s, label) ((short) offsetof(s, label)),
46 #define SYM_GEN_B(s, label) ((short) offsetof(s, label)),
47 #define SYM_GEN_Z(s, label) ((short) offsetof(s, label)),
48 #define PADDR_A(label) SYM_GEN_PADDR_A(struct SYM_FWA_SCR, label)
49 #define PADDR_B(label) SYM_GEN_PADDR_B(struct SYM_FWB_SCR, label)
52 #if SYM_CONF_GENERIC_SUPPORT
56 #define SYM_FWA_SCR sym_fw1a_scr
57 #define SYM_FWB_SCR sym_fw1b_scr
58 #define SYM_FWZ_SCR sym_fw1z_scr
77 #define SYM_FWA_SCR sym_fw2a_scr
78 #define SYM_FWB_SCR sym_fw2b_scr
79 #define SYM_FWZ_SCR sym_fw2z_scr
102 #if SYM_CONF_GENERIC_SUPPORT
109 struct sym_hcb *np = sym_get_hcb(shost);
110 struct sym_fw1a_scr *scripta0;
111 struct sym_fw1b_scr *scriptb0;
113 scripta0 = (
struct sym_fw1a_scr *) np->
scripta0;
114 scriptb0 = (
struct sym_fw1b_scr *) np->
scriptb0;
125 #ifdef SYM_CONF_IARB_SUPPORT
154 struct sym_fw2a_scr *scripta0;
155 struct sym_fw2b_scr *scriptb0;
157 scripta0 = (
struct sym_fw2a_scr *) np->
scripta0;
158 scriptb0 = (
struct sym_fw2b_scr *) np->
scriptb0;
169 #if SYM_CONF_DMA_ADDRESSING_MODE == 2
176 scripta0->is_dmap_dirty[1] = 0;
178 scripta0->is_dmap_dirty[3] = 0;
182 #ifdef SYM_CONF_IARB_SUPPORT
228 scriptb0->pm0_data_addr[0] =
230 offsetof(
struct sym_fw2a_scr, pm0_data));
231 scriptb0->pm1_data_addr[0] =
233 offsetof(
struct sym_fw2a_scr, pm1_data));
270 for (i = 0 ; i <
sizeof(np->
fwa_bas)/
sizeof(
u32) ; i++)
290 #if SYM_CONF_GENERIC_SUPPORT
297 struct sym_fw1a_scr *scripta0;
298 struct sym_fw1b_scr *scriptb0;
300 scripta0 = (
struct sym_fw1a_scr *) np->
scripta0;
301 scriptb0 = (
struct sym_fw1b_scr *) np->
scriptb0;
306 sym_fw_fill_data(scripta0->data_in, scripta0->data_out);
311 sym_fw_setup_bus_addresses(np, fw);
321 struct sym_fw2a_scr *scripta0;
322 struct sym_fw2b_scr *scriptb0;
324 scripta0 = (
struct sym_fw2a_scr *) np->
scripta0;
325 scriptb0 = (
struct sym_fw2b_scr *) np->
scriptb0;
330 sym_fw_fill_data(scripta0->data_in, scripta0->data_out);
335 sym_fw_setup_bus_addresses(np, fw);
341 #if SYM_CONF_GENERIC_SUPPORT
354 #if SYM_CONF_GENERIC_SUPPORT
385 printf (
"%s: ERROR0 IN SCRIPT at %d.\n",
401 printf (
"%d: <%x>\n", (
int) (cur-start),
407 switch (opcode >> 28) {
427 if ((tmp1 ^ tmp2) & 3) {
428 printf (
"%s: ERROR1 IN SCRIPT at %d.\n",
437 opcode = (opcode & ~SCR_NO_FLUSH);
456 #ifdef SYM_CONF_TARGET_ROLE_SUPPORT
461 opcode &= ~0x20000000;
463 opcode = (opcode & ~OPC_TCHMOVE);
470 opcode &= ~0x20000000;
472 opcode = (opcode & ~OPC_TCHMOVE);
481 if (opcode & 0x00800000)
483 else if ((opcode & 0xf8400000) == 0x80400000)
522 new = (old & ~RELOC_MASK) + np->
mmio_ba;
531 new = (old & ~RELOC_MASK) + np->
hcb_ba;
546 panic(
"sym_fw_bind_script: "
547 "weird relocation %x\n", old);