From c67eef4e7d99b6b2e319b6de8714e4d0ad027b4e Mon Sep 17 00:00:00 2001 From: bouyer Date: Fri, 6 Oct 2000 16:31:17 +0000 Subject: Handle reselect entirely in script; for this provide a script area, modified by the driver, which will load the appropriate DSA for a given target/lun. --- sys/dev/microcode/siop/siop.ss | 50 +++++++++++++++++++++++++++++++++++++++--- 1 file changed, 47 insertions(+), 3 deletions(-) (limited to 'sys/dev') diff --git a/sys/dev/microcode/siop/siop.ss b/sys/dev/microcode/siop/siop.ss index 3450a2e0d3a..b7d9a87fe46 100644 --- a/sys/dev/microcode/siop/siop.ss +++ b/sys/dev/microcode/siop/siop.ss @@ -1,4 +1,4 @@ -; $NetBSD: siop.ss,v 1.7 2000/06/13 13:59:15 bouyer Exp $ +; $NetBSD: siop.ss,v 1.8 2000/10/06 16:31:17 bouyer Exp $ ; ; Copyright (c) 2000 Manuel Bouyer. @@ -87,6 +87,18 @@ EXTERN slot_abs_selected; EXTERN endslot_abs_reselect; +EXTERN abs_find_dsa; +ENTRY rtarget; +ENTRY rlun; +ENTRY rdsa0; +ENTRY rdsa1; +ENTRY rdsa2; +ENTRY rdsa3; +ENTRY rsxfer; +ENTRY rscntl3; +ENTRY res_nextld; +EXTERN resel_abs_selected; + PROC siop_script: selected: @@ -110,8 +122,8 @@ reselect: MOVE SFBR to SCRATCHA0 ; save reselect ID INT int_err, WHEN NOT MSG_IN; MOVE FROM t_msg_in, WHEN MSG_IN; - INT int_resel; - + MOVE SFBR & 0x07 to SCRATCHA2; save LUN + JUMP abs_find_dsa; reselect_fail: ; check that host asserted SIGP, this'll clear SIGP in ISTAT MOVE CTEST2 & 0x40 TO SFBR; @@ -261,3 +273,35 @@ nextslot: NOP; /* will be changed to the next slot entry PROC endslot_script: JUMP endslot_abs_reselect; + +;; script used to find the DSA after a reselect. +;; each slot contain a target/lun identifier (when free target = 0xff, so it's +;; ignored) used to load the appropriate DSA for this reselect + +PROC reselected_script: + MOVE SCRATCHA0 to SFBR; load ID +rtarget: + JUMP REL(res_nextid), IF NOT 0xff; + MOVE SCRATCHA2 to SFBR; load LUN +rlun: + JUMP REL(res_nextld), IF NOT 0xff; +rdsa0: + MOVE 0x00 to dsa0; +rdsa1: + MOVE 0x01 to dsa1; +rdsa2: + MOVE 0x02 to dsa2; +rdsa3: + MOVE 0x03 to dsa3; +; the select is here to reload sxfer and scntl3 from the table. As we're +; already reselected is always fais, and always jumps to the main script. + SELECT FROM t_id, resel_abs_selected; + +res_nextld: + NOP ; MOVE SCRATCHA0 to SFBR +res_nextid: + NOP ; JUMP REL(res_nextid), IF NOT 0xff + +PROC reselected_end_script: + INT int_resel; + INT int_resel; /* need two because res_nextld and res_nextid */ -- cgit /sys/compat/linux/arch/amd64/linux_commons.c
AgeCommit message (Expand)Author
2021-10-12fix various typos, mainly in comments.andvar
2020-05-03Always clear FUTEX_PRIVATE_FLAG for Linux processes. NetBSD-native futexesthorpej
2011-05-30Add fadvise64 and fadvise64_64 syscalls to compat_linux and compat_linux32.alnsn
2010-03-02Nuke fs_lfs.h included for unknown reasons (if there was a reasonpooka
2008-11-19Make the emulations, exec formats, coredump, NFS, and the NFS serverad
2008-10-17Remove unneeded linux_sigaction.cnjoly
2007-08-15Changes to make ktrace LKM friendly and reduce ifdef KTRACE. Proposedad
2007-02-09Merge newlock2 to head.ad
2006-02-09Add initial (but unfinished) COMPAT_LINUX32 for amd64. This is good enough somanu
2005-12-11merge ktrace-lwp.christos
2005-11-04Implement Linux futex and gettid system calls for amd64manu
2005-10-31build fixmanu
2005-05-03First work on COMPAT_LINUX/amd64manu