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