18c2ecf20Sopenharmony_ci~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 28c2ecf20Sopenharmony_ciMOTOROLA MICROPROCESSOR & MEMORY TECHNOLOGY GROUP 38c2ecf20Sopenharmony_ciM68000 Hi-Performance Microprocessor Division 48c2ecf20Sopenharmony_ciM68060 Software Package 58c2ecf20Sopenharmony_ciProduction Release P1.00 -- October 10, 1994 68c2ecf20Sopenharmony_ci 78c2ecf20Sopenharmony_ciM68060 Software Package Copyright © 1993, 1994 Motorola Inc. All rights reserved. 88c2ecf20Sopenharmony_ci 98c2ecf20Sopenharmony_ciTHE SOFTWARE is provided on an "AS IS" basis and without warranty. 108c2ecf20Sopenharmony_ciTo the maximum extent permitted by applicable law, 118c2ecf20Sopenharmony_ciMOTOROLA DISCLAIMS ALL WARRANTIES WHETHER EXPRESS OR IMPLIED, 128c2ecf20Sopenharmony_ciINCLUDING IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE 138c2ecf20Sopenharmony_ciand any warranty against infringement with regard to the SOFTWARE 148c2ecf20Sopenharmony_ci(INCLUDING ANY MODIFIED VERSIONS THEREOF) and any accompanying written materials. 158c2ecf20Sopenharmony_ci 168c2ecf20Sopenharmony_ciTo the maximum extent permitted by applicable law, 178c2ecf20Sopenharmony_ciIN NO EVENT SHALL MOTOROLA BE LIABLE FOR ANY DAMAGES WHATSOEVER 188c2ecf20Sopenharmony_ci(INCLUDING WITHOUT LIMITATION, DAMAGES FOR LOSS OF BUSINESS PROFITS, 198c2ecf20Sopenharmony_ciBUSINESS INTERRUPTION, LOSS OF BUSINESS INFORMATION, OR OTHER PECUNIARY LOSS) 208c2ecf20Sopenharmony_ciARISING OF THE USE OR INABILITY TO USE THE SOFTWARE. 218c2ecf20Sopenharmony_ciMotorola assumes no responsibility for the maintenance and support of the SOFTWARE. 228c2ecf20Sopenharmony_ci 238c2ecf20Sopenharmony_ciYou are hereby granted a copyright license to use, modify, and distribute the SOFTWARE 248c2ecf20Sopenharmony_ciso long as this entire notice is retained without alteration in any modified and/or 258c2ecf20Sopenharmony_ciredistributed versions, and that such modified versions are clearly identified as such. 268c2ecf20Sopenharmony_ciNo licenses are granted by implication, estoppel or otherwise under any patents 278c2ecf20Sopenharmony_cior trademarks of Motorola, Inc. 288c2ecf20Sopenharmony_ci~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 298c2ecf20Sopenharmony_ci68060 SOFTWARE PACKAGE (Kernel version) SIMPLE TESTS 308c2ecf20Sopenharmony_ci----------------------------------------------------- 318c2ecf20Sopenharmony_ci 328c2ecf20Sopenharmony_ciThe files itest.sa and ftest.sa contain simple tests to check 338c2ecf20Sopenharmony_cithe state of the 68060ISP and 68060FPSP once they have been installed. 348c2ecf20Sopenharmony_ci 358c2ecf20Sopenharmony_ciRelease file format: 368c2ecf20Sopenharmony_ci-------------------- 378c2ecf20Sopenharmony_ciThe release files itest.sa and ftest.sa are essentially 388c2ecf20Sopenharmony_cihexadecimal images of the actual tests. This format is the 398c2ecf20Sopenharmony_ciONLY format that will be supported. The hex images were created 408c2ecf20Sopenharmony_ciby assembling the source code and then converting the resulting 418c2ecf20Sopenharmony_cibinary output images into ASCII text files. The hexadecimal 428c2ecf20Sopenharmony_cinumbers are listed using the Motorola Assembly syntax assembler 438c2ecf20Sopenharmony_cidirective "dc.l" (define constant longword). The files can be 448c2ecf20Sopenharmony_ciconverted to other assembly syntaxes by using any word processor 458c2ecf20Sopenharmony_ciwith a global search and replace function. 468c2ecf20Sopenharmony_ci 478c2ecf20Sopenharmony_ciTo assist in assembling and linking these modules with other modules, 488c2ecf20Sopenharmony_cithe installer should add symbolic labels to the top of the files. 498c2ecf20Sopenharmony_ciThis will allow the calling routines to access the entry points 508c2ecf20Sopenharmony_ciof these packages. 518c2ecf20Sopenharmony_ci 528c2ecf20Sopenharmony_ciThe source code itest.s and ftest.s have been included but only 538c2ecf20Sopenharmony_cifor documentation purposes. 548c2ecf20Sopenharmony_ci 558c2ecf20Sopenharmony_ciRelease file structure: 568c2ecf20Sopenharmony_ci----------------------- 578c2ecf20Sopenharmony_ci 588c2ecf20Sopenharmony_ci(top of module) 598c2ecf20Sopenharmony_ci ----------------- 608c2ecf20Sopenharmony_ci | | - 128 byte-sized section 618c2ecf20Sopenharmony_ci (1) | Call-Out | - 4 bytes per entry (user fills these in) 628c2ecf20Sopenharmony_ci | | 638c2ecf20Sopenharmony_ci ----------------- 648c2ecf20Sopenharmony_ci | | - 8 bytes per entry 658c2ecf20Sopenharmony_ci (2) | Entry Point | - user does "bsr" or "jsr" to this address 668c2ecf20Sopenharmony_ci | | 678c2ecf20Sopenharmony_ci ----------------- 688c2ecf20Sopenharmony_ci | | - code section 698c2ecf20Sopenharmony_ci (3) ~ ~ 708c2ecf20Sopenharmony_ci | | 718c2ecf20Sopenharmony_ci ----------------- 728c2ecf20Sopenharmony_ci(bottom of module) 738c2ecf20Sopenharmony_ci 748c2ecf20Sopenharmony_ciThe first section of this module is the "Call-out" section. This section 758c2ecf20Sopenharmony_ciis NOT INCLUDED in {i,f}test.sa (an example "Call-out" section is provided at 768c2ecf20Sopenharmony_cithe end of this file). The purpose of this section is to allow the test 778c2ecf20Sopenharmony_ciroutines to reference external printing functions that must be provided 788c2ecf20Sopenharmony_ciby the host operating system. This section MUST be exactly 128 bytes in 798c2ecf20Sopenharmony_cisize. There are 32 fields, each 4 bytes in size. Each field corresponds 808c2ecf20Sopenharmony_cito a function required by the test packages (these functions and their 818c2ecf20Sopenharmony_cilocation are listed in "68060{ISP,FPSP}-TEST call-outs" below). Each field 828c2ecf20Sopenharmony_cientry should contain the address of the corresponding function RELATIVE to 838c2ecf20Sopenharmony_cithe starting address of the "call-out" section. The "Call-out" section must 848c2ecf20Sopenharmony_cisit adjacent to the {i,f}test.sa image in memory. Since itest.sa and ftest.sa 858c2ecf20Sopenharmony_ciare individual tests, they each require their own "Call-out" sections. 868c2ecf20Sopenharmony_ci 878c2ecf20Sopenharmony_ciThe second section, the "Entry-point" section, is used by external routines 888c2ecf20Sopenharmony_cito access the test routines. Since the {i,f}test.sa hex files contain 898c2ecf20Sopenharmony_cino symbol names, this section contains function entry points that are fixed 908c2ecf20Sopenharmony_ciwith respect to the top of the package. The currently defined entry-points 918c2ecf20Sopenharmony_ciare listed in section "68060{ISP,FPSP}-TEST entry points" below. A calling 928c2ecf20Sopenharmony_ciroutine would simply execute a "bsr" or "jsr" that jumped to the selected 938c2ecf20Sopenharmony_cifunction entry-point. 948c2ecf20Sopenharmony_ci 958c2ecf20Sopenharmony_ciFor example, to run the 060ISP test, write a program that includes the 968c2ecf20Sopenharmony_ciitest.sa data and execute something similar to: 978c2ecf20Sopenharmony_ci 988c2ecf20Sopenharmony_ci bsr _060ISP_TEST+128+0 998c2ecf20Sopenharmony_ci 1008c2ecf20Sopenharmony_ci(_060ISP_TEST is the starting address of the "Call-out" section; the "Call-out" 1018c2ecf20Sopenharmony_cisection is 128 bytes long; and the 68060ISP test entry point is located 1028c2ecf20Sopenharmony_ci0 bytes from the top of the "Entry-point" section.) 1038c2ecf20Sopenharmony_ci 1048c2ecf20Sopenharmony_ciThe third section is the code section. After entering through an "Entry-point", 1058c2ecf20Sopenharmony_cithe entry code jumps to the appropriate test code within the code section. 1068c2ecf20Sopenharmony_ci 1078c2ecf20Sopenharmony_ci68060ISP-TEST Call-outs: 1088c2ecf20Sopenharmony_ci------------------------ 1098c2ecf20Sopenharmony_ci0x0: _print_string() 1108c2ecf20Sopenharmony_ci0x4: _print_number() 1118c2ecf20Sopenharmony_ci 1128c2ecf20Sopenharmony_ci68060FPSP-TEST Call-outs: 1138c2ecf20Sopenharmony_ci------------------------- 1148c2ecf20Sopenharmony_ci0x0: _print_string() 1158c2ecf20Sopenharmony_ci0x4: _print_number() 1168c2ecf20Sopenharmony_ci 1178c2ecf20Sopenharmony_ciThe test packages call _print_string() and _print_number() 1188c2ecf20Sopenharmony_cias subroutines and expect the main program to print a string 1198c2ecf20Sopenharmony_cior a number to a file or to the screen. 1208c2ecf20Sopenharmony_ciIn "C"-like fashion, the test program calls: 1218c2ecf20Sopenharmony_ci 1228c2ecf20Sopenharmony_ci print_string("Test passed"); 1238c2ecf20Sopenharmony_ci 1248c2ecf20Sopenharmony_ci or 1258c2ecf20Sopenharmony_ci 1268c2ecf20Sopenharmony_ci print_number(20); 1278c2ecf20Sopenharmony_ci 1288c2ecf20Sopenharmony_ciFor _print_string(), the test programs pass a longword address 1298c2ecf20Sopenharmony_ciof the string on the stack. For _print_number(), the test programs pass 1308c2ecf20Sopenharmony_cia longword number to be printed. 1318c2ecf20Sopenharmony_ci 1328c2ecf20Sopenharmony_ciFor debugging purposes, after the main program performs a "print" 1338c2ecf20Sopenharmony_cifor a test package, it should flush the output so that it's not 1348c2ecf20Sopenharmony_cibuffered. In this way, if the test program crashes, at least the previous 1358c2ecf20Sopenharmony_cistatements printed will be seen. 1368c2ecf20Sopenharmony_ci 1378c2ecf20Sopenharmony_ci68060ISP-TEST Entry-points: 1388c2ecf20Sopenharmony_ci--------------------------- 1398c2ecf20Sopenharmony_ci0x0: integer test 1408c2ecf20Sopenharmony_ci 1418c2ecf20Sopenharmony_ci68060FPSP-TEST Entry-points: 1428c2ecf20Sopenharmony_ci---------------------------- 1438c2ecf20Sopenharmony_ci0x00: main fp test 1448c2ecf20Sopenharmony_ci0x08: FP unimplemented test 1458c2ecf20Sopenharmony_ci0x10: FP enabled snan/operr/ovfl/unfl/dz/inex 1468c2ecf20Sopenharmony_ci 1478c2ecf20Sopenharmony_ciThe floating-point unit test has 3 entry points which will require 1488c2ecf20Sopenharmony_ci3 different calls to the package if each of the three following tests 1498c2ecf20Sopenharmony_ciis desired: 1508c2ecf20Sopenharmony_ci 1518c2ecf20Sopenharmony_cimain fp test: tests (1) unimp effective address exception 1528c2ecf20Sopenharmony_ci (2) unsupported data type exceptions 1538c2ecf20Sopenharmony_ci (3) non-maskable overflow/underflow exceptions 1548c2ecf20Sopenharmony_ci 1558c2ecf20Sopenharmony_ciFP unimplemented: tests FP unimplemented exception. this one is 1568c2ecf20Sopenharmony_ci separate from the previous tests for systems that don't 1578c2ecf20Sopenharmony_ci want FP unimplemented instructions. 1588c2ecf20Sopenharmony_ci 1598c2ecf20Sopenharmony_ciFP enabled: tests enabled snan/operr/ovfl/unfl/dz/inex. 1608c2ecf20Sopenharmony_ci basically, it enables each of these exceptions and forces 1618c2ecf20Sopenharmony_ci each using an implemented FP instruction. this process 1628c2ecf20Sopenharmony_ci exercises _fpsp_{snan,operr,ovfl,unfl,dz,inex}() and 1638c2ecf20Sopenharmony_ci _real_{snan,operr,ovfl,unfl,dz,inex}(). the test expects 1648c2ecf20Sopenharmony_ci _real_XXXX() to do nothing except clear the exception 1658c2ecf20Sopenharmony_ci and "rte". if a system's _real_XXXX() handler creates an 1668c2ecf20Sopenharmony_ci alternate result, the test will print "failed" but this 1678c2ecf20Sopenharmony_ci is acceptable. 1688c2ecf20Sopenharmony_ci 1698c2ecf20Sopenharmony_ciMiscellaneous: 1708c2ecf20Sopenharmony_ci-------------- 1718c2ecf20Sopenharmony_ciAgain, itest.sa and ftest.sa are simple tests and do not thoroughly 1728c2ecf20Sopenharmony_citest all 68060SP connections. For example, they do not test connections 1738c2ecf20Sopenharmony_cito _real_access(), _real_trace(), _real_trap(), etc. because these 1748c2ecf20Sopenharmony_ciwill be system-implemented several different ways and the test packages 1758c2ecf20Sopenharmony_cimust remain system independent. 1768c2ecf20Sopenharmony_ci 1778c2ecf20Sopenharmony_ciExample test package set-up: 1788c2ecf20Sopenharmony_ci---------------------------- 1798c2ecf20Sopenharmony_ci_print_str: 1808c2ecf20Sopenharmony_ci . # provided by system 1818c2ecf20Sopenharmony_ci rts 1828c2ecf20Sopenharmony_ci 1838c2ecf20Sopenharmony_ci_print_num: 1848c2ecf20Sopenharmony_ci . # provided by system 1858c2ecf20Sopenharmony_ci rts 1868c2ecf20Sopenharmony_ci 1878c2ecf20Sopenharmony_ci . 1888c2ecf20Sopenharmony_ci . 1898c2ecf20Sopenharmony_ci bsr _060FPSP_TEST+128+0 1908c2ecf20Sopenharmony_ci . 1918c2ecf20Sopenharmony_ci . 1928c2ecf20Sopenharmony_ci rts 1938c2ecf20Sopenharmony_ci 1948c2ecf20Sopenharmony_ci# beginning of "Call-out" section; provided by integrator. 1958c2ecf20Sopenharmony_ci# MUST be 128 bytes long. 1968c2ecf20Sopenharmony_ci_060FPSP_TEST: 1978c2ecf20Sopenharmony_ci long _print_str - _060FPSP_TEST 1988c2ecf20Sopenharmony_ci long _print_num - _060FPSP_TEST 1998c2ecf20Sopenharmony_ci space 120 2008c2ecf20Sopenharmony_ci 2018c2ecf20Sopenharmony_ci# ftest.sa starts here; start of "Entry-point" section. 2028c2ecf20Sopenharmony_ci long 0x60ff0000, 0x00002346 2038c2ecf20Sopenharmony_ci long 0x60ff0000, 0x00018766 2048c2ecf20Sopenharmony_ci long 0x60ff0000, 0x00023338 2058c2ecf20Sopenharmony_ci long 0x24377299, 0xab2643ea 2068c2ecf20Sopenharmony_ci . 2078c2ecf20Sopenharmony_ci . 2088c2ecf20Sopenharmony_ci . 209