1*1da177e4SLinus Torvalds~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2*1da177e4SLinus TorvaldsMOTOROLA MICROPROCESSOR & MEMORY TECHNOLOGY GROUP 3*1da177e4SLinus TorvaldsM68000 Hi-Performance Microprocessor Division 4*1da177e4SLinus TorvaldsM68060 Software Package 5*1da177e4SLinus TorvaldsProduction Release P1.00 -- October 10, 1994 6*1da177e4SLinus Torvalds 7*1da177e4SLinus TorvaldsM68060 Software Package Copyright � 1993, 1994 Motorola Inc. All rights reserved. 8*1da177e4SLinus Torvalds 9*1da177e4SLinus TorvaldsTHE SOFTWARE is provided on an "AS IS" basis and without warranty. 10*1da177e4SLinus TorvaldsTo the maximum extent permitted by applicable law, 11*1da177e4SLinus TorvaldsMOTOROLA DISCLAIMS ALL WARRANTIES WHETHER EXPRESS OR IMPLIED, 12*1da177e4SLinus TorvaldsINCLUDING IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE 13*1da177e4SLinus Torvaldsand any warranty against infringement with regard to the SOFTWARE 14*1da177e4SLinus Torvalds(INCLUDING ANY MODIFIED VERSIONS THEREOF) and any accompanying written materials. 15*1da177e4SLinus Torvalds 16*1da177e4SLinus TorvaldsTo the maximum extent permitted by applicable law, 17*1da177e4SLinus TorvaldsIN NO EVENT SHALL MOTOROLA BE LIABLE FOR ANY DAMAGES WHATSOEVER 18*1da177e4SLinus Torvalds(INCLUDING WITHOUT LIMITATION, DAMAGES FOR LOSS OF BUSINESS PROFITS, 19*1da177e4SLinus TorvaldsBUSINESS INTERRUPTION, LOSS OF BUSINESS INFORMATION, OR OTHER PECUNIARY LOSS) 20*1da177e4SLinus TorvaldsARISING OF THE USE OR INABILITY TO USE THE SOFTWARE. 21*1da177e4SLinus TorvaldsMotorola assumes no responsibility for the maintenance and support of the SOFTWARE. 22*1da177e4SLinus Torvalds 23*1da177e4SLinus TorvaldsYou are hereby granted a copyright license to use, modify, and distribute the SOFTWARE 24*1da177e4SLinus Torvaldsso long as this entire notice is retained without alteration in any modified and/or 25*1da177e4SLinus Torvaldsredistributed versions, and that such modified versions are clearly identified as such. 26*1da177e4SLinus TorvaldsNo licenses are granted by implication, estoppel or otherwise under any patents 27*1da177e4SLinus Torvaldsor trademarks of Motorola, Inc. 28*1da177e4SLinus Torvalds~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 29*1da177e4SLinus Torvalds68060 SOFTWARE PACKAGE (Kernel version) SIMPLE TESTS 30*1da177e4SLinus Torvalds----------------------------------------------------- 31*1da177e4SLinus Torvalds 32*1da177e4SLinus TorvaldsThe files itest.sa and ftest.sa contain simple tests to check 33*1da177e4SLinus Torvaldsthe state of the 68060ISP and 68060FPSP once they have been installed. 34*1da177e4SLinus Torvalds 35*1da177e4SLinus TorvaldsRelease file format: 36*1da177e4SLinus Torvalds-------------------- 37*1da177e4SLinus TorvaldsThe release files itest.sa and ftest.sa are essentially 38*1da177e4SLinus Torvaldshexadecimal images of the actual tests. This format is the 39*1da177e4SLinus TorvaldsONLY format that will be supported. The hex images were created 40*1da177e4SLinus Torvaldsby assembling the source code and then converting the resulting 41*1da177e4SLinus Torvaldsbinary output images into ASCII text files. The hexadecimal 42*1da177e4SLinus Torvaldsnumbers are listed using the Motorola Assembly syntax assembler 43*1da177e4SLinus Torvaldsdirective "dc.l" (define constant longword). The files can be 44*1da177e4SLinus Torvaldsconverted to other assembly syntaxes by using any word processor 45*1da177e4SLinus Torvaldswith a global search and replace function. 46*1da177e4SLinus Torvalds 47*1da177e4SLinus TorvaldsTo assist in assembling and linking these modules with other modules, 48*1da177e4SLinus Torvaldsthe installer should add symbolic labels to the top of the files. 49*1da177e4SLinus TorvaldsThis will allow the calling routines to access the entry points 50*1da177e4SLinus Torvaldsof these packages. 51*1da177e4SLinus Torvalds 52*1da177e4SLinus TorvaldsThe source code itest.s and ftest.s have been included but only 53*1da177e4SLinus Torvaldsfor documentation purposes. 54*1da177e4SLinus Torvalds 55*1da177e4SLinus TorvaldsRelease file structure: 56*1da177e4SLinus Torvalds----------------------- 57*1da177e4SLinus Torvalds 58*1da177e4SLinus Torvalds(top of module) 59*1da177e4SLinus Torvalds ----------------- 60*1da177e4SLinus Torvalds | | - 128 byte-sized section 61*1da177e4SLinus Torvalds (1) | Call-Out | - 4 bytes per entry (user fills these in) 62*1da177e4SLinus Torvalds | | 63*1da177e4SLinus Torvalds ----------------- 64*1da177e4SLinus Torvalds | | - 8 bytes per entry 65*1da177e4SLinus Torvalds (2) | Entry Point | - user does "bsr" or "jsr" to this address 66*1da177e4SLinus Torvalds | | 67*1da177e4SLinus Torvalds ----------------- 68*1da177e4SLinus Torvalds | | - code section 69*1da177e4SLinus Torvalds (3) ~ ~ 70*1da177e4SLinus Torvalds | | 71*1da177e4SLinus Torvalds ----------------- 72*1da177e4SLinus Torvalds(bottom of module) 73*1da177e4SLinus Torvalds 74*1da177e4SLinus TorvaldsThe first section of this module is the "Call-out" section. This section 75*1da177e4SLinus Torvaldsis NOT INCLUDED in {i,f}test.sa (an example "Call-out" section is provided at 76*1da177e4SLinus Torvaldsthe end of this file). The purpose of this section is to allow the test 77*1da177e4SLinus Torvaldsroutines to reference external printing functions that must be provided 78*1da177e4SLinus Torvaldsby the host operating system. This section MUST be exactly 128 bytes in 79*1da177e4SLinus Torvaldssize. There are 32 fields, each 4 bytes in size. Each field corresponds 80*1da177e4SLinus Torvaldsto a function required by the test packages (these functions and their 81*1da177e4SLinus Torvaldslocation are listed in "68060{ISP,FPSP}-TEST call-outs" below). Each field 82*1da177e4SLinus Torvaldsentry should contain the address of the corresponding function RELATIVE to 83*1da177e4SLinus Torvaldsthe starting address of the "call-out" section. The "Call-out" section must 84*1da177e4SLinus Torvaldssit adjacent to the {i,f}test.sa image in memory. Since itest.sa and ftest.sa 85*1da177e4SLinus Torvaldsare individual tests, they each require their own "Call-out" sections. 86*1da177e4SLinus Torvalds 87*1da177e4SLinus TorvaldsThe second section, the "Entry-point" section, is used by external routines 88*1da177e4SLinus Torvaldsto access the test routines. Since the {i,f}test.sa hex files contain 89*1da177e4SLinus Torvaldsno symbol names, this section contains function entry points that are fixed 90*1da177e4SLinus Torvaldswith respect to the top of the package. The currently defined entry-points 91*1da177e4SLinus Torvaldsare listed in section "68060{ISP,FPSP}-TEST entry points" below. A calling 92*1da177e4SLinus Torvaldsroutine would simply execute a "bsr" or "jsr" that jumped to the selected 93*1da177e4SLinus Torvaldsfunction entry-point. 94*1da177e4SLinus Torvalds 95*1da177e4SLinus TorvaldsFor example, to run the 060ISP test, write a program that includes the 96*1da177e4SLinus Torvaldsitest.sa data and execute something similar to: 97*1da177e4SLinus Torvalds 98*1da177e4SLinus Torvalds bsr _060ISP_TEST+128+0 99*1da177e4SLinus Torvalds 100*1da177e4SLinus Torvalds(_060ISP_TEST is the starting address of the "Call-out" section; the "Call-out" 101*1da177e4SLinus Torvaldssection is 128 bytes long; and the 68060ISP test entry point is located 102*1da177e4SLinus Torvalds0 bytes from the top of the "Entry-point" section.) 103*1da177e4SLinus Torvalds 104*1da177e4SLinus TorvaldsThe third section is the code section. After entering through an "Entry-point", 105*1da177e4SLinus Torvaldsthe entry code jumps to the appropriate test code within the code section. 106*1da177e4SLinus Torvalds 107*1da177e4SLinus Torvalds68060ISP-TEST Call-outs: 108*1da177e4SLinus Torvalds------------------------ 109*1da177e4SLinus Torvalds0x0: _print_string() 110*1da177e4SLinus Torvalds0x4: _print_number() 111*1da177e4SLinus Torvalds 112*1da177e4SLinus Torvalds68060FPSP-TEST Call-outs: 113*1da177e4SLinus Torvalds------------------------- 114*1da177e4SLinus Torvalds0x0: _print_string() 115*1da177e4SLinus Torvalds0x4: _print_number() 116*1da177e4SLinus Torvalds 117*1da177e4SLinus TorvaldsThe test packages call _print_string() and _print_number() 118*1da177e4SLinus Torvaldsas subroutines and expect the main program to print a string 119*1da177e4SLinus Torvaldsor a number to a file or to the screen. 120*1da177e4SLinus TorvaldsIn "C"-like fashion, the test program calls: 121*1da177e4SLinus Torvalds 122*1da177e4SLinus Torvalds print_string("Test passed"); 123*1da177e4SLinus Torvalds 124*1da177e4SLinus Torvalds or 125*1da177e4SLinus Torvalds 126*1da177e4SLinus Torvalds print_number(20); 127*1da177e4SLinus Torvalds 128*1da177e4SLinus TorvaldsFor _print_string(), the test programs pass a longword address 129*1da177e4SLinus Torvaldsof the string on the stack. For _print_number(), the test programs pass 130*1da177e4SLinus Torvaldsa longword number to be printed. 131*1da177e4SLinus Torvalds 132*1da177e4SLinus TorvaldsFor debugging purposes, after the main program performs a "print" 133*1da177e4SLinus Torvaldsfor a test package, it should flush the output so that it's not 134*1da177e4SLinus Torvaldsbuffered. In this way, if the test program crashes, at least the previous 135*1da177e4SLinus Torvaldsstatements printed will be seen. 136*1da177e4SLinus Torvalds 137*1da177e4SLinus Torvalds68060ISP-TEST Entry-points: 138*1da177e4SLinus Torvalds--------------------------- 139*1da177e4SLinus Torvalds0x0: integer test 140*1da177e4SLinus Torvalds 141*1da177e4SLinus Torvalds68060FPSP-TEST Entry-points: 142*1da177e4SLinus Torvalds---------------------------- 143*1da177e4SLinus Torvalds0x00: main fp test 144*1da177e4SLinus Torvalds0x08: FP unimplemented test 145*1da177e4SLinus Torvalds0x10: FP enabled snan/operr/ovfl/unfl/dz/inex 146*1da177e4SLinus Torvalds 147*1da177e4SLinus TorvaldsThe floating-point unit test has 3 entry points which will require 148*1da177e4SLinus Torvalds3 different calls to the package if each of the three following tests 149*1da177e4SLinus Torvaldsis desired: 150*1da177e4SLinus Torvalds 151*1da177e4SLinus Torvaldsmain fp test: tests (1) unimp effective address exception 152*1da177e4SLinus Torvalds (2) unsupported data type exceptions 153*1da177e4SLinus Torvalds (3) non-maskable overflow/underflow exceptions 154*1da177e4SLinus Torvalds 155*1da177e4SLinus TorvaldsFP unimplemented: tests FP unimplemented exception. this one is 156*1da177e4SLinus Torvalds separate from the previous tests for systems that don't 157*1da177e4SLinus Torvalds want FP unimplemented instructions. 158*1da177e4SLinus Torvalds 159*1da177e4SLinus TorvaldsFP enabled: tests enabled snan/operr/ovfl/unfl/dz/inex. 160*1da177e4SLinus Torvalds basically, it enables each of these exceptions and forces 161*1da177e4SLinus Torvalds each using an implemented FP instruction. this process 162*1da177e4SLinus Torvalds exercises _fpsp_{snan,operr,ovfl,unfl,dz,inex}() and 163*1da177e4SLinus Torvalds _real_{snan,operr,ovfl,unfl,dz,inex}(). the test expects 164*1da177e4SLinus Torvalds _real_XXXX() to do nothing except clear the exception 165*1da177e4SLinus Torvalds and "rte". if a system's _real_XXXX() handler creates an 166*1da177e4SLinus Torvalds alternate result, the test will print "failed" but this 167*1da177e4SLinus Torvalds is acceptable. 168*1da177e4SLinus Torvalds 169*1da177e4SLinus TorvaldsMiscellaneous: 170*1da177e4SLinus Torvalds-------------- 171*1da177e4SLinus TorvaldsAgain, itest.sa and ftest.sa are simple tests and do not thoroughly 172*1da177e4SLinus Torvaldstest all 68060SP connections. For example, they do not test connections 173*1da177e4SLinus Torvaldsto _real_access(), _real_trace(), _real_trap(), etc. because these 174*1da177e4SLinus Torvaldswill be system-implemented several different ways and the test packages 175*1da177e4SLinus Torvaldsmust remain system independent. 176*1da177e4SLinus Torvalds 177*1da177e4SLinus TorvaldsExample test package set-up: 178*1da177e4SLinus Torvalds---------------------------- 179*1da177e4SLinus Torvalds_print_str: 180*1da177e4SLinus Torvalds . # provided by system 181*1da177e4SLinus Torvalds rts 182*1da177e4SLinus Torvalds 183*1da177e4SLinus Torvalds_print_num: 184*1da177e4SLinus Torvalds . # provided by system 185*1da177e4SLinus Torvalds rts 186*1da177e4SLinus Torvalds 187*1da177e4SLinus Torvalds . 188*1da177e4SLinus Torvalds . 189*1da177e4SLinus Torvalds bsr _060FPSP_TEST+128+0 190*1da177e4SLinus Torvalds . 191*1da177e4SLinus Torvalds . 192*1da177e4SLinus Torvalds rts 193*1da177e4SLinus Torvalds 194*1da177e4SLinus Torvalds# beginning of "Call-out" section; provided by integrator. 195*1da177e4SLinus Torvalds# MUST be 128 bytes long. 196*1da177e4SLinus Torvalds_060FPSP_TEST: 197*1da177e4SLinus Torvalds long _print_str - _060FPSP_TEST 198*1da177e4SLinus Torvalds long _print_num - _060FPSP_TEST 199*1da177e4SLinus Torvalds space 120 200*1da177e4SLinus Torvalds 201*1da177e4SLinus Torvalds# ftest.sa starts here; start of "Entry-point" section. 202*1da177e4SLinus Torvalds long 0x60ff0000, 0x00002346 203*1da177e4SLinus Torvalds long 0x60ff0000, 0x00018766 204*1da177e4SLinus Torvalds long 0x60ff0000, 0x00023338 205*1da177e4SLinus Torvalds long 0x24377299, 0xab2643ea 206*1da177e4SLinus Torvalds . 207*1da177e4SLinus Torvalds . 208*1da177e4SLinus Torvalds . 209