1
0
Files
2022-09-29 17:59:04 +03:00

1449 lines
25 KiB
Plaintext

#########################################################################
# IP22 Script - Includes PM, CPU, MEM, and GFX TESTS #
#########################################################################
report=4 # set verbose, but not debug
$stoponerr=1
$oven = 0;
$quick = 0;
$solid = 0;
$gounix = 1;
$skip_timer = 0;
$skip_eisa = 0;
$failed = 0;
hinv -v
delay {
ide_delay -s 2;
}
cv_low {
echo "Changing Voltage to 4.75V"
chg_volt 1;
repeat 8 {
delay;
}
chg_volt 0;
repeat 8 {
delay;
}
}
cv_nom {
echo "Changing Voltage to 5.00V"
chg_volt 1;
repeat 8 {
delay;
}
}
cv_high {
echo "Changing Voltage to 5.25V"
chg_volt 1;
repeat 8 {
delay;
}
chg_volt 2;
repeat 8 {
delay;
}
}
unix {
echo "<<<< About to to boot UNIX......>>>>"
boot dksc(0,1,0)unix;
}
#########################################################################
# Processor Module Tests and Scripts #
#########################################################################
pm1 {
echo "Processor Module Tests...."
if(tlb){
echo "Failure detected in tlb test"
$failed=1;
return(-1);
}
if(utlb){
echo "Failure detected in utlb test"
$failed=1;
return(-1);
}
if(dcache1){
echo "Failure detected in dcache1 test"
$failed=1;
return(-1);
}
$tmp=icache1
if($tmp) {
echo "Failure detected in icache1 test"
$failed=1;
return(-1);
}
$tmp=icache2
if($tmp) {
echo "Failure detected in icache2 test"
$failed=1;
return(-1);
}
$tmp=scache1
if($tmp) {
echo "Failure detected in scache1 test"
$failed=1;
return(-1);
}
if(hpc3) {
echo "Failure detected in hpc3 test"
$failed=1;
return(-1);
}
if(fpu) {
echo "Failure detected in fpu test"
$failed=1;
return(-1);
}
echo "Processor Module Tests Passed...."
}
#########################################################################
# CPU Board Tests and Scripts #
#########################################################################
cpusc {
echo "CPU Secondary Cache Tests...."
if (is_r4600sc) {
echo "R4600sc found!!!";
if(sc_on){
echo "Failure detected in sc_on test"
$failed=1;
return(-1);
}
if(sc_hit){
echo "Failure detected in sc_hit test"
$failed=1;
return(-1);
}
if(sc_miss){
echo "Failure detected in sc_miss test"
$failed=1;
return(-1);
}
if(sc_hit_miss){
echo "Failure detected in sc_hit_miss test"
$failed=1;
return(-1);
}
if(sc_tag){
echo "Failure detected in sc_tag test"
$failed=1;
return(-1);
}
if(sc_off){
echo "Failure detected in sc_off test"
$failed=1;
return(-1);
}
}
else
{
echo "R4600sc not found!!!";
if(tlb){
echo "Failure detected in tlb test"
$failed=1;
return(-1);
}
if(utlb){
echo "Failure detected in utlb test"
$failed=1;
return(-1);
}
fi
}
if(dcache1){
echo "Failure detected in dcache1 test"
$failed=1;
return(-1);
}
$tmp=icache1
if($tmp) {
echo "Failure detected in icache1 test"
$failed=1;
return(-1);
}
$tmp=icache2
if($tmp) {
echo "Failure detected in icache2 test"
$failed=1;
return(-1);
}
$tmp=scache1
if($tmp) {
echo "Failure detected in scache1 test"
$failed=1;
return(-1);
}
$tmp=scache2
if($tmp) {
echo "Failure detected in scache2 test"
$failed=1;
return(-1);
}
if(fpu) {
echo "Failure detected in fpu test"
$failed=1;
return(-1);
}
echo "CPU Secondary Cache Tests Passed...."
}
#########################################################################
# Memory Tests and Scripts #
#########################################################################
m2 {
echo "Memory Tests (M2)...."
$tmp=khlow
if($tmp) {
echo "Failure detected in Knaizuk Hartmann Low Test"
$failed=1;
return(-1);
}
$tmp=memtest2 3
if($tmp) {
echo "Failure detected in Knaizuk Hartmann Test"
$failed=1;
return(-1);
}
$tmp=memtest2 5
if($tmp) {
echo "Failure detected in Knaizuk Hartmann Parity Test"
$failed=1;
return(-1);
}
$tmp=memtest2 10
if($tmp) {
echo "Failure detected in Threebit Memory Test"
$failed=1;
return(-1);
}
$tmp=memtest2 12
if($tmp) {
echo "Failure detected in Knaizuk Hartmann Doubleword Test"
$failed=1;
return(-1);
}
$tmp=memtest2 11
if($tmp) {
echo "Failure detected in Butterfly Test"
$failed=1;
return(-1);
}
$tmp=memtest2 8
if($tmp) {
echo "Failure detected in March X Test"
$failed=1;
return(-1);
}
$tmp=memtest2 9
if($tmp) {
echo "Failure detected in March Y Test"
$failed=1;
return(-1);
}
$tmp=ldram
if($tmp) {
echo "Failure detected in ldram test"
$failed=1;
return(-1);
}
echo "Memory Tests (M2) Passed...."
}
memory {
echo "Memory Tests (memory)...."
if(dcache1){
echo "Failure detected in dcache1 test"
$failed=1;
return(-1);
}
$tmp=icache1
if($tmp) {
echo "Failure detected in icache1 test"
$failed=1;
return(-1);
}
$tmp=icache2
if($tmp) {
echo "Failure detected in icache2 test"
$failed=1;
return(-1);
}
$tmp=scache1
if($tmp) {
echo "Failure detected in scache1 test"
$failed=1;
return(-1);
}
$tmp=memtest
if($tmp) {
echo "Failure detected in memtest test"
$failed=1;
return(-1);
}
$tmp=m2
if($tmp) {
echo "Failure detected in additional memory tests"
$failed=1;
return(-1);
}
$tmp=ldram 0xa8800000
if($tmp) {
echo "Failure detected in ldram test"
$failed=1;
return(-1);
}
$tmp=ldram -p
if($tmp) {
echo "Failure detected in ldram with parity test"
$failed=1;
return(-1);
}
$tmp=dram
if($tmp) {
echo "Failure detected in dram test"
$failed=1;
return(-1);
}
$tmp=dram -p
if($tmp) {
echo "Failure detected in dram with parity test"
$failed=1;
return(-1);
}
echo "Memory Tests (memory) Passed...."
}
#########################################################################
# Audio Tests and Scripts #
#########################################################################
a2test {
$loopcount = 0;
report =4;
$a2tst0pass = 0;
$a2tst0fail = 0;
$a2tst1pass = 0;
$a2tst1fail = 0;
$a2tst2pass = 0;
$a2tst2fail = 0;
$a2tst3pass = 0;
$a2tst3fail = 0;
$a2tst4pass = 0;
$a2tst4fail = 0;
$a2tst5pass = 0;
$a2tst5fail = 0;
$a2tst6pass = 0;
$a2tst6fail = 0;
$a2tst7pass = 0;
$a2tst7fail = 0;
while ( $loopcount < 3 ) {
echo ""
echo "----------------------------------------------------"
echo "Starting audio test loop" $loopcount
echo "----------------------------------------------------"
$a2tst = audio -t0
if($a2tst) {
$a2tst0fail = $a2tst0fail + 1;
$failed = 1;
}
else {
$a2tst0pass = $a2tst0pass + 1;
}
a2tst = audio -t1
if($a2tst) {
$a2tst1fail = $a2tst1fail + 1;
$failed = 1;
}
else {
$a2tst1pass = $a2tst1pass + 1;
}
a2tst = audio -t2
if($a2tst) {
$a2tst2fail = $a2tst2fail + 1;
$failed = 1;
}
else {
$a2tst2pass = $a2tst2pass + 1;
}
a2tst = audio -t3
if($a2tst)
$a2tst3fail = $a2tst3fail + 1;
else
$a2tst3pass = $a2tst3pass + 1;
a2tst = audio -t4
if($a2tst)
$a2tst4fail = $a2tst4fail + 1;
else
$a2tst4pass = $a2tst4pass + 1;
a2tst = audio -t5
if($a2tst) {
$a2tst5fail = $a2tst5fail + 1;
$failed = 1;
}
else {
$a2tst5pass = $a2tst5pass + 1;
}
a2tst = audio -t6
if($a2tst) {
$a2tst6fail = $a2tst6fail + 1;
$failed = 1;
}
else {
$a2tst6pass = $a2tst6pass + 1;
}
a2tst = audio -t7
if($a2tst)
$a2tst7fail = $a2tst7fail + 1;
else
$a2tst7pass = $a2tst7pass + 1;
$loopcount = $loopcount + 1;
}
echo "audio test 0: Pass =" $a2tst0pass" fail =" $a2tst0fail
echo "audio test 1: Pass =" $a2tst1pass" fail =" $a2tst1fail
echo "audio test 2: Pass =" $a2tst2pass" fail =" $a2tst2fail
echo "audio test 3: Pass =" $a2tst3pass" fail =" $a2tst3fail
echo "audio test 4: Pass =" $a2tst4pass" fail =" $a2tst4fail
echo "audio test 5: Pass =" $a2tst5pass" fail =" $a2tst5fail
echo "audio test 6: Pass =" $a2tst6pass" fail =" $a2tst6fail
echo "audio test 7: Pass =" $a2tst7pass" fail =" $a2tst7fail
wait;
if( $a2tst7pass == 0 ) {
# Rerun audio -t7 ten more times to get it to pass
echo "Audio test 7 failed three loops."
echo "Press ENTER to run audio test 7 for 10 more loops"
wait;
$report=1
$loopcount = 0;
while ( $loopcount < 10 ) {
a2tst = audio -t7
if($a2tst) {
$a2tst7fail = $a2tst7fail + 1;
}
else {
$a2tst7pass = $a2tst7pass + 1;
$loopcount = 10
}
$loopcount = $loopcount + 1;
}
if( $a2tst7pass == 0 ) {
echo "Audio test 7 FAILED."
echo "Reject this system with an Audio failure"
$failed = 1;
}
}
}
#########################################################################
# MEM, INT and SCSI tests and scripts #
#########################################################################
ip {
echo "IP22 Memory, interrupt, duart, scsi tests...."
$tmp = 0;
if(int2) {
echo "Failure detected in int2 test"
$failed=1;
return(-1);
}
if ($skip_timer !=1) {
if(clock) {
echo "Failure detected in clock test"
$failed=1;
return(-1);
}
}
if ($oven) {
$tmp = memtest;
if ($tmp) {
echo "Failure detected in memtest test"
$failed=1;
return(-1);
}
$tmp = ldram -p;
if ($tmp) {
echo "Failure detected in ldram test"
$failed=1;
return(-1);
}
m2;
if ($failed) {
return(-1);
}
} else {
$tmp = memtest 0xa8800000:0xa9000000 ;
if ($tmp) {
echo "Failure detected in memtest test"
$failed=1;
return(-1);
}
}
# Duart External tests turned off and internal tests turned on rwaits 9/23/92
# originally -i0, -i1 on -i2 off, -e0 off -e2, -e3 on
$tmp=duart -i0;
if($tmp) {
echo "Failure detected in duart 0 test"
$failed=1;
return(-1);
}
$tmp= duart -i1;
if($tmp) {
echo "Failure detected in duart 1 test"
$failed=1;
return(-1);
}
$tmp = led 0;
if($tmp){
echo "Failure detected in led 0 test"
$failed=1;
return(-1);
}
$tmp = led 1;
if($tmp){
echo "Failure detected in led 1 test"
$failed=1;
return(-1);
}
if (parity) {
echo "Failure detected in parity test"
$failed=1;
return(-1);
}
$tmp = scsi;
if($tmp) {
echo "Failure detected in scsi test"
$failed=1;
return(-1);
}
if ($skip_timer != 1) {
if(timer){
echo "Failure detected in timer test"
$failed=1;
return(-1);
}
}
if ($skip_eisa != 1) {
if(eisa){
echo "Failure detected in eisa test"
$failed=1;
return(-1);
}
}
else {
echo "Skipping EIU/EISA interface test"
}
echo "IP22 Memory, interrupt, duart, scsi tests Passed...."
}
#########################################################################
# ALL IP22 (PM/CPU/MEM/AUDIO/SCSI) TESTS and SCRIPTS #
#########################################################################
ip22 {
echo "ALL Tests in IP22...."
$skip_eisa = 0;
$failed = 0;
pm1;
if($failed) {
if ($oven) {
if ($volts == 0) {
boot -f bootp()pm1_vlo.failed;
} else if ($volts == 2) {
boot -f bootp()pm1_vhi.failed;
}
}
return(-1);
} else if ($oven) {
boot -f bootp()pm1.pass;
}
cpusc;
if($failed) {
return(-1);
} else if ($oven) {
boot -f bootp()cpu.done;
}
ip;
if($failed) {
return(-1);
} else if ($oven) {
boot -f bootp()ip.done;
}
echo "ALL Tests in IP22 Passed...."
}
#########################################################################
# ALL IP22 (PM/CPU/MEM/AUDIO/SCSI) WITH VOLTAGE CHANGES #
#########################################################################
ip22va {
cv_low;
ip22;
if ($failed) {
return(-1);
}
cv_high;
ip22;
if ($failed) {
return(-1);
}
}
#########################################################################
# GR2 TESTS and SCRIPTS #
#########################################################################
# Initialize variables used by GR2.
$stride_failed=0 ;
$zb_failed=0 ;
$gr2_failed=0;
$chkbt457_failed=0;
$bp_failed=0;
$shramre3_failed=0;
$cpushram_failed=0;
$cpure3_failed=0;
$ctxsw_failed=0;
$vdma_failed=0;
$quad_failed=0;
$fourquad_failed=0;
$mon=0;
$test_xmap_failed = 0;
$test_xmap_clut_failed = 0;
gr2_vhwinit {
gr2_videoclk 0x47
if ($mon ==1 ) gr2_initclock 0x132;
else gr2_initclock 0x107;
fi
gr2_wrconfig 0x0
gr2_delay 3
gr2_wrconfig 0x1
gr2_vinitdac
}
gr2_initre {
$a = gr2_getGR2ver;
if ($a < 4) gr2_wrfifo 0 0;
else if ($a == 4) gr2_wrfifo 0 1;
else gr2_wrfifo 0 2;
}
gr2_initsys {
gr2_reset
gr2_vhwinit
$mon = gr2_getMonType;
if ($mon == 1) gr2_initvc1 4;
else gr2_initvc1 20;
fi
gr2_xcol
gr2_inithq
gr2_load_ucode ge
gr2_load_ucode hq
gr2_unstall
gr2_initre
}
clear {
gr2_wrfifo 35 0
gr2_wrfifo 6 0
}
gr2_quad {
gr2_wrfifo 33 0
}
gr2_fourquad {
gr2_wrfifo 34 0
}
test_xmap {
gr2_initsys;
$a=gr2_txmap;
return $a;
}
test_xmap_clut {
gr2_initsys;
$a=gr2_txmap_clut;
return $a;
}
gr2_vdma {
gr2_initsys;
$b=gr2_cachefdma 32 1;
$b=$b+gr2_cachefdma 256 1;
$b=$b+gr2_cachefdma 512 1;
$b=$b+gr2_cachefdma 128 1;
$b=$b+gr2_yzoomdma ;
$b=$b+gr2_yzoomdma 32 32;
$b=$b+gr2_yzoomdma 128 128;
$b=$b+gr2_yzoomdma 256 256;
$b=$b+gr2_stridedma;
$b=$b+gr2_stridedma 32 32;
$b=$b+gr2_stridedma 256 1;
$b=$b+gr2_stridedma 512 0;
return $b;
}
gr2 {
# Too verbose with report=4
report=3;
$stride_failed=0 ;
$zb_failed=0 ;
$gr2_failed=0;
$chkbt457_failed=0;
$bp_failed=0;
$shramre3_failed=0;
$cpushram_failed=0;
$cpure3_failed=0;
$ctxsw_failed=0;
$vdma_failed=0;
$quad_failed=0;
$fourquad_failed=0;
$test_xmap_failed = 0;
$test_xmap_clut_failed = 0;
gr2_reset;
buffon
# HQ2 internal register 19 must read 0xdeadbeef
report = 2;
gr2_rdhqint 19;
report = 1;
# Test VC1 SRAM
gr2_vhwinit
report =3
if (gr2_vc1_sram) {
echo "VC1 SRAM test failed";
resetcons;
buffoff;
wait;
$err = 1;
}
# Test ram 0 at Ge7 at 0
$tmp = gr2_tram 0;
if ($tmp) {
echo "GE7 at 0 RAM0 test failed"
resetcons;
buffoff;
$err = 1;
wait;
}
# Test ram 0 at Ge7 at 1
$tmp = gr2_tram 1;
if ($tmp) {
echo "GE7 at 1 RAM0 test failed"
resetcons;
buffoff;
$err = 1;
wait;
}
# Test ram 0 at Ge7 at 2
$tmp = gr2_tram 2;
if ($tmp) {
echo "GE7 at 2 RAM0 test failed"
resetcons;
buffoff;
$err = 1;
wait;
}
# Test ram 0 at Ge7 at 3
$tmp = gr2_tram 3 ;
if ($tmp) {
echo "GE7 at 3 RAM0 test failed"
resetcons;
buffoff;
wait;
$err = 1;
}
# Test ram 0 at Ge7 at 4
$tmp = gr2_tram 4 ;
if ($tmp) {
echo "GE7 at 4 RAM0 test failed"
resetcons;
buffoff;
wait;
$err = 1;
}
# Test ram 0 at Ge7 at 5
$tmp = gr2_tram 5 ;
if ($tmp) {
echo "GE7 at 5 RAM0 test failed"
resetcons;
buffoff;
wait;
$err = 1;
}
# Test ram 0 at Ge7 at 6
$tmp = gr2_tram 6 ;
if ($tmp) {
echo "GE7 at 6 RAM0 test failed"
resetcons;
buffoff;
wait;
$err = 1;
}
# Test ram 0 at Ge7 at 7
$tmp = gr2_tram 7 ;
if ($tmp) {
echo "GE7 at 7 RAM0 test failed"
resetcons;
buffoff;
wait;
$err = 1;
}
# Test shram
$tmp = gr2_tram 8 ;
if ($tmp) {
echo "Share ram test failed ";
resetcons;
buffoff;
wait;
$err = 1;
}
# Test Hq2uram
$tmp = gr2_tram 9 ;
if ($tmp) {
echo "HQ2 uram test failed ";
resetcons;
buffoff;
wait;
$err = 1;
}
# Test ge7uram
$tmp = gr2_tram 10;
if ($tmp) {
echo "GE7 uram test failed ";
resetcons;
buffoff;
wait;
$err = 1;
}
gr2_initsys;
clear;
# Test HQ2
if(gr2_hq2test) {
echo "HQ2 test failed ";
resetcons;
buffoff;
wait;
$err = 1;
}
# Test shareram using Ucode
if (gr2_shram) {
echo "Shram test failed"
resetcons;
buffoff;
wait;
$err = 1;
}
# Test internal GE7 ram
if (gr2_ram12) {
echo "GE7 internal test failed"
resetcons;
buffoff;
wait;
$err = 1;
}
# Test seedrom
if (gr2_seedrom) {
echo "GE7 seedrom test failed"
resetcons;
buffoff;
wait;
$err = 1;
}
# Test the squaroot rom
if (gr2_sqrom) {
echo "GE7 sqrom test failed"
resetcons;
buffoff;
wait;
$err = 1;
}
gr2_initsys ;
# Test Ge 7 bus
if (gr2_gebus) {
echo "GE7 bus test failed"
resetcons;
buffoff;
wait;
$err = 1;
}
# Test ge floating point unit
if (gr2_gefloat) {
echo "GE7 floating point test failed"
resetcons;
buffoff;
wait;
$err = 1;
}
gr2_initsys;
clear;
if ( $err ) {
echo "HQ & GE Tests failed\n";
resetcons;
buffoff;
wait;
$err=0
$gr2_failed=1
}
else {
resetcons;
buffoff;
echo "HQ & GE Tests passed\n"
}
buffon
# Test bt457
if (gr2_chkbt457) {
resetcons;
buffoff;
wait;
$chkbt457_failed = 1;
$err=1;
}
# Test bitplane VM2
gr2_initsys
if (gr2_bp) {
$bp_failed = 1;
$err=1;
resetcons;
buffoff;
wait;
}
# Test Shared ram and Re
gr2_initsys
$tmp = gr2_shramre3
if ($tmp) {
resetcons;
buffoff;
wait;
$shramre3_failed =1;
$err=1;
}
# Test DMA between host and GE7 shared ram
gr2_initsys
clear
$tmp = gr2_cpushram
if ($tmp) {
resetcons;
buffoff;
wait;
$cpushram_failed =1;
$err=1;
}
# Test DMA between host and and RE3
resetcons
buffon
gr2_initsys
$tmp = gr2_cpure3
if ($tmp) {
resetcons;
buffoff;
wait;
$cpure3_failed =1;
$err=1;
}
# Test GE7 context switching
if(gr2_ctxsw) {
resetcons;
buffoff;
wait;
$ctxsw_failed =1;
$err=1;
}
clear;
# Test quad drawing
$tmp = gr2_quad
if ($tmp) {
resetcons;
buffoff;
wait;
$quad_failed =1;
$err=1;
}
$tmp = gr2_fourquad
if ($tmp){
resetcons;
buffoff;
wait;
$fourquad_failed = 1;
$err=1;
}
clear;
if ($chkbt457_failed) echo "Bt457 test failed";
if ($bp_failed) echo "bitplane test failed";
if ($shramre3_failed) echo "shramre3 test failed"
if ($cpushram_failed) echo "CPU shram test failed";
if ($cpure3_failed) echo "cpure3 test failed ";
if ($ctxsw_failed) echo "context switching test failed ";
if ($vdma_failed) echo "vdma controller test failed ";
if ($quad_failed) echo "quad test failed";
if ($fourquad_failed) echo "fourquad test failed";
if ($err)
{
if (!$report) {
emfail 2;
wait;
exit;
}
echo "****** PRESS RETURN TO CONTINUE OR ^C TO EXIT ************"
$err=0
$gr2_failed=1
resetcons;
buffoff;
wait;
}
else {
resetcons;
buffoff;
echo "BT457, Bit-Plane, DMA and QUADs Tests Passed.\n"
}
buffon
# Test stridedma between shram and re3
gr2_initsys
$tmp = gr2_stride
if ($tmp) {
$stride_failed =1 ;
$err=1;
resetcons;
buffoff;
wait;
}
# Test Zbuffer
gr2_initsys
$tmp=gr2_zb
if($tmp) {
$zb_failed =1;
$err=1;
resetcons;
buffoff;
wait;
}
resetcons
buffoff
echo "************************* RESULTS ********************************"
if ($stride_failed) {
echo "stride test failed";
$gr2_failed = 1;
wait;
}
if ($zb_failed) {
echo "Zbuffer test failed";
$gr2_failed = 1;
wait;
}
if (!$gr2_failed) echo "Stride DMA, and Z-Buffer Test Passed.\n"
# Test Xmap
buffon
echo "testing XMAP"
if (test_xmap) {
$test_xmap_failed =1;
$err=1;
resetcons;
buffoff;
wait;
}
#Test Xmap CLUT
if (test_xmap_clut) {
$test_xmap_clut_failed =1;
$err=1;
resetcons;
buffoff;
wait;
}
resetcons
buffoff
echo "************************* RESULTS ********************************"
if ($test_xmap_failed) {
echo "test_xmap test failed";
$gr2_failed = 1;
}
if ($test_xmap_clut_failed) {
echo "test_xmap_clut test failed";
$gr2_failed = 1;
}
if (!$err) echo "XMAPs Test Passed.\n"
if ($gr2_failed) {
echo "ERROR: Failure detected on graphics board."
wait;
}
else echo "graphics board tests passed"
fi
echo " *****************END OF THE TEST *****************"
# Restore verbosity
report=4
}
gr2_all {
$tmp = gr2_setboard 0;
if ($tmp) {
echo "Testing gr3/gu1 in slot 0."
gr2;
if ($gr2_failed) {
echo "ERROR: Failure detected on gr3/gu1 in slot 0."
}
}
$tmp = gr2_setboard 1;
if ($tmp) {
echo "Testing gr3/gu1 in slot 1."
gr2;
if ($gr2_failed) {
echo "ERROR: Failure detected on gr3/gu1 in slot 1."
}
}
}
#########################################################################
# NG1 GRAPHICS TESTS and SCRIPTS #
#########################################################################
# Initialize variables used by ng1.
$err=0
$ng1failed=0
$ng1_rex3_failed=0
$ng1_bt445_failed=0
$ng1_cmap_failed=0
$ng1_xmap9_failed=0
$ng1_vc2_failed=0
$ng1_vram_failed=0
$ng1_cid_failed=0
$ng1_dma_failed=0
$ng1_dma_result=-1
# Start of NG1 diagnostics
ng1_script {
$ng1failed=0;
$err=0;
buffon
# Test Rex3
if(ng1_rexregs) {
if (!$report) {
emfail 2;
wait;
exit;
}
$ng1_rex3_failed = 1;
$err=1;
}
# Test bt445
if(ng1_bt445test) {
if (!$report) {
emfail 2;
wait;
exit;
}
$ng1_bt445_failed =1;
$err=1;
}
# Test cmap
if(ng1_cmaptest) {
if (!$report) {
emfail 2;
wait;
exit;
}
$ng1_cmap_failed = 1;
$err=1;
}
# Test Xmap9
if(ng1_xmap9test) {
if (!$report) {
emfail 2;
wait;
exit;
}
$ng1_xmap9_failed = 1;
$err=1;
}
# Test VC2
if(ng1_vc2test) {
if (!$report) {
emfail 2;
wait;
exit;
}
$ng1_vc2_failed = 1;
$err=1;
}
# Test VRAM
if(ng1_vram) {
if (!$report) {
emfail 2;
wait;
exit;
}
$ng1_vram_failed = 1;
$err=1;
}
# Test CID
if(ng1_cid) {
if (!$report) {
emfail 2;
wait;
exit;
}
$ng1_cid_failed = 1;
$err=1;
}
# Change Bus width to 64 & run DMA tests
ng1_setvisual 0;
ng1_color 0;
ng1_block 0 0 105 105;
ng1_buswidth 64;
ng1_rwpacked 1;
ng1_rwdouble 1;
$ng1_dma_result=ng1_dmatest 0 0 100 100;
if($ng1_dma_result == -1) {
if (!$report) {
emfail 2;
wait;
exit;
}
$ng1_dma_failed = 1;
$err=1;
}
ng1_buswidth 32;
resetcons
buffoff
echo "************************* RESULTS ******************************"
if($ng1_rex3_failed) {
echo "Rex3 Register r/w tests failed.";
$ng1failed = 1;
}
if($ng1_cmap_failed) {
echo "Cmap r/w tests failed.";
$ng1failed = 1;
}
if($ng1_xmap9_failed) {
echo "Xmap9 r/w tests failed.";
$ng1failed = 1;
}
if($ng1_vc2_failed) {
echo "VC2 r/w tests failed.";
$ng1failed = 1;
}
if($ng1_vram_failed) {
echo "VRAM test failed.";
$ng1failed = 1;
}
if($ng1_cid_failed) {
echo "CID test failed.";
$ng1failed = 1;
}
if($ng1_dma_failed) {
echo "DMA tests failed.";
$ng1failed = 1;
}
if (!$err) echo "REX3, CMAP, XMAP9, VC2, VRAM, CID & DMA Test Passed.\n"
if ($ng1failed) echo "ERROR: Failure detected on NG1 graphics board."
else echo "NG1 graphics board tests passed"
fi
echo " *****************END OF THE TEST *****************"
}
ng1 {
# test board 0 only (mostly for Indy)
ng1_probe;
$tmp = ng1_setboard 0;
if ($tmp)
ng1_script;
}
ng1_all {
$tmp = ng1_setboard 0;
if ($tmp) {
echo "Testing NG1/LG3 in slot 0."
ng1_script;
if ($ng1failed) {
echo "ERROR: Failure detected on gfx in slot 0."
}
}
$tmp = ng1_setboard 1;
if ($tmp) {
echo "Testing NG1/LG3 in slot 1."
ng1_script;
if ($ng1failed) {
echo "ERROR: Failure detected on gfx in slot 1."
}
}
}
ng1va {
cv_high;
ng1_all;
cv_nom;
}
gfx {
$express = gr2_probe;
$newport = ng1_probe;
if ($newport) {
ng1_all;
}
if ($express) {
gr2_all;
}
if ($gounix) {
if ($failed == 0) {
unix;
}
}
}
gfxva {
$gounix = 0;
cv_low;
gfx;
$gounix = 1;
cv_high;
gfx;
}
gfx_quick {
$gounix = 0;
echo "----- Executing the QUICK verision of the GFX Tests -----"
$quick = 1;
gfx;
$quick = 0;
echo "----- QUICK verision of the GFX Tests is DONE -----"
}
gfxva_quick {
$gounix = 0;
echo "----- Executing the QUICK verision of the GFX Tests with Chg Vol.-----"
$quick = 1;
gfxva;
$quick = 0;
echo "----- QUICK verision of the GFX Tests with Change Voltage is DONE -----"
}
#########################################################################
# IP22 + GFX ASRS OVEN SCRIPT #
#########################################################################
ip22_gfx_asrs {
report=2;
echo "=========================================="
echo "WELCOME TO IP22 + GFX ASRS TEST SUITE"
echo "=========================================="
cv_low;
boot -f bootp()voltage_low.pass
$skip_timer =0;
$skip_eisa = 1;
$oven = 1;
$volts = 0;
$gounix = 0;
ip22;
boot -f bootp()ip22_low.done
gfx;
boot -f bootp()gfx_low.done
cv_high;
boot -f bootp()voltage_hi.pass
$skip_timer =1;
$volts = 2;
$skip_eisa = 1;
ip22;
boot -f bootp()ip22_hi.done
gfx;
boot -f bootp()gfx_hi.done
cv_nom;
boot -f bootp()start_unix;
unix;
}
#########################################################################
# IP22 + GFX FUNCTION TEST & REPAIR SCRIPT #
#########################################################################
i2frmenu {
echo "==================================================="
echo "WELCOME TO IP22 + GFX FUNCTION TEST & REPAIR SUITE"
echo "==================================================="
echo "Command Description"
echo "======= ==========="
echo "ip22 IP22 tests (PM, CPU, MEM)"
echo "ip22va IP22 tests with automatic voltage change"
echo ""
echo "gfx Express GFX tests"
echo "gfxva Express GFX tests with automatic voltage change"
echo ""
echo "audio Audio tests"
echo ""
echo "i2frmenu To display the above menu"
echo ""
}
ip22_gfx_func_repair {
report=4;
i2frmenu;
}
$suite = gr2_test_suite;
if ($suite == 1) {
ip22_gfx_asrs;
} else {
ip22_gfx_func_repair;
}
echo ""