1
0
Files
irix-657m-src/stand/arcs/ide/IP30/ip30imp.pre
2022-09-29 17:59:04 +03:00

2843 lines
66 KiB
Plaintext

################################################################
# PLEASE READ THIS BEFORE CHANGING
#
# Add "DIAG" before any "C" code function
# Add "FUNC" before any script function
# DO NOT KEEP multiple DIAG and/or FUNC in the same line
################################################################
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 "radical to run RADical card tests ONLY"
echo "shoebox to run PCI Shoebox tests ONLY"
echo ""
echo "///////////////////////////////////////////////////////////////////////////"
}
# commands for customer support
FUNC fieldmode {
$oven = 1;
$go_unix = 0;
$old_bootp_scheme = 0;
$is_fieldmode = 1;
}
FUNC defaultmode {
$oven = 0;
$go_unix = 1;
$old_bootp_scheme = 1;
$is_fieldmode = 0;
}
FUNC list {
FUNC fieldmode;
FUNC menu;
}
FUNC gounix_fieldmode {
if ($is_fieldmode == 1) {
$go_unix = 0;
}
}
# find out of we are MP
$mp = DIAG ismp
$slave = DIAG slavecpu
$failed=0;
$oven = 0;
$go_unix = 1;
$nic_check_on = 1;
$stmp = "";
$old_bootp_scheme = 1;
$is_fieldmode = 0;
FUNC heart {
echo "\nStarting HEART Tests **********"
$failed = 1;
if ( DIAG hr_regs ) return(1);
if ( DIAG hr_misc ) return(1);
if ( DIAG hr_intr ) return(1);
if ( DIAG hr_piowcr ) return(1);
if ( DIAG hr_piuacc ) return(1);
$failed = 0;
echo "HEART Tests Passed **********"
}
#
FUNC xbow {
echo "\nStarting XBOW Tests **********"
$failed = 1;
if ( DIAG x_regs ) return(1);
if ( DIAG x_acc ) return(1);
$failed = 0;
echo "XBOW Tests Passed **********"
}
#
FUNC bridge {
echo "\nStarting BRIDGE Tests **********"
$failed = 1;
if ( DIAG br_regs ) return(1);
if ( DIAG br_intr ) return(1);
if ( DIAG br_err ) return(1);
if ( DIAG br_ram ) return(1);
$failed = 0;
echo "BRIDGE Tests Passed **********"
}
#
FUNC duart {
echo "\nStarting DUART Tests **********"
$failed = 1;
if ( DIAG duart_regs ) return(1);
# WE DO NOT WANT TO RUN THE LOOP BACK TESTS IN ASRS
if ($oven == 0) {
$tmp = DIAG pci_sio -p 1 -t abc -b 50;
if ($tmp) return(1);
$tmp = DIAG pci_sio -p 1 -t abc -b 2000;
if ($tmp) return(1);
$tmp = DIAG pci_sio -p 1 -t abc -b 384000;
if ($tmp) return(1);
}
$failed = 0;
echo "DUART Tests Passed **********"
}
#
FUNC plp {
# RUN THE TEST ONLY AT FUNCTION TEST AREA
if ($dl == 0) {
echo "\nStarting Parallel Port Tests **********"
$failed = 1;
if ( DIAG pci_par ) return(1);
if ( DIAG pci_par_lp ) return(1);
$failed = 0;
echo "Parallel Loop Tests Passed **********"
}
}
#
FUNC ioc3 {
echo "\nStarting IOC3 Tests **********"
$failed = 1;
if ( DIAG ioc3_regs ) return(1);
if ( DIAG ioc3_sram ) return(1);
if ( DIAG enet ) return(1);
$failed = 0;
echo "IOC3 Tests Passed **********"
}
#
FUNC rad {
if ( DIAG is_lx ) return(1);
echo "\nStarting RAD Tests **********"
$failed = 1;
if ( DIAG rad_regs ) return(1);
if ( DIAG rad_dma ) return(1);
if ( DIAG rad_ram ) return(1);
$failed = 0;
echo "RAD Tests Passed **********"
}
#
FUNC rtc {
echo "\nStarting RTC Tests **********"
$failed = 1;
if ( DIAG rtc_regs ) return(1);
if ( DIAG pci_rtc ) return(1);
$failed = 0;
echo "RTC Tests Passed **********"
}
#
FUNC scsi {
echo "\nStarting SCSI Tests **********"
$failed = 1;
if ( DIAG scsi_test ) return(1);
$failed = 0;
echo "SCSI Tests Passed **********"
}
#
FUNC unix {
echo "<<<< About to to boot UNIX......>>>>"
if ($oven && $old_bootp_scheme) { DIAG boot -f bootp()start_unix; }
DIAG unsetenv diagmode
DIAG unsetenv OSLoader
DIAG unsetenv SystemPartition
DIAG reset;
}
FUNC do_unix {
if ($is_fieldmode == 0) {
FUNC unix;
}
}
#
FUNC pm {
echo "\nStarting PM Tests **********"
report = 4;
$failed = 1;
if ($nic_check_on) {
if ( DIAG nic_check_basic ) {
echo "Failure detected in basic NIC test\n"
if ($oven && $old_bootp_scheme) {
DIAG boot -f bootp()nic_basic.fail;
}
return(1);
}
}
# (MINIMIZE) if ($oven && $old_bootp_scheme) { DIAG boot -f bootp()nic_basic.pass; }
#
if ( DIAG tlb ) {
echo "Failure detected in tlb test\n";
if ($oven && $old_bootp_scheme) {
DIAG boot -f bootp()pm_tlb.fail;
}
return(1);
}
if ($mp) {
$tmp = DIAG exec -v $slave -f tlb
if ($tmp) {
echo "Failure detected in tlb test\n";
if ($oven && $old_bootp_scheme) {
DIAG boot -f bootp()pm_tlb.fail;
}
return(1);
}
}
# (MINIMIZE) if ($oven && $old_bootp_scheme) { DIAG boot -f bootp()pm_tlb.pass; }
#
if ( DIAG utlb ) {
echo "Failure detected in utlb test\n";
if ($oven && $old_bootp_scheme) {
DIAG boot -f bootp()pm_utlb.fail;
}
return(1);
}
if ($mp) {
$tmp = DIAG exec -v $slave -f utlb
if ($tmp) {
echo "Failure detected in utlb test\n";
if ($oven && $old_bootp_scheme) {
DIAG boot -f bootp()pm_utlb.fail;
}
return(1);
}
}
# (MINIMIZE) if ($oven && $old_bootp_scheme) { DIAG boot -f bootp()pm_utlb.pass; }
#
if ( DIAG dcache1 ) {
echo "Failure detected in dcache1 test\n"
if ($oven && $old_bootp_scheme) {
DIAG boot -f bootp()pm_dcache1.fail;
}
return(1);
}
#
if ( DIAG icache1 ) {
echo "Failure detected in icache1 test\n"
if ($oven && $old_bootp_scheme) {
DIAG boot -f bootp()pm_icache1.fail;
}
return(1);
}
#
echo "The Icache Test Could Take About 5 minutes... Please wait"
if ( DIAG icache2 ) {
echo "Failure detected in icache2 test\n"
if ($oven && $old_bootp_scheme) {
DIAG boot -f bootp()pm_icache2.fail;
}
return(1);
}
if ($mp) {
$tmp = DIAG exec -v $slave -f icache2;
if($tmp) {
echo "Failure detected in icache2 test\n"
if ($oven && $old_bootp_scheme) {
DIAG boot -f bootp()pm_icache2.fail;
}
return(1);
}
}
# (MINIMIZE) if ($oven && $old_bootp_scheme) { DIAG boot -f bootp()pm_icache2.pass; }
#
if ( DIAG scache1 ) {
echo "Failure detected in scache1 test\n"
if ($oven && $old_bootp_scheme) {
DIAG boot -f bootp()pm_scache1.fail;
}
return(1);
}
if ($mp) {
$tmp = DIAG exec -v $slave -f scache1;
if($tmp) {
echo "Failure detected in scache1 test\n"
if ($oven && $old_bootp_scheme) {
DIAG boot -f bootp()pm_scache1.fail;
}
return(1);
}
}
# (MINIMIZE) if ($oven && $old_bootp_scheme) { DIAG boot -f bootp()pm_scache1.pass; }
#
if ( DIAG scache2 ) {
echo "Failure detected in scache2 test\n"
if ($oven && $old_bootp_scheme) {
DIAG boot -f bootp()pm_scache2.fail;
}
return(1);
}
if ($mp) {
$tmp = DIAG exec -v $slave -f scache2;
if($tmp) {
echo "Failure detected in scache2 test\n"
if ($oven && $old_bootp_scheme) {
DIAG boot -f bootp()pm_scache2.fail;
}
return(1);
}
}
# (MINIMIZE) if ($oven && $old_bootp_scheme) { DIAG boot -f bootp()pm_scache2.pass; }
#
if( DIAG fpu ) {
echo "Failure detected in fpu test\n";
if ($oven && $old_bootp_scheme) {
DIAG boot -f bootp()pm_fpu.fail;
}
return(1);
}
if ($mp) {
$tmp = DIAG exec -v $slave -f "fpu";
if($tmp) {
echo "Failure detected in fpu test\n";
if ($oven && $old_bootp_scheme) {
DIAG boot -f bootp()pm_fpu.fail;
}
return(1);
}
}
# (MINIMIZE) if ($oven && $old_bootp_scheme) { DIAG boot -f bootp()pm_fpu.pass; }
#
if( DIAG lpackd ) {
echo "Failure detected in lpackd test\n";
if ($oven && $old_bootp_scheme) {
DIAG boot -f bootp()pm_lpackd.fail;
}
return(1);
}
# (MINIMIZE) if ($oven && $old_bootp_scheme) { DIAG boot -f bootp()pm_lpackd.pass; }
#
# XXX ct not working for mp yet
# if (!$mp)
# {
# if ( DIAG ct ) {
# echo "\nFailure Detected in ct test";
# if ($oven) { DIAG boot -f bootp()pm_ct.fail; }
# return($failed);
# }
# }
# if ($oven) { DIAG boot -f bootp()pm_ct.pass; }
echo "PM Tests Passed **********\n"
$failed = 0;
if ($oven && $old_bootp_scheme) { DIAG boot -f bootp()pm_all.pass; }
#
if ($go_unix) {
FUNC unix;
}
}
#
FUNC pmva {
$failed=0
$go_unix = 0;
#
echo "\nVoltage changed to 5.25V"
DIAG chg_volt -m 3 -l 2 -f 0;
DIAG ide_delay -s 15;
FUNC pm;
if ($failed) {
echo "\nFailure Detected IN PM at 5.25V"
$go_unix = 1;
return(1);
}
#
echo "\nVoltage changed to 5.0V"
DIAG chg_volt -m 3 -l 1 -f 0;
DIAG ide_delay -s 15;
FUNC pm;
#
$go_unix = 1;
FUNC gounix_fieldmode;
if ($failed) {
echo "\nFailure Detected IN PM at 5.0V"
return(1);
} else {
echo "PM Tests Passed **********\n";
if ($oven == 0) {
FUNC unix
}
}
}
#
# Speed Racer front plane
# Tests to be added here: LED, BR_ID/PS_ID/SYS_ID check
#
FUNC fp {
echo "\nStarting FRONT PLANE Tests **********"
report = 4;
$failed=0;
if( DIAG xbow ){
echo "\nFailure Detected IN FRONT PLANE"
if ($oven && $old_bootp_scheme) {
DIAG boot -f bootp()fp_xbow.fail;
}
$failed=1;
return(1);
}
echo "FRONT PLANE Tests Passed **********\n"
if ($oven && $old_bootp_scheme) { DIAG boot -f bootp()fp_xbow.pass; }
if ($go_unix) {
FUNC unix;
}
}
#
#wrappers for low memory tests
FUNC ldram {
$tmp = DIAG ldram_bkend -- -p --;
if ($tmp) $failed = 1;
return (1);
}
FUNC lkh {
$tmp = DIAG lkh_bkend -- -p --;
if ($tmp) $failed = 1;
return (1);
}
#
FUNC memory {
echo "\nStarting MEMORY Tests **********"
#
# it takes about 3 minutes
echo "PLEASE WAIT ... THE FOLLOWING TEST TAKES ABOUT 6 MINUTES"
#
$tmp = FUNC ldram;
if($failed){
echo "\nFailure Detected in ldram test"
if ($oven && $old_bootp_scheme) {
DIAG boot -f bootp()ip30_ldram.fail;
}
return(1);
}
# (MINIMIZE) if ($oven && $old_bootp_scheme) { DIAG boot -f bootp()ip30_ldram.pass; }
# illegal i3 e1 e2
# Run new SIMM tests
$tmp = DIAG memtest 11;
if($tmp) {
echo "\nFailure Detected in memtest tests"
$failed = 1;
if ($oven && $old_bootp_scheme) {
DIAG boot -f bootp()ip30_memtest.fail;
}
return(1);
}
# (MINIMIZE) if ($oven && $old_bootp_scheme) { DIAG boot -f bootp()ip30_memtest.pass; }
#
if ( DIAG ecctest ) {
echo "\nFailure Detected in ecc tests"
$failed=1;
if ($oven && $old_bootp_scheme) {
DIAG boot -f bootp()ip30_ecctest.fail;
}
return(1);
}
# (MINIMIZE) if ($oven && $old_bootp_scheme) { DIAG boot -f bootp()ip30_ecctest.pass; }
echo "MEMORY Tests Passed **********\n"
}
#
FUNC ip30 {
echo "\nStarting IP30 Tests **********"
report = 4;
$failed = 1;
if ($nic_check_on) {
if ( DIAG nic_check_basic ) {
if ($oven && $old_bootp_scheme) {
DIAG boot -f bootp()nic_basic.fail;
}
return(1);
}
}
$tmp = FUNC heart;
if($failed) {
echo "\nFailure Detected in HEART test"
if ($oven && $old_bootp_scheme) {
DIAG boot -f bootp()ip30_heart.fail;
}
return(1);
}
# (MINIMIZE) if ($oven && $old_bootp_scheme) { DIAG boot -f bootp()ip30_heart.pass; }
$tmp = FUNC bridge;
if($failed) {
echo "\nFailure Detected in BRIDGE test"
if ($oven && $old_bootp_scheme) {
DIAG boot -f bootp()ip30_bridge.fail;
}
return(1);
}
# (MINIMIZE) if ($oven && $old_bootp_scheme) { DIAG boot -f bootp()ip30_bridge.pass; }
$tmp = FUNC xbow
if ($failed) {
echo "\nFailure Detected in XBOW test"
if ($oven && $old_bootp_scheme) {
DIAG boot -f bootp()fp_xbow.fail;
}
return(1);
}
# (MINIMIZE) if ($oven && $old_bootp_scheme) { DIAG boot -f bootp()fp_xbow.pass; }
$tmp = FUNC memory;
if ($failed) {
echo "\nFailure Detected in MEMORY test"
return(1);
}
if (! DIAG is_lx) {
$tmp = FUNC rad;
if($failed) {
echo "\nFailure Detected in RAD tests"
if ($oven && $old_bootp_scheme) {
DIAG boot -f bootp()ip30_rad.fail;
}
return(1);
}
# (MINIMIZE) if ($oven && $old_bootp_scheme) { DIAG boot -f bootp()ip30_rad.pass; }
}
$tmp = FUNC ioc3;
if($failed) {
echo "\nFailure Detected in IOC3 tests"
if ($oven && $old_bootp_scheme) {
DIAG boot -f bootp()ip30_ioc3.fail;
}
return(1);
}
# (MINIMIZE) if ($oven && $old_bootp_scheme) { DIAG boot -f bootp()ip30_ioc3.pass; }
$tmp = FUNC rtc;
if($failed) {
echo "\nFailure Detected in RTC tests"
if ($oven && $old_bootp_scheme) {
DIAG boot -f bootp()ip30_rtc.fail;
}
return(1);
}
# (MINIMIZE) if ($oven && $old_bootp_scheme) { DIAG boot -f bootp()ip30_rtc.pass; }
$tmp = FUNC duart;
if($failed) {
echo "\nFailure Detected in DUART tests"
if ($oven && $old_bootp_scheme) {
DIAG boot -f bootp()ip30_duart.fail;
}
return(1);
}
# (MINIMIZE) if ($oven && $old_bootp_scheme) { DIAG boot -f bootp()ip30_duart.pass; }
# $tmp = FUNC scsi;
# if($failed) {
# echo "\nFailure Detected in SCSI tests"
# if ($oven && $old_bootp_scheme) {
# DIAG boot -f bootp()ip30_scsi.fail;
# }
# return(1);
# }
# (MINIMIZE) if ($oven && $old_bootp_scheme) { DIAG boot -f bootp()ip30_scsi.pass; }
$tmp = FUNC plp;
if($failed) {
echo "\nFailure Detected in Parallel Port Test"
return($failed);
}
echo "IP30 Tests Passed **********\n";
$failed=0;
if ($oven && $old_bootp_scheme) { DIAG boot -f bootp()ip30_all.pass; }
if ($go_unix) {
FUNC unix;
}
}
#
FUNC ip30va {
$failed =0;
$go_unix = 0;
echo "\nVoltage changed to 4.75V"
DIAG chg_volt -m 3 -l 0 -f 0;
DIAG ide_delay -s 15;
FUNC ip30;
DIAG chg_volt -m 3 -l 1 -f 0;
DIAG ide_delay -s 15;
if ($failed) {
echo "\nFailure Detected IN IP30 in 4.75V";
return(1);
}
echo "\nVoltage changed to 5.25V"
DIAG chg_volt -m 3 -l 2 -f 0;
DIAG ide_delay -s 15;
FUNC ip30;
DIAG chg_volt -m 3 -l 1 -f 0;
DIAG ide_delay -s 15;
#
$go_unix = 1;
#
FUNC gounix_fieldmode;
if ($failed) {
echo "\nFailure Detected IN IP30 in 5.25V";
return(1);
} else {
echo "ALL TESTS IN IP30 Passed **********";
FUNC do_unix;
}
}
#
FUNC pm_fp_ip30 {
$failed=1;
FUNC pm;
if($failed) {
echo "\nFailure Detected IN PM";
return(1);
}
FUNC fp;
if($failed) {
echo "\nFailure Detected IN FRONT PLANE";
return(1);
}
FUNC ip30;
if($failed) {
echo "\nFailure Detected IN IP30";
return(1);
}
$failed=0;
}
#
FUNC racer {
$failed = 0;
$go_unix = 0;
FUNC pm_fp_ip30;
$go_unix = 1;
FUNC gounix_fieldmode;
if ($failed) {
echo "\nFailure Detected IN RACER";
return(1);
} else {
echo "ALL TESTS IN RACER Passed **********";
FUNC do_unix;
}
}
#
FUNC racerva {
$go_unix = 0;
$failed =0;
echo "\nVoltage changed to 4.75V"
DIAG chg_volt -m 3 -l 0 -f 0;
DIAG ide_delay -s 15;
FUNC pm_fp_ip30;
DIAG chg_volt -m 3 -l 1 -f 0;
DIAG ide_delay -s 15;
#
if ($failed) {
echo "\nFailure Detected IN RACER AT 4.75V";
return(1);
}
#
echo "\nVoltage changed to 5.25V"
DIAG chg_volt -m 3 -l 2 -f 0;
DIAG ide_delay -s 15;
FUNC pm_fp_ip30
DIAG chg_volt -m 3 -l 1 -f 0;
DIAG ide_delay -s 15;
#
$go_unix = 1;
FUNC gounix_fieldmode;
if($failed) {
echo "\nFailure Detected IN RACER AT 5.25V"
return(1);
} else {
echo "ALL TESTS IN RACER Passed **********";
FUNC do_unix;
}
}
#
report = 4;
$failed = 0;
$quick = 0;
$num_rss = 1;
$solid = 0;
FUNC delay {
DIAG ide_delay -s 2;
}
#
FUNC mg_rtfifo_loop {
#
$failed = 1;
$status = DIAG mg_setboard ;
if ($status == 0) { $failed = 1; return (1); }
#
FUNC delay;
DIAG mg_hqfifoinit;
#
# report=2
echo " ============ Data Format tests done through PIO ============="
$status = DIAG mg_rtpio_loop -i 4 -o 0
if ($status == 1) return (1);
$status = DIAG mg_rtpio_loop -i 4 -o 1
if ($status == 1) return (1);
$status = DIAG mg_rtpio_loop -i 3 -o 2
if ($status == 1) return (1);
$status = DIAG mg_rtpio_loop -i 2 -o 0
if ($status == 1) return (1);
$status = DIAG mg_rtpio_loop -i 2 -o 1
if ($status == 1) return (1);
$status = DIAG mg_rtpio_loop -i 1 -o 0
if ($status == 1) return (1);
$status = DIAG mg_rtpio_loop -i 1 -o 1
if ($status == 1) return (1);
$status = DIAG mg_rtpio_loop -i 0 -o 0
if ($status == 1) return (1);
$status = DIAG mg_rtpio_loop -i 0 -o 1
if ($status == 1) return (1);
#
$status = DIAG mg_setboard ;
if ($status == 0) return (1);
FUNC delay;
DIAG mg_hqfifoinit;
#
$status = DIAG mg_rtdma_loop -p 2 ;
if ($status == 1) return (1);
#
$failed = 0;
# return (0);
}
#
FUNC enabdisp {
DIAG mg_pokexmap -r XMAP_DIB_CTRL0 -d 0x100
}
#
#
FUNC allsetup {
$failed = 1;
DIAG mg_gfxreset;
FUNC delay;
FUNC delay;
$status = DIAG mg_setboard ;
if ($status == 0) return (1);
FUNC delay;
DIAG mg_hqfifoinit;
#
FUNC delay;
DIAG mg_set_0ge;
FUNC delay;
if ( DIAG mg_reset) return (1);
FUNC delay;
FUNC delay;
DIAG resetcons
if (! DIAG mg_gfxconsole) {
if ( DIAG mg_sync_repp) return (1);
if ( DIAG mg_sync_pprdram) return (1);
DIAG mg_xmapinit
if ( DIAG mg_rdram_ccsearch) return (1);
DIAG mg_initppregs
FUNC enabdisp
DIAG mg0_clear_color
}
$solid = DIAG mg_issolid;
$failed = 0;
}
#
FUNC re4setup {
$failed = 1;
echo "Calling mg_gfxreset"
DIAG mg_gfxreset;
FUNC delay;
echo "Calling gioslot"
$status = DIAG mg_setboard ;
if ($status == 0) return (1);
FUNC delay;
DIAG mg_hqfifoinit;
#
FUNC delay;
echo "Calling mg_set_0ge"
DIAG mg_set_0ge;
FUNC delay;
echo "Calling mg_re4reset"
if ( DIAG mg_re4reset) return (1);
FUNC delay;
FUNC delay;
DIAG resetcons
$solid = DIAG mg_issolid;
$failed = 0;
}
#
FUNC ppsetup {
$failed = 1;
if (! DIAG mg_gfxconsole) {
echo
echo "Syncing RE-0 to PP-0"
DIAG mg_sync_repp -r 0 -p 0
FUNC delay
echo "Syncing RE-0 to PP-1"
DIAG mg_sync_repp -r 0 -p 1
FUNC delay
$tmp = DIAG mg_setnumre4s -q
echo
echo "Syncing RE-0 to PP-0 to rdram-0"
DIAG mg_sync_pprdram_repair -r 0 -p 0 -d 0
FUNC delay
echo "Syncing RE-0 to PP-0 to rdram-1"
DIAG mg_sync_pprdram_repair -r 0 -p 0 -d 1
FUNC delay
echo "Syncing RE-0 to PP-0 to rdram-2"
DIAG mg_sync_pprdram_repair -r 0 -p 0 -d 2
FUNC delay
echo "Syncing RE-0 to PP-1 to rdram-0"
DIAG mg_sync_pprdram_repair -r 0 -p 1 -d 0
FUNC delay
echo "Syncing RE-0 to PP-1 to rdram-1"
DIAG mg_sync_pprdram_repair -r 0 -p 1 -d 1
FUNC delay
echo "Syncing RE-0 to PP-1 to rdram-2"
DIAG mg_sync_pprdram_repair -r 0 -p 1 -d 2
FUNC delay
$tmp = DIAG mg_setnumre4s -q
if ($tmp == 2) {
echo;
echo "Syncing RE-1 to PP-2"
DIAG mg_sync_repp -r 0 -p 0
FUNC delay
echo "Syncing RE-1 to PP-3"
DIAG mg_sync_repp -r 0 -p 1
FUNC delay
echo;
echo "Syncing RE-1 to PP-2 to rdram-0"
DIAG mg_sync_pprdram_repair -r 1 -p 0 -d 0
FUNC delay
echo "Syncing RE-1 to PP-2 to rdram-1"
DIAG mg_sync_pprdram_repair -r 1 -p 0 -d 1
FUNC delay
echo "Syncing RE-1 to PP-2 to rdram-2"
DIAG mg_sync_pprdram_repair -r 1 -p 0 -d 2
FUNC delay
echo "Syncing RE-1 to PP-3 to rdram-0"
DIAG mg_sync_pprdram_repair -r 1 -p 1 -d 0
FUNC delay
echo "Syncing RE-1 to PP-3 to rdram-1"
DIAG mg_sync_pprdram_repair -r 1 -p 1 -d 1
FUNC delay
echo "Syncing RE-1 to PP-3 to rdram-2"
DIAG mg_sync_pprdram_repair -r 1 -p 1 -d 2
FUNC delay
}
#
echo
echo "Calling mg_sync_pprdram to sync everybody together"
DIAG mg_sync_pprdram
echo "Calling mg_xmapinit"
DIAG mg_xmapinit
FUNC delay;
FUNC delay
echo "Calling mg_rdram_ccsearch"
DIAG mg_rdram_ccsearch
FUNC delay
echo "Calling mg_initppregs"
DIAG mg_initppregs
FUNC delay
echo "Calling enabdisp"
FUNC enabdisp
FUNC delay
echo "Calling mg0_clear_color"
#XXX DIAG mg0_clear_color
}
$solid = DIAG mg_issolid;
$failed = 0;
}
#
FUNC bkendsetup {
$failed = 1;
echo "Calling mg_bkendreset to do some setup..."
DIAG mg_bkendreset;
echo "Calling mg_dacreset..."
DIAG mg_dacreset;
echo "Calling mg_vc3reset..."
if ( DIAG mg_vc3reset) {
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"
DIAG mg_vc3init -t 0x107;
echo "Calling mg_progcmap 0x0 to load the cmaps with a linear ramp"
DIAG mg_progcmap 0x0;
echo "Calling mg_gammaprog 0x0 to load the gamma tables with a linear ramp"
DIAG mg_gammaprog 0x0;
echo "Calling mg_vc3init -t 0x107 (2nd time)"
DIAG mg_vc3init -t 0x107;
FUNC enabdisp
DIAG mg0_clear_color
$solid = DIAG mg_issolid;
$failed = 0;
}
#
# allows colors to be correct for drawings
FUNC drawsetup {
FUNC delay;
# mg_gfxreset;
# mg_set_0ge;
# mg_reset;
FUNC delay;
FUNC delay;
DIAG mg_xmapinit;
}
#
FUNC scene1 {
DIAG mg0_clear_color
DIAG fpusetup
DIAG 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
DIAG fpusetup
DIAG 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
DIAG mg0_line -x 1000 1000 0 100 100 0 0 -n 0 0 0 100 100 0 0
DIAG mg0_line -x 0 1000 0 100 0 100 0 -n 1000 0 0 100 100 0 0
DIAG mg0_clear_color -t 500 500 -d 600 600
DIAG mg0_point -x 551 -y 551 -r 100 -g100 -b100 -a100
DIAG mg0_rect -t 900 100 -d 1000 200 -r100 -g 20 -b 100
}
#
FUNC scene1_overlay {
DIAG 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
DIAG mg0_rect -t 1100 100 -d 1200 200 -r100 -g 20 -b 100 -f 0x41
DIAG mg0_line -x 100 500 0 100 0 0 0 -n 800 0 0 100 0 0 0 -f 0x41
DIAG mg0_point -x 600 -y 500 -r 100 -f 0x41
DIAG mg0_point -x 610 -y 500 -r 100 -f 0x41
DIAG mg0_point -x 590 -y 500 -r 100 -f 0x41
DIAG mg0_clear_color -f 0x41 -r 100 -t 800 700 -d 900 800
}
#
FUNC restore_pps {
DIAG mg_dispctrl -o1 -p1 -r0
FUNC delay
DIAG mg_dispctrl -o1 -p0 -r0
FUNC delay;
DIAG mg_dispctrl -o1 -p0 -r1
FUNC delay;
DIAG mg_dispctrl -o1 -p1 -r1
FUNC delay;
}
#
# 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 ...
#
FUNC 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>
#
FUNC 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>
#
FUNC 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>
#
FUNC 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
}
}
#
FUNC scene_test {
$failed = 0;
if ( DIAG mg_reset) return(1);
FUNC delay;
FUNC drawsetup
DIAG mg_vc3clearcursor;
echo "------ Executing Scene Test with CRC ------"
echo "------ Testing the scene in the display buffer ------"
FUNC scene1
$numrss = DIAG mg_setnumre4s -q
FUNC dac_crc_rss0_pp0 "scene_test display buffer" 0x125 0x256 0x3bf 0x3fc 0xfc 0x1f $numrss;
if ($failed) {return (1);}
FUNC dac_crc_rss0_pp1 "scene_test display buffer" 0x3bd 0xe 0x141 0x1c4 0x6d 0x29f $numrss;
if ($failed) {return (1);}
if ($numrss == 2) {
FUNC dac_crc_rss1_pp0 "scene_test display buffer" 0x125 0x256 0x3bf;
if ($failed) {return (1);}
FUNC dac_crc_rss1_pp1 "scene_test display buffer" 0x3bd 0xe 0x141;
if ($failed) {return (1);}
}
DIAG ide_delay -s 6
echo "------ Testing the scene in the overlay buffer ------"
FUNC allsetup
if ($failed) { return (1); }
FUNC scene1;
FUNC delay;
DIAG mg_overlay_on;
DIAG mg0_clear_color -f 0x41;
DIAG mg_enabdisp_overlay;
FUNC scene1_overlay;
FUNC dac_crc_rss0_pp0 "scene_test overlay buffer" 0x3d7 0x64 0x21e 0x51 0x3c6 0x34f $numrss;
if ($failed) {return (1);}
FUNC dac_crc_rss0_pp1 "scene_test overlay buffer" 0x29e 0x34f 0x34d 0x163 0x2a4 0x3fe $numrss;
if ($failed) {return (1);}
if ($numrss == 2) {
FUNC dac_crc_rss1_pp0 "scene_test overlay buffer" 0x2a1 0x219 0x3d;
if ($failed) {return (1);}
FUNC dac_crc_rss1_pp1 "scene_test overlay buffer" 0x29e 0x34f 0x34d;
if ($failed) {return (1);}
}
DIAG ide_delay -s 6
echo "Resetting graphics ";
DIAG mg_disabdisp_overlay;
DIAG mg_overlay_off;
FUNC allsetup;
if ($failed) { return (1); }
echo "******** Scene Test with DAC CRC PASSED ********"
}
#
FUNC mg_tram_rev_nobuff {
$failed = 1;
$status = DIAG mg_dma_tram -r -e 1 -p
if ($status) return(1);
$num_rss = DIAG mg_setnumre4s -q
if ($num_rss == 2) {
$status = DIAG mg_dma_tram -r -e 1 -p -n 1
if ($status) return (1);
}
$failed = 0;
}
#
FUNC alphablend_test {
$failed = 0;
$status = DIAG mg_reset;
if ($status) {
$failed = 1;
return (1);
}
FUNC delay;
FUNC drawsetup;
DIAG mg0_clear_color
DIAG mg_vc3clearcursor
$status = DIAG mg_alphablend
if ($status) {
$failed = 1;
echo;
echo " -- ERROR"
echo
echo; echo "alphablend RDRAM readback FAILED"; echo
return (1);
}
#
$numrss = DIAG mg_setnumre4s -q
FUNC dac_crc_rss0_pp0 "alphablend" 0x167 0x3b2 0x3a0 0x1d2 0x1d 0x2d6 $numrss
FUNC dac_crc_rss0_pp1 "alphablend" 0x254 0x370 0x266 0xf8 0x235 0xc4 $numrss
#
if ($numrss == 2) {
FUNC dac_crc_rss1_pp0 "alphablend" 0x167 0x3b2 0x3a0;
FUNC dac_crc_rss1_pp1 "alphablend" 0x254 0x370 0x266;
}
#
FUNC restore_pps;
#
if ($failed) {
echo "******** Alphablend Test with DAC CRC FAILED ********"
return (1);
}
else
echo "******** Alphablend Test with DAC CRC PASSED ********"
}
#
FUNC hqtest {
echo "\nStarting HQ Tests **********"
$failed = 1;
DIAG buffon;
$status = DIAG mg_setboard ;
if ($status == 0) return (1);
FUNC delay;
DIAG mg_hqfifoinit;
FUNC delay;
DIAG mg_hqfifoinit
DIAG mg_set_0ge
# if ( DIAG mg_hq_initcheck) return(1);
if ( DIAG mg_hq) return(1);
$status = DIAG mg_setboard ;
if ($status == 0) return (1);
FUNC delay;
DIAG mg_hqfifoinit;
FUNC delay;
if ( DIAG mg_hq_cp) return(1);
if ( DIAG mg_hq_converter) return (1);
if ( DIAG mg_hq_cfifo) return(1);
if ( DIAG mg_hq4reg) return(1);
echo "HQ Tests Passed **********"
$failed = 0;
DIAG resetcons;
DIAG buffoff
}
#
# GE11 test scripts
#
#
FUNC gioslot_2GE {
$status = DIAG mg_setboard ;
if ($status == 0) { $failed = 1; return (1); }
DIAG delay;
DIAG mg_hqfifoinit;
}
FUNC ge_ucode_test {
DIAG mg_pon_puts -s "testing ge_ucode_test 1....\r"
$status = DIAG mg_ge_reg
if ($status) {
$failed = 1;
return(1);
}
DIAG mg_pon_puts -s "testing ge_ucode_test 2....\n\r"
$status = DIAG mg_ge_ucode_dbus
if ($status) {
$failed = 1;
return(1);
}
DIAG mg_pon_puts -s "testing ge_ucode_test 3....\n\r"
$status = DIAG mg_ge_ucode_abus
if ($status) {
$failed = 1;
return(1);
}
DIAG mg_pon_puts -s "testing ge_ucode_test 4....\n\r"
$status = DIAG mg_ge_ucode_a
if ($status) {
$failed = 1;
return(1);
}
DIAG mg_pon_puts -s "testing ge_ucode_test 5....\n\r"
$status = DIAG mg_ge_ucode_m
if ($status) {
$failed = 1;
return(1);
}
}
FUNC ge0_ucode {
$failed = 0;
$status = DIAG mg_setboard ;
if ($status == 0) { $failed = 1; return (1); }
DIAG delay;
DIAG mg_hqfifoinit;
#
$ge_no = DIAG mg_queryGE;
if ($ge_no == 0)
{
echo "GE11 doesn't exist";
}
else if ($ge_no == 1){
echo "testing GE0 Ucode memory....";
DIAG mg_pon_puts -s "testing ge0_ucode 1....\n\r"
$status = DIAG mg_setboard ;
if ($status == 0) { $failed = 1; return (1); }
DIAG delay;
DIAG mg_hqfifoinit;
DIAG mg_pon_puts -s "testing ge0_ucode 2....\n\r"
#
DIAG buffon;
# mg_gfxreset;
DIAG mg_set_ge 0;
FUNC ge_ucode_test;
if ($failed) { return (1); }
DIAG mg_pon_puts -s "testing ge0_ucode 3....\n\r"
}
else if ($ge_no == 2) {
echo "testing GE0(2GE system) Ucode memory....";
FUNC gioslot_2GE;
DIAG buffon;
# mg_gfxreset;
DIAG mg_set_ge 0;
FUNC ge_ucode_test;
if ($failed) { return (1); }
}
DIAG mg_pon_puts -s "testing ge0_ucode 3....\n\r"
}
FUNC ge1_ucode {
$failed = 0;
$status = DIAG mg_setboard ;
if ($status == 0) { $failed = 1; return (1); }
DIAG delay;
DIAG mg_hqfifoinit;
#
$ge_no = DIAG mg_queryGE;
if ($ge_no == 2)
{
echo "testing GE1 Ucode memory....";
FUNC gioslot_2GE;
DIAG buffon;
# mg_gfxreset;
DIAG mg_set_ge 1;
FUNC ge_ucode_test;
if ($failed) { return (1); }
}
else {
echo "GE11 doesn't exist";
}
}
#
#
FUNC getest {
#
DIAG mg_pon_puts -s "testing getest 1....\n\r"
echo " mg_ge_cram in progress "
$status = DIAG mg_ge_cram;
if ($status) {
$failed = 1;
return(1);
}
#
DIAG mg_pon_puts -s "testing getest 2....\n\r"
echo " mg_ge_eram in progress "
$status = DIAG mg_ge_eram;
if ($status) {
$failed = 1;
return(1);
}
#
DIAG mg_pon_puts -s "testing getest 3....\n\r"
echo " mg_ge_wram in progress "
$status = DIAG mg_ge_wram;
if ($status) {
$failed = 1;
return(1);
}
#
DIAG mg_pon_puts -s "testing getest 4....\n\r"
echo " give more delay "
#
DIAG delay ;
DIAG delay ;
DIAG delay ;
#
DIAG mg_pon_puts -s "testing getest 5....\n\r"
echo " mg_ge_alu in progress "
$status = DIAG mg_ge_alu;
if ($status) {
$failed = 1;
return(1);
}
#
DIAG mg_pon_puts -s "testing getest 6....\n\r"
echo " mg_ge_dreg in progress "
$status = DIAG mg_ge_dreg;
if ($status) {
$failed = 1;
return(1);
}
echo " mg_ge_inst in progress "
DIAG mg_pon_puts -s "testing getest 7....\n\r"
$status = DIAG mg_ge_inst;
if ($status) {
$failed = 1;
return(1);
}
#
DIAG mg_pon_puts -s "testing getest 8....\n\r"
echo " mg_ge_dma in progress "
$status = DIAG mg_ge_dma;
if ($status) {
$failed = 1;
return(1);
}
#
#
echo "******** GE Test Suite Execution Completed ********"
#
}
#
#
#
FUNC ge0_setup {
$failed = 0;
DIAG mg_pon_puts -s "testing ge0_setup 1....\n\r"
$status = DIAG mg_setboard ;
if ($status == 0) { $failed = 1; return (1); }
DIAG delay;
DIAG mg_hqfifoinit;
#
DIAG mg_pon_puts -s "testing ge0_setup 2....\n\r"
$ge_no = DIAG mg_queryGE;
if ($ge_no == 0)
{
echo "No GE11 exists";
}
DIAG mg_pon_puts -s "testing ge0_setup 3....\n\r"
if ($ge_no == 2) {
echo "------ Executing GE0 test setup ------"
FUNC gioslot_2GE;
$status = DIAG mg_hq_dnload;
if ($status) {
$failed = 1;
return (1);
}
#
# mg_gfxreset;
DIAG mg_set_ge 0;
$status = DIAG mg_ge11_dnload;
if ($status) {
$failed = 1;
return (1);
}
#
DIAG mg_ge_go ;
}
DIAG mg_pon_puts -s "testing ge0_setup 4....\n\r"
if ($ge_no == 1) {
#
echo "------ Executing GE0 test setup ------"
FUNC gioslot_2GE;
DIAG buffon;
$status = DIAG mg_hq_dnload;
if ($status) {
$failed = 1;
return (1);
}
#
# mg_gfxreset;
DIAG delay;
$status = DIAG mg_setboard ;
if ($status == 0) { $failed = 1; return (1); }
DIAG delay;
DIAG mg_hqfifoinit;
DIAG delay;
DIAG mg_set_ge 0;
#
$status = DIAG mg_ge11_dnload;
if ($status) {
$failed = 1;
return (1);
}
#
DIAG mg_set_ge 0;
DIAG mg_ge_go;
}
DIAG mg_pon_puts -s "testing ge0_setup 5....\n\r"
# DIAG buffoff;
# DIAG resetcons;
}
FUNC ge0_test {
$failed =0;
$status = DIAG mg_setboard ;
if ($status == 0) { $failed = 1; return (1); }
DIAG delay;
DIAG mg_hqfifoinit;
DIAG buffon;
$ge_no = DIAG mg_queryGE;
if($ge_no == 0)
{
echo "No GE11 exists";
}
else {
#
echo "------ Executing GE Test Suite on :: GE0 ------"
if ($quick == 0) {
FUNC ge0_ucode;
if ($failed) {
$failed = 1;
return (1);
}
}
FUNC ge0_setup; if ($failed) { return (1); }
DIAG delay;
# mg_gfxreset;
DIAG resetcons;
DIAG buffoff;
DIAG buffon;
DIAG delay;
$status = DIAG mg_setboard ;
if ($status == 0) { $failed = 1; return (1); }
DIAG delay;
DIAG mg_hqfifoinit;
#
$status = FUNC getest;
if ($failed) {
$failed = 1;
return(1);
}
}
DIAG resetcons;
DIAG buffoff;
}
#
FUNC tge_setup {
$failed = 0;
$status = DIAG mg_setboard ;
if ($status == 0) { $failed = 1; return (1); }
DIAG delay;
DIAG mg_hqfifoinit;
#
$ge_no = DIAG mg_queryGE;
if ($ge_no == 2)
{
echo "=== tge_setup ===";
FUNC gioslot_2GE;
DIAG buffon;
$status = DIAG mg_hq_dnload;
if ($status) {
$failed = 1;
return (1);
}
#
# mg_gfxreset;
$status = DIAG mg_setboard ;
if ($status == 0) { $failed = 1; return (1); }
DIAG delay;
DIAG mg_hqfifoinit;
#
DIAG delay;
DIAG mg_set_ge 0;
$status = DIAG mg_ge11_dnload;
if ($status) {
$failed = 1;
return (1);
}
#
DIAG mg_ge_go;
DIAG mg_set_ge 1;
$status = DIAG mg_ge11_dnload;
if ($status) {
$failed = 1;
return (1);
}
#
DIAG mg_ge_go;
DIAG mg_set_ge 0;
DIAG resetcons;
DIAG buffoff;
}
if($ge_no == 1)
{
echo "Setup GE11_0 only";
FUNC ge0_setup; if ($failed) { return (1); };
}
if($ge_no == 0)
{
echo "NO ge11 exists";
}
DIAG buffoff;
DIAG resetcons;
}
#
FUNC tge_test {
$failed =0;
$status = DIAG mg_setboard ;
if ($status == 0) { $failed = 1; return (1); }
DIAG delay;
DIAG mg_hqfifoinit;
DIAG buffon;
$ge_no = DIAG mg_queryGE;
if ($ge_no == 2)
{
if ($quick == 0) {
FUNC ge0_ucode;
if ($failed) {
$failed = 1;
return (1);
}
FUNC ge1_ucode;
if ($failed) {
$failed = 1;
return (1);
}
}
FUNC tge_setup; if ($failed) { return (1); }
FUNC gioslot_2GE;
DIAG resetcons;
DIAG buffoff;
DIAG buffon
# DIAG mg_gfxreset
$status = DIAG mg_setboard ;
if ($status == 0) { $failed = 1; return (1); }
DIAG delay;
DIAG mg_hqfifoinit;
#
DIAG delay;
DIAG mg_set_2ge;
DIAG mg_set_ge 0
DIAG mg_ge_go
DIAG mg_set_ge 1
DIAG mg_ge_go
DIAG mg_set_ge 0
echo " testing GE0 COREs....";
$status = FUNC getest;
if ($failed) {
$failed = 1;
DIAG resetcons;
DIAG buffoff;
return(1);
}
DIAG mg_nextge;
DIAG mg_set_ge 1;
DIAG mg_ge_go
echo " testing GE1 COREs....";
$status = FUNC getest
if ($failed) {
$failed = 1;
DIAG resetcons;
DIAG buffoff;
return(1);
}
DIAG resetcons;
DIAG buffoff
}
if ($ge_no == 1)
{
echo "Test only GE11_0";
$status = FUNC ge0_test;
if ($status) {
$failed = 1;
DIAG resetcons;
DIAG buffoff;
return(1);
}
DIAG resetcons;
DIAG buffoff
}
if ($ge_no == 0)
{
echo "No GE11 exists";
}
}
# End of Ge test scripts
#
FUNC dactest {
echo "\nStarting DAC Tests **********"
$failed = 1;
if ( DIAG mg_dacreset) return(1);
if ( DIAG mg_dacmodereg) return(1);
if ( DIAG mg_dacreset) return(1);
if ( DIAG mg_dacaddrreg) return(1);
if ( DIAG mg_dacreset) return(1);
if ( DIAG mg_clrpaletteaddrUniq) return(1);
if ( DIAG mg_dacreset) return(1);
if ( DIAG mg_clrpalettewalkbit) return(1);
if ( DIAG mg_dacreset) return(1);
if ( DIAG mg_clrpalettepatrn) return(1);
if ( DIAG mg_dacreset) return(1);
$failed = 0;
echo "DAC Tests Passed **********"
}
#
FUNC vc3test {
echo "\nStarting VC3 Tests **********"
$failed = 1;
if ( DIAG mg_vc3reset) return(1);
if ( DIAG mg_vc3internalreg) return(1);
if ( DIAG mg_vc3addrsbus) return(1);
if ( DIAG mg_vc3databus) return(1);
if ( DIAG mg_vc3addrsuniq) return(1);
if ( DIAG mg_vc3patrn) return(1);
$failed = 0;
echo "VC3 Tests Passed **********"
}
#
FUNC cmaptest {
echo "\nStarting CMAP Tests **********"
$failed = 1;
$status = DIAG mg_vc3init -t 0x107;
if ($status) return (1);
if (! DIAG mg_cmaprev) return (1);
$status = DIAG mg_cmapdatabus 0;
if ($status) return (1);
$status = DIAG mg_cmapaddrsbus 0;
if ($status) return (1);
# report=4;
$status = DIAG mg_cmappatrn -w 0 -f 0 -l 8191;
if ($status) return (1);
$status = DIAG mg_cmapaddrsuniq 0;
if ($status) return (1);
$status = DIAG mg_cmapdatabus 1;
if ($status) return (1);
$status = DIAG mg_cmapaddrsbus 1;
if ($status) return (1);
# report=4;
$status = DIAG mg_cmappatrn -w 1 -f 0 -l 8191 ;
if ($status) return (1);
$status = DIAG mg_cmapaddrsuniq 1;
if ($status) return (1);
$failed = 0;
echo "CMAP Tests Passed **********"
}
#
FUNC mg_dcbdma_tests {
$failed =0;
$status = DIAG mg_setboard ;
if ($status == 0) { $failed = 1; return (1); }
FUNC delay;
DIAG mg_hqfifoinit;
#
DIAG buffon;
DIAG mg_dcbdma 1;
FUNC delay ;
FUNC delay ;
FUNC delay;
echo "\nStarting DAC Tests in DCBDMA Mode **********"
$status = FUNC dactest;
if ($failed) { DIAG mg_dcbdma 0; return(1); }
echo "DAC Tests in DCBDMA Mode Passed **********"
#
echo "\nStarting VC3 Tests in DCBDMA Mode **********"
$status = FUNC vc3test;
if ($failed) { DIAG mg_dcbdma 0; return(1); }
echo "VC3 Tests in DCBDMA Mode Passed **********"
FUNC delay ;
FUNC delay ;
FUNC delay;
#
#XXX echo " CMAP Tests in DCBDMA mode "
#XXX $status = FUNC cmaptest;
#XXX if ($failed) {
#XXX DIAG mg_dcbdma 0;
#XXX return(1);
#XXX }
DIAG mg_dcbdma 0;
# FUNC delay ;
# FUNC delay ;
# FUNC delay;
if ( DIAG mg_reset) { $failed = 1; return(1); }
FUNC delay;
}
#
FUNC bkend {
echo "\nStarting BACK_END Tests **********"
$failed = 0;
$status = DIAG mg_setboard ;
if ($status == 0) { $failed = 1; return (1); }
FUNC delay;
DIAG mg_hqfifoinit;
#
DIAG buffon;
$status = FUNC dactest;
if ($failed) { return(1); }
#
$status = FUNC vc3test;
if ($failed) { return(1); }
#
$status = FUNC cmaptest;
if ($failed) { return(1); }
#
if ( DIAG mg_reset) { $failed = 1; return(1); }
FUNC delay;
#
$status = FUNC mg_dcbdma_tests;
if ($failed == 1) { return (1); }
#
if ( DIAG mg_reset) { $failed = 1; return(1); }
FUNC delay;
#
$status = DIAG mg_xmapdcbreg 0;
if ($status) { $failed = 1; return(1); }
#
$status = DIAG mg_xmapdcbreg 1;
if ($status) { $failed = 1; return(1); }
#
$tmp = DIAG mg_setnumre4s -q
if ($tmp == 2) {
$status = DIAG mg_xmapdcbreg 2;
if ($status) { $failed = 1; return(1); }
$status = DIAG mg_xmapdcbreg 3;
if ($status) { $failed = 1; return(1); }
}
#
if ( DIAG mg_reset) { $failed = 1; return(1); }
FUNC delay;
#
DIAG mg_starttiming;
if ( DIAG mg_crcwalk) { $failed = 1; return(1); }
#
$status = DIAG mg_vc3init -t 0x139
if ($status) { $failed = 1; return(1); }
#
if ( DIAG mg_crcwalk) { $failed = 1; return(1); }
if ( DIAG mg_reset) { $failed = 1; return(1); }
echo "Testing 1600x1200 timing"
DIAG mg_stoptiming;
$status = DIAG mg_vc3init -t 0x159
if ($status) { $failed = 1; return(1); }
DIAG mg_starttiming;
if ( DIAG mg_crcwalk) { $failed = 1; return(1); }
#
FUNC delay;
if ( DIAG mg_reset) { $failed = 1; return (1); }
FUNC delay;
DIAG mg_xmapinit;
FUNC delay;
FUNC delay;
FUNC delay;
FUNC delay;
#
echo "Executing mg_vc3cursorposition test..."
if ( DIAG mg_vc3cursorposition) { $failed = 1; return(1); }
#
DIAG resetcons;
DIAG buffoff;
echo "BACK_END Tests Passed **********"
}
#
FUNC retest {
echo "\nStarting RE Tests **********"
$failed = 1;
# report = 3;
if ( DIAG mg_re_status_reg) return(1);
#
if ( DIAG mg_re_rdwr_regs) return(1);
#
$status = DIAG mg_re_internal_ram -t0;
if ($status) return(1);
#
$status = DIAG mg_re_internal_ram -t1;
if ($status) return(1);
#
$status = DIAG mg_re_internal_ram -t2;
if ($status) return(1);
#
$status = DIAG mg_re_internal_ram -t3;
if ($status) return(1);
#
$status = DIAG mg_re_internal_ram -t4;
if ($status) return(1);
#
$status = DIAG mg_re_internal_ram -t5;
if ($status) return(1);
#
echo "RE Tests Passed **********"
# report = 4;
$failed = 0;
}
#
FUNC tetest {
echo "\nStarting TE Tests **********"
$failed = 1;
# report = 3;
#
if ( DIAG mg_read_te_version) return(1);
#
$status = DIAG mg_re_rdwr_regs -t;
if ($status) return(1);
#
echo "TE Tests Passed **********"
# report = 4;
$failed = 0;
}
#
FUNC dmatest {
echo "\nStarting DMA Tests **********"
$failed = 1;
if ( DIAG mg_host_hqdma) return(1);
#
if ( DIAG mg_host_hq_cp_dma) return(1);
#
# if ( DIAG mg_ge_dma) return(1);
#
# DMA PIO Test
$status = DIAG mg_dma_pp -r1 -e1 -w1 -d1 -t -m 0 0 -b 0x240 -y 16 -z 192
if ($status) return(1);
$failed = 0;
echo "DMA Tests Passed **********"
}
#
FUNC drawclose {
FUNC delay;
DIAG resetcons;
FUNC delay;
FUNC delay;
}
#
FUNC re_texlut_test {
$failed = 0;
$status = DIAG mg_re_rev -r 0
if ($status) {
status = DIAG mg_reset;
if ($status) {
$failed = 1;
return (1);
}
FUNC delay;
DIAG mg0_clear_color;
DIAG buffon;
FUNC drawsetup
DIAG mg_vc3clearcursor;
#
DIAG mg_retexlut;
#
$numrss = DIAG mg_setnumre4s -q
FUNC dac_crc_rss0_pp0 "re_texlut_test" 0x78 0x19b 0x1c3 0x358 0x19 0x1cb $numrss
FUNC dac_crc_rss0_pp1 "re_texlut_test" 0xaf 0x302 0x158 0x35e 0x67 0xfa $numrss
#
if ($numrss == 2) {
FUNC dac_crc_rss1_pp0 "re_texlut_test" 0x78 0x19b 0x1c3;
FUNC dac_crc_rss1_pp1 "re_texlut_test" 0xaf 0x302 0x158;
}
#
FUNC restore_pps;
DIAG resetcons;
DIAG buffoff;
echo "Resetting graphics for you"
if ($failed) {
echo "******** re_texlut_test with DAC CRC FAILED ********"
return (1);
}
else {
FUNC allsetup
if ($failed) {
return(1);
}
echo "******** re_texlut_test with DAC CRC PASSED ********"
}
}
}
#
FUNC tex_draw_test {
echo "\nStarting TEXTURE Tests **********"
$failed = 1;
#
FUNC drawsetup;
FUNC delay;
if ( DIAG mg_notex_line) return(1);
#
FUNC delay;
FUNC delay;
if ( DIAG mg_notex_poly) return(1);
#
FUNC delay;
FUNC delay;
if ( DIAG mg_tex_poly) return(1);
#
FUNC delay;
FUNC delay;
if ( DIAG mg_tex_lut4d) return(1);
#
FUNC delay;
FUNC delay
if ( DIAG mg_tex_mddma) return(1);
#
FUNC delay;
$failed = 0;
FUNC allsetup
if ($failed) return(1);
FUNC re_texlut_test;
if ($failed) return(1);
#
FUNC drawclose;
#
echo "TEXTURE Tests Passed **********"
}
#
FUNC repp_test {
echo "\nStarting RE-PP Tests **********"
$failed =0;
FUNC allsetup;
if ($failed) return(1);
DIAG resetcons;
DIAG buffoff;
DIAG buffon
# FUNC delay;
# FUNC delay;
# FUNC delay;
DIAG mg_vc3clearcursor;
FUNC delay;
FUNC delay;
FUNC delay;
FUNC drawsetup;
FUNC delay;
#
$failed = 1;
echo " mg_z_tri in progess ..."
FUNC delay;
if ( DIAG mg_z_tri) return(1);
#
echo " mg_lines in progess ..."
FUNC delay;
FUNC delay;
FUNC delay;
FUNC delay;
if ( DIAG mg_lines) return(1);
#
echo " mg_points in progess ..."
FUNC delay;
FUNC delay;
if ( DIAG mg_points) return(1);
#
echo " mg_stip_tri in progess ..."
FUNC delay;
FUNC delay;
if ( DIAG mg_stip_tri) return(1);
#
echo " mg_xblock in progess ..."
FUNC delay;
FUNC delay;
if ( DIAG mg_xblock) return(1);
#
echo " mg_chars in progess ..."
FUNC delay;
FUNC delay;
if ( DIAG mg_chars) return(1);
#
echo " mg_logicop in progess ..."
FUNC delay;
FUNC delay;
if ( DIAG mg_logicop) return(1);
#
echo " mg_dither in progess ..."
FUNC delay;
FUNC delay;
if ( DIAG mg_dither) return(1);
#
echo " mg_color_tri in progess ..."
FUNC delay;
FUNC delay;
if ( DIAG mg_color_tri) return(1);
#
FUNC delay;
$status = FUNC alphablend_test;
delay;
if ($failed) {
return(1);
}
#
$failed = 0;
FUNC delay;
#XXXX The scene test does not work on console G
if (! DIAG mg_gfxconsole) {
$status = FUNC scene_test;
FUNC delay;
if ($failed) return(1);
}
FUNC delay
FUNC drawclose;
#
echo "RE-PP Tests Passed **********"
}
#
FUNC rdram_mem_quick {
echo "\nStarting QUICK RDRAM Tests **********"
$failed = 1;
# report = 3;
#
FUNC drawsetup
$status = DIAG mg_dma_pp -r0 -e0 -w0 -d0 -b 0x240 -p0 -x 0 -y 4 -z 12 -m 0 0
if ($status) return(1);
$failed = 0;
echo "QUICK RDRAM Tests Passed **********"
#
}
#
FUNC rdram_mem {
echo "\nStarting RDRAM Tests **********"
$failed = 1;
# Z Buffer Test
FUNC drawsetup
$status = DIAG mg_dma_pp -r0 -e0 -w0 -d0 -b 0x0 -p3 -x 0x0
if ($status) return(1);
# Color Buffer Test
$status = DIAG mg_dma_pp -r0 -e0 -w0 -d0 -b 0x240 -p3 -x 0x0
if ($status) return (1);
# Overlay Buffer Test
$status = DIAG mg_dma_pp -r0 -e0 -w0 -d0 -b 0x1c0 -p3 -x 0x0
if ($status) return (1);
#
$tmp = DIAG mg_setnumre4s -q
if ($tmp == 2) {
# Display Buffer-CD Test
$status = DIAG mg_dma_pp -r0 -e0 -w0 -d0 -b 0x320 -p3 -x 0x0
if ($status) return (1);
# ACC36 or AUX 0 Buffer
$status = DIAG mg_dma_pp -r0 -e0 -w0 -d0 -b 0x0e0 -p3 -x 0x0
if ($status) return (1);
}
#
$failed = 0;
echo "RDRAM Tests Passed **********"
# report = 4;
}
#
FUNC tram_mem {
echo "\nStarting TRAM Tests **********"
$failed =0;
$status = DIAG mg_setnumtrams ;
if ( $status ) {
DIAG mg0_clear_color;
FUNC delay;
FUNC delay;
FUNC delay
FUNC mg_tram_rev_nobuff
if ($failed ) {
echo "mg_tram_rev_nobuff failed"
return (1);
}
FUNC delay;
$status = DIAG mg_dma_tram -m 3 -e 0
if ($status) { $failed = 1; return (1); }
FUNC delay
$num_rss = DIAG mg_setnumre4s -q
FUNC delay
if ($num_rss == 2) {
$status = DIAG mg_dma_tram -m 3 -e 0 -n 1
if ($status) { $failed = 1; return (1); }
}
echo "TRAM Tests Passed **********"
}
}
#
FUNC rssbus_test {
DIAG buffon;
echo "\nStarting RSSBUS Tests **********"
$failed = 0;
$status = DIAG mg_hq 4
if ($status) { $failed = 1; return (1); }
echo "RSSBUS Tests Passed **********"
DIAG resetcons;
DIAG buffoff;
}
FUNC re4flextest {
FUNC rssbus_test
}
#
# Takes an arg for which RSS you are testing
FUNC mg_rtdma2tram {
$failed =0;
$status = DIAG mg_setnumtrams ;
if ( $status ) {
FUNC allsetup;
if ($failed) return (1);
FUNC delay;
FUNC delay;
DIAG buffon;
DIAG mg0_clear_color;
FUNC delay;
DIAG mg_rtdma 1;
FUNC delay ;
FUNC delay;
# report=4;
$status = DIAG mg_dma_tram -m 3 -e 0 -n $1;
if ($status) {
$failed = 1;
DIAG resetcons;
DIAG buffoff;
DIAG mg_rtdma 0;
return(1);
}
DIAG resetcons;
DIAG buffoff;
FUNC delay;
FUNC delay;
DIAG mg_rtdma 0;
FUNC delay ;
FUNC delay;
}
}
#
#
$iteration = 1
#
FUNC mg_test_all {
echo " Iteration " $iteration
DIAG ttyprint 1;
$failed = 0;
$status = DIAG mg_setboard ;
if ($status == 0) { $failed = 1; return (1); }
FUNC delay;
DIAG mg_hqfifoinit;
#
report=4;
FUNC delay;
FUNC delay;
FUNC delay;
DIAG buffon
if ( DIAG mg_reset) { $failed = 1; return (1); }
$solid = DIAG mg_issolid;
DIAG ide_delay -s 4
$status = FUNC hqtest;
if ($failed) {
echo "\nFailure Detected in HQ test"
return(1);
}
#
DIAG ide_delay -s 4
# FUNC delay;
# FUNC delay;
DIAG buffon;
if ($nic_check_on) {
if ( DIAG mg_nic_check) {
$failed = 1;
echo "\nFailure Detected in NIC test"
return(1);
}
}
#
report=2
FUNC mg_rtfifo_loop;
DIAG resetcons;
DIAG buffoff;
report=4
#
if ($failed == 1) {
echo "\nFailure Detected in RT FIFO test"
return (1);
}
report=4;
if ($oven && $old_bootp_scheme) { DIAG boot -f bootp()mg_hq.pass; }
#
$status = FUNC rssbus_test;
if ($failed) {
echo "\nFailure Detected in RSS BUS test"
DIAG resetcons;
DIAG buffoff;
return(1);
}
#
#
DIAG resetcons;
if ( DIAG mg_reset) {
$failed = 1;
return (1);
}
DIAG ide_delay -s 5;
DIAG resetcons;
#
$status = FUNC bkend;
if ($failed) {
echo "\nFailure Detected in BACK_END test"
DIAG resetcons;
DIAG buffoff;
return(1);
}
if ($oven && $old_bootp_scheme) { DIAG boot -f bootp()mg_bkend.pass; }
DIAG resetcons;
if ( DIAG mg_i2c) {
echo "\nFailure Detected in I2C test"
$failed = 1;
return(1);
}
# (MINIMIZE) if ($oven && $old_bootp_scheme) { DIAG boot -f bootp()mg_i2c.pass; }
if ( DIAG mg_reset) {
$failed = 1;
return (1);
}
#
report=2
$ge_no = DIAG mg_queryGE;
if ($ge_no == 2) {
echo "Testing 2GE system...."
$status = FUNC tge_test;
if ($failed) {
echo "\nFailure Detected in 2GE test"
DIAG resetcons;
DIAG buffoff;
return(1);
}
}
#
if ($ge_no == 1) {
echo "Testing 1GE system...."
$status = FUNC ge0_test;
if ($failed) {
echo "\nFailure Detected in 1GE test"
DIAG resetcons;
DIAG buffoff;
return(1);
}
}
#
if ($oven && $old_bootp_scheme) { DIAG boot -f bootp()mg_ge.pass; }
DIAG ide_delay -s 8;
FUNC allsetup;
if ($failed) {
DIAG resetcons;
DIAG buffoff;
return(1);
}
#
DIAG buffon
#
report=3
$status = FUNC retest;
if ($failed) {
echo "\nFailure Detected in RE test"
DIAG resetcons;
DIAG buffoff;
return(1);
}
report=4
if ($oven && $old_bootp_scheme) { DIAG boot -f bootp()mg_re.pass; }
#
$status = FUNC dmatest;
if ($failed) {
echo "\nFailure Detected in DMA test"
DIAG resetcons;
DIAG buffoff;
return(1);
}
DIAG resetcons;
DIAG buffoff;
if ($oven && $old_bootp_scheme) { DIAG boot -f bootp()mg_dma.pass; }
DIAG buffon;
report=4;
$status = FUNC rdram_mem_quick;
if ($failed) {
echo "\nFailure Detected in RDRAM QUICK test"
DIAG resetcons;
DIAG buffoff;
return(1);
}
report=4;
if ($quick == 0) {
$status = FUNC rdram_mem;
if ($failed) {
echo "\nFailure Detected in RDRAM test"
DIAG resetcons;
DIAG buffoff;
return(1);
}
}
DIAG resetcons;
DIAG buffoff;
DIAG ide_delay -s 20
if ($oven && $old_bootp_scheme) { DIAG boot -f bootp()mg_rdram.pass; }
#
DIAG buffon;
$status = FUNC repp_test;
if ($failed) {
echo "\nFailure Detected in RE-PP test"
DIAG resetcons;
DIAG buffoff;
return(1);
}
if ($oven && $old_bootp_scheme) { DIAG boot -f bootp()mg_repp.pass; }
#
DIAG ide_delay -s 20
DIAG resetcons;
DIAG buffoff;
DIAG buffon;
$status = DIAG mg_setnumtrams ;
if ($status == 0) {
echo "No Texture Subsystem in the Graphics Board"
echo "Tests for Texture Subsystem are skipped..."
} else {
$status = FUNC tetest
if ($failed) {
echo "\nFailure Detected in TE test"
echo "The RE-TE connection may be BAD"
DIAG resetcons;
DIAG buffoff;
return(1);
}
if ($quick == 0) {
echo "Testing TRAM memory"
FUNC delay;
FUNC delay;
FUNC delay;
$status = FUNC tram_mem;
if ($failed) {
echo "\nFailure Detected in TRAM test"
DIAG resetcons;
DIAG buffoff;
return(1);
}
if ($oven && $old_bootp_scheme) {
DIAG boot -f bootp()mg_tram.pass;
}
}
$status = FUNC mg_rtdma2tram 0;
if ($failed) {
echo "\nFailure Detected in RT-DMA test"
echo " RSS-0 failed for real-time texture DMA";
return (1);
}
$num_rss = DIAG mg_setnumre4s -q;
FUNC delay;
if ($num_rss == 2) {
$status = FUNC mg_rtdma2tram 1;
if ($failed) {
echo "\nFailure Detected in RT-DMA test"
echo " RSS-1 failed for real-time texture DMA";
return (1);
}
}
if ($oven && $old_bootp_scheme) {
DIAG boot -f bootp()rtdma.pass;
}
DIAG buffon;
$status = FUNC tex_draw_test
if ($failed) {
echo "\nFailure Detected in TEXTURE test"
DIAG resetcons;
DIAG buffoff;
return(1);
}
DIAG resetcons;
DIAG buffoff;
#(MINIMIZE) if ($oven && $old_bootp_scheme) {
#(MINIMIZE) DIAG boot -f bootp()mg_tex.pass;
#(MINIMIZE) }
}
echo "GRAPHICS Tests Passed **********"
DIAG ide_delay -s 4;
DIAG resetcons;
DIAG buffoff;
report=4
$iteration = $iteration + 1
}
#
FUNC mg_test_tram {
report=4;
$failed = 0;
FUNC allsetup;
if ($failed) { return (1); } ;
DIAG buffon;
$status = DIAG mg_setnumtrams ;
if ($status) {
FUNC tetest;
if ($failed) {
echo "tetest FAILED"
echo "The RE-TE connection may be BAD"
DIAG resetcons;
DIAG buffoff;
return(-1);
}
FUNC tram_mem;
if ($failed) {
echo "\nFailure Detected in TRAM test"
DIAG resetcons;
DIAG buffoff;
return(1);
}
$status = FUNC tex_draw_test;
if ($failed) {
echo "\nFailure Detected in TEXTURE test"
DIAG resetcons;
DIAG buffoff;
return(1);
}
DIAG resetcons;
DIAG buffoff;
FUNC mg_rtdma2tram 0;
if ($failed) {
echo "\nFailure Detected in RT-DMA test"
echo " Real-time texture DMA in RSS 0 Failed"
return (1);
}
$num_rss = DIAG mg_setnumre4s -q
FUNC delay
if ($num_rss == 2) {
FUNC mg_rtdma2tram 1;
if ($failed) {
echo "\nFailure Detected in RT-DMA test"
echo " Real-time texture DMA in RSS 1 Failed";
return (1);
}
}
}
}
#
FUNC mg_mhead_all {
$status = DIAG mg_setport 9;
if ($status == 1) {
$status = FUNC mg_test_all;
if ($failed == 1) return (1);
}
$status = DIAG mg_setport 10;
if ($status == 1) {
$status = FUNC mg_test_all;
if ($failed == 1) return (1);
}
$status = DIAG mg_setport 11;
if ($status == 1) {
$status = FUNC mg_test_all;
if ($failed == 1) return (1);
}
$status = DIAG mg_setport 12;
if ($status == 1) {
$status = FUNC mg_test_all;
if ($failed == 1) return (1);
}
$status = DIAG mg_setport 13;
if ($status == 1) {
$status = FUNC mg_test_all;
if ($failed == 1) return (1);
}
}
#
echo "IDE name:" $0;
#
$dl = DIAG ide_getenv -s dlserver;
DIAG setenv -p ge_ucode_from_disk 1;
if (( $0 == "bootp()/usr/local/boot/func30.ide.test" ) || ( $0 == "bootp()/usr/local/boot/func30gfx.ide.test" ) || ( $0 == "bootp()/usr/local/boot/func30pm.ide.test" )) {
$dl = 0 ;
$func = 1 ;
}
#
if (( $0 == "bootp()/usr/local/boot/func30.ide" ) || ( $0 == "bootp()/usr/local/boot/func30gfx.ide" ) || ( $0 == "bootp()/usr/local/boot/func30pm.ide" ) ) {
$dl = 0 ;
$func = 1 ;
}
else {
if (( $0 == "bootp()/usr/local/boot/runin30.ide" ) || ( $0 == "bootp()/usr/local/boot/runin30.ide.test" )) {
DIAG setenv testmod pm10-ip30-gfx ;
DIAG setenv gfxvolt nom ;
DIAG setenv cpuvolt nom ;
DIAG setenv numloops 1 ;
$dl = 128 ;
$runin = 1 ;
}
$testmod = DIAG ide_getenv -s testmod
$cpuvolt = DIAG ide_getenv -s cpuvolt
$gfxvolt = DIAG ide_getenv -s gfxvolt
$nloops = DIAG ide_getenv -s numloops;
}
#
FUNC menu;
DIAG ttyprint 1;
FUNC gfx {
$is_odsy = FUNC xtalk_nic_probe;
if ($is_odsy == 49171) { # 0xc013
echo "\nDiagnostics for Odyssey graphics boards are Unix-based"
FUNC do_unix;
}
else {
if ($is_odsy == 49155) { # 0xc003
$status = FUNC mg_test_all;
if ($failed) {
echo "\nFailure Detected IN GRAPHICS"
if ($oven && $old_bootp_scheme) {
DIAG boot -f bootp()gfx.fail
}
return(1);
} else {
echo "ALL TESTS IN GRAPHICS PASSED\n";
if ($oven && $old_bootp_scheme) {
DIAG boot -f bootp()gfx_all.pass;
} else {
FUNC do_unix;
}
}
}
else {
echo "\nNo graphics boards detected"
FUNC do_unix;
}
}
}
#
FUNC gfxva {
$is_odsy = FUNC xtalk_nic_probe;
if ($is_odsy == 49171) { # 0xc013
echo "\nDiagnostics for Odyssey graphics boards are Unix-based"
FUNC do_unix;
}
else {
if ($is_odsy == 49155) { # 0xc003
$failed =0;
echo "\nVoltage changed to 4.75V"
DIAG chg_volt -m 3 -l 0 -f 0;
DIAG ide_delay -s 15;
$status = FUNC mg_test_all;
DIAG chg_volt -m 3 -l 1 -f 0;
DIAG ide_delay -s 15;
if ($failed) {
echo "\nFailure Detected IN GRAPHICS AT 4.75V";
return(1);
}
echo "\nVoltage changed to 5.25V"
DIAG chg_volt -m 3 -l 2 -f 0;
DIAG ide_delay -s 15;
$status = FUNC mg_test_all;
DIAG chg_volt -m 3 -l 1 -f 0;
DIAG ide_delay -s 15;
if($failed) {
echo "\nFailure Detected IN GRAPHICS AT 5.25V"
return($failed);
} else {
echo "ALL TESTS IN GRAPHICS PASSED";
FUNC do_unix;
}
}
else {
echo "\nNo graphics boards detected"
FUNC do_unix;
}
}
}
# runtest assumes scripts called pm10, pm20. Create aliases here:
#
FUNC pm10 {
FUNC pm;
}
#
FUNC pm20 {
FUNC pm;
}
#
FUNC radical {
echo "\nStarting RADICAL Tests **********"
$failed = DIAG rad_all_cards;
if($failed) {
echo "\nFailure Detected in RADICAL Card test"
return(1);
} else {
echo "\nRADICAL Card test passed"
if ($go_unix) {
setenv AutoLoad Yes
FUNC unix;
}
}
}
#
FUNC shoebox {
echo "\nStarting SHOEBOX Tests **********"
$failed = DIAG shoebox_all;
if($failed) {
echo "\nFailure Detected in SHOEBOX test"
return(1);
} else {
echo "\nSHOEBOX test passed"
if ($go_unix) {
setenv AutoLoad Yes
FUNC unix;
}
}
}
#
FUNC send_boot_msg {
DIAG 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;
#
FUNC change_volt {
if ($what_volt == 2) {
echo "Changing voltage to HIGH"
DIAG chg_volt -m 3 -l 2 -f 0;
}
if ($what_volt == 1) {
echo "Changing voltage to NOM"
DIAG chg_volt -m 3 -l 1 -f 0;
}
if ($what_volt == 0) {
echo "Changing voltage to LOW"
DIAG chg_volt -m 3 -l 0 -f 0;
}
DIAG ide_delay -s 15;
return;
}
#
FUNC runtest_bootp {
DIAG ide_delay -s 5;
DIAG boot -f $1
DIAG ide_delay -s 5;
DIAG boot -f $1
}
#
FUNC runtest {
#
$testmod = DIAG ide_getenv -s testmod;
$cpuvolt = DIAG ide_getenv -s cpuvolt;
$gfxvolt = DIAG ide_getenv -s gfxvolt;
$what = 0;
#
for ($what = 0; $what < 3; $what = $what + 1 ) {
$what_volt = DIAG get_volt_level pm10;
if ($what_volt < 8) {
FUNC change_volt
FUNC pm10;
if ($failed) return;
}
$what_volt = DIAG get_volt_level pm20;
if ($what_volt < 8) {
FUNC change_volt
FUNC pm20 ;
if ($failed) return;
}
$what_volt = DIAG get_volt_level ip30;
if ($what_volt < 8) {
FUNC change_volt
FUNC ip30 ;
if ($failed) return;
}
$what_volt = DIAG get_volt_level gfx;
if ($what_volt < 8) {
FUNC change_volt
FUNC gfx ;
if ($failed) return;
}
}
#
}
#
if ($mp) {
$tmp = DIAG exec -v $slave -f slave_dummy;
}
#
# $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) {
if (($0 == "bootp()/usr/local/boot/func30.ide") || ($0 == "bootp()/usr/local/boot/func30.ide.test")) {
echo "Testing ip30va now..."
FUNC ip30va;
}
if (($0 == "bootp()/usr/local/boot/func30gfx.ide") || ($0 == "bootp()/usr/local/boot/func30gfx.ide.test")) {
echo "Testing gfx now..."
FUNC gfx;
}
if (($0 == "bootp()/usr/local/boot/func30pm.ide") || ($0 == "bootp()/usr/local/boot/func30pm.ide.test")) {
echo "Testing pmva now..."
FUNC pmva;
}
}
#
##########################################################
# 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"
DIAG setenv -p ef0mode 10;
FUNC 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;
if ($old_bootp_scheme == 0) {
DIAG bootpon;
}
if ($nloops == 1) {
$nloops = 1;
}
echo "The number of loops = " $nloops
do {
echo "************** Loop NUmber " $nloops "***************"
if ($oven && $old_bootp_scheme) {
DIAG boot -f bootp()start_ide_tests;
}
FUNC runtest;
if ($failed) {
forever wait;
}
$nloops = $nloops - 1;
} while ($nloops > 0);
FUNC do_unix;
} else {
FUNC menu;
}
}
echo ""