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