isp.doc 8.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218
  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 INTEGER SOFTWARE PACKAGE (Kernel version)
  26. ------------------------------------------------
  27. The file isp.sa contains the 68060 Integer Software Package.
  28. This package is essentially an exception handler that can be
  29. integrated into an operating system to handle the "Unimplemented
  30. Integer Instruction" exception vector #61.
  31. This exception is taken when any of the integer instructions
  32. not hardware implemented on the 68060 are encountered. The
  33. isp.sa provides full emulation support for these instructions.
  34. The unimplemented integer instructions are:
  35. 64-bit divide
  36. 64-bit multiply
  37. movep
  38. cmp2
  39. chk2
  40. cas (w/ a misaligned effective address)
  41. cas2
  42. Release file format:
  43. --------------------
  44. The file isp.sa is essentially a hexadecimal image of the
  45. release package. This is the ONLY format which will be supported.
  46. The hex image was created by assembling the source code and
  47. then converting the resulting binary output image into an
  48. ASCII text file. The hexadecimal numbers are listed
  49. using the Motorola Assembly Syntax assembler directive "dc.l"
  50. (define constant longword). The file can be converted to other
  51. assembly syntaxes by using any word processor with a global
  52. search and replace function.
  53. To assist in assembling and linking this module with other modules,
  54. the installer should add a symbolic label to the top of the file.
  55. This will allow calling routines to access the entry points
  56. of this package.
  57. The source code isp.s has also been included but only for
  58. documentation purposes.
  59. Release file structure:
  60. -----------------------
  61. (top of module)
  62. -----------------
  63. | | - 128 byte-sized section
  64. (1) | Call-Out | - 4 bytes per entry (user fills these in)
  65. | | - example routines in iskeleton.s
  66. -----------------
  67. | | - 8 bytes per entry
  68. (2) | Entry Point | - user does a "bra" or "jmp" to this address
  69. | |
  70. -----------------
  71. | | - code section
  72. (3) ~ ~
  73. | |
  74. -----------------
  75. (bottom of module)
  76. The first section of this module is the "Call-out" section. This section
  77. is NOT INCLUDED in isp.sa (an example "Call-out" section is provided at
  78. the end of the file iskeleton.s). The purpose of this section is to allow
  79. the ISP routines to reference external functions that must be provided
  80. by the host operating system. This section MUST be exactly 128 bytes in
  81. size. There are 32 fields, each 4 bytes in size. Each field corresponds
  82. to a function required by the ISP (these functions and their location are
  83. listed in "68060ISP call-outs" below). Each field entry should contain
  84. the address of the corresponding function RELATIVE to the starting address
  85. of the "call-out" section. The "Call-out" section must sit adjacent to the
  86. isp.sa image in memory.
  87. The second section, the "Entry-point" section, is used by external routines
  88. to access the functions within the ISP. Since the isp.sa hex file contains
  89. no symbol names, this section contains function entry points that are fixed
  90. with respect to the top of the package. The currently defined entry-points
  91. are listed in section "68060 ISP entry points" below. A calling routine
  92. would simply execute a "bra" or "jmp" that jumped to the selected function
  93. entry-point.
  94. For example, if the 68060 hardware took a "Unimplemented Integer Instruction"
  95. exception (vector #61), the operating system should execute something
  96. similar to:
  97. bra _060ISP_TOP+128+0
  98. (_060ISP_TOP is the starting address of the "Call-out" section; the "Call-out"
  99. section is 128 bytes long; and the Unimplemented Integer ISP handler entry
  100. point is located 0 bytes from the top of the "Entry-point" section.)
  101. The third section is the code section. After entering through an "Entry-point",
  102. the entry code jumps to the appropriate emulation code within the code section.
  103. 68060ISP call-outs: (details in iskeleton.s)
  104. --------------------
  105. 0x000: _060_real_chk
  106. 0x004: _060_real_divbyzero
  107. 0x008: _060_real_trace
  108. 0x00c: _060_real_access
  109. 0x010: _060_isp_done
  110. 0x014: _060_real_cas
  111. 0x018: _060_real_cas2
  112. 0x01c: _060_real_lock_page
  113. 0x020: _060_real_unlock_page
  114. 0x024: (Motorola reserved)
  115. 0x028: (Motorola reserved)
  116. 0x02c: (Motorola reserved)
  117. 0x030: (Motorola reserved)
  118. 0x034: (Motorola reserved)
  119. 0x038: (Motorola reserved)
  120. 0x03c: (Motorola reserved)
  121. 0x040: _060_imem_read
  122. 0x044: _060_dmem_read
  123. 0x048: _060_dmem_write
  124. 0x04c: _060_imem_read_word
  125. 0x050: _060_imem_read_long
  126. 0x054: _060_dmem_read_byte
  127. 0x058: _060_dmem_read_word
  128. 0x05c: _060_dmem_read_long
  129. 0x060: _060_dmem_write_byte
  130. 0x064: _060_dmem_write_word
  131. 0x068: _060_dmem_write_long
  132. 0x06c: (Motorola reserved)
  133. 0x070: (Motorola reserved)
  134. 0x074: (Motorola reserved)
  135. 0x078: (Motorola reserved)
  136. 0x07c: (Motorola reserved)
  137. 68060ISP entry points:
  138. -----------------------
  139. 0x000: _060_isp_unimp
  140. 0x008: _060_isp_cas
  141. 0x010: _060_isp_cas2
  142. 0x018: _060_isp_cas_finish
  143. 0x020: _060_isp_cas2_finish
  144. 0x028: _060_isp_cas_inrange
  145. 0x030: _060_isp_cas_terminate
  146. 0x038: _060_isp_cas_restart
  147. Integrating cas/cas2:
  148. ---------------------
  149. The instructions "cas2" and "cas" (when used with a misaligned effective
  150. address) take the Unimplemented Integer Instruction exception. When the
  151. 060ISP is installed properly, these instructions will enter through the
  152. _060_isp_unimp() entry point of the ISP.
  153. After the 060ISP decodes the instruction type and fetches the appropriate
  154. data registers, and BEFORE the actual emulated transfers occur, the
  155. package calls either the "Call-out" _060_real_cas() or _060_real_cas2().
  156. If the emulation code provided by the 060ISP is sufficient for the
  157. host system (see isp.s source code), then these "Call-out"s should be
  158. made, by the system integrator, to point directly back into the package
  159. through the "Entry-point"s _060_isp_cas() or _060_isp_cas2().
  160. One other necessary action by the integrator is to supply the routines
  161. _060_real_lock_page() and _060_real_unlock_page(). These functions are
  162. defined further in iskeleton.s and the 68060 Software Package Specification.
  163. If the "core" emulation routines of either "cas" or "cas2" perform some
  164. actions which are too system-specific, then the system integrator must
  165. supply new emulation code. This new emulation code should reside within
  166. the functions _060_real_cas() or _060_real_cas2(). When this new emulation
  167. code has completed, then it should re-enter the 060ISP package through the
  168. "Entry-point" _060_isp_cas_finish() or _060_isp_cas2_finish().
  169. To see what the register state is upon entering _060_real_cas() or
  170. _060_real_cas2() and what it should be upon return to the package through
  171. _060_isp_cas_finish() or _060_isp_cas2_finish(), please refer to the
  172. source code in isp.s.
  173. Miscellaneous:
  174. --------------
  175. _060_isp_unimp:
  176. ----------------
  177. - documented in 2.2 in spec.
  178. - Basic flow:
  179. exception taken ---> enter _060_isp_unimp --|
  180. |
  181. |
  182. may exit through _060_real_itrace <----|
  183. or |
  184. may exit through _060_real_chk <----|
  185. or |
  186. may exit through _060_real_divbyzero <----|
  187. or |
  188. may exit through _060_isp_done <----|