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