summaryrefslogtreecommitdiff
path: root/sys/dev/microcode
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/microcode')
-rw-r--r--sys/dev/microcode/siop/siop.out291
-rw-r--r--sys/dev/microcode/siop/siop.ss115
2 files changed, 278 insertions, 128 deletions
diff --git a/sys/dev/microcode/siop/siop.out b/sys/dev/microcode/siop/siop.out
index effe33a0b9f..67a59edbbfa 100644
--- a/sys/dev/microcode/siop/siop.out
+++ b/sys/dev/microcode/siop/siop.out
@@ -1,121 +1,194 @@
-/* $NetBSD: siop.out,v 1.1 2000/04/21 17:57:01 bouyer Exp $ */
+/* $NetBSD: siop.out,v 1.2 2000/04/25 16:27:06 bouyer Exp $ */
/*
* DO NOT EDIT - this file is automatically generated.
- * created from siop.ss on Thu Apr 20 23:36:33 2000
+ * created from siop.ss on Mon Apr 24 16:52:43 2000
*/
const u_int32_t siop_script[] = {
- 0x47000004, 0x00000048, /* 000 - 0 */
- 0x78340000, 0x00000000, /* 008 - 8 */
- 0x78350000, 0x00000000, /* 010 - 16 */
- 0x868b0000, 0x000000a0, /* 018 - 24 */
- 0x878b0000, 0x00000068, /* 020 - 32 */
- 0x808b0000, 0x00000118, /* 028 - 40 */
- 0x818b0000, 0x000000c0, /* 030 - 48 */
- 0x828b0000, 0x00000098, /* 038 - 56 */
- 0x838b0000, 0x000000a0, /* 040 - 64 */
- 0x98080000, 0x0000ffff, /* 048 - 72 */
- 0x54000000, 0x00000030, /* 050 - 80 */
- 0x740a8f00, 0x00000000, /* 058 - 88 */
- 0x6a340000, 0x00000000, /* 060 - 96 */
- 0x9f030000, 0x0000ffff, /* 068 - 104 */
- 0x1f00000c, 0x0000000c, /* 070 - 112 */
- 0x60000040, 0x00000000, /* 078 - 120 */
- 0x98080000, 0x0000ff02, /* 080 - 128 */
- 0x98080000, 0x0000ff03, /* 088 - 136 */
- 0x60000008, 0x00000000, /* 090 - 144 */
- 0x1f00000c, 0x0000000c, /* 098 - 152 */
- 0x808c0004, 0x000001a8, /* 0a0 - 160 */
- 0x808c0000, 0x000001d0, /* 0a8 - 168 */
- 0x808c0002, 0x000001d8, /* 0b0 - 176 */
- 0x98080000, 0x0000ff01, /* 0b8 - 184 */
- 0x1e000014, 0x00000014, /* 0c0 - 192 */
- 0x60000008, 0x00000000, /* 0c8 - 200 */
- 0x80880000, 0xffffff40, /* 0d0 - 208 */
- 0x1a00001c, 0x0000001c, /* 0d8 - 216 */
- 0x80880000, 0xffffff30, /* 0e0 - 224 */
- 0x1b000024, 0x00000024, /* 0e8 - 232 */
- 0x80880000, 0xffffff20, /* 0f0 - 240 */
- 0x88880000, 0x00000098, /* 0f8 - 248 */
- 0x1900002c, 0x0000002c, /* 100 - 256 */
- 0x7e350100, 0x00000000, /* 108 - 264 */
- 0x7e100800, 0x00000000, /* 110 - 272 */
- 0x7f110000, 0x00000000, /* 118 - 280 */
- 0x7f120000, 0x00000000, /* 120 - 288 */
- 0x7f130000, 0x00000000, /* 128 - 296 */
- 0x818b0000, 0xffffffc8, /* 130 - 304 */
- 0x88880000, 0x000000a0, /* 138 - 312 */
- 0x80880000, 0xfffffed0, /* 140 - 320 */
- 0x88880000, 0x00000048, /* 148 - 328 */
- 0x1800002c, 0x0000002c, /* 150 - 336 */
- 0x7e350100, 0x00000000, /* 158 - 344 */
- 0x7e100800, 0x00000000, /* 160 - 352 */
- 0x7f110000, 0x00000000, /* 168 - 360 */
- 0x7f120000, 0x00000000, /* 170 - 368 */
- 0x7f130000, 0x00000000, /* 178 - 376 */
- 0x808b0000, 0xffffffc8, /* 180 - 384 */
- 0x88880000, 0x00000050, /* 188 - 392 */
- 0x80880000, 0xfffffe80, /* 190 - 400 */
- 0x72100000, 0x00000000, /* 198 - 408 */
- 0x6a5c0000, 0x00000000, /* 1a0 - 416 */
- 0x72110000, 0x00000000, /* 1a8 - 424 */
- 0x6a5d0000, 0x00000000, /* 1b0 - 432 */
- 0x72120000, 0x00000000, /* 1b8 - 440 */
- 0x6a5e0000, 0x00000000, /* 1c0 - 448 */
- 0x72130000, 0x00000000, /* 1c8 - 456 */
- 0x6a5f0000, 0x00000000, /* 1d0 - 464 */
- 0x90080000, 0x00000000, /* 1d8 - 472 */
- 0x725c0000, 0x00000000, /* 1e0 - 480 */
- 0x6a100000, 0x00000000, /* 1e8 - 488 */
- 0x725d0000, 0x00000000, /* 1f0 - 496 */
- 0x6a110000, 0x00000000, /* 1f8 - 504 */
- 0x725e0000, 0x00000000, /* 200 - 512 */
- 0x6a120000, 0x00000000, /* 208 - 520 */
- 0x725f0000, 0x00000000, /* 210 - 528 */
- 0x6a130000, 0x00000000, /* 218 - 536 */
- 0x90080000, 0x00000000, /* 220 - 544 */
- 0x7c027f00, 0x00000000, /* 228 - 552 */
- 0x60000008, 0x00000000, /* 230 - 560 */
- 0x60000040, 0x00000000, /* 238 - 568 */
- 0x48000000, 0x00000000, /* 240 - 576 */
- 0x90080000, 0x00000000, /* 248 - 584 */
- 0x88880000, 0xffffffd0, /* 250 - 592 */
- 0x74340100, 0x00000000, /* 258 - 600 */
- 0x808c0000, 0xfffffde8, /* 260 - 608 */
- 0x72350000, 0x00000000, /* 268 - 616 */
- 0x808c0000, 0xfffffdd8, /* 270 - 624 */
- 0x98080000, 0x0000ff04, /* 278 - 632 */
- 0x88880000, 0xffffffa0, /* 280 - 640 */
- 0x98080000, 0x0000ff00, /* 288 - 648 */
- 0x60000040, 0x00000000, /* 290 - 656 */
- 0x7a340100, 0x00000000, /* 298 - 664 */
- 0x80880000, 0xfffffde8, /* 2a0 - 672 */
+ 0x78340000, 0x00000000, /* 000 - 0 */
+ 0x78350000, 0x00000000, /* 008 - 8 */
+ 0x868b0000, 0x000000d8, /* 010 - 16 */
+ 0x878b0000, 0x00000078, /* 018 - 24 */
+ 0x808b0000, 0x00000150, /* 020 - 32 */
+ 0x818b0000, 0x000000f8, /* 028 - 40 */
+ 0x828b0000, 0x000000d0, /* 030 - 48 */
+ 0x838b0000, 0x000000d8, /* 038 - 56 */
+ 0x98080000, 0x0000ffff, /* 040 - 64 */
+ 0x54000000, 0x00000030, /* 048 - 72 */
+ 0x740a8f00, 0x00000000, /* 050 - 80 */
+ 0x6a340000, 0x00000000, /* 058 - 88 */
+ 0x9f030000, 0x0000ffff, /* 060 - 96 */
+ 0x1f00001c, 0x0000001c, /* 068 - 104 */
+ 0x60000040, 0x00000000, /* 070 - 112 */
+ 0x98080000, 0x0000ff04, /* 078 - 120 */
+ 0x741a4000, 0x00000000, /* 080 - 128 */
+ 0x980c0000, 0x0000ff06, /* 088 - 136 */
+ 0x80880000, 0x00000280, /* 090 - 144 */
+ 0x60000008, 0x00000000, /* 098 - 152 */
+ 0x1f00001c, 0x0000001c, /* 0a0 - 160 */
+ 0x808c0004, 0x000001d0, /* 0a8 - 168 */
+ 0x808c0000, 0x000001f8, /* 0b0 - 176 */
+ 0x808c0002, 0x00000200, /* 0b8 - 184 */
+ 0x808c0001, 0x00000210, /* 0c0 - 192 */
+ 0x98080000, 0x0000ff01, /* 0c8 - 200 */
+ 0x60000040, 0x00000000, /* 0d0 - 208 */
+ 0x80880000, 0xffffff30, /* 0d8 - 216 */
+ 0x58000008, 0x00000000, /* 0e0 - 224 */
+ 0x60000040, 0x00000000, /* 0e8 - 232 */
+ 0x1e00003c, 0x0000003c, /* 0f0 - 240 */
+ 0x60000008, 0x00000000, /* 0f8 - 248 */
+ 0x80880000, 0xffffff08, /* 100 - 256 */
+ 0x1a000044, 0x00000044, /* 108 - 264 */
+ 0x80880000, 0xfffffef8, /* 110 - 272 */
+ 0x1b00004c, 0x0000004c, /* 118 - 280 */
+ 0x80880000, 0xfffffee8, /* 120 - 288 */
+ 0x88880000, 0x00000098, /* 128 - 296 */
+ 0x19000054, 0x00000054, /* 130 - 304 */
+ 0x7e350100, 0x00000000, /* 138 - 312 */
+ 0x7e100800, 0x00000000, /* 140 - 320 */
+ 0x7f110000, 0x00000000, /* 148 - 328 */
+ 0x7f120000, 0x00000000, /* 150 - 336 */
+ 0x7f130000, 0x00000000, /* 158 - 344 */
+ 0x818b0000, 0xffffffc8, /* 160 - 352 */
+ 0x88880000, 0x000000a0, /* 168 - 360 */
+ 0x80880000, 0xfffffe98, /* 170 - 368 */
+ 0x88880000, 0x00000048, /* 178 - 376 */
+ 0x18000054, 0x00000054, /* 180 - 384 */
+ 0x7e350100, 0x00000000, /* 188 - 392 */
+ 0x7e100800, 0x00000000, /* 190 - 400 */
+ 0x7f110000, 0x00000000, /* 198 - 408 */
+ 0x7f120000, 0x00000000, /* 1a0 - 416 */
+ 0x7f130000, 0x00000000, /* 1a8 - 424 */
+ 0x808b0000, 0xffffffc8, /* 1b0 - 432 */
+ 0x88880000, 0x00000050, /* 1b8 - 440 */
+ 0x80880000, 0xfffffe48, /* 1c0 - 448 */
+ 0x72100000, 0x00000000, /* 1c8 - 456 */
+ 0x6a5c0000, 0x00000000, /* 1d0 - 464 */
+ 0x72110000, 0x00000000, /* 1d8 - 472 */
+ 0x6a5d0000, 0x00000000, /* 1e0 - 480 */
+ 0x72120000, 0x00000000, /* 1e8 - 488 */
+ 0x6a5e0000, 0x00000000, /* 1f0 - 496 */
+ 0x72130000, 0x00000000, /* 1f8 - 504 */
+ 0x6a5f0000, 0x00000000, /* 200 - 512 */
+ 0x90080000, 0x00000000, /* 208 - 520 */
+ 0x725c0000, 0x00000000, /* 210 - 528 */
+ 0x6a100000, 0x00000000, /* 218 - 536 */
+ 0x725d0000, 0x00000000, /* 220 - 544 */
+ 0x6a110000, 0x00000000, /* 228 - 552 */
+ 0x725e0000, 0x00000000, /* 230 - 560 */
+ 0x6a120000, 0x00000000, /* 238 - 568 */
+ 0x725f0000, 0x00000000, /* 240 - 576 */
+ 0x6a130000, 0x00000000, /* 248 - 584 */
+ 0x90080000, 0x00000000, /* 250 - 592 */
+ 0x7c027f00, 0x00000000, /* 258 - 600 */
+ 0x60000008, 0x00000000, /* 260 - 608 */
+ 0x60000040, 0x00000000, /* 268 - 616 */
+ 0x48000000, 0x00000000, /* 270 - 624 */
+ 0x90080000, 0x00000000, /* 278 - 632 */
+ 0x88880000, 0xffffffd0, /* 280 - 640 */
+ 0x74340100, 0x00000000, /* 288 - 648 */
+ 0x808c0000, 0x00000080, /* 290 - 656 */
+ 0x72350000, 0x00000000, /* 298 - 664 */
+ 0x808c0000, 0x00000070, /* 2a0 - 672 */
+ 0x98080000, 0x0000ff07, /* 2a8 - 680 */
+ 0x88880000, 0xffffffa0, /* 2b0 - 688 */
+ 0x98080000, 0x0000ff00, /* 2b8 - 696 */
+ 0x60000040, 0x00000000, /* 2c0 - 704 */
+ 0x7a340100, 0x00000000, /* 2c8 - 712 */
+ 0x80880000, 0xfffffdc0, /* 2d0 - 720 */
+ 0x60000040, 0x00000000, /* 2d8 - 728 */
+ 0x9f020000, 0x0000ffff, /* 2e0 - 736 */
+ 0x1f000024, 0x00000024, /* 2e8 - 744 */
+ 0x98080000, 0x0000ff02, /* 2f0 - 752 */
+ 0x60000040, 0x00000000, /* 2f8 - 760 */
+ 0x9f020000, 0x0000ffff, /* 300 - 768 */
+ 0x1f00002c, 0x0000002c, /* 308 - 776 */
+ 0x98080000, 0x0000ff03, /* 310 - 784 */
+ 0x10000000, 0x00000000, /* 318 - 792 */
};
-#define A_t_id 0x00000004
-#define A_t_msg_in 0x0000000c
-#define A_t_msg_out 0x00000014
-#define A_t_cmd 0x0000001c
-#define A_t_status 0x00000024
-#define A_t_data 0x0000002c
+const u_int32_t slot_script[] = {
+ 0x80880000, 0x00000044, /* 000 - 0 */
+ 0x78100000, 0x00000000, /* 008 - 8 */
+ 0x78110100, 0x00000000, /* 010 - 16 */
+ 0x78120200, 0x00000000, /* 018 - 24 */
+ 0x78130300, 0x00000000, /* 020 - 32 */
+ 0x43000014, 0x00000000, /* 028 - 40 */
+ 0xc0000004, 0x00000000, 0x00000000, /* 030 - 48 */
+ 0x80080000, 0x00000000, /* 03c - 60 */
+ 0x10000000, 0x00000000, /* 044 - 68 */
+ 0x10000000, 0x00000000, /* 04c - 76 */
+};
+
+const u_int32_t endslot_script[] = {
+ 0x80080000, 0x00000000, /* 000 - 0 */
+};
+
+#define A_t_id 0x00000014
+#define A_t_msg_in 0x0000001c
+#define A_t_ext_msg_in 0x00000024
+#define A_t_ext_msg_data 0x0000002c
+#define A_t_ext_msg_tag 0x00000034
+#define A_t_msg_out 0x0000003c
+#define A_t_cmd 0x00000044
+#define A_t_status 0x0000004c
+#define A_t_data 0x00000054
#define A_int_done 0x0000ff00
#define A_int_msgin 0x0000ff01
-#define A_int_resel 0x0000ff02
-#define A_int_resfail 0x0000ff03
-#define A_int_disc 0x0000ff04
+#define A_int_extmsgin 0x0000ff02
+#define A_int_extmsgdata 0x0000ff03
+#define A_int_resel 0x0000ff04
+#define A_int_reseltag 0x0000ff05
+#define A_int_resfail 0x0000ff06
+#define A_int_disc 0x0000ff07
#define A_int_err 0x0000ffff
#define A_flag_sdp 0x00000001
-#define Ent_waitphase 0x00000018
-#define Ent_select 0x00000000
-#define Ent_msgout 0x000000c0
-#define Ent_msgin 0x00000090
-#define Ent_dataout 0x00000148
-#define Ent_datain 0x000000f8
-#define Ent_cmdout 0x000000d8
-#define Ent_status 0x000000e8
-#define Ent_disconnect 0x00000228
-#define Ent_reselect 0x00000050
-#define Ent_reselected 0x00000008
-#define Ent_handle_reselect 0x00000000
+#define Ent_waitphase 0x00000010
+#define Ent_send_msgout 0x000000e0
+#define Ent_msgout 0x000000f0
+#define Ent_msgin 0x00000098
+#define Ent_msgin_ack 0x000000d0
+#define Ent_dataout 0x00000178
+#define Ent_datain 0x00000128
+#define Ent_cmdout 0x00000108
+#define Ent_status 0x00000118
+#define Ent_disconnect 0x00000258
+#define Ent_reselect 0x00000048
+#define Ent_selected 0x00000000
+#define Ent_get_extmsgdata 0x000002f8
+#define Ent_sheduler 0x00000318
+#define Ent_slot 0x00000000
+#define Ent_idsa0 0x00000008
+#define Ent_idsa1 0x00000010
+#define Ent_idsa2 0x00000018
+#define Ent_idsa3 0x00000020
+#define Ent_slotdata 0x00000044
+#define Ent_nextslot 0x0000004c
+#define Ent_endslot 0x00000000
+#define E_slot_nextp 0x00000000
+u_int32_t E_slot_nextp_Used[] = {
+ 0x0000000e,
+};
+
+#define E_slot_shed_addrsrc 0x00000000
+u_int32_t E_slot_shed_addrsrc_Used[] = {
+ 0x0000000d,
+};
+
+#define E_slot_abs_reselect 0x00000000
+u_int32_t E_slot_abs_reselect_Used[] = {
+ 0x0000000b,
+};
+
+#define E_slot_abs_selected 0x00000000
+u_int32_t E_slot_abs_selected_Used[] = {
+ 0x00000010,
+};
+
+#define E_endslot_abs_reselect 0x00000000
+u_int32_t E_endslot_abs_reselect_Used[] = {
+ 0x00000001,
+};
+
-u_int32_t INSTRUCTIONS = 0x00000055;
+u_int32_t INSTRUCTIONS = 0x0000006f;
u_int32_t PATCHES = 0x00000000;
diff --git a/sys/dev/microcode/siop/siop.ss b/sys/dev/microcode/siop/siop.ss
index e7e6b61220f..77b9a29318a 100644
--- a/sys/dev/microcode/siop/siop.ss
+++ b/sys/dev/microcode/siop/siop.ss
@@ -1,42 +1,63 @@
ARCH 720
-; offsets of sym_xfer
-ABSOLUTE t_id = 4;
-ABSOLUTE t_msg_in = 12;
-ABSOLUTE t_msg_out = 20;
-ABSOLUTE t_cmd = 28;
-ABSOLUTE t_status = 36;
-ABSOLUTE t_data = 44;
+; offsets in sym_xfer
+ABSOLUTE t_id = 20;
+ABSOLUTE t_msg_in = 28;
+ABSOLUTE t_ext_msg_in = 36;
+ABSOLUTE t_ext_msg_data = 44;
+ABSOLUTE t_ext_msg_tag = 52;
+ABSOLUTE t_msg_out = 60;
+ABSOLUTE t_cmd = 68;
+ABSOLUTE t_status = 76;
+ABSOLUTE t_data = 84;
;; interrupt codes
ABSOLUTE int_done = 0xff00;
ABSOLUTE int_msgin = 0xff01;
-ABSOLUTE int_resel = 0xff02;
-ABSOLUTE int_resfail = 0xff03;
-ABSOLUTE int_disc = 0xff04;
+ABSOLUTE int_extmsgin = 0xff02;
+ABSOLUTE int_extmsgdata = 0xff03;
+ABSOLUTE int_resel = 0xff04;
+ABSOLUTE int_reseltag = 0xff05;
+ABSOLUTE int_resfail = 0xff06;
+ABSOLUTE int_disc = 0xff07;
ABSOLUTE int_err = 0xffff;
; flags for scratcha0
ABSOLUTE flag_sdp = 0x01 ; got save data pointer
ENTRY waitphase;
-ENTRY select;
+ENTRY send_msgout;
ENTRY msgout;
ENTRY msgin;
+ENTRY msgin_ack;
ENTRY dataout;
ENTRY datain;
ENTRY cmdout;
ENTRY status;
ENTRY disconnect;
ENTRY reselect;
-ENTRY reselected;
-ENTRY handle_reselect;
+ENTRY selected;
+ENTRY get_extmsgdata;
+ENTRY sheduler;
+ENTRY slot;
+ENTRY idsa0;
+ENTRY idsa1;
+ENTRY idsa2;
+ENTRY idsa3;
+ENTRY slotdata;
+ENTRY nextslot;
+ENTRY endslot;
+
+EXTERN slot_nextp;
+EXTERN slot_shed_addrsrc;
+EXTERN slot_abs_reselect;
+EXTERN slot_abs_selected;
+
+EXTERN endslot_abs_reselect;
PROC siop_script:
-select:
- SELECT ATN FROM t_id, REL(reselect);
-reselected:
+selected:
; starting a new session, init 'local variables'
MOVE 0 to SCRATCHA0 ; flags
MOVE 0 to SCRATCHA1 ; DSA offset (for S/G save data pointer)
@@ -60,7 +81,10 @@ reselect:
INT int_resel;
reselect_fail:
- INT int_resfail;
+ ; check that host asserted SIGP, this'll clear SIGP in ISTAT
+ MOVE CTEST2 & 0x40 TO SFBR;
+ INT int_resfail, IF 0x00;
+ JUMP REL(sheduler);
msgin:
CLEAR ATN
@@ -68,7 +92,16 @@ msgin:
JUMP REL(handle_dis), IF 0x04 ; disconnect message
JUMP REL(handle_cmpl), IF 0x00 ; command complete message
JUMP REL(handle_sdp), IF 0x02 ; save data pointer message
+ JUMP REL(handle_extin), IF 0x01 ; extended message
INT int_msgin;
+msgin_ack:
+ CLEAR ACK;
+ JUMP REL(waitphase);
+
+; entry point for msgout after a msgin or status phase
+send_msgout:
+ SET ATN;
+ CLEAR ACK;
msgout:
MOVE FROM t_msg_out, WHEN MSG_OUT;
CLEAR ATN;
@@ -138,9 +171,9 @@ handle_dis:
CALL REL(disconnect);
; if we didn't get sdp, or if offset is 0, no need to interrupt
MOVE SCRATCHA0 & flag_sdp TO SFBR;
- JUMP REL(reselect), if 0x00;
+ JUMP REL(sheduler), if 0x00;
MOVE SCRATCHA1 TO SFBR;
- JUMP REL(reselect), if 0x00;
+ JUMP REL(sheduler), if 0x00;
; Ok, we need to save data pointers
INT int_disc;
@@ -151,3 +184,47 @@ handle_sdp:
CLEAR ACK;
MOVE SCRATCHA0 | flag_sdp TO SCRATCHA0;
JUMP REL(msgin) ; should get a disconnect message now
+
+handle_extin:
+ CLEAR ACK;
+ INT int_err, IF NOT MSG_IN;
+ MOVE FROM t_ext_msg_in, WHEN MSG_IN;
+ INT int_extmsgin; /* let host fill in t_ext_msg_data */
+get_extmsgdata:
+ CLEAR ACK;
+ INT int_err, IF NOT MSG_IN;
+ MOVE FROM t_ext_msg_data, WHEN MSG_IN;
+ INT int_extmsgdata;
+
+sheduler:
+ NOP; /* will be changed by the slot scripts */
+
+; script used for the sheduler: when a slot is free the JUMP points to
+; the next slot so that instructions for this slot are not run.
+; once the CPU has set up the slot variables (DSA address) it changes
+; the JUMP address to 0 (so that it'll jump to the next instruction) and
+; this command will be processed next time the sheduler is executed.
+; When the target has been successfully selected the script changes the jump
+; addr back to the next slot, so that it's ignored the next time.
+;
+
+PROC slot_script:
+slot:
+ JUMP REL(nextslot);
+idsa0:
+ MOVE 0x00 to dsa0;
+idsa1:
+ MOVE 0x01 to dsa1;
+idsa2:
+ MOVE 0x02 to dsa2;
+idsa3:
+ MOVE 0x03 to dsa3;
+ SELECT ATN FROM t_id, slot_abs_reselect;
+ MOVE MEMORY 4, slot_shed_addrsrc, slot_nextp;
+ JUMP slot_abs_selected;
+slotdata:
+ NOP; slot variables: dsa & jumppatchp
+nextslot: NOP; /* will be changed to the next slot entry
+
+PROC endslot_script:
+ JUMP endslot_abs_reselect;