162306a36Sopenharmony_ci~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
262306a36Sopenharmony_ciMOTOROLA MICROPROCESSOR & MEMORY TECHNOLOGY GROUP
362306a36Sopenharmony_ciM68000 Hi-Performance Microprocessor Division
462306a36Sopenharmony_ciM68060 Software Package
562306a36Sopenharmony_ciProduction Release P1.00 -- October 10, 1994
662306a36Sopenharmony_ci
762306a36Sopenharmony_ciM68060 Software Package Copyright © 1993, 1994 Motorola Inc.  All rights reserved.
862306a36Sopenharmony_ci
962306a36Sopenharmony_ciTHE SOFTWARE is provided on an "AS IS" basis and without warranty.
1062306a36Sopenharmony_ciTo the maximum extent permitted by applicable law,
1162306a36Sopenharmony_ciMOTOROLA DISCLAIMS ALL WARRANTIES WHETHER EXPRESS OR IMPLIED,
1262306a36Sopenharmony_ciINCLUDING IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE
1362306a36Sopenharmony_ciand any warranty against infringement with regard to the SOFTWARE
1462306a36Sopenharmony_ci(INCLUDING ANY MODIFIED VERSIONS THEREOF) and any accompanying written materials.
1562306a36Sopenharmony_ci
1662306a36Sopenharmony_ciTo the maximum extent permitted by applicable law,
1762306a36Sopenharmony_ciIN NO EVENT SHALL MOTOROLA BE LIABLE FOR ANY DAMAGES WHATSOEVER
1862306a36Sopenharmony_ci(INCLUDING WITHOUT LIMITATION, DAMAGES FOR LOSS OF BUSINESS PROFITS,
1962306a36Sopenharmony_ciBUSINESS INTERRUPTION, LOSS OF BUSINESS INFORMATION, OR OTHER PECUNIARY LOSS)
2062306a36Sopenharmony_ciARISING OF THE USE OR INABILITY TO USE THE SOFTWARE.
2162306a36Sopenharmony_ciMotorola assumes no responsibility for the maintenance and support of the SOFTWARE.
2262306a36Sopenharmony_ci
2362306a36Sopenharmony_ciYou are hereby granted a copyright license to use, modify, and distribute the SOFTWARE
2462306a36Sopenharmony_ciso long as this entire notice is retained without alteration in any modified and/or
2562306a36Sopenharmony_ciredistributed versions, and that such modified versions are clearly identified as such.
2662306a36Sopenharmony_ciNo licenses are granted by implication, estoppel or otherwise under any patents
2762306a36Sopenharmony_cior trademarks of Motorola, Inc.
2862306a36Sopenharmony_ci~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2962306a36Sopenharmony_ci68060 SOFTWARE PACKAGE (Kernel version) SIMPLE TESTS
3062306a36Sopenharmony_ci-----------------------------------------------------
3162306a36Sopenharmony_ci
3262306a36Sopenharmony_ciThe files itest.sa and ftest.sa contain simple tests to check
3362306a36Sopenharmony_cithe state of the 68060ISP and 68060FPSP once they have been installed.
3462306a36Sopenharmony_ci
3562306a36Sopenharmony_ciRelease file format:
3662306a36Sopenharmony_ci--------------------
3762306a36Sopenharmony_ciThe release files itest.sa and ftest.sa are essentially
3862306a36Sopenharmony_cihexadecimal images of the actual tests. This format is the
3962306a36Sopenharmony_ciONLY format that will be supported. The hex images were created
4062306a36Sopenharmony_ciby assembling the source code and then converting the resulting
4162306a36Sopenharmony_cibinary output images into ASCII text files. The hexadecimal
4262306a36Sopenharmony_cinumbers are listed using the Motorola Assembly syntax assembler
4362306a36Sopenharmony_cidirective "dc.l" (define constant longword). The files can be
4462306a36Sopenharmony_ciconverted to other assembly syntaxes by using any word processor
4562306a36Sopenharmony_ciwith a global search and replace function.
4662306a36Sopenharmony_ci
4762306a36Sopenharmony_ciTo assist in assembling and linking these modules with other modules,
4862306a36Sopenharmony_cithe installer should add symbolic labels to the top of the files.
4962306a36Sopenharmony_ciThis will allow the calling routines to access the entry points
5062306a36Sopenharmony_ciof these packages.
5162306a36Sopenharmony_ci
5262306a36Sopenharmony_ciThe source code itest.s and ftest.s have been included but only
5362306a36Sopenharmony_cifor documentation purposes.
5462306a36Sopenharmony_ci
5562306a36Sopenharmony_ciRelease file structure:
5662306a36Sopenharmony_ci-----------------------
5762306a36Sopenharmony_ci
5862306a36Sopenharmony_ci(top of module)
5962306a36Sopenharmony_ci	-----------------
6062306a36Sopenharmony_ci	|		| - 128 byte-sized section
6162306a36Sopenharmony_ci   (1)  |   Call-Out	| - 4 bytes per entry (user fills these in)
6262306a36Sopenharmony_ci	|		|
6362306a36Sopenharmony_ci	-----------------
6462306a36Sopenharmony_ci	|		| - 8 bytes per entry
6562306a36Sopenharmony_ci   (2)  | Entry Point	| - user does "bsr" or "jsr" to this address
6662306a36Sopenharmony_ci	|		|
6762306a36Sopenharmony_ci	-----------------
6862306a36Sopenharmony_ci	|		| - code section
6962306a36Sopenharmony_ci   (3)  ~		~
7062306a36Sopenharmony_ci	|		|
7162306a36Sopenharmony_ci	-----------------
7262306a36Sopenharmony_ci(bottom of module)
7362306a36Sopenharmony_ci
7462306a36Sopenharmony_ciThe first section of this module is the "Call-out" section. This section
7562306a36Sopenharmony_ciis NOT INCLUDED in {i,f}test.sa (an example "Call-out" section is provided at
7662306a36Sopenharmony_cithe end of this file). The purpose of this section is to allow the test
7762306a36Sopenharmony_ciroutines to reference external printing functions that must be provided
7862306a36Sopenharmony_ciby the host operating system. This section MUST be exactly 128 bytes in
7962306a36Sopenharmony_cisize. There are 32 fields, each 4 bytes in size. Each field corresponds
8062306a36Sopenharmony_cito a function required by the test packages (these functions and their
8162306a36Sopenharmony_cilocation are listed in "68060{ISP,FPSP}-TEST call-outs" below). Each field
8262306a36Sopenharmony_cientry should contain the address of the corresponding function RELATIVE to
8362306a36Sopenharmony_cithe starting address of the "call-out" section. The "Call-out" section must
8462306a36Sopenharmony_cisit adjacent to the {i,f}test.sa image in memory. Since itest.sa and ftest.sa
8562306a36Sopenharmony_ciare individual tests, they each require their own "Call-out" sections.
8662306a36Sopenharmony_ci
8762306a36Sopenharmony_ciThe second section, the "Entry-point" section, is used by external routines
8862306a36Sopenharmony_cito access the test routines. Since the {i,f}test.sa hex files contain
8962306a36Sopenharmony_cino symbol names, this section contains function entry points that are fixed
9062306a36Sopenharmony_ciwith respect to the top of the package. The currently defined entry-points
9162306a36Sopenharmony_ciare listed in section "68060{ISP,FPSP}-TEST entry points" below. A calling
9262306a36Sopenharmony_ciroutine would simply execute a "bsr" or "jsr" that jumped to the selected
9362306a36Sopenharmony_cifunction entry-point.
9462306a36Sopenharmony_ci
9562306a36Sopenharmony_ciFor example, to run the 060ISP test, write a program that includes the
9662306a36Sopenharmony_ciitest.sa data and execute something similar to:
9762306a36Sopenharmony_ci
9862306a36Sopenharmony_ci	bsr	_060ISP_TEST+128+0
9962306a36Sopenharmony_ci
10062306a36Sopenharmony_ci(_060ISP_TEST is the starting address of the "Call-out" section; the "Call-out"
10162306a36Sopenharmony_cisection is 128 bytes long; and the 68060ISP test entry point is located
10262306a36Sopenharmony_ci0 bytes from the top of the "Entry-point" section.)
10362306a36Sopenharmony_ci
10462306a36Sopenharmony_ciThe third section is the code section. After entering through an "Entry-point",
10562306a36Sopenharmony_cithe entry code jumps to the appropriate test code within the code section.
10662306a36Sopenharmony_ci
10762306a36Sopenharmony_ci68060ISP-TEST Call-outs:
10862306a36Sopenharmony_ci------------------------
10962306a36Sopenharmony_ci0x0: _print_string()
11062306a36Sopenharmony_ci0x4: _print_number()
11162306a36Sopenharmony_ci
11262306a36Sopenharmony_ci68060FPSP-TEST Call-outs:
11362306a36Sopenharmony_ci-------------------------
11462306a36Sopenharmony_ci0x0: _print_string()
11562306a36Sopenharmony_ci0x4: _print_number()
11662306a36Sopenharmony_ci
11762306a36Sopenharmony_ciThe test packages call _print_string() and _print_number()
11862306a36Sopenharmony_cias subroutines and expect the main program to print a string
11962306a36Sopenharmony_cior a number to a file or to the screen.
12062306a36Sopenharmony_ciIn "C"-like fashion, the test program calls:
12162306a36Sopenharmony_ci
12262306a36Sopenharmony_ci	print_string("Test passed");
12362306a36Sopenharmony_ci
12462306a36Sopenharmony_ci		or
12562306a36Sopenharmony_ci
12662306a36Sopenharmony_ci	print_number(20);
12762306a36Sopenharmony_ci
12862306a36Sopenharmony_ciFor _print_string(), the test programs pass a longword address
12962306a36Sopenharmony_ciof the string on the stack. For _print_number(), the test programs pass
13062306a36Sopenharmony_cia longword number to be printed.
13162306a36Sopenharmony_ci
13262306a36Sopenharmony_ciFor debugging purposes, after the main program performs a "print"
13362306a36Sopenharmony_cifor a test package, it should flush the output so that it's not
13462306a36Sopenharmony_cibuffered. In this way, if the test program crashes, at least the previous
13562306a36Sopenharmony_cistatements printed will be seen.
13662306a36Sopenharmony_ci
13762306a36Sopenharmony_ci68060ISP-TEST Entry-points:
13862306a36Sopenharmony_ci---------------------------
13962306a36Sopenharmony_ci0x0: integer test
14062306a36Sopenharmony_ci
14162306a36Sopenharmony_ci68060FPSP-TEST Entry-points:
14262306a36Sopenharmony_ci----------------------------
14362306a36Sopenharmony_ci0x00: main fp test
14462306a36Sopenharmony_ci0x08: FP unimplemented test
14562306a36Sopenharmony_ci0x10: FP enabled snan/operr/ovfl/unfl/dz/inex
14662306a36Sopenharmony_ci
14762306a36Sopenharmony_ciThe floating-point unit test has 3 entry points which will require
14862306a36Sopenharmony_ci3 different calls to the package if each of the three following tests
14962306a36Sopenharmony_ciis desired:
15062306a36Sopenharmony_ci
15162306a36Sopenharmony_cimain fp test: tests (1) unimp effective address exception
15262306a36Sopenharmony_ci		    (2) unsupported data type exceptions
15362306a36Sopenharmony_ci		    (3) non-maskable overflow/underflow exceptions
15462306a36Sopenharmony_ci
15562306a36Sopenharmony_ciFP unimplemented: tests FP unimplemented exception. this one is
15662306a36Sopenharmony_ci		  separate from the previous tests for systems that don't
15762306a36Sopenharmony_ci		  want FP unimplemented instructions.
15862306a36Sopenharmony_ci
15962306a36Sopenharmony_ciFP enabled: tests enabled snan/operr/ovfl/unfl/dz/inex.
16062306a36Sopenharmony_ci	    basically, it enables each of these exceptions and forces
16162306a36Sopenharmony_ci	    each using an implemented FP instruction. this process
16262306a36Sopenharmony_ci	    exercises _fpsp_{snan,operr,ovfl,unfl,dz,inex}() and
16362306a36Sopenharmony_ci	    _real_{snan,operr,ovfl,unfl,dz,inex}(). the test expects
16462306a36Sopenharmony_ci	    _real_XXXX() to do nothing except clear the exception
16562306a36Sopenharmony_ci	    and "rte". if a system's _real_XXXX() handler creates an
16662306a36Sopenharmony_ci	    alternate result, the test will print "failed" but this
16762306a36Sopenharmony_ci	    is acceptable.
16862306a36Sopenharmony_ci
16962306a36Sopenharmony_ciMiscellaneous:
17062306a36Sopenharmony_ci--------------
17162306a36Sopenharmony_ciAgain, itest.sa and ftest.sa are simple tests and do not thoroughly
17262306a36Sopenharmony_citest all 68060SP connections. For example, they do not test connections
17362306a36Sopenharmony_cito _real_access(), _real_trace(), _real_trap(), etc. because these
17462306a36Sopenharmony_ciwill be system-implemented several different ways and the test packages
17562306a36Sopenharmony_cimust remain system independent.
17662306a36Sopenharmony_ci
17762306a36Sopenharmony_ciExample test package set-up:
17862306a36Sopenharmony_ci----------------------------
17962306a36Sopenharmony_ci_print_str:
18062306a36Sopenharmony_ci	.			# provided by system
18162306a36Sopenharmony_ci	rts
18262306a36Sopenharmony_ci
18362306a36Sopenharmony_ci_print_num:
18462306a36Sopenharmony_ci	.			# provided by system
18562306a36Sopenharmony_ci	rts
18662306a36Sopenharmony_ci
18762306a36Sopenharmony_ci	.
18862306a36Sopenharmony_ci	.
18962306a36Sopenharmony_ci	bsr	_060FPSP_TEST+128+0
19062306a36Sopenharmony_ci	.
19162306a36Sopenharmony_ci	.
19262306a36Sopenharmony_ci	rts
19362306a36Sopenharmony_ci
19462306a36Sopenharmony_ci# beginning of "Call-out" section; provided by integrator.
19562306a36Sopenharmony_ci# MUST be 128 bytes long.
19662306a36Sopenharmony_ci_060FPSP_TEST:
19762306a36Sopenharmony_ci	long	_print_str - _060FPSP_TEST
19862306a36Sopenharmony_ci	long	_print_num - _060FPSP_TEST
19962306a36Sopenharmony_ci	space	120
20062306a36Sopenharmony_ci
20162306a36Sopenharmony_ci# ftest.sa starts here; start of "Entry-point" section.
20262306a36Sopenharmony_ci	long	0x60ff0000, 0x00002346
20362306a36Sopenharmony_ci	long	0x60ff0000, 0x00018766
20462306a36Sopenharmony_ci	long	0x60ff0000, 0x00023338
20562306a36Sopenharmony_ci	long	0x24377299, 0xab2643ea
20662306a36Sopenharmony_ci		.
20762306a36Sopenharmony_ci		.
20862306a36Sopenharmony_ci		.
209