2908 lines
57 KiB
Plaintext
2908 lines
57 KiB
Plaintext
#s This is an ide startup file.
|
|
report=4 # set verbose, but not debug
|
|
bootpoff;
|
|
printenv eaddr
|
|
printenv netaddr
|
|
hinv -v
|
|
#
|
|
menu {
|
|
/* Display the version of the diagnostic */
|
|
echo "///////////////////////////////////////////////////////////////////////////"
|
|
version;
|
|
echo ""
|
|
echo " FUNCTIONAL TEST OPTIONS "
|
|
echo " -----------------------"
|
|
echo "Command Description"
|
|
echo ""
|
|
echo "racerva RACER diagnostics with automatic voltage change"
|
|
echo "ip30va IP30 diagnostics with automatic voltage change"
|
|
echo "pmva PM10/PM20 diagnostics with automatic voltage change"
|
|
echo "fpva Front Plane diagnostics with automatic voltage change"
|
|
echo ""
|
|
echo "gfxva Impact diagnostics with automatic voltage change"
|
|
echo ""
|
|
echo ""
|
|
echo " TECHNICIAN BENCH OPTIONS"
|
|
echo " ------------------------"
|
|
echo "racer RACER diagnostics with no voltage change"
|
|
echo "ip30 IP30 diagnostics with no voltage change"
|
|
echo "pm PM10/PM20 diagnostics with no voltage change"
|
|
echo "fp Front Plane diagnostics with no voltage change"
|
|
echo "gfx Impact diagnostics with no voltage change"
|
|
echo "mg_test_tram to run TMEZZ tests ONLY"
|
|
echo ""
|
|
echo "///////////////////////////////////////////////////////////////////////////"
|
|
}
|
|
# find out of we are MP
|
|
$mp = ismp
|
|
$slave = slavecpu
|
|
$failed=0;
|
|
$oven = 0;
|
|
$go_unix = 1;
|
|
$nic_check_on = 1;
|
|
$stmp = "";
|
|
heart {
|
|
echo "\nStarting HEART Tests"
|
|
$failed = 1;
|
|
if (hr_regs) return(1);
|
|
if (hr_misc) return(1);
|
|
if (hr_intr) return(1);
|
|
if (hr_piowcr) return(1);
|
|
if (hr_piuacc) return(1);
|
|
$failed = 0;
|
|
echo "HEART Tests Passed"
|
|
}
|
|
#
|
|
xbow {
|
|
echo "\nStarting XBOW Tests"
|
|
$failed = 1;
|
|
if (x_regs) return(1);
|
|
if (x_acc) return(1);
|
|
$failed = 0;
|
|
echo "XBOW Tests Passed"
|
|
}
|
|
#
|
|
bridge {
|
|
echo "\nStarting BRIDGE Tests"
|
|
$failed = 1;
|
|
if (br_regs) return(1);
|
|
if (br_intr) return(1);
|
|
if (br_err) return(1);
|
|
if (br_ram) return(1);
|
|
$failed = 0;
|
|
echo "BRIDGE Tests Passed"
|
|
}
|
|
#
|
|
duart {
|
|
echo "\nStarting DUART Tests"
|
|
$failed = 1;
|
|
if (duart_regs) return(1);
|
|
# WE DO NOT WANT TO RUN THE LOOP BACK TESTS IN ASRS
|
|
if ($oven == 0) {
|
|
$tmp = pci_sio -p 1 -t abc -b 50;
|
|
if ($tmp) return(1);
|
|
$tmp = pci_sio -p 1 -t abc -b 2000;
|
|
if ($tmp) return(1);
|
|
$tmp = pci_sio -p 1 -t abc -b 384000;
|
|
if ($tmp) return(1);
|
|
}
|
|
$failed = 0;
|
|
echo "DUART Tests Passed"
|
|
}
|
|
#
|
|
plp {
|
|
# RUN THE TEST ONLY AT FUNCTION TEST AREA
|
|
if ($dl == 0) {
|
|
echo "\nStarting Parallel Port Tests"
|
|
$failed = 1;
|
|
if (pci_par) return(1);
|
|
if (pci_par_lp) return(1);
|
|
$failed = 0;
|
|
echo "Parallel Loop Tests Passed"
|
|
}
|
|
}
|
|
#
|
|
ioc3 {
|
|
echo "\nStarting IOC3 Tests"
|
|
$failed = 1;
|
|
if (ioc3_regs) return(1);
|
|
if (ioc3_sram) return(1);
|
|
if (enet) return(1);
|
|
$failed = 0;
|
|
echo "IOC3 Tests Passed"
|
|
}
|
|
#
|
|
rad {
|
|
echo "\nStarting RAD Tests"
|
|
$failed = 1;
|
|
if (rad_regs) return(1);
|
|
if (rad_dma) return(1);
|
|
if (rad_ram) return(1);
|
|
$failed = 0;
|
|
echo "RAD Tests Passed"
|
|
}
|
|
#
|
|
rtc {
|
|
echo "\nStarting RTC Tests"
|
|
$failed = 1;
|
|
if (rtc_regs) return(1);
|
|
if (pci_rtc) return(1);
|
|
$failed = 0;
|
|
echo "RTC Tests Passed"
|
|
}
|
|
#
|
|
scsi {
|
|
echo "\nStarting SCSI Tests"
|
|
$failed = 1;
|
|
if (scsi_test) return(1);
|
|
$failed = 0;
|
|
echo "SCSI Tests Passed"
|
|
}
|
|
#
|
|
unix {
|
|
echo "<<<< About to to boot UNIX......>>>>"
|
|
if ($oven) { boot -f bootp()start_unix; }
|
|
unsetenv diagmode
|
|
reset;
|
|
}
|
|
#
|
|
pm {
|
|
echo "\nStarting PM Tests"
|
|
report = 4;
|
|
$failed = 1;
|
|
if ($nic_check_on) {
|
|
if (nic_check_basic) return(1);
|
|
}
|
|
#
|
|
if (tlb) return(1);
|
|
if ($mp) {
|
|
$tmp = exec -v $slave -f tlb
|
|
if ($tmp) return(1);
|
|
|
|
}
|
|
#
|
|
if (utlb) return(1);
|
|
if ($mp) {
|
|
$tmp = exec -v $slave -f utlb
|
|
if ($tmp) return(1);
|
|
}
|
|
#
|
|
if (dcache1) return(1);
|
|
#
|
|
if (icache1) return(1);
|
|
#
|
|
echo "The Icache Test Could Take About 5 minutes... Please wait"
|
|
if (icache2) return(1);
|
|
if ($mp) {
|
|
$tmp = exec -v $slave -f icache2;
|
|
if($tmp) return(1);
|
|
}
|
|
#
|
|
if (scache1) return(1);
|
|
if ($mp) {
|
|
$tmp = exec -v $slave -f scache1;
|
|
if($tmp) return(1);
|
|
}
|
|
#
|
|
if (scache2) return(1);
|
|
if ($mp) {
|
|
$tmp = exec -v $slave -f scache2;
|
|
if($tmp) return(1);
|
|
}
|
|
#
|
|
if(fpu) return(1);
|
|
if ($mp) {
|
|
$tmp = exec -v $slave -f "fpu";
|
|
if($tmp) return(1);
|
|
}
|
|
#
|
|
if(lpackd) return(1);
|
|
#
|
|
# XXX ct not working for mp yet
|
|
# if (!$mp)
|
|
# {
|
|
# if (ct) {
|
|
# echo "\nFailure Detected in ct test";
|
|
# if ($oven) { boot -f bootp()pm.ct.fail; }
|
|
# return($failed);
|
|
# }
|
|
# }
|
|
# if ($oven) { boot -f bootp()pm.ct.pass; }
|
|
echo "PM Tests Passed\n"
|
|
$failed = 0;
|
|
#
|
|
if ($go_unix) {
|
|
unix;
|
|
}
|
|
}
|
|
#
|
|
pmva {
|
|
$failed=0
|
|
$go_unix = 0;
|
|
#
|
|
echo "\nVoltage changed to 5.25V"
|
|
chg_volt -m 3 -l 2;
|
|
ide_delay -s 15;
|
|
pm;
|
|
if ($failed) {
|
|
echo "\nFailure Detected IN PM at 5.25V"
|
|
$go_unix = 1;
|
|
return(1);
|
|
}
|
|
#
|
|
echo "\nVoltage changed to 5.0V"
|
|
chg_volt -m 3 -l 1;
|
|
ide_delay -s 15;
|
|
pm;
|
|
#
|
|
$go_unix = 1;
|
|
if ($failed) {
|
|
echo "\nFailure Detected IN PM at 5.0V"
|
|
return(1);
|
|
} else {
|
|
echo "PM Tests Passed\n";
|
|
if ($oven == 0) {
|
|
unix
|
|
}
|
|
}
|
|
}
|
|
#
|
|
# Speed Racer front plane
|
|
# Tests to be added here: LED, BR_ID/PS_ID/SYS_ID check
|
|
#
|
|
fp {
|
|
echo "\nStarting FRONT PLANE Tests"
|
|
report = 4;
|
|
$failed=0;
|
|
if(xbow){
|
|
echo "\nFailure Detected IN FRONT PLANE"
|
|
$failed=1;
|
|
return(1);
|
|
}
|
|
echo "FRONT PLANE Tests Passed\n"
|
|
if ($go_unix) {
|
|
unix;
|
|
}
|
|
}
|
|
#
|
|
#wrappers for low memory tests
|
|
ldram {
|
|
$tmp = ldram_bkend -- -p --;
|
|
if ($tmp) $failed = 1;
|
|
return (1);
|
|
}
|
|
lkh {
|
|
$tmp = lkh_bkend -- -p --;
|
|
if ($tmp) $failed = 1;
|
|
return (1);
|
|
}
|
|
#
|
|
memory {
|
|
echo "\nStarting MEMORY Tests"
|
|
#
|
|
# it takes about 3 minutes
|
|
echo "PLEASE WAIT ... THE FOLLOWING TEST TAKES ABOUT 6 MINUTES"
|
|
#
|
|
$tmp = ldram;
|
|
if($failed){
|
|
echo "\nFailure Detected in ldram test"
|
|
return(1);
|
|
}
|
|
# illegal i3 e1 e2
|
|
# Run new SIMM tests
|
|
$tmp = memtest 11;
|
|
if($tmp) {
|
|
echo "\nFailure Detected in memtest tests"
|
|
$failed = 1;
|
|
return(1);
|
|
}
|
|
#
|
|
if (ecctest) {
|
|
echo "\nFailure Detected in ecc tests"
|
|
$failed=1;
|
|
return(1);
|
|
}
|
|
echo "MEMORY Tests Passed\n"
|
|
}
|
|
#
|
|
ip30 {
|
|
echo "\nStarting IP30 Tests"
|
|
report = 4;
|
|
$failed = 1;
|
|
if ($nic_check_on) {
|
|
if (nic_check_basic) return(1);
|
|
}
|
|
$tmp = heart;
|
|
if($failed) {
|
|
echo "\nFailure Detected in HEART test"
|
|
return(1);
|
|
}
|
|
$tmp = bridge;
|
|
if($failed) {
|
|
echo "\nFailure Detected in BRIDGE test"
|
|
return(1);
|
|
}
|
|
$tmp = xbow
|
|
if ($failed) {
|
|
echo "\nFailure Detected in XBOW test"
|
|
return(1);
|
|
}
|
|
$tmp = memory;
|
|
if ($failed) {
|
|
echo "\nFailure Detected in MEMORY test"
|
|
}
|
|
$tmp = rad;
|
|
if($failed) {
|
|
echo "\nFailure Detected in RAD tests"
|
|
return(1);
|
|
}
|
|
$tmp = ioc3;
|
|
if($failed) {
|
|
echo "\nFailure Detected in IOC3 tests"
|
|
return(1);
|
|
}
|
|
$tmp = rtc;
|
|
if($failed) {
|
|
echo "\nFailure Detected in RTC tests"
|
|
return(1);
|
|
}
|
|
$tmp = duart;
|
|
if($failed) {
|
|
echo "\nFailure Detected in DUART tests"
|
|
return(1);
|
|
}
|
|
$tmp = scsi;
|
|
if($failed) {
|
|
echo "\nFailure Detected in SCSI tests"
|
|
return(1);
|
|
}
|
|
$tmp = plp;
|
|
if($failed) {
|
|
echo "\nFailure Detected in Parallel Port Test"
|
|
return($failed);
|
|
}
|
|
echo "IP30 Tests Passed\n";
|
|
$failed=0;
|
|
if ($go_unix) {
|
|
unix;
|
|
}
|
|
}
|
|
#
|
|
ip30va {
|
|
$failed =0;
|
|
$go_unix = 0;
|
|
echo "\nVoltage changed to 4.75V"
|
|
chg_volt -m 3 -l 0;
|
|
ide_delay -s 15;
|
|
ip30;
|
|
chg_volt -m 3 -l 1;
|
|
ide_delay -s 15;
|
|
if ($failed) {
|
|
echo "\nFailure Detected IN IP30 in 4.75V";
|
|
$go_unix = 1;
|
|
return(1);
|
|
}
|
|
echo "\nVoltage changed to 5.25V"
|
|
chg_volt -m 3 -l 2;
|
|
ide_delay -s 15;
|
|
ip30;
|
|
chg_volt -m 3 -l 1;
|
|
ide_delay -s 15;
|
|
#
|
|
$go_unix = 1;
|
|
#
|
|
if ($failed) {
|
|
echo "\nFailure Detected IN IP30 in 5.25V";
|
|
return(1);
|
|
} else {
|
|
echo "ALL TESTS IN IP30 Passed";
|
|
unix;
|
|
}
|
|
}
|
|
#
|
|
pm_fp_ip30 {
|
|
$failed=1;
|
|
pm;
|
|
if($failed) {
|
|
echo "\nFailure Detected IN PM";
|
|
return(1);
|
|
}
|
|
fp;
|
|
if($failed) {
|
|
echo "\nFailure Detected IN FRONT PLANE";
|
|
return(1);
|
|
}
|
|
ip30;
|
|
if($failed) {
|
|
echo "\nFailure Detected IN IP30";
|
|
return(1);
|
|
}
|
|
$failed=0;
|
|
}
|
|
#
|
|
racer {
|
|
$failed = 0;
|
|
$go_unix = 0;
|
|
pm_fp_ip30;
|
|
$go_unix = 1;
|
|
if ($failed) {
|
|
echo "\nFailure Detected IN RACER";
|
|
return(1);
|
|
} else {
|
|
echo "ALL TESTS IN RACER Passed";
|
|
unix;
|
|
}
|
|
}
|
|
#
|
|
racerva {
|
|
$go_unix = 0;
|
|
$failed =0;
|
|
echo "\nVoltage changed to 4.75V"
|
|
chg_volt -m 3 -l 0;
|
|
ide_delay -s 15;
|
|
pm_fp_ip30;
|
|
chg_volt -m 3 -l 1;
|
|
ide_delay -s 15;
|
|
#
|
|
if ($failed) {
|
|
echo "\nFailure Detected IN RACER AT 4.75V";
|
|
$go_unix = 1;
|
|
return(1);
|
|
}
|
|
#
|
|
echo "\nVoltage changed to 5.25V"
|
|
chg_volt -m 3 -l 2;
|
|
ide_delay -s 15;
|
|
pm_fp_ip30
|
|
chg_volt -m 3 -l 1;
|
|
ide_delay -s 15;
|
|
#
|
|
$go_unix = 1;
|
|
|
|
if($failed) {
|
|
echo "\nFailure Detected IN RACER AT 5.25V"
|
|
return(1);
|
|
} else {
|
|
echo "ALL TESTS IN RACER Passed";
|
|
unix;
|
|
}
|
|
}
|
|
#
|
|
report = 2;
|
|
$failed = 0;
|
|
$quick = 0;
|
|
$solid = 0;
|
|
delay {
|
|
ide_delay -s 2;
|
|
}
|
|
#
|
|
mg_rtfifo_loop {
|
|
#
|
|
$failed = 1;
|
|
$status = mg_setboard ;
|
|
if ($status == 0) { $failed = 1; return (1); }
|
|
#
|
|
delay; mg_hqfifoinit;
|
|
#
|
|
report=2
|
|
echo " ============ Data Format tests done through PIO ============="
|
|
$status = mg_rtpio_loop -i 4 -o 0
|
|
if ($status == 1) return (1);
|
|
$status = mg_rtpio_loop -i 4 -o 1
|
|
if ($status == 1) return (1);
|
|
$status = mg_rtpio_loop -i 3 -o 2
|
|
if ($status == 1) return (1);
|
|
$status = mg_rtpio_loop -i 2 -o 0
|
|
if ($status == 1) return (1);
|
|
$status = mg_rtpio_loop -i 2 -o 1
|
|
if ($status == 1) return (1);
|
|
$status = mg_rtpio_loop -i 1 -o 0
|
|
if ($status == 1) return (1);
|
|
$status = mg_rtpio_loop -i 1 -o 1
|
|
if ($status == 1) return (1);
|
|
$status = mg_rtpio_loop -i 0 -o 0
|
|
if ($status == 1) return (1);
|
|
$status = mg_rtpio_loop -i 0 -o 1
|
|
if ($status == 1) return (1);
|
|
#
|
|
$status = mg_setboard ;
|
|
if ($status == 0) return (1);
|
|
delay; mg_hqfifoinit;
|
|
#
|
|
$status = mg_rtdma_loop -p 2 ;
|
|
if ($status == 1) return (1);
|
|
#
|
|
$failed = 0;
|
|
# return (0);
|
|
}
|
|
#
|
|
enabdisp {
|
|
mg_pokexmap -r XMAP_DIB_CTRL0 -d 0x100
|
|
}
|
|
#
|
|
#
|
|
allsetup {
|
|
$failed =0;
|
|
mg_gfxreset;
|
|
delay;
|
|
delay;
|
|
$status = mg_setboard ;
|
|
if ($status == 0) { $failed = 1; return (1); }
|
|
delay;
|
|
mg_hqfifoinit;
|
|
#
|
|
delay;
|
|
mg_set_0ge;
|
|
delay;
|
|
$status = mg_reset;
|
|
if ($status) {
|
|
$failed = 1;
|
|
return (1);
|
|
}
|
|
delay;
|
|
delay;
|
|
resetcons
|
|
if (!mg_gfxconsole) {
|
|
$status = mg_sync_repp
|
|
if ($status) {
|
|
$failed = 1;
|
|
return (1);
|
|
}
|
|
$status = mg_sync_pprdram
|
|
if ($status) {
|
|
$failed = 1;
|
|
return (1);
|
|
}
|
|
mg_xmapinit
|
|
$status = mg_rdram_ccsearch
|
|
if ($status) {
|
|
$failed = 1;
|
|
return (1);
|
|
}
|
|
mg_initppregs
|
|
enabdisp
|
|
mg0_clear_color
|
|
}
|
|
$solid = mg_issolid;
|
|
}
|
|
#
|
|
re4setup {
|
|
$failed =0;
|
|
echo "Calling mg_gfxreset"
|
|
mg_gfxreset;
|
|
delay;
|
|
echo "Calling gioslot"
|
|
$status = mg_setboard ;
|
|
if ($status == 0) { $failed = 1; return (1); }
|
|
delay;
|
|
mg_hqfifoinit;
|
|
#
|
|
delay;
|
|
echo "Calling mg_set_0ge"
|
|
mg_set_0ge;
|
|
delay;
|
|
echo "Calling mg_re4reset"
|
|
$status = mg_re4reset;
|
|
if ($status) {
|
|
$failed = 1;
|
|
return (1);
|
|
}
|
|
delay;
|
|
delay;
|
|
resetcons
|
|
$solid = mg_issolid;
|
|
}
|
|
#
|
|
ppsetup {
|
|
$failed =0;
|
|
if (!mg_gfxconsole) {
|
|
echo
|
|
echo "Syncing RE-0 to PP-0"
|
|
mg_sync_repp -r 0 -p 0
|
|
delay
|
|
echo "Syncing RE-0 to PP-1"
|
|
mg_sync_repp -r 0 -p 1
|
|
delay
|
|
$tmp = mg_setnumre4s -q
|
|
echo
|
|
echo "Syncing RE-0 to PP-0 to rdram-0"
|
|
mg_sync_pprdram_repair -r 0 -p 0 -d 0
|
|
delay
|
|
echo "Syncing RE-0 to PP-0 to rdram-1"
|
|
mg_sync_pprdram_repair -r 0 -p 0 -d 1
|
|
delay
|
|
echo "Syncing RE-0 to PP-0 to rdram-2"
|
|
mg_sync_pprdram_repair -r 0 -p 0 -d 2
|
|
delay
|
|
echo "Syncing RE-0 to PP-1 to rdram-0"
|
|
mg_sync_pprdram_repair -r 0 -p 1 -d 0
|
|
delay
|
|
echo "Syncing RE-0 to PP-1 to rdram-1"
|
|
mg_sync_pprdram_repair -r 0 -p 1 -d 1
|
|
delay
|
|
echo "Syncing RE-0 to PP-1 to rdram-2"
|
|
mg_sync_pprdram_repair -r 0 -p 1 -d 2
|
|
delay
|
|
$tmp = mg_setnumre4s -q
|
|
if ($tmp == 2) {
|
|
echo;
|
|
echo "Syncing RE-1 to PP-2"
|
|
mg_sync_repp -r 0 -p 0
|
|
delay
|
|
echo "Syncing RE-1 to PP-3"
|
|
mg_sync_repp -r 0 -p 1
|
|
delay
|
|
echo;
|
|
echo "Syncing RE-1 to PP-2 to rdram-0"
|
|
mg_sync_pprdram_repair -r 1 -p 0 -d 0
|
|
delay
|
|
echo "Syncing RE-1 to PP-2 to rdram-1"
|
|
mg_sync_pprdram_repair -r 1 -p 0 -d 1
|
|
delay
|
|
echo "Syncing RE-1 to PP-2 to rdram-2"
|
|
mg_sync_pprdram_repair -r 1 -p 0 -d 2
|
|
delay
|
|
echo "Syncing RE-1 to PP-3 to rdram-0"
|
|
mg_sync_pprdram_repair -r 1 -p 1 -d 0
|
|
delay
|
|
echo "Syncing RE-1 to PP-3 to rdram-1"
|
|
mg_sync_pprdram_repair -r 1 -p 1 -d 1
|
|
delay
|
|
echo "Syncing RE-1 to PP-3 to rdram-2"
|
|
mg_sync_pprdram_repair -r 1 -p 1 -d 2
|
|
delay
|
|
}
|
|
#
|
|
echo
|
|
echo "Calling mg_sync_pprdram to sync everybody together"
|
|
mg_sync_pprdram
|
|
echo "Calling mg_xmapinit"
|
|
mg_xmapinit
|
|
delay; delay
|
|
echo "Calling mg_rdram_ccsearch"
|
|
mg_rdram_ccsearch
|
|
delay
|
|
echo "Calling mg_initppregs"
|
|
mg_initppregs
|
|
delay
|
|
echo "Calling enabdisp"
|
|
enabdisp
|
|
delay
|
|
echo "Calling mg0_clear_color"
|
|
#XXX mg0_clear_color
|
|
}
|
|
$solid = mg_issolid;
|
|
}
|
|
#
|
|
bkendsetup {
|
|
$failed = 0;
|
|
echo "Calling mg_bkendreset to do some setup..."
|
|
mg_bkendreset;
|
|
echo "Calling mg_dacreset..."
|
|
mg_dacreset;
|
|
echo "Calling mg_vc3reset..."
|
|
$status = mg_vc3reset;
|
|
if ($status) {
|
|
$failed = 1;
|
|
echo; echo "VC3 reset returned an error. The VC3 may be bad"
|
|
echo;
|
|
return (1);
|
|
}
|
|
echo "Calling mg_vc3init -t 0x107 to load 1280x1024_60 table"
|
|
mg_vc3init -t 0x107;
|
|
echo "Calling mg_progcmap 0x0 to load the cmaps with a linear ramp"
|
|
mg_progcmap 0x0;
|
|
echo "Calling mg_gammaprog 0x0 to load the gamma tables with a linear ramp"
|
|
mg_gammaprog 0x0;
|
|
echo "Calling mg_vc3init -t 0x107 (2nd time)"
|
|
mg_vc3init -t 0x107;
|
|
enabdisp
|
|
mg0_clear_color
|
|
$solid = mg_issolid;
|
|
}
|
|
#
|
|
# allows colors to be correct for drawings
|
|
drawsetup {
|
|
delay;
|
|
# mg_gfxreset;
|
|
# mg_set_0ge;
|
|
# mg_reset;
|
|
delay;
|
|
delay;
|
|
mg_xmapinit;
|
|
}
|
|
#
|
|
scene1 {
|
|
mg0_clear_color
|
|
fpusetup
|
|
mg0_tri -x 0 1000 0 100 0 0 0 -d 1200 500 0 0 100 0 0 -n 0 0 0 0 0 100 0
|
|
fpusetup
|
|
mg0_tri -x 100 200 0 99 6 8 2 -d 150 100 0 50 96 9 1 -n 0 20 0 0 6 98 7
|
|
mg0_line -x 1000 1000 0 100 100 0 0 -n 0 0 0 100 100 0 0
|
|
mg0_line -x 0 1000 0 100 0 100 0 -n 1000 0 0 100 100 0 0
|
|
mg0_clear_color -t 500 500 -d 600 600
|
|
mg0_point -x 551 -y 551 -r 100 -g100 -b100 -a100
|
|
mg0_rect -t 900 100 -d 1000 200 -r100 -g 20 -b 100
|
|
}
|
|
#
|
|
scene1_overlay {
|
|
mg0_tri -x 500 900 0 100 0 0 0 -d 0 400 0 50 100 0 0 -n 90 0 0 0 0 100 0 -b 0x41
|
|
mg0_rect -t 1100 100 -d 1200 200 -r100 -g 20 -b 100 -f 0x41
|
|
mg0_line -x 100 500 0 100 0 0 0 -n 800 0 0 100 0 0 0 -f 0x41
|
|
mg0_point -x 600 -y 500 -r 100 -f 0x41
|
|
mg0_point -x 610 -y 500 -r 100 -f 0x41
|
|
mg0_point -x 590 -y 500 -r 100 -f 0x41
|
|
mg0_clear_color -f 0x41 -r 100 -t 800 700 -d 900 800
|
|
}
|
|
#
|
|
# Usage: dac_crc_rss0_pp0 <test name string>
|
|
# <rss0,pp0,red, 1rss> <rss0,pp0,green, 1rss> <rss0,pp0,blue, 1rss>
|
|
# <rss0,pp0,red, 2rss> <rss0,pp0,green, 2rss> <rss0,pp0,blue, 2rss>
|
|
# e.g.
|
|
# dac_crc_rss0_pp0 "alpha test" 0x213 0x2 0xa5 0xa 0xb 0x34 ...
|
|
#
|
|
dac_crc_rss0_pp0 {
|
|
echo "Checking RSS-0 PP0 crc..."
|
|
mg_dispctrl -o1 -p0 -r0
|
|
delay;
|
|
mg_dispctrl -o0 -p1 -r0
|
|
delay;
|
|
mg_dispctrl -o0 -p0 -r1
|
|
delay;
|
|
mg_dispctrl -o0 -p1 -r1
|
|
delay;
|
|
if ($8 == 2) {
|
|
if ($1 == "DEBUG")
|
|
report=5;
|
|
$status = mg_crc_test -r $5 -g $6 -b $7;
|
|
if ($1 == "DEBUG")
|
|
report=4;
|
|
}
|
|
else {
|
|
if ($1 == "DEBUG")
|
|
report=5;
|
|
$status = mg_crc_test -r $2 -g $3 -b $4;
|
|
if ($1 == "DEBUG")
|
|
report=4;
|
|
}
|
|
if ($status) {
|
|
$failed = 1;
|
|
echo;
|
|
echo " -- ERROR"
|
|
echo
|
|
echo; echo $1 "RSS-0 PP0 crc FAILED"; echo
|
|
return (1);
|
|
}
|
|
else {
|
|
echo; echo $1 "RSS-0 PP0 crc PASSED"; echo;
|
|
}
|
|
}
|
|
#
|
|
# Usage: dac_crc_rss0_pp1 "test string"
|
|
# <rss0,pp1,red, 1rss> <rss0,pp1,green, 1rss> <rss0,pp1,blue, 1rss>
|
|
# <rss0,pp1,red, 2rss> <rss0,pp1,green, 2rss> <rss0,pp1,blue, 2rss>
|
|
#
|
|
dac_crc_rss0_pp1 {
|
|
$numrss = mg_setnumre4s -q
|
|
echo "Checking RSS-0 PP1 crc..."
|
|
mg_dispctrl -o1 -p1 -r0
|
|
delay
|
|
mg_dispctrl -o0 -p0 -r0
|
|
delay;
|
|
mg_dispctrl -o0 -p0 -r1
|
|
delay;
|
|
mg_dispctrl -o0 -p1 -r1
|
|
delay;
|
|
if ($numrss == 2) {
|
|
if ($1 == "DEBUG")
|
|
report=5;
|
|
$status = mg_crc_test -r $5 -g $6 -b $7;
|
|
if ($1 == "DEBUG")
|
|
report=4;
|
|
}
|
|
else {
|
|
if ($1 == "DEBUG")
|
|
report=5;
|
|
$status = mg_crc_test -r $2 -g $3 -b $4;
|
|
if ($1 == "DEBUG")
|
|
report=4;
|
|
}
|
|
if ($status) {
|
|
$failed = 1;
|
|
echo;
|
|
echo " -- ERROR"
|
|
echo
|
|
echo; echo $1 "RSS-0 PP1 crc FAILED"; echo
|
|
return (1);
|
|
}
|
|
else {
|
|
echo; echo $1 "RSS-0 PP1 crc PASSED"; echo;
|
|
}
|
|
}
|
|
#
|
|
# Usage: dac_crc_rss1_pp0 "test name"
|
|
# <rss1,pp0,red, 2rss> <rss1,pp0,green, 2rss> <rss1,pp0,blue, 2rss>
|
|
#
|
|
dac_crc_rss1_pp0 {
|
|
echo "Checking RSS-1 PP0 crc..."
|
|
delay; delay;
|
|
mg_dispctrl -o1 -p0 -r0
|
|
delay
|
|
mg_dispctrl -o1 -p0 -r1
|
|
delay
|
|
mg_dispctrl -o0 -p1 -r1
|
|
delay
|
|
mg_dispctrl -o0 -p1 -r0
|
|
delay;
|
|
if ($1 == "DEBUG")
|
|
report=5;
|
|
$status = mg_crc_test -r $2 -g $3 -b $4;
|
|
if ($1 == "DEBUG")
|
|
report=4;
|
|
if ($status) {
|
|
$failed = 1;
|
|
echo;
|
|
echo " -- ERROR"
|
|
echo
|
|
echo; echo $1 "RSS-1 PP0 crc FAILED"; echo
|
|
return (1);
|
|
}
|
|
else {
|
|
echo; echo $1 "RSS-1 PP0 crc PASSED"; echo
|
|
}
|
|
}
|
|
#
|
|
# Usage: dac_crc_rss1_pp1 "test name"
|
|
# <rss1,pp1,red, 2rss> <rss1,pp1,green, 2rss> <rss1,pp1,blue, 2rss>
|
|
#
|
|
dac_crc_rss1_pp1 {
|
|
echo "Checking RSS-1 PP1 crc..."
|
|
mg_dispctrl -o1 -p1 -r0
|
|
delay;
|
|
mg_dispctrl -o1 -p1 -r1
|
|
delay
|
|
mg_dispctrl -o0 -p0 -r1
|
|
delay
|
|
mg_dispctrl -o0 -p0 -r0
|
|
delay
|
|
if ($1 == "DEBUG")
|
|
report=5;
|
|
$status = mg_crc_test -r $2 -g $3 -b $4;
|
|
if ($1 == "DEBUG")
|
|
report=4;
|
|
if ($status) {
|
|
$failed = 1;
|
|
echo;
|
|
echo " -- ERROR"
|
|
echo
|
|
echo; echo $1 "RSS-1 PP1 crc FAILED"; echo
|
|
return (1);
|
|
}
|
|
else {
|
|
echo; echo $1 "RSS-1 PP1 crc PASSED"; echo
|
|
}
|
|
}
|
|
#
|
|
restore_pps {
|
|
mg_dispctrl -o1 -p1 -r0
|
|
delay
|
|
mg_dispctrl -o1 -p0 -r0
|
|
delay;
|
|
mg_dispctrl -o1 -p0 -r1
|
|
delay;
|
|
mg_dispctrl -o1 -p1 -r1
|
|
delay;
|
|
}
|
|
#
|
|
scene_test {
|
|
$failed = 0;
|
|
$status = mg_reset;
|
|
if ($status) {
|
|
$failed = 1;
|
|
return (1);
|
|
}
|
|
delay;
|
|
drawsetup
|
|
mg_vc3clearcursor;
|
|
echo "------ Executing Scene Test with CRC ------"
|
|
echo "------ Testing the scene in the display buffer ------"
|
|
scene1
|
|
$numrss = mg_setnumre4s -q
|
|
$status = mg_dac_crc_rss_pp -r 0 -p 0 -a 0x125 -b 0x256 -c 0x3bf -x 0x3fc -y 0xfc -z 0x1f;
|
|
if ($status) {return (-1);}
|
|
$status = mg_dac_crc_rss_pp -r 0 -p 1 -a 0x3bd -b 0xe -c 0x141 -x 0x1c4 -y 0x6d -z 0x29f;
|
|
if ($status) {return (-1);}
|
|
if ($numrss == 2) {
|
|
$status = mg_dac_crc_rss_pp -r 1 -p 0 -a 0 -b 0 -c 0 -x 0x125 -y 0x256 -z 0x3bf;
|
|
if ($status) {return (-1);}
|
|
$status = mg_dac_crc_rss_pp -r 1 -p 1 -a 0 -b 0 -c 0 -x 0x3bd -y 0xe -z 0x141;
|
|
if ($status) {return (-1);}
|
|
}
|
|
ide_delay -s 6
|
|
echo "------ Testing the scene in the overlay buffer ------"
|
|
allsetup
|
|
if ($failed) { return (-1); }
|
|
scene1;
|
|
delay;
|
|
mg_overlay_on;
|
|
mg0_clear_color -f 0x41;
|
|
mg_enabdisp_overlay;
|
|
scene1_overlay;
|
|
$status = mg_dac_crc_rss_pp -r 0 -p 0 -a 0x3d7 -b 0x64 -c 0x21e -x 0x51 -y 0x3c6 -z 0x34f;
|
|
if ($status) {return (-1);}
|
|
$status = mg_dac_crc_rss_pp -r 0 -p 1 -a 0x29e -b 0x34f -c 0x34d -x 0x163 -y 0x2a4 -z 0x3fe;
|
|
if ($status) {return (-1);}
|
|
if ($numrss == 2) {
|
|
$status = mg_dac_crc_rss_pp -r 1 -p 0 -a 0 -b 0 -c 0 -x 0x2a1 -y 0x219 -z 0x3d;
|
|
if ($status) {return (-1);}
|
|
$status = mg_dac_crc_rss_pp -r 1 -p 1 -a 0 -b 0 -c 0 -x 0x29e -y 0x34f -z 0x34d;
|
|
if ($status) {return (-1);}
|
|
}
|
|
ide_delay -s 6
|
|
echo "Resetting graphics ";
|
|
mg_disabdisp_overlay;
|
|
mg_overlay_off;
|
|
allsetup;
|
|
if ($failed) { return (-1); }
|
|
echo "******** Scene Test with DAC CRC PASSED ********"
|
|
}
|
|
#
|
|
mg_tram_rev_nobuff {
|
|
$status = mg_dma_tram -r -e 1 -p
|
|
if ($status) {
|
|
$failed = 1;
|
|
return (1);
|
|
}
|
|
$foo = mg_setnumre4s -q
|
|
if ($foo == 2) {
|
|
$status = mg_dma_tram -r -e 1 -p -n 1
|
|
if ($status) {
|
|
$failed = 1;
|
|
return (1);
|
|
}
|
|
}
|
|
}
|
|
#
|
|
hq3test {
|
|
echo "------ Executing Hq3 Test Suite ------"
|
|
$failed = 0;
|
|
buffon;
|
|
$status = mg_setboard ;
|
|
if ($status == 0) { $failed = 1; return (1); }
|
|
delay;
|
|
mg_hqfifoinit;
|
|
#
|
|
delay;
|
|
mg_hqfifoinit
|
|
mg_set_0ge
|
|
# $status = mg_hq3_initcheck;
|
|
# if ($status) {
|
|
# $failed = 1;
|
|
# echo "mg_hq3_initcheck";
|
|
# return(1);
|
|
# }
|
|
#
|
|
#
|
|
$status = mg_hq3;
|
|
if ($status) {
|
|
$failed = 1;
|
|
return(1);
|
|
}
|
|
$status = mg_setboard ;
|
|
if ($status == 0) { $failed = 1; return (1); }
|
|
delay;
|
|
mg_hqfifoinit;
|
|
#
|
|
delay;
|
|
$status = mg_hq3_cp;
|
|
if ($status) {
|
|
$failed = 1;
|
|
return(1);
|
|
}
|
|
#
|
|
$status = mg_hq3_converter;
|
|
if ($status) {
|
|
$failed = 1;
|
|
return(1);
|
|
}
|
|
#
|
|
$status = mg_hq3_cfifo;
|
|
if ($status) {
|
|
$failed = 1;
|
|
return(1);
|
|
}
|
|
$status = mg_hq4reg;
|
|
if ($status) { $failed = 1; return(1); }
|
|
#
|
|
echo "******** Hq3 Test Suite Execution Completed ********"
|
|
resetcons; buffoff
|
|
}
|
|
#
|
|
#
|
|
# GE11 test scripts
|
|
#
|
|
#
|
|
|
|
#
|
|
gioslot_2GE {
|
|
$status = mg_setboard ;
|
|
if ($status == 0) { $failed = 1; return (1); }
|
|
delay;
|
|
mg_hqfifoinit;
|
|
}
|
|
ge_ucode_test {
|
|
mg_pon_puts -s "testing ge_ucode_test 1....\n\r"
|
|
$status = mg_ge_reg
|
|
if ($status) {
|
|
$failed = 1;
|
|
return(1);
|
|
}
|
|
mg_pon_puts -s "testing ge_ucode_test 2....\n\r"
|
|
$status = mg_ge_ucode_dbus
|
|
if ($status) {
|
|
$failed = 1;
|
|
return(1);
|
|
}
|
|
mg_pon_puts -s "testing ge_ucode_test 3....\n\r"
|
|
$status = mg_ge_ucode_abus
|
|
if ($status) {
|
|
$failed = 1;
|
|
return(1);
|
|
}
|
|
mg_pon_puts -s "testing ge_ucode_test 4....\n\r"
|
|
$status = mg_ge_ucode_a
|
|
if ($status) {
|
|
$failed = 1;
|
|
return(1);
|
|
}
|
|
mg_pon_puts -s "testing ge_ucode_test 5....\n\r"
|
|
$status = mg_ge_ucode_m
|
|
if ($status) {
|
|
$failed = 1;
|
|
return(1);
|
|
}
|
|
}
|
|
ge0_ucode {
|
|
$failed = 0;
|
|
gioslot_2GE;
|
|
if ($failed == 1) { return (1); }
|
|
#
|
|
$ge_no = mg_queryGE;
|
|
if ($ge_no == 0)
|
|
{
|
|
echo "GE11 doesn't exist";
|
|
}
|
|
buffon;
|
|
mg_set_ge 0;
|
|
ge_ucode_test;
|
|
if ($failed) { return (1); }
|
|
}
|
|
ge1_ucode {
|
|
$failed = 0;
|
|
gioslot_2GE;
|
|
if ($failed == 1) { return (1); }
|
|
$ge_no = mg_queryGE;
|
|
if ($ge_no == 2)
|
|
{
|
|
echo "testing GE1 Ucode memory....";
|
|
buffon;
|
|
mg_set_ge 1;
|
|
ge_ucode_test;
|
|
if ($failed) { return (1); }
|
|
}
|
|
else {
|
|
echo "GE11 doesn't exist";
|
|
}
|
|
}
|
|
#
|
|
#
|
|
getest {
|
|
#
|
|
mg_pon_puts -s "testing getest 1....\n\r"
|
|
echo " mg_ge_cram in progress "
|
|
$status = mg_ge_cram;
|
|
if ($status) {
|
|
$failed = 1;
|
|
return(1);
|
|
}
|
|
#
|
|
mg_pon_puts -s "testing getest 2....\n\r"
|
|
echo " mg_ge_eram in progress "
|
|
$status = mg_ge_eram;
|
|
if ($status) {
|
|
$failed = 1;
|
|
return(1);
|
|
}
|
|
#
|
|
mg_pon_puts -s "testing getest 3....\n\r"
|
|
echo " mg_ge_wram in progress "
|
|
$status = mg_ge_wram;
|
|
if ($status) {
|
|
$failed = 1;
|
|
return(1);
|
|
}
|
|
#
|
|
mg_pon_puts -s "testing getest 4....\n\r"
|
|
echo " give more delay "
|
|
#
|
|
delay ; delay ; delay ;
|
|
#
|
|
mg_pon_puts -s "testing getest 5....\n\r"
|
|
echo " mg_ge_alu in progress "
|
|
$status = mg_ge_alu;
|
|
if ($status) {
|
|
$failed = 1;
|
|
return(1);
|
|
}
|
|
#
|
|
mg_pon_puts -s "testing getest 6....\n\r"
|
|
echo " mg_ge_dreg in progress "
|
|
$status = mg_ge_dreg;
|
|
if ($status) {
|
|
$failed = 1;
|
|
return(1);
|
|
}
|
|
echo " mg_ge_inst in progress "
|
|
mg_pon_puts -s "testing getest 7....\n\r"
|
|
$status = mg_ge_inst;
|
|
if ($status) {
|
|
$failed = 1;
|
|
return(1);
|
|
}
|
|
#
|
|
mg_pon_puts -s "testing getest 8....\n\r"
|
|
echo " mg_ge_dma in progress "
|
|
$status = mg_ge_dma;
|
|
if ($status) {
|
|
$failed = 1;
|
|
return(1);
|
|
}
|
|
#
|
|
#
|
|
echo "******** GE Test Suite Execution Completed ********"
|
|
#
|
|
}
|
|
#
|
|
#
|
|
#
|
|
ge0_setup {
|
|
$failed = 0;
|
|
gioslot_2GE;
|
|
if ($failed == 1) { return (1); }
|
|
|
|
#
|
|
mg_pon_puts -s "testing ge0_setup 2....\n\r"
|
|
$ge_no = mg_queryGE;
|
|
if ($ge_no == 0)
|
|
{
|
|
echo "No GE11 exists";
|
|
}
|
|
mg_pon_puts -s "testing ge0_setup 3....\n\r"
|
|
#
|
|
echo "------ Executing GE0 test setup ------"
|
|
buffon;
|
|
$status = mg_hq3_dnload;
|
|
if ($status) {
|
|
$failed = 1;
|
|
return (1);
|
|
}
|
|
#
|
|
# mg_gfxreset;
|
|
delay;
|
|
mg_set_ge 0;
|
|
$status = mg_ge11_dnload;
|
|
if ($status) {
|
|
$failed = 1;
|
|
return (1);
|
|
}
|
|
#
|
|
mg_set_ge 0;
|
|
mg_ge_go;
|
|
|
|
mg_setboard; mg_hqfifoinit;
|
|
mg_pon_puts -s "testing ge0_setup 5....\n\r"
|
|
# buffoff; resetcons;
|
|
}
|
|
ge0_test {
|
|
$failed =0;
|
|
buffon;
|
|
ge0_ucode;
|
|
if ($failed) {
|
|
return (1);
|
|
}
|
|
ge0_setup; if ($failed) { return (1); }
|
|
delay;
|
|
resetcons; buffoff; buffon;
|
|
delay;
|
|
$status = getest;
|
|
if ($failed) {
|
|
return(1);
|
|
}
|
|
resetcons; buffoff;
|
|
}
|
|
#
|
|
tge_setup {
|
|
$failed = 0;
|
|
gioslot_2GE;
|
|
if ($failed == 1) { return (1); }
|
|
#
|
|
$ge_no = mg_queryGE;
|
|
if ($ge_no == 2)
|
|
{
|
|
echo "=== tge_setup ===";
|
|
gioslot_2GE;
|
|
buffon;
|
|
$status = mg_hq3_dnload;
|
|
if ($status) {
|
|
$failed = 1;
|
|
return (1);
|
|
}
|
|
#
|
|
# mg_gfxreset;
|
|
$status = mg_setboard ;
|
|
if ($status == 0) { $failed = 1; return (1); }
|
|
delay;
|
|
mg_hqfifoinit;
|
|
#
|
|
delay;
|
|
mg_set_ge 0;
|
|
|
|
$status = mg_ge11_dnload;
|
|
if ($status) {
|
|
$failed = 1;
|
|
return (1);
|
|
}
|
|
#
|
|
mg_ge_go;
|
|
mg_set_ge 1;
|
|
$status = mg_ge11_dnload;
|
|
if ($status) {
|
|
$failed = 1;
|
|
return (1);
|
|
}
|
|
#
|
|
mg_ge_go;
|
|
mg_set_ge 0;
|
|
resetcons; buffoff;
|
|
}
|
|
if($ge_no == 1)
|
|
{
|
|
echo "Setup GE11_0 only";
|
|
ge0_setup; if ($failed) { return (1); };
|
|
}
|
|
if($ge_no == 0)
|
|
{
|
|
echo "NO ge11 exists";
|
|
}
|
|
buffoff; resetcons;
|
|
}
|
|
ge1_setup {
|
|
buffon;
|
|
if($ge_no == 1)
|
|
{
|
|
echo "GE11_1 doesn't exist";
|
|
}
|
|
tge_setup;
|
|
gioslot_2GE;
|
|
if ($failed == 1) { return (1); }
|
|
mg_set_2ge;
|
|
mg_set_ge 0
|
|
mg_nextge;
|
|
mg_set_ge 1;
|
|
buffoff; resetcons;
|
|
}
|
|
#
|
|
ge1_test {
|
|
$failed = 0;
|
|
gioslot_2GE;
|
|
if ($failed == 1) { return (1); }
|
|
#
|
|
$ge_no = mg_queryGE;
|
|
buffon;
|
|
if($ge_no == 2)
|
|
{
|
|
echo "------ Executing GE Test Suite :: GE1 ------"
|
|
ge1_ucode;
|
|
if ($failed) {
|
|
return (1);
|
|
}
|
|
ge1_setup; if ($failed) { return (1); }
|
|
$status = getest;
|
|
if ($failed) {
|
|
$failed = 1;
|
|
return(1);
|
|
}
|
|
}
|
|
if($ge_no == 1)
|
|
{
|
|
echo "GE11_1 doesn't exist";
|
|
}
|
|
buffoff; resetcons;
|
|
}
|
|
#
|
|
tge_test {
|
|
ge0_test;
|
|
ge1_test;
|
|
}
|
|
# End of Ge test scripts
|
|
#
|
|
dactest {
|
|
$failed = 1;
|
|
echo "------ Executing DAC Test Suite ------"
|
|
$status = mg_dacreset;
|
|
if ($status)
|
|
return(1);
|
|
#
|
|
$status = mg_dacmodereg;
|
|
if ($status)
|
|
return(1);
|
|
#
|
|
$status = mg_dacreset;
|
|
if ($status)
|
|
return(1);
|
|
#
|
|
$status = mg_dacaddrreg;
|
|
if ($status)
|
|
return(1);
|
|
#
|
|
$status = mg_dacreset;
|
|
if ($status)
|
|
return(1);
|
|
#
|
|
$status = mg_clrpaletteaddrUniq;
|
|
if ($status)
|
|
return(1);
|
|
#
|
|
$status = mg_dacreset;
|
|
if ($status)
|
|
return(1);
|
|
#
|
|
$status = mg_clrpalettewalkbit;
|
|
if ($status)
|
|
return(1);
|
|
#
|
|
$status = mg_dacreset;
|
|
if ($status)
|
|
return(1);
|
|
#
|
|
$status = mg_clrpalettepatrn;
|
|
if ($status)
|
|
return(1);
|
|
#
|
|
$status = mg_dacreset;
|
|
if ($status)
|
|
return(1);
|
|
#
|
|
$failed = 0;
|
|
echo "******** DAC Test Suite Execution Completed ********"
|
|
}
|
|
#
|
|
vc3test {
|
|
$failed = 1;
|
|
echo "------ Executing VC3 Test Suite ------"
|
|
$status = mg_vc3reset;
|
|
if ($status)
|
|
return(1);
|
|
#
|
|
$status = mg_vc3internalreg;
|
|
if ($status)
|
|
return(1);
|
|
#
|
|
$status = mg_vc3addrsbus;
|
|
if ($status)
|
|
return(1);
|
|
#
|
|
$status = mg_vc3databus;
|
|
if ($status)
|
|
return(1);
|
|
#
|
|
$status = mg_vc3addrsuniq;
|
|
if ($status)
|
|
return(1);
|
|
#
|
|
$status = mg_vc3patrn;
|
|
if ($status)
|
|
return(1);
|
|
$failed = 0;
|
|
echo "******** VC3 Test Suite Execution Completed ********"
|
|
}
|
|
#
|
|
cmaptest {
|
|
$failed = 1;
|
|
echo "------ Executing CMAP Test Suite ------"
|
|
$status = mg_vc3init -t 0x107;
|
|
if ($status)
|
|
return (1);
|
|
#
|
|
mg_clrcmpcnt;
|
|
$status = mg_cmaprev;
|
|
mg_dispcmapcnt;
|
|
if (!$status)
|
|
return (1);
|
|
#
|
|
mg_clrcmpcnt;
|
|
$status = mg_cmapdatabus 0;
|
|
mg_dispcmapcnt;
|
|
if ($status)
|
|
return (1);
|
|
#
|
|
mg_clrcmpcnt;
|
|
$status = mg_cmapaddrsbus 0;
|
|
mg_dispcmapcnt;
|
|
if ($status)
|
|
return (1);
|
|
#
|
|
mg_clrcmpcnt; report=4;
|
|
$status = mg_cmappatrn -w 0 -f 0 -l 8191;
|
|
mg_dispcmapcnt;
|
|
if ($status)
|
|
return (1);
|
|
#
|
|
mg_clrcmpcnt;
|
|
$status = mg_cmapaddrsuniq 0;
|
|
mg_dispcmapcnt;
|
|
if ($status)
|
|
return (1);
|
|
#
|
|
mg_clrcmpcnt;
|
|
$status = mg_cmapdatabus 1;
|
|
mg_dispcmapcnt;
|
|
if ($status)
|
|
return (1);
|
|
#
|
|
mg_clrcmpcnt;
|
|
$status = mg_cmapaddrsbus 1;
|
|
mg_dispcmapcnt;
|
|
if ($status)
|
|
return (1);
|
|
#
|
|
mg_clrcmpcnt; report=4;
|
|
$status = mg_cmappatrn -w 1 -f 0 -l 8191 ;
|
|
mg_dispcmapcnt;
|
|
if ($status)
|
|
return (1);
|
|
#
|
|
mg_clrcmpcnt;
|
|
$status = mg_cmapaddrsuniq 1;
|
|
mg_dispcmapcnt;
|
|
if ($status)
|
|
return (1);
|
|
$failed = 0;
|
|
echo "******** CMAP Test Suite Execution Completed ********"
|
|
}
|
|
#
|
|
mg_dcbdma_tests {
|
|
$failed =0;
|
|
$status = mg_setboard ;
|
|
if ($status == 0) { $failed = 1; return (1); }
|
|
delay;
|
|
mg_hqfifoinit;
|
|
#
|
|
buffon;
|
|
mg_dcbdma 1;
|
|
delay ; delay ; delay;
|
|
echo " DAC Tests in DCBDMA mode "
|
|
$status = dactest;
|
|
if ($failed) {
|
|
mg_dcbdma 0;
|
|
return(1);
|
|
}
|
|
#
|
|
# delay ; delay ; delay;
|
|
#
|
|
echo " VC3 Tests in DCBDMA mode "
|
|
$status = vc3test;
|
|
if ($failed) {
|
|
mg_dcbdma 0;
|
|
return(1);
|
|
}
|
|
delay ; delay ; delay;
|
|
#
|
|
#XXX echo " CMAP Tests in DCBDMA mode "
|
|
#XXX $status = cmaptest;
|
|
#XXX if ($failed) {
|
|
#XXX mg_dcbdma 0;
|
|
#XXX return(1);
|
|
#XXX }
|
|
mg_dcbdma 0;
|
|
# delay ; delay ; delay;
|
|
$status = mg_reset;
|
|
if ($status) {
|
|
$failed = 1;
|
|
return(1);
|
|
}
|
|
delay;
|
|
#
|
|
}
|
|
#
|
|
bkend {
|
|
$failed =0;
|
|
$status = mg_setboard ;
|
|
if ($status == 0) { $failed = 1; return (1); }
|
|
delay;
|
|
mg_hqfifoinit;
|
|
#
|
|
buffon;
|
|
echo "------ Executing Back End Test Suite ------"
|
|
$status = dactest;
|
|
if ($failed) {
|
|
return(1);
|
|
}
|
|
#
|
|
$status = vc3test;
|
|
if ($failed) {
|
|
$vc3fail = 1;
|
|
return(1);
|
|
}
|
|
#
|
|
$status = cmaptest;
|
|
if ($failed) {
|
|
return(1);
|
|
}
|
|
#
|
|
$status = mg_reset;
|
|
if ($status) {
|
|
$failed = 1;
|
|
return(1);
|
|
}
|
|
delay;
|
|
#
|
|
$status = mg_dcbdma_tests;
|
|
if ($failed == 1) {
|
|
return (1);
|
|
}
|
|
#
|
|
$status = mg_reset;
|
|
if ($status) {
|
|
$failed = 1;
|
|
return(1);
|
|
}
|
|
delay;
|
|
#
|
|
$status = mg_xmapdcbreg 0;
|
|
if ($status) {
|
|
$failed = 1;
|
|
return(1);
|
|
}
|
|
##
|
|
$status = mg_xmapdcbreg 1;
|
|
if ($status) {
|
|
$failed = 1;
|
|
return(1);
|
|
}
|
|
#
|
|
$tmp = mg_setnumre4s -q
|
|
if ($tmp == 2) {
|
|
$status = mg_xmapdcbreg 2;
|
|
if ($status) {
|
|
$failed = 1;
|
|
return(1);
|
|
}
|
|
$status = mg_xmapdcbreg 3;
|
|
if ($status) {
|
|
$failed = 1;
|
|
return(1);
|
|
}
|
|
}
|
|
|
|
#
|
|
$status = mg_reset;
|
|
if ($status) {
|
|
$failed = 1;
|
|
return(1);
|
|
}
|
|
delay;
|
|
#
|
|
#XXX # mg_stoptiming;
|
|
#XXX # $status = mg_vc3init -t 0x107
|
|
#XXX # if ($status) {
|
|
#XXX # $failed = 1;
|
|
#XXX # return(1);
|
|
#XXX # }
|
|
mg_starttiming;
|
|
$status = mg_crcwalk;
|
|
if ($status) {
|
|
$failed = 1;
|
|
return(1);
|
|
}
|
|
#XXX # $testnum = "_41"
|
|
#XXX # $status = mg_reset;
|
|
#XXX # if ($status) {
|
|
#XXX # $failed = 1;
|
|
#XXX # return(1);
|
|
#XXX # }
|
|
#XXX #
|
|
#XXX # $testnum = "_42"
|
|
#XXX # mg_stoptiming;
|
|
#XXX # $status = mg_vc3init -t 0x130
|
|
#XXX # if ($status) {
|
|
#XXX # $failed = 1;
|
|
#XXX # return(1);
|
|
#XXX # }
|
|
#XXX # $testnum = "_43"
|
|
#XXX # mg_starttiming;
|
|
#XXX # $status = mg_crcwalk;
|
|
#XXX # if ($status) {
|
|
#XXX # $failed = 1;
|
|
#XXX # return(1);
|
|
#XXX # }
|
|
#XXX # $testnum = "_44"
|
|
#XXX # $status = mg_reset;
|
|
#XXX # if ($status) {
|
|
#XXX # $failed = 1;
|
|
#XXX # return(1);
|
|
#XXX # }
|
|
#XXX #
|
|
echo "Testing 1280_1024_76 timing"
|
|
$status = mg_vc3init -t 0x139
|
|
if ($status) {
|
|
$failed = 1;
|
|
return(1);
|
|
}
|
|
$status = mg_crcwalk;
|
|
if ($status) {
|
|
$failed = 1;
|
|
return(1);
|
|
}
|
|
$status = mg_reset;
|
|
if ($status) {
|
|
$failed = 1;
|
|
return(1);
|
|
}
|
|
|
|
#XXX if ($solid) {
|
|
#XXX $testnum = "_48"
|
|
#XXX echo "Testing 1600x1200 solid timing"
|
|
#XXX mg_stoptiming;
|
|
#XXX $status = mg_vc3init -t 0x156
|
|
#XXX if ($status) {
|
|
#XXX $failed = 1;
|
|
#XXX return(1);
|
|
#XXX }
|
|
#XXX $testnum = "_49"
|
|
#XXX mg_starttiming;
|
|
#XXX $status = mg_crcwalk;
|
|
#XXX if ($status) {
|
|
#XXX $failed = 1;
|
|
#XXX return(1);
|
|
#XXX }
|
|
#XXX } else {
|
|
echo "Testing 1600x1200 timing"
|
|
mg_stoptiming;
|
|
$status = mg_vc3init -t 0x159
|
|
if ($status) {
|
|
$failed = 1;
|
|
return(1);
|
|
}
|
|
mg_starttiming;
|
|
$status = mg_crcwalk;
|
|
if ($status) {
|
|
$failed = 1;
|
|
return(1);
|
|
}
|
|
#XXX }
|
|
#XXX
|
|
|
|
delay;
|
|
echo "Executing mg_vc3cursorposition test..."
|
|
$status = mg_reset;
|
|
if ($status) {
|
|
$failed = 1;
|
|
return (1);
|
|
}
|
|
delay;
|
|
mg_xmapinit;
|
|
delay;
|
|
repeat 3 {
|
|
delay
|
|
}
|
|
|
|
$status = mg_vc3cursorposition;
|
|
if ($status) {
|
|
$failed = 1;
|
|
resetcons; buffoff;
|
|
return(1);
|
|
}
|
|
|
|
#XXX
|
|
resetcons; buffoff;
|
|
echo "******** Back End Test Suite Execution Completed ********"
|
|
#
|
|
}
|
|
#
|
|
re4test {
|
|
$failed =0;
|
|
report = 3;
|
|
echo "------ Executing RE4 Test Suite ------"
|
|
$status = mg_re_status_reg;
|
|
if ($status) {
|
|
$failed = 1; return(1);
|
|
}
|
|
#
|
|
$status = mg_re_rdwr_regs;
|
|
if ($status) {
|
|
$failed = 1; return(1);
|
|
}
|
|
#
|
|
$status = mg_re_internal_ram -t0;
|
|
if ($status) {
|
|
$failed = 1; return(1);
|
|
}
|
|
#
|
|
$status = mg_re_internal_ram -t1;
|
|
if ($status) {
|
|
$failed = 1; return(1);
|
|
}
|
|
#
|
|
$status = mg_re_internal_ram -t2;
|
|
if ($status) {
|
|
$failed = 1; return(1);
|
|
}
|
|
#
|
|
$status = mg_re_internal_ram -t3;
|
|
if ($status) {
|
|
$failed = 1; return(1);
|
|
}
|
|
#
|
|
#
|
|
$status = mg_re_internal_ram -t4;
|
|
if ($status) {
|
|
$failed = 1; return(1);
|
|
}
|
|
#
|
|
$status = mg_re_internal_ram -t5;
|
|
if ($status) {
|
|
$failed = 1; return(1);
|
|
}
|
|
#
|
|
echo "******** RE4 Test Suite Execution Completed ********"
|
|
report = 4;
|
|
}
|
|
#
|
|
tetest {
|
|
$failed =0;
|
|
report = 3;
|
|
echo "------ Executing TE Test Suite ------"
|
|
#
|
|
$status = mg_read_te_version;
|
|
if ($status) {
|
|
$failed = 1; return(1);
|
|
}
|
|
#
|
|
$status = mg_re_rdwr_regs -t;
|
|
if ($status) {
|
|
$failed = 1; return(1);
|
|
}
|
|
#
|
|
echo "******** TE Test Suite Execution Completed ********"
|
|
report = 4;
|
|
}
|
|
#
|
|
dmatest {
|
|
$failed =0;
|
|
echo "------ Executing DMA Test Suite ------"
|
|
$status = mg_host_hqdma;
|
|
if ($status) {
|
|
$failed = 1;
|
|
return(1);
|
|
}
|
|
#
|
|
#
|
|
$status = mg_host_hq_cp_dma;
|
|
if ($status) {
|
|
$failed = 1;
|
|
return(1);
|
|
}
|
|
#
|
|
# $status = mg_ge_dma;
|
|
# if ($status) {
|
|
# $failed = 1;
|
|
# return(1);
|
|
# }
|
|
#
|
|
# DMA PIO Test
|
|
$status = mg_dma_pp -r1 -e1 -w1 -d1 -t -m 0 0 -b 0x240 -y 16 -z 192
|
|
if ($status) {
|
|
$failed = 1;
|
|
return(1);
|
|
}
|
|
echo "******** DMA Test Suite Execution Completed ********"
|
|
}
|
|
#
|
|
#
|
|
drawclose {
|
|
delay;
|
|
resetcons;
|
|
delay;
|
|
delay;
|
|
}
|
|
#
|
|
#
|
|
re_texlut_test {
|
|
$failed = 0;
|
|
mg0_clear_color;
|
|
if (mg_retexlut) {
|
|
$failed = 1;
|
|
return(-1);
|
|
}
|
|
}
|
|
#
|
|
#
|
|
tex_draw_test {
|
|
$failed =1;
|
|
echo "------ Executing tex_draw_test Suite ------"
|
|
#
|
|
drawsetup;
|
|
$status = mg_notex_line
|
|
delay;
|
|
if ($status)
|
|
return(1);
|
|
#
|
|
delay;
|
|
$status = mg_notex_poly
|
|
delay;
|
|
if ($status)
|
|
return(1);
|
|
#
|
|
delay;
|
|
$status = mg_tex_poly
|
|
delay;
|
|
if ($status)
|
|
return(1);
|
|
#
|
|
# delay;
|
|
# $status = mg_tex_1d
|
|
# delay;
|
|
# if ($status) {
|
|
# $failed = 1;
|
|
# return(1);
|
|
# }
|
|
#
|
|
# delay;
|
|
# $status = mg_tex_3d
|
|
# delay;
|
|
# if ($status) {
|
|
# $failed = 1;
|
|
# return(1);
|
|
# }
|
|
#
|
|
# delay;
|
|
# $status = mg_tex_scistri
|
|
# delay;
|
|
# if ($status) {
|
|
# $failed = 1;
|
|
# return(1);
|
|
# }
|
|
#
|
|
# delay;
|
|
# $status = mg_tex_linegl
|
|
# delay;
|
|
# if ($status) {
|
|
# $failed = 1;
|
|
# return(1);
|
|
# }
|
|
#
|
|
#XXX delay;
|
|
#XXX $status = mg_tex_load
|
|
#XXX delay;
|
|
#XXX if ($status) {
|
|
#XXX $failed = 1;
|
|
#XXX return(1);
|
|
#XXX }
|
|
#
|
|
# delay;
|
|
# $status = mg_tex_persp
|
|
# delay;
|
|
# if ($status) {
|
|
# $failed = 1;
|
|
# return(1);
|
|
# }
|
|
#
|
|
# delay;
|
|
# $status = mg_tex_mag
|
|
# delay;
|
|
# if ($status) {
|
|
# $failed = 1;
|
|
# return(1);
|
|
# }
|
|
#
|
|
# delay;
|
|
# $status = mg_tex_detail
|
|
# delay;
|
|
# if ($status) {
|
|
# $failed = 1;
|
|
# return(1);
|
|
# }
|
|
#
|
|
# delay;
|
|
# $status = mg_tex_bordertall
|
|
# delay;
|
|
# if ($status) {
|
|
# $failed = 1;
|
|
# return(1);
|
|
# }
|
|
#
|
|
delay;
|
|
$status = mg_tex_lut4d
|
|
delay;
|
|
if ($status)
|
|
return(1);
|
|
#
|
|
# delay;
|
|
# $status = mg_tex_borderwide
|
|
# delay;
|
|
# if ($status) {
|
|
# $failed = 1;
|
|
# return(1);
|
|
# }
|
|
#
|
|
delay;
|
|
$status = mg_tex_mddma
|
|
delay
|
|
if ($status)
|
|
return(1);
|
|
#
|
|
delay;
|
|
allsetup
|
|
re_texlut_test;
|
|
if ($failed) {
|
|
return(-1);
|
|
}
|
|
#
|
|
drawclose;
|
|
#
|
|
echo "******** tex_draw_test Suite Execution Completed ********"
|
|
}
|
|
#
|
|
#
|
|
repp_test {
|
|
$failed =0;
|
|
echo "------ Executing RE-PP Test Suite ------"
|
|
allsetup;
|
|
if ($failed) {
|
|
return(1);
|
|
}
|
|
resetcons; buffoff; buffon
|
|
# delay; delay; delay;
|
|
mg_vc3clearcursor;
|
|
delay; delay; delay;
|
|
drawsetup;
|
|
delay;
|
|
echo " mg_z_tri in progess ..."
|
|
$status = mg_z_tri
|
|
delay;
|
|
if ($status) {
|
|
$failed = 1;
|
|
return(1);
|
|
}
|
|
#
|
|
echo " mg_lines in progess ..."
|
|
delay; delay; delay;
|
|
$status = mg_lines
|
|
delay;
|
|
if ($status) {
|
|
$failed = 1;
|
|
return(1);
|
|
}
|
|
#
|
|
delay;
|
|
echo " mg_points in progess ..."
|
|
$status = mg_points
|
|
delay;
|
|
if ($status) {
|
|
$failed = 1;
|
|
return(1);
|
|
}
|
|
#
|
|
echo " mg_stip_tri in progess ..."
|
|
delay;
|
|
$status = mg_stip_tri
|
|
delay;
|
|
if ($status) {
|
|
$failed = 1;
|
|
return(1);
|
|
}
|
|
#
|
|
delay;
|
|
echo " mg_xblock in progess ..."
|
|
$status = mg_xblock
|
|
delay;
|
|
if ($status) {
|
|
$failed = 1;
|
|
return(1);
|
|
}
|
|
#
|
|
delay;
|
|
echo " mg_chars in progess ..."
|
|
$status = mg_chars
|
|
delay;
|
|
if ($status) {
|
|
$failed = 1;
|
|
return(1);
|
|
}
|
|
#
|
|
delay;
|
|
echo " mg_logicop in progess ..."
|
|
$status = mg_logicop
|
|
delay;
|
|
if ($status) {
|
|
$failed = 1;
|
|
return(1);
|
|
}
|
|
#
|
|
delay;
|
|
echo " mg_dither in progess ..."
|
|
$status = mg_dither
|
|
delay;
|
|
if ($status) {
|
|
$failed = 1;
|
|
return(1);
|
|
}
|
|
#
|
|
delay;
|
|
echo " mg_color_tri in progess ..."
|
|
$status = mg_color_tri
|
|
delay;
|
|
if ($status) {
|
|
$failed = 1;
|
|
return(1);
|
|
}
|
|
#
|
|
delay;
|
|
$testname = "mg_alphablend"
|
|
if (mg_alphablend) {
|
|
return(-1);
|
|
}
|
|
#
|
|
delay;
|
|
#XXXX The scene test does not work on console G
|
|
if (!mg_gfxconsole) {
|
|
$status = scene_test;
|
|
delay;
|
|
if ($failed) {
|
|
return(1);
|
|
}
|
|
}
|
|
|
|
# led 1
|
|
delay
|
|
drawclose;
|
|
#
|
|
echo "******** RE/PP Test Suite Execution Completed ********"
|
|
}
|
|
#
|
|
rdram_mem_quick {
|
|
$failed =0;
|
|
report = 3;
|
|
echo "------ Executing FRAME BUFFER QUICK Test Suite ------"
|
|
#
|
|
drawsetup
|
|
if (mg_gfxconsole)
|
|
$status = mg_dma_pp -r0 -e0 -w0 -d0 -b 0x240 -p0 -x 0 -y 4 -z 12 -m 0 0
|
|
if ($status) {
|
|
$failed = 1;
|
|
return (1);
|
|
}
|
|
#
|
|
}
|
|
#
|
|
rdram_mem {
|
|
$failed =0;
|
|
|
|
echo "------ Executing FRAME BUFFER Test Suite ------"
|
|
# Z Buffer Test
|
|
#
|
|
drawsetup
|
|
if (mg_gfxconsole)
|
|
$status = mg_dma_pp -r0 -e0 -w0 -d0 -b 0x0 -p3 -x 0x0
|
|
if ($status) {
|
|
$failed = 1;
|
|
return (1);
|
|
}
|
|
#
|
|
# Color Buffer Test
|
|
if (mg_gfxconsole)
|
|
$status = mg_dma_pp -r0 -e0 -w0 -d0 -b 0x240 -p3 -x 0x0
|
|
if ($status) {
|
|
$failed = 1;
|
|
return (1);
|
|
}
|
|
#
|
|
# Overlay Buffer Test
|
|
if (mg_gfxconsole)
|
|
$status = mg_dma_pp -r0 -e0 -w0 -d0 -b 0x1c0 -p3 -x 0x0
|
|
if ($status) {
|
|
$failed = 1;
|
|
return (1);
|
|
}
|
|
#
|
|
$tmp = mg_setnumre4s -q
|
|
if ($tmp == 2) {
|
|
# Display Buffer-CD Test
|
|
if (mg_gfxconsole)
|
|
$status = mg_dma_pp -r0 -e0 -w0 -d0 -b 0x320 -p3 -x 0x0
|
|
if ($status) {
|
|
$failed = 1;
|
|
return (1);
|
|
}
|
|
# ACC36 or AUX 0 Buffer
|
|
if (mg_gfxconsole)
|
|
$status = mg_dma_pp -r0 -e0 -w0 -d0 -b 0x0e0 -p3 -x 0x0
|
|
if ($status) {
|
|
$failed = 1;
|
|
return (1);
|
|
}
|
|
}
|
|
|
|
#
|
|
echo "******** FRAME BUFFER Test Suite Execution Completed ********"
|
|
report = 4;
|
|
}
|
|
#
|
|
#
|
|
tram_mem {
|
|
$failed =0;
|
|
mg0_clear_color; ide_delay -s 2 ;
|
|
delay;
|
|
echo "------ Executing TRAM Memory Test Suite ------"
|
|
delay
|
|
mg_tram_rev_nobuff
|
|
if ($failed ) {
|
|
echo "mg_tram_rev_nobuff failed"
|
|
return (1);
|
|
}
|
|
delay;
|
|
$status = mg_dma_tram -m 3 -e 0
|
|
if ($status) {
|
|
$failed = 1;
|
|
return (1);
|
|
}
|
|
delay
|
|
$foo = mg_setnumre4s -q
|
|
delay
|
|
if ($foo == 2) {
|
|
$status = mg_dma_tram -m 3 -e 0 -n 1
|
|
if ($status) {
|
|
$failed = 1;
|
|
return (1);
|
|
}
|
|
}
|
|
}
|
|
#
|
|
re4flextest {
|
|
buffon;
|
|
$failed =0;
|
|
echo "------ HQ <---> RSS Bus Test ------"
|
|
$status = mg_hq3 4
|
|
if ($status) {
|
|
$failed = 1;
|
|
return (1);
|
|
}
|
|
resetcons; buffoff;
|
|
}
|
|
#
|
|
#
|
|
# Takes an arg for which RSS you are testing
|
|
mg_rtdma2tram {
|
|
$failed =0;
|
|
allsetup;
|
|
if ($failed) { return (1); } ;
|
|
delay; delay;
|
|
buffon ;
|
|
mg0_clear_color; ide_delay -s 2 ;
|
|
mg_rtdma 1;
|
|
delay ; delay;
|
|
report=4;
|
|
$testname = "mg_rtdma2tram"
|
|
$status = mg_dma_tram -m 3 -e 0 -n $1;
|
|
if ($status) {
|
|
$failed = 1;
|
|
resetcons; buffoff;
|
|
mg_rtdma 0;
|
|
return(1);
|
|
}
|
|
resetcons; buffoff;
|
|
delay; delay;
|
|
mg_rtdma 0;
|
|
delay ; delay;
|
|
}
|
|
#
|
|
#
|
|
$iteration = 1
|
|
#
|
|
mg_test_all {
|
|
echo " Iteration " $iteration
|
|
ttyprint 1;
|
|
$failed = 0;
|
|
$status = mg_setboard ;
|
|
if ($status == 0) { $failed = 1; return (1); }
|
|
delay;
|
|
mg_hqfifoinit;
|
|
#
|
|
report=4;
|
|
repeat 3 {
|
|
delay;
|
|
}
|
|
buffon
|
|
$status = mg_reset;
|
|
if ($status) {
|
|
$failed = 1;
|
|
return (1);
|
|
}
|
|
$solid = mg_issolid;
|
|
# if (mg_setboard) {
|
|
# delay; mg_hqfifoinit;
|
|
# $status = mg_reset;
|
|
# $solid = mg_issolid;
|
|
# delay;
|
|
# delay;
|
|
# resetcons;
|
|
# if ($status) {
|
|
# $failed = 1;
|
|
# return (1);
|
|
# }
|
|
# } else {
|
|
# allsetup;
|
|
# if ($failed) {
|
|
# echo "Initializing graphics failed"
|
|
# return (1)
|
|
# }
|
|
# }
|
|
ide_delay -s 4
|
|
# delay;
|
|
# delay;
|
|
$status = hq3test;
|
|
if ($failed) {
|
|
echo "hq3test FAILED"
|
|
|
|
return($status);
|
|
}
|
|
#
|
|
ide_delay -s 4
|
|
# delay;
|
|
# delay;
|
|
buffon;
|
|
if ($nic_check_on) {
|
|
$testname = "mg_nic_check"
|
|
$status = mg_nic_check;
|
|
if ($status) {
|
|
$failed = 1;
|
|
echo "mg_nic_check FAILED"
|
|
return($status);
|
|
}
|
|
}
|
|
#
|
|
mg_rtfifo_loop;
|
|
resetcons; buffoff;
|
|
#
|
|
if ($failed == 1)
|
|
return (1);
|
|
report=4;
|
|
if ($oven) {
|
|
boot -f bootp()mg_hq.pass;
|
|
}
|
|
#
|
|
$status = re4flextest;
|
|
if ($failed) {
|
|
echo "HQ <---> RSS Bus Test FAILED"
|
|
resetcons; buffoff;
|
|
return($status);
|
|
}
|
|
#
|
|
#
|
|
resetcons;
|
|
#XXX mg_setboard; delay; mg_hqfifoinit;
|
|
$status = mg_reset;
|
|
if ($status) {
|
|
$failed = 1;
|
|
return (1);
|
|
}
|
|
# delay;
|
|
# delay;
|
|
ide_delay -s 5;
|
|
resetcons;
|
|
#
|
|
# report=2
|
|
# $status = mg_dcbdma_tests;
|
|
# if ($failed == 1) {
|
|
# return (1);
|
|
# }
|
|
# report=4
|
|
#
|
|
$status = bkend;
|
|
if ($failed) {
|
|
echo "bkend FAILED"
|
|
# if ($vc3fail) {
|
|
#
|
|
# $vc3fail = 0;
|
|
# } else {
|
|
# echo "The RA Board may be BAD"
|
|
# }
|
|
resetcons; buffoff;
|
|
return($status);
|
|
}
|
|
#
|
|
#XXX report=2
|
|
#XXX $status = mg_dcbdma_tests;
|
|
#XXX if ($failed == 1) {
|
|
#XXX return (1);
|
|
#XXX }
|
|
#XXX report=4
|
|
#
|
|
if ($oven) {
|
|
boot -f bootp()mg_bkend.pass;
|
|
}
|
|
resetcons;
|
|
|
|
$testname = "mg_i2c"
|
|
$status = mg_i2c;
|
|
if ($status) {
|
|
$failed = 1;
|
|
return(1);
|
|
}
|
|
if ($oven) {
|
|
boot -f bootp()mg_i2c.pass;
|
|
}
|
|
$status = mg_reset;
|
|
if ($status) {
|
|
$failed = 1;
|
|
return (1);
|
|
}
|
|
#
|
|
report=2
|
|
$ge_no = mg_queryGE;
|
|
if ($ge_no == 2) # 2 GE system
|
|
{
|
|
echo "Testing 2GE system...."
|
|
$status = tge_test;
|
|
}
|
|
if ($failed) {
|
|
echo "tge_test FAILED"
|
|
|
|
resetcons; buffoff;
|
|
return($status);
|
|
}
|
|
#
|
|
if ($ge_no == 1) # 1 ge system
|
|
{
|
|
echo "Testing 1GE system...."
|
|
$status = ge0_test;
|
|
}
|
|
#
|
|
if ($failed) {
|
|
echo "ge_test FAILED"
|
|
resetcons; buffoff;
|
|
return($status);
|
|
}
|
|
#
|
|
if ($oven) {
|
|
boot -f bootp()mg_ge.pass;
|
|
}
|
|
#
|
|
ide_delay -s 8;
|
|
# repeat 4 delay;
|
|
#
|
|
allsetup;
|
|
if ($failed) {
|
|
resetcons; buffoff;
|
|
return(1);
|
|
}
|
|
#
|
|
buffon
|
|
#
|
|
report=4
|
|
$status = re4test;
|
|
if ($failed) {
|
|
echo "re4test FAILED"
|
|
resetcons; buffoff;
|
|
return(1);
|
|
}
|
|
if ($oven) {
|
|
boot -f bootp()mg_re.pass;
|
|
}
|
|
$status = dmatest;
|
|
if ($failed) {
|
|
echo "dmatest FAILED"
|
|
resetcons; buffoff;
|
|
return($status);
|
|
}
|
|
resetcons; buffoff;
|
|
if ($oven) {
|
|
boot -f bootp()mg_dma.pass;
|
|
}
|
|
buffon;
|
|
report=4;
|
|
$status = rdram_mem_quick;
|
|
if ($failed) {
|
|
echo "RDRAM QUICK FAILED"
|
|
resetcons; buffoff;
|
|
return($status);
|
|
}
|
|
report=4;
|
|
if ($quick == 0) {
|
|
$status = rdram_mem;
|
|
if ($failed) {
|
|
echo "RDRAM FAILED"
|
|
resetcons; buffoff;
|
|
return($status);
|
|
}
|
|
}
|
|
resetcons; buffoff;
|
|
ide_delay -s 20
|
|
# delay; delay; delay; delay; delay;
|
|
# delay; delay; delay; delay; delay;
|
|
#
|
|
if ($oven) {
|
|
boot -f bootp()mg_rdram.pass;
|
|
}
|
|
buffon;
|
|
$status = repp_test;
|
|
if ($failed) {
|
|
echo "repp_test FAILED"
|
|
resetcons; buffoff;
|
|
return(1);
|
|
}
|
|
#
|
|
if ($oven) {
|
|
boot -f bootp()mg_repp.pass;
|
|
}
|
|
ide_delay -s 20
|
|
# delay; delay; delay; delay; delay;
|
|
# delay; delay; delay; delay; delay;
|
|
resetcons; buffoff;
|
|
#
|
|
# allsetup;
|
|
# if ($failed) {
|
|
# resetcons; buffoff;
|
|
# return(1);
|
|
# }
|
|
# delay;
|
|
# delay;
|
|
# $status = mg_reset;
|
|
# if ($status) {
|
|
# $failed = 1;
|
|
# return (1);
|
|
# }
|
|
# delay;
|
|
resetcons; buffoff;
|
|
buffon;
|
|
#
|
|
# perform TRAM memory and TEXTURE draw tests for Max/High Only
|
|
# if (($solid == 1) && ($tram == 0))
|
|
$status = mg_setnumtrams ;
|
|
#
|
|
if ($status == 0) {
|
|
echo "No Texture Subsystem for MG10"
|
|
echo "Tests for Texture Subsystem are skipped..."
|
|
} else {
|
|
#
|
|
$status = tetest
|
|
if ($failed) {
|
|
echo "tetest FAILED"
|
|
echo "The RE-TE connection may be BAD"
|
|
resetcons; buffoff;
|
|
return(1);
|
|
}
|
|
#
|
|
if ($quick == 0) {
|
|
echo "Testing TRAM memory"
|
|
repeat 3 {
|
|
delay;
|
|
}
|
|
$status = tram_mem;
|
|
if ($failed) {
|
|
echo "tram test FAILED"
|
|
resetcons; buffoff;
|
|
return(1);
|
|
}
|
|
if ($oven) {
|
|
boot -f bootp()mg_tram.pass;
|
|
}
|
|
}
|
|
#
|
|
$testname = "mg_rtdma_tram"
|
|
$status = mg_rtdma2tram 0;
|
|
if ($failed == 1) {
|
|
echo " RSS-0 failed for real-time texture DMA";
|
|
return (1);
|
|
}
|
|
echo " Real-time texture DMA in RSS 0 passed"
|
|
$foo = mg_setnumre4s -q;
|
|
delay;
|
|
if ($foo == 2) {
|
|
$status = mg_rtdma2tram 1;
|
|
if ($failed == 1) {
|
|
echo " RSS-1 failed for real-time texture DMA";
|
|
return (1);
|
|
}
|
|
echo " Real-time texture DMA in RSS 1 passed"
|
|
}
|
|
buffon;
|
|
$status = tex_draw_test
|
|
if ($failed) {
|
|
echo "tex_draw_test FAILED"
|
|
resetcons; buffoff;
|
|
return(1);
|
|
}
|
|
resetcons; buffoff;
|
|
if ($oven) {
|
|
boot -f bootp()mg_tex.pass;
|
|
}
|
|
}
|
|
#
|
|
# echo ""
|
|
echo " All tests have passed"
|
|
ide_delay -s 4;
|
|
# delay;
|
|
# delay;
|
|
# $status = mg_reset;
|
|
# if ($status) {
|
|
# $failed = 1;
|
|
# return (1);
|
|
# }
|
|
resetcons; buffoff;
|
|
report=4
|
|
$iteration = $iteration + 1
|
|
}
|
|
#
|
|
#mg_test_all_tram {
|
|
# $tram = 1;
|
|
# mg_setnumtrams -c 4;
|
|
# mg_test_all
|
|
# $tram = 0;
|
|
#}
|
|
#
|
|
mg_test_tram {
|
|
report=4;
|
|
$failed = 0;
|
|
allsetup;
|
|
if ($failed) { return (1); } ;
|
|
buffon;
|
|
tram_mem;
|
|
if ($failed) {
|
|
echo "tram test FAILED"
|
|
resetcons; buffoff;
|
|
return(1);
|
|
}
|
|
$status = tex_draw_test;
|
|
if ($failed) {
|
|
echo "tex_draw test FAILED"
|
|
resetcons; buffoff;
|
|
return(1);
|
|
}
|
|
resetcons; buffoff;
|
|
mg_rtdma2tram 0;
|
|
if ($failed) {
|
|
echo " Real-time texture DMA in RSS 0 Failed"
|
|
return (1);
|
|
} ;
|
|
echo " Real-time texture DMA in RSS 0 passed"
|
|
$foo = mg_setnumre4s -q
|
|
delay
|
|
if ($foo == 2) {
|
|
$testname = "mg_rtdma_tram"
|
|
mg_rtdma2tram 1;
|
|
if ($failed) {
|
|
echo " Real-time texture DMA in RSS 1 Failed";
|
|
return (1);
|
|
} ;
|
|
echo " Real-time texture DMA in RSS 1 passed"
|
|
}
|
|
}
|
|
#
|
|
mg_mhead_all {
|
|
$status = mg_setport 9;
|
|
if ($status == 1) {
|
|
$status = mg_test_all;
|
|
if ($failed == 1) return (1);
|
|
}
|
|
$status = mg_setport 10;
|
|
if ($status == 1) {
|
|
$status = mg_test_all;
|
|
if ($failed == 1) return (1);
|
|
}
|
|
$status = mg_setport 11;
|
|
if ($status == 1) {
|
|
$status = mg_test_all;
|
|
if ($failed == 1) return (1);
|
|
}
|
|
$status = mg_setport 12;
|
|
if ($status == 1) {
|
|
$status = mg_test_all;
|
|
if ($failed == 1) return (1);
|
|
}
|
|
$status = mg_setport 13;
|
|
if ($status == 1) {
|
|
$status = mg_test_all;
|
|
if ($failed == 1) return (1);
|
|
}
|
|
#
|
|
}
|
|
$testmod = ide_getenv -s testmod;
|
|
$cpuvolt = ide_getenv -s cpuvolt;
|
|
$gfxvolt = ide_getenv -s gfxvolt;
|
|
$dl = ide_getenv -s dlserver;
|
|
$nloops = ide_getenv -s numloops;
|
|
#gm_comment {
|
|
#echo ""
|
|
#echo "type mg_test_all to run all tests "
|
|
#echo "type mg_test_tram to run TMEZZ tests ONLY"
|
|
#echo ""
|
|
#}
|
|
ttyprint 1;
|
|
gfx {
|
|
$status = mg_test_all;
|
|
if ($failed) {
|
|
echo "FAILURES DETECTED IN GRAPHICS BOARD\n"
|
|
if ($oven) {
|
|
boot -f bootp()gfx.fail
|
|
}
|
|
return($failed);
|
|
} else {
|
|
echo "ALL TESTS IN GRAPHICS BOARD PASSED\n";
|
|
if ($oven) {
|
|
boot -f bootp()gfx.all.pass;
|
|
} else {
|
|
unix;
|
|
}
|
|
}
|
|
}
|
|
#
|
|
gfxva {
|
|
$failed =0;
|
|
# echo "\n*****************************\n"
|
|
echo "\n****** Voltage changed to 4.75V *****\n "
|
|
# echo "\n*****************************\n"
|
|
chg_volt -m 3 -l 0;
|
|
ide_delay -s 15;
|
|
$status = mg_test_all;
|
|
chg_volt -m 3 -l 1;
|
|
ide_delay -s 15;
|
|
if ($failed) {
|
|
echo "FAILURES DETECTED IN GRAPHICS BOARD AT 4.75V\n";
|
|
return($failed);
|
|
}
|
|
#
|
|
# echo "\n*****************************\n"
|
|
echo "\n ****** Voltage changed to 5.25 V\n ****** "
|
|
# echo "\n*****************************\n"
|
|
chg_volt -m 3 -l 2;
|
|
ide_delay -s 15;
|
|
$status = mg_test_all;
|
|
chg_volt -m 3 -l 1;
|
|
ide_delay -s 15;
|
|
#
|
|
if($failed) {
|
|
echo "FAILURES DETECTED IN GRAPHICS BOARD AT 5.25V\n"
|
|
return($failed);
|
|
} else {
|
|
echo "ALL TESTS IN GRAPHICS BOARD PASSED\n";
|
|
unix;
|
|
}
|
|
}
|
|
# runtest assumes scripts called pm10, pm20. Create aliases here:
|
|
#
|
|
pm10 {
|
|
pm;
|
|
}
|
|
#
|
|
pm20 {
|
|
pm;
|
|
}
|
|
#
|
|
send_boot_msg {
|
|
boot -f $1
|
|
}
|
|
#
|
|
#
|
|
#
|
|
# testmod table
|
|
# -------------------
|
|
# name value
|
|
#
|
|
# pm10 0
|
|
# pm20 1
|
|
# ip30 2
|
|
# gfx 3
|
|
# pm10-ip30 4
|
|
# pm20-ip30 5
|
|
# pm10-gfx 6
|
|
# pm20-gfx 7
|
|
# ip30-gfx 8
|
|
# pm10-ip30-gfx 9
|
|
# pm20-ip30-gfx 10
|
|
#
|
|
# voltage table (cpuvolt, gfxvolt)
|
|
# -------------------
|
|
# name value
|
|
#
|
|
# low 0
|
|
# high 1
|
|
# nom 2
|
|
# low-high 3
|
|
# low-nom 4
|
|
# high-low 5
|
|
# high-nom 6
|
|
# nom-low 7
|
|
# nom-high 8
|
|
# low-high-nom 9
|
|
# low-nom-high 10
|
|
# high-low-nom 11
|
|
# high-nom-low 12
|
|
# nom-low-high 13
|
|
# nom-high-low 14
|
|
#
|
|
$what_volt = 1;
|
|
#
|
|
change_volt {
|
|
if ($what_volt == 2) {
|
|
echo "Changing voltage to HIGH"
|
|
chg_volt -m 3 -l 2;
|
|
}
|
|
if ($what_volt == 1) {
|
|
echo "Changing voltage to NOM"
|
|
chg_volt -m 3 -l 1;
|
|
}
|
|
if ($what_volt == 0) {
|
|
echo "Changing voltage to LOW"
|
|
chg_volt -m 3 -l 0;
|
|
}
|
|
ide_delay -s 15;
|
|
return;
|
|
}
|
|
#
|
|
runtest_bootp {
|
|
ide_delay -s 5;
|
|
boot -f $1
|
|
ide_delay -s 5;
|
|
boot -f $1
|
|
}
|
|
#
|
|
runtest {
|
|
#
|
|
$testmod = ide_getenv -s testmod;
|
|
$cpuvolt = ide_getenv -s cpuvolt;
|
|
$gfxvolt = ide_getenv -s gfxvolt;
|
|
$what = 0;
|
|
#
|
|
for ($what = 0; $what < 3; $what = $what + 1 ) {
|
|
$what_volt = get_volt_level pm10;
|
|
if ($what_volt < 8) {
|
|
change_volt;
|
|
pm10;
|
|
if ($failed) {
|
|
$tmp = "bootp()pm10.fail"
|
|
runtest_bootp $tmp;
|
|
return;
|
|
} else {
|
|
$tmp = "bootp()pm10.pass"
|
|
runtest_bootp $tmp;
|
|
}
|
|
}
|
|
$what_volt = get_volt_level pm20;
|
|
if ($what_volt < 8) {
|
|
change_volt
|
|
pm20 ;
|
|
if ($failed) {
|
|
$tmp = "bootp()pm20.fail"
|
|
runtest_bootp $tmp;
|
|
return;
|
|
} else {
|
|
$tmp = "bootp()pm20.pass"
|
|
runtest_bootp $tmp;
|
|
}
|
|
}
|
|
$what_volt = get_volt_level ip30;
|
|
if ($what_volt < 8) {
|
|
change_volt
|
|
ip30 ;
|
|
if ($failed) {
|
|
$tmp = "bootp()ip30.fail"
|
|
runtest_bootp $tmp;
|
|
return;
|
|
} else {
|
|
$tmp = "bootp()ip30.pass"
|
|
runtest_bootp $tmp;
|
|
}
|
|
}
|
|
$what_volt = get_volt_level gfx;
|
|
if ($what_volt < 8) {
|
|
change_volt
|
|
gfx ;
|
|
if ($failed) {
|
|
$tmp = "bootp()gfx.fail"
|
|
runtest_bootp $tmp;
|
|
return;
|
|
} else {
|
|
$tmp = "bootp()gfx.pass"
|
|
runtest_bootp $tmp;
|
|
}
|
|
}
|
|
}
|
|
#
|
|
}
|
|
#
|
|
#$testmod = ide_getenv -s testmod;
|
|
#$cpuvolt = ide_getenv -s cpuvolt;
|
|
#$gfxvolt = ide_getenv -s gfxvolt;
|
|
#$dl = ide_getenv -s dlserver;
|
|
#$nloops = ide_getenv -s numloops;
|
|
if ($mp) {
|
|
$tmp = exec -v $slave -f slave_dummy;
|
|
}
|
|
#gm_comment;
|
|
#
|
|
# $dl = 0 the server is func
|
|
# $dl = 1 the server is config
|
|
# $dl = 2 the server is final
|
|
# $dl = 3 the server is ra
|
|
# $dl = 128 the server is one of the watchdogs
|
|
#
|
|
##########################################################
|
|
# The following code takes care of Function Test
|
|
##########################################################
|
|
if ($dl == 0) {
|
|
menu;
|
|
}
|
|
#
|
|
##########################################################
|
|
# The following code takes care of System Integration Test
|
|
##########################################################
|
|
if ($dl == 1) {
|
|
echo "Machine may be in System Integration Test Area"
|
|
echo "Setting the network speed as 10"
|
|
setenv -p ef0mode 10;
|
|
# LED_check
|
|
# if ($failed) {
|
|
# echo "FAILURES DETECTED\n"
|
|
# } else {
|
|
# echo "NIC check not added"
|
|
# unix;
|
|
# }
|
|
unix;
|
|
}
|
|
#
|
|
##########################################################
|
|
# The following code takes care of Final Test
|
|
##########################################################
|
|
if ($dl == 2) {
|
|
echo "Machine may be in Final Test Area"
|
|
echo "No IDE tests are planned at Final Test"
|
|
}
|
|
##########################################################
|
|
# The following code takes care of EBRA
|
|
##########################################################
|
|
if ($dl == 3) {
|
|
echo "Machine may be in EBRA"
|
|
echo "Please source appropriate scripts"
|
|
}
|
|
echo " "
|
|
##########################################################
|
|
# The following code takes care of ASRS
|
|
##########################################################
|
|
if ($dl == 128) {
|
|
if (($testmod >= 0) && ($cpuvolt >= 0) && ($gfxvolt >= 0)) {
|
|
echo "Machine may be in ASRS"
|
|
$oven = 1;
|
|
$go_unix = 0;
|
|
bootpon;
|
|
if ($nloops == 1) {
|
|
$nloops = 1;
|
|
}
|
|
echo "The number of loops = " $nloops
|
|
do {
|
|
echo "************** Loop NUmber " $nloops "***************"
|
|
boot -f bootp()start_ide_tests;
|
|
runtest;
|
|
if ($failed) {
|
|
forever wait;
|
|
}
|
|
$nloops = $nloops - 1;
|
|
} while ($nloops > 0);
|
|
unix;
|
|
} else {
|
|
menu;
|
|
}
|
|
}
|
|
echo ""
|