TEST.DOC 7.7 KB

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