Nov 13, 1997 onl7v1: Solaris 2.5 cc ドライバのデバッグ. cc ドライバの実行 ~~~~~~~~~~~~~~~~~~~ (http://www-online.kek.jp/~inoue/CAMAC/onl7v1-sol2.5/camac-step02.log) 高エネルギー加速器研究機構 素粒子原子核研究所 物理、オンライングループ 井上 栄二 (1). 現状確認 (A). FRCvme、VMEbus Driver CPU-5V/5VT/20VT/24VT/7V/ Solaris 2.5 は 正常にインストールできた。 (B). ccドライバ、FORCE-5V-sol2.5.tar.gz を正常にインストールできた。 (2). ここでやるべきこと onl7v1 上で ccドライバの動作確認をするために、サンプル・プログラムを 実行する。 (3). サンプル・プログラムの実行 (3-1). cam1 の実行 onl7v1[59]% pwd /export/home/onl7v1/inoue/CAMAC/Driver/FORCE-5V-sol2.5 onl7v1[60]% cam1 5 Input n a f (data)>3 0 0 N=3 A=0 F=0 Q=1 X=1 Data:000000(Hex) 00000000(Dec) Input n a f (data)>3 0 16 7777 N=3 A=0 F=16 Q=1 X=1 Data:001E61(Hex) 00007777(Dec) Input n a f (data)>3 0 0 N=3 A=0 F=0 Q=1 X=1 Data:001E61(Hex) 00007777(Dec) Input n a f (data)>3 0 16 0 N=3 A=0 F=16 Q=1 X=1 Data:000000(Hex) 00000000(Dec) Input n a f (data)>3 0 0 N=3 A=0 F=0 Q=1 X=1 Data:000000(Hex) 00000000(Dec) onl7v1[61]% ok. 正常終了した。 (3-2). cam3 の実行 onl7v1[61]% cam3 *** Now waiting LAM ... N=3 Loop=10 Timeout=0 sec Interrupted !! count=1 Interrupted !! count=2 Interrupted !! count=3 Interrupted !! count=4 Interrupted !! count=5 Interrupted !! count=6 Interrupted !! count=7 Interrupted !! count=8 Interrupted !! count=9 Interrupted !! count=10 *** cam3 nomal end. onl7v1[62]% onl7v1[62]% cam3 *** Now waiting LAM ... N=3 Loop=10 Timeout=0 sec Interrupted !! count=1 Interrupted !! count=2 Timeout !! count=3 <-- ここで、故意にタイムアウトを起こしてみた。 Timeout !! count=4 <-- ここで、故意にタイムアウトを起こしてみた。 Interrupted !! count=5 Interrupted !! count=6 Timeout !! count=7 <-- ここで、故意にタイムアウトを起こしてみた。 Timeout !! count=8 <-- ここで、故意にタイムアウトを起こしてみた。 Timeout !! count=9 <-- ここで、故意にタイムアウトを起こしてみた。 Interrupted !! count=10 *** cam3 nomal end. onl7v1[63]% ok. 正常終了した。 (3-3). cam2 の実行 onl7v1[64]% cam2 Input transfer mode (1:word 2:long word) >1 Input loop >5 Input mode (0:QSTOP 1:QIGNORE 2:QREPEAT 3:QSCAN) >1 Input data counts >5 Input n a f >3 0 0 <---- ここで、フリーズしてしまった。 ctl-c で中断しようとしたがダメ。 killコマンド で中断しようとしてもダメ。 結局、システムを リブートする。 この時、コンソールには、 WARNING: VME: VME DMA not possible, set the slavewin property in VME.conf のメッセージが表示された。 VME slave window の設定をやっていなかったようだ。 (3-3-1). "Solaris 2.x VMEbus Driver User's Manual" を調べる。 マニュアルの "システム・メッセージ"の項を調べる。 "Warnings メッセージ"の説明のところで、マニュアルの173ページに、上記の メッセージの記述があった。 WARNING: VME: VME DMA not possible, set the slavewin property in VME.conf Some device driver tried to initiate a DMA transfer to the local CPU by means of the DDI DMA interface. To do so, it is necessary to set the slavewin property in the configuration file of the VMEbus nexus driver (see section 4.2 "Nexus Driver Fault Handling" on page 122). ローカル CPU に対して、DDI DMA interface のやり方で DMA 転送をしようする 時には、VMEbus nexus ドライバのコンフィギュレーション・ファイルの中に、 slavewin についての記述をしておくことが必要ということのようだ。 注. slave window の設定については、以下のファイルの項目(7)〜(14)を 参照せよ。 http://www-online.kek.jp/~inoue/CAMAC/onl5v4-sol2.5/debug-step10-log.txt (3-3-2). VME.conf に slavewin プロパティを設定する onl7v1[136]% su Password: # csh onl7v1# source /.cshrc onl7v1[34]# cd /kernel/drv /kernel/drv onl7v1[35]# ls VME* icmp.conf pci_pci* qe* tcp.conf VME.conf ip* pcmcia* qec* tl* arp* ip.conf pcmcia.conf rtvc* tl.conf arp.conf isp* pcmem* sad* udp* be* iwscn* pcram* sad.conf udp.conf bpp* iwscn.conf pcram.conf* sd* vmectl* clone* le* pcser* sd.conf vmectl.conf clone.conf lebuffer* pem* soc* vmedma* cn* llc1* pem.conf sp* vmedma.conf cn.conf llc1.conf pln* sp.conf vmedvma* conskbd* log* pln.conf ssd* vmedvma.conf conskbd.conf log.conf profile* ssd.conf vmefdma* consms* mm* pseudo* st* vmefdma.conf consms.conf mm.conf pseudo.conf st.conf vmeplus* esp* openeepr* ptc* stp4020* vmeplus.conf fas* openeepr.conf ptc.conf sy* wc* hme* options* ptsl* sy.conf wc.conf icmp* options.conf ptsl.conf tcp* xbox* onl7v1[36]# mv VME.conf VME.conf.org onl7v1[37]# cp VME.conf.org VME.conf onl7v1[38]# ls -l VME.conf* -rw-r--r-- 1 root other 1769 Nov 12 15:54 VME.conf -rw-r--r-- 1 root sys 1769 Dec 13 1996 VME.conf.org onl7v1[39]# chgrp sys VME.conf onl7v1[40]# ls -l VME.conf* -rw-r--r-- 1 root sys 1769 Nov 12 15:54 VME.conf -rw-r--r-- 1 root sys 1769 Dec 13 1996 VME.conf.org onl7v1[41]# vi VME.conf # @(#)VME.conf 1.4 96/12/12 FRC # # vmewin must be on a 256MB boundary # vmewin= # vmewinX= # The syntax for VME A24/A16 windows is vmexxdxx=, # The parameter is currently ignored (the full 16MB/64K range is used). # If these properties exist, the VSI is programmed with a static SBus to # VMEbus mapping. # # If you don't need this and want to save range registers in the VSI, # you should comment it out. # # The slavewin property is only needed for device drivers that want to # to do DMA via the standard DDI DMA interface calls, so that the VME nexus # can provide a VMEbus address where the device can perform DMA to. # Don't define this if you do not need it, as it will eat up a VME slave # range. Note also that the VSI will decode these addresses once the # slavewin property has been set and report VME Bus Errors if no driver # uses it! So if you get strange bus errors, check this file for the # slavewin property. # The format is: # # slavewin , , # # vme_start must be aligned to vme_size. vme_size must be 0x100000 (1MB), 2MB # 4MB, 8MB, ... 64MB. Space is a bitset of the VME_BT_xxx literals defined # in sys/vme_types. Standard values are: # 0x00020000 for a slave window in A24 space # 0x00040000 for a slave window in A32 space # # Refer to the manual for possible values for different hardware. E.g. if # you want the slave memory to accept BLT/MBLT transfers, set the # VME_BT_BLT/VME_BT_MBLT bits: # 0x00040600 for a slave window in A32 space with BLT/MBLT enabled. # #vmewin1=0x40000000 #vmewin2=0x20000000 #vmewin3=0x30000000 #vmewin=0x10000000 #vme16d16=0x0,0x10000 #vme16d32=0x0,0x10000 #vme24d32=0x0,0x100000 #vme24d16=0x0,0x100000 slavewin=0x000000,0x100000,0x00020000 ; onl7v1[42]# (3-3-3). システムをリブートする onl7v1 console login: root Password: Nov 12 16:01:27 onl7v1 login: ROOT LOGIN /dev/console Last login: Wed Nov 12 15:52:42 on pts/2 Sun Microsystems Inc. SunOS 5.5 Generic November 1995 Starting OpenWindows in 5 seconds (type Control-C to interrupt) ^C# csh onl7v1[8]# reboot Nov 12 16:01:44 onl7v1 reboot: rebooted by root Nov 12 16:01:45 onl7v1 syslogd: going down on signal 15 Nov 12 16:01:45 rpcbind: rpcbind terminating on signal. Nov 12 16:01:46 /usr/sbin/vold[2396]: problem unmounting /vol; No such file or d irectory syncing file systems... [1] done rebooting... Resetting ... screen not found. Can't open input device. Keyboard not present. Using tty for input and output. SPARC CPU-7V, No Keyboard ROM Rev. 2.15.1, 64 MB memory installed, Serial #9157050. Ethernet address 0:80:42:b:49:ba, Host ID: 808bb9ba. Rebooting with command: Boot device: /iommu/sbus/espdma@5,8400000/esp@5,8800000/sd@3,0 File and args: SunOS Release 5.5 Version Generic [UNIX(R) System V Release 4.0] Copyright (c) 1983-1995, Sun Microsystems, Inc. NOTICE: VME SYSFAIL (clr) not handled. NOTICE: VME: slavewin at vme=0x0, size=0x100000 space=0x2c020017 configuring network interfaces: hme0 le0. Hostname: onl7v1 Configuring the /devices directory vmeplus0 at VME0: vme16d16 0x0 and vme24d16 0x0 and vme32d16 0x0 and vme16d32 0x 0 and vme24d32 0x0 and vme32d32 0x0 CAMAC device driver V1.3x, 1991-1993 by Y.TAKEUCHI (T.I.T.) cc0 at VME0: vme16d16 0xff00 VME level 4 vector 0xff sparc ipl 7 vmemem0 at VME0: vme32d16 0x0 vmemem1 at VME0: vme16d16 0x0 vmemem2 at VME0: vme24d16 0x0 vmemem3 at VME0: vme32d32 0x0 vmemem4 at VME0: vme16d32 0x0 vmemem5 at VME0: vme24d32 0x0 vmectl0 at VME0 Configuring the /dev directory Configuring the /dev directory (compatibility devices) The system is coming up. Please wait. checking ufs filesystems /dev/rdsk/c0t3d0s5: is clean. /dev/rdsk/c0t3d0s4: is clean. /dev/rdsk/c0t3d0s3: is clean. /dev/rdsk/c0t3d0s7: is stable. Flushing routing table: add net default: gateway ICCFG1 NIS domainname is kek.jp starting rpc services: rpcbind keyserv kerbd done. Setting netmask of hme0 to 255.255.252.0 Setting netmask of le0 to 255.255.252.0 Setting default interface for multicast: add net 224.0.0.0: gateway onl7v1 syslog service starting. Print services started. volume management starting. The system is ready. onl7v1 console login: (3-3-4). cam2 テスト・プログラムを再度、実行してみる slavewin 設定、リブート後の、cam2 の実行。 onl7v1[10]% cam2 Input transfer mode (1:word 2:long word) >1 Input loop >5 Input mode (0:QSTOP 1:QIGNORE 2:QREPEAT 3:QSCAN) >1 Input data counts >5 Input n a f >3 0 0 <---- ここでフリーズする。 この時、コンソールには、 cc0 at VME0: vme16d16 0xff00 VME level 4 vector 0xff sparc ipl 7 と表示されている。 CPUボードの RUN LED は、赤、オレンジを点滅している。 k2917ボードの、RUN と M1 の LED が赤く点灯している。 コンソールからも、ネットワークからもアクセスできなくなってしまった。 参考. "Model 2917-Z1A Instruction Manual" のページ27によると、 M1 LED の点灯は "Ignore-Q Operation" を実行中であることを 示している。 CPUボードの ABORT、RESETスイッチを押してシステムを立ち上げ直す。 cc0 at VME0: vme16d16 0xff00 VME level 4 vector 0xff sparc ipl 7 Power-On Self Test IU Register File Test MMU Context Table Reg Test MMU Context Register Test MMU Sync Fault Stat Reg Test MMU Sync Fault Addr Reg Test D-Cache Tag Ram Test D-Cache Data Ram Test D-TLB CAM Test D-TLB RAM Test I-Cache Tag Ram Test I-Cache Data Ram Test No Secondary Cache Exists No Secondary Cache Exists No Secondary Cache Exists Snoop Ram Test IOMMU-TLB Test IOMMU Control Register Test IOMMU Base Addr Register Test IOMMU SBus Config Registers Test Set RAH to 3 Set WS to 3 DRAM Data Bus Test Probing Bank 0 -- 32 Megs Found Probing Bank 1 -- 32 Megs Found Probing Bank 2 -- 0 Megs Found Probing Bank 3 -- 0 Megs Found Probing Bank 4 -- 0 Megs Found Probing Bank 5 -- 0 Megs Found Probing Bank 6 -- 0 Megs Found Probing Bank 7 -- 0 Megs Found DRAM Address Bus Test Memory Address Pattern Test D-Cache Hit Miss Test D-TLB Hit Miss Test I-TLB Hit Miss Test I-Cache Hit Miss Test No Secondary Cache Exists I-TLB Ram Test FPU Register File Test FPU Misaligned Reg Pair Test FPU Single-precision Tests FPU Double-precision Tests FPU SP Invalid CEXC Test FPU SP Overflow CEXC Test FPU SP Divide-by-0 CEXC Test FPU SP Inexact CEXC Test FPU SP Trap Priority > Test FPU SP Trap Priority < Test FPU DP Invalid CEXC Test FPU DP Overflow CEXC Test FPU DP Divide-by-0 CEXC Test FPU DP Inexact CEXC Test FPU DP Trap Priority > Test FPU DP Trap Priority < Test PROC0 Interrupt Regs Tests Soft Interrupts OFF Test ERROR : Address= 71e10000, exp= 00000000, obs= 00000600, xor= 00000600 UNUMBER: U1507 エラーになってリセットできない。 k2917 の RESETボタンを押してみる。 RUN、M1 の LED は消えた。 Soft Interrupts OFF Test ERROR : Address= 71e10000, exp= 00000000, obs= 00000600, xor= 00000600 UNUMBER: U1507Level 15 Interrupt Type help for more information ok ok. CPU-7V はモニター・コマンドに戻った。 ここで再度、CPU-7V の RESETスイッチを押してシステムを立ちあげる。 ok Power-On Self Test IU Register File Test MMU Context Table Reg Test MMU Context Register Test MMU Sync Fault Stat Reg Test MMU Sync Fault Addr Reg Test D-Cache Tag Ram Test D-Cache Data Ram Test D-TLB CAM Test D-TLB RAM Test I-Cache Tag Ram Test I-Cache Data Ram Test No Secondary Cache Exists No Secondary Cache Exists No Secondary Cache Exists Snoop Ram Test IOMMU-TLB Test IOMMU Control Register Test IOMMU Base Addr Register Test IOMMU SBus Config Registers Test Set RAH to 3 Set WS to 3 DRAM Data Bus Test Probing Bank 0 -- 32 Megs Found Probing Bank 1 -- 32 Megs Found Probing Bank 2 -- 0 Megs Found Probing Bank 3 -- 0 Megs Found Probing Bank 4 -- 0 Megs Found Probing Bank 5 -- 0 Megs Found Probing Bank 6 -- 0 Megs Found Probing Bank 7 -- 0 Megs Found DRAM Address Bus Test Memory Address Pattern Test D-Cache Hit Miss Test D-TLB Hit Miss Test I-TLB Hit Miss Test I-Cache Hit Miss Test No Secondary Cache Exists I-TLB Ram Test FPU Register File Test FPU Misaligned Reg Pair Test FPU Single-precision Tests FPU Double-precision Tests FPU SP Invalid CEXC Test FPU SP Overflow CEXC Test FPU SP Divide-by-0 CEXC Test FPU SP Inexact CEXC Test FPU SP Trap Priority > Test FPU SP Trap Priority < Test FPU DP Invalid CEXC Test FPU DP Overflow CEXC Test FPU DP Divide-by-0 CEXC Test FPU DP Inexact CEXC Test FPU DP Trap Priority > Test FPU DP Trap Priority < Test PROC0 Interrupt Regs Tests Soft Interrupts OFF Test Soft Interrupts ON Test PROC0 User Timer Test PROC0 Counter/Timer Test DMA2 E_CSR Register Test LANCE Address Port Tests LANCE Data Port Tests DMA2 D_CSR Register Test DMA2 D_ADDR Register Test DMA2 D_BCNT Register Test DMA2 D_NADDR Register Test ESP Registers Tests DMA2 P_CSR Register Test DMA2 P_ADDR Register Test DMA2 P_BCNT Register Test PPORT Registers Tests NVRAM Access Test TOD Registers Test screen not found. Can't open input device. Keyboard not present. Using tty for input and output. SPARC CPU-7V, No Keyboard ROM Rev. 2.15.1, 64 MB memory installed, Serial #9157050. Ethernet address 0:80:42:b:49:ba, Host ID: 808bb9ba. Boot device: /iommu/sbus/espdma@5,8400000/esp@5,8800000/sd@3,0 File and args: SunOS Release 5.5 Version Generic [UNIX(R) System V Release 4.0] Copyright (c) 1983-1995, Sun Microsystems, Inc. NOTICE: VME SYSFAIL (clr) not handled. NOTICE: VME: slavewin at vme=0x0, size=0x100000 space=0x2c020017 configuring network interfaces: hme0 le0. Hostname: onl7v1 The / file system (/dev/rdsk/c0t3d0s0) is being checked. /dev/rdsk/c0t3d0s0: UNREF DIR I=25625 OWNER=root MODE=40755 /dev/rdsk/c0t3d0s0: SIZE=512 MTIME=Oct 23 14:08 1997 (RECONNECTED) /dev/rdsk/c0t3d0s0: DIR I=25625 CONNECTED. PARENT WAS I=38216 /dev/rdsk/c0t3d0s0: LINK COUNT DIR I=25625 OWNER=root MODE=40755 /dev/rdsk/c0t3d0s0: SIZE=512 MTIME=Oct 23 14:08 1997 COUNT 1 SHOULD BE 2 /dev/rdsk/c0t3d0s0: LINK COUNT INCREASING /dev/rdsk/c0t3d0s0: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY. WARNING - Unable to repair the / filesystem. Run fsck manually (fsck -F ufs /dev/rdsk/c0t3d0s0). Exit the shell when done to continue the boot process. Type Ctrl-d to proceed with normal startup, (or give root password for system maintenance): Entering System Maintenance Mode Nov 12 16:39:40 su: 'su root' succeeded for h driver on /dev/console Sun Microsystems Inc. SunOS 5.5 Generic November 1995 Starting OpenWindows in 5 seconds (type Control-C to interrupt) ^C# システム・アップの途中で / ファイル・システムが壊れているので fsck をやれと言ってきた。 これは、先ほどシステムがフリーズした時に、 いきなりCPU-7V の RESETスイッチを押したために / ファイル・システム に矛盾が生じたためだろう。 fsck をやる。 # fsck -F ufs /dev/rdsk/c0t3d0s0 ** /dev/rdsk/c0t3d0s0 ** Currently Mounted on / ** Phase 1 - Check Blocks and Sizes ** Phase 2 - Check Pathnames ** Phase 3 - Check Connectivity UNREF DIR I=25625 OWNER=root MODE=40755 SIZE=512 MTIME=Oct 23 14:08 1997 RECONNECT? y DIR I=25625 CONNECTED. PARENT WAS I=38216 ** Phase 4 - Check Reference Counts LINK COUNT DIR I=25625 OWNER=root MODE=40755 SIZE=512 MTIME=Oct 23 14:08 1997 COUNT 1 SHOULD BE 2 ADJUST? y LINK COUNT DIR I=38216 OWNER=root MODE=40755 SIZE=1536 MTIME=Oct 27 14:12 1997 COUNT 6 SHOULD BE 5 ADJUST? y ** Phase 5 - Check Cyl groups 2526 files, 16346 used, 103357 free (165 frags, 12899 blocks, 0.1% fragmentation ) ***** FILE SYSTEM WAS MODIFIED ***** # ここでリブートした。 ***** FILE SYSTEM WAS MODIFIED ***** # reboot syncing file systems... done rebooting... Resetting ... screen not found. Can't open input device. Keyboard not present. Using tty for input and output. SPARC CPU-7V, No Keyboard ROM Rev. 2.15.1, 64 MB memory installed, Serial #9157050. Ethernet address 0:80:42:b:49:ba, Host ID: 808bb9ba. Rebooting with command: Boot device: /iommu/sbus/espdma@5,8400000/esp@5,8800000/sd@3,0 File and args: SunOS Release 5.5 Version Generic [UNIX(R) System V Release 4.0] Copyright (c) 1983-1995, Sun Microsystems, Inc. NOTICE: VME SYSFAIL (clr) not handled. NOTICE: VME: slavewin at vme=0x0, size=0x100000 space=0x2c020017 configuring network interfaces: hme0 le0. Hostname: onl7v1 The /usr file system (/dev/rdsk/c0t3d0s6) is being checked. /dev/rdsk/c0t3d0s6: 15929 files, 185911 used, 102408 free /dev/rdsk/c0t3d0s6: (104 frags, 12788 blocks, 0.0% fragmentation) The system is coming up. Please wait. checking ufs filesystems /dev/rdsk/c0t3d0s5: is stable. /dev/rdsk/c0t3d0s4: is stable. /dev/rdsk/c0t3d0s3: is stable. /dev/rdsk/c0t3d0s7: 283 files, 4331 used, 3603434 free /dev/rdsk/c0t3d0s7: (346 frags, 450386 blocks, 0.0% fragmentation) Flushing routing table: add net default: gateway ICCFG1 NIS domainname is kek.jp starting rpc services: rpcbind keyserv kerbd done. Setting netmask of hme0 to 255.255.252.0 Setting netmask of le0 to 255.255.252.0 Setting default interface for multicast: add net 224.0.0.0: gateway onl7v1 syslog service starting. Print services started. bdconfig: no serial device configured. Run bdconfig interactively (no args). volume management starting. The system is ready. onl7v1 console login: 今度は正常に立ち上がった。 ブロック転送は、スロット#1デバイスでないと実行できないのかな。 --- (6). 項目タイトル (6-1). サブ項目タイトル (6-1-1). サブサブ項目タイトル