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