Home | History | Annotate | Line # | Download | only in dist
isp.doc revision 1.1.6.2
      1  1.1.6.2  bouyer #
      2  1.1.6.2  bouyer # $NetBSD: isp.doc,v 1.1.6.2 2000/11/20 20:11:33 bouyer Exp $
      3  1.1.6.2  bouyer #
      4  1.1.6.2  bouyer 
      5  1.1.6.2  bouyer #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      6  1.1.6.2  bouyer # MOTOROLA MICROPROCESSOR & MEMORY TECHNOLOGY GROUP
      7  1.1.6.2  bouyer # M68000 Hi-Performance Microprocessor Division
      8  1.1.6.2  bouyer # M68060 Software Package Production Release 
      9  1.1.6.2  bouyer # 
     10  1.1.6.2  bouyer # M68060 Software Package Copyright (C) 1993, 1994, 1995, 1996 Motorola Inc.
     11  1.1.6.2  bouyer # All rights reserved.
     12  1.1.6.2  bouyer # 
     13  1.1.6.2  bouyer # THE SOFTWARE is provided on an "AS IS" basis and without warranty.
     14  1.1.6.2  bouyer # To the maximum extent permitted by applicable law,
     15  1.1.6.2  bouyer # MOTOROLA DISCLAIMS ALL WARRANTIES WHETHER EXPRESS OR IMPLIED,
     16  1.1.6.2  bouyer # INCLUDING IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS
     17  1.1.6.2  bouyer # FOR A PARTICULAR PURPOSE and any warranty against infringement with
     18  1.1.6.2  bouyer # regard to the SOFTWARE (INCLUDING ANY MODIFIED VERSIONS THEREOF)
     19  1.1.6.2  bouyer # and any accompanying written materials. 
     20  1.1.6.2  bouyer # 
     21  1.1.6.2  bouyer # To the maximum extent permitted by applicable law,
     22  1.1.6.2  bouyer # IN NO EVENT SHALL MOTOROLA BE LIABLE FOR ANY DAMAGES WHATSOEVER
     23  1.1.6.2  bouyer # (INCLUDING WITHOUT LIMITATION, DAMAGES FOR LOSS OF BUSINESS PROFITS,
     24  1.1.6.2  bouyer # BUSINESS INTERRUPTION, LOSS OF BUSINESS INFORMATION, OR OTHER PECUNIARY LOSS)
     25  1.1.6.2  bouyer # ARISING OF THE USE OR INABILITY TO USE THE SOFTWARE.
     26  1.1.6.2  bouyer # 
     27  1.1.6.2  bouyer # Motorola assumes no responsibility for the maintenance and support
     28  1.1.6.2  bouyer # of the SOFTWARE.  
     29  1.1.6.2  bouyer # 
     30  1.1.6.2  bouyer # You are hereby granted a copyright license to use, modify, and distribute the
     31  1.1.6.2  bouyer # SOFTWARE so long as this entire notice is retained without alteration
     32  1.1.6.2  bouyer # in any modified and/or redistributed versions, and that such modified
     33  1.1.6.2  bouyer # versions are clearly identified as such.
     34  1.1.6.2  bouyer # No licenses are granted by implication, estoppel or otherwise under any
     35  1.1.6.2  bouyer # patents or trademarks of Motorola, Inc.
     36  1.1.6.2  bouyer #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     37  1.1.6.2  bouyer 
     38  1.1.6.2  bouyer 68060 INTEGER SOFTWARE PACKAGE (Kernel version)
     39  1.1.6.2  bouyer ------------------------------------------------
     40  1.1.6.2  bouyer 
     41  1.1.6.2  bouyer The file isp.sa contains the 68060 Integer Software Package.
     42  1.1.6.2  bouyer This package is essentially an exception handler that can be
     43  1.1.6.2  bouyer integrated into an operating system to handle the "Unimplemented
     44  1.1.6.2  bouyer Integer Instruction" exception vector #61.
     45  1.1.6.2  bouyer This exception is taken when any of the integer instructions
     46  1.1.6.2  bouyer not hardware implemented on the 68060 are encountered. The
     47  1.1.6.2  bouyer isp.sa provides full emulation support for these instructions.
     48  1.1.6.2  bouyer 
     49  1.1.6.2  bouyer The unimplemented integer instructions are:
     50  1.1.6.2  bouyer 	64-bit divide
     51  1.1.6.2  bouyer 	64-bit multiply
     52  1.1.6.2  bouyer 	movep
     53  1.1.6.2  bouyer 	cmp2
     54  1.1.6.2  bouyer 	chk2
     55  1.1.6.2  bouyer 	cas (w/ a misaligned effective address)
     56  1.1.6.2  bouyer 	cas2
     57  1.1.6.2  bouyer 
     58  1.1.6.2  bouyer Release file format:
     59  1.1.6.2  bouyer --------------------
     60  1.1.6.2  bouyer The file isp.sa is essentially a hexadecimal image of the
     61  1.1.6.2  bouyer release package. This is the ONLY format which will be supported.
     62  1.1.6.2  bouyer The hex image was created by assembling the source code and
     63  1.1.6.2  bouyer then converting the resulting binary output image into an
     64  1.1.6.2  bouyer ASCII text file. The hexadecimal numbers are listed
     65  1.1.6.2  bouyer using the Motorola Assembly Syntax assembler directive "dc.l"
     66  1.1.6.2  bouyer (define constant longword). The file can be converted to other
     67  1.1.6.2  bouyer assembly syntaxes by using any word processor with a global
     68  1.1.6.2  bouyer search and replace function.
     69  1.1.6.2  bouyer 
     70  1.1.6.2  bouyer To assist in assembling and linking this module with other modules,
     71  1.1.6.2  bouyer the installer should add a symbolic label to the top of the file.
     72  1.1.6.2  bouyer This will allow calling routines to access the entry points
     73  1.1.6.2  bouyer of this package.
     74  1.1.6.2  bouyer 
     75  1.1.6.2  bouyer The source code isp.s has also been included but only for
     76  1.1.6.2  bouyer documentation purposes.
     77  1.1.6.2  bouyer 
     78  1.1.6.2  bouyer Release file structure:
     79  1.1.6.2  bouyer -----------------------
     80  1.1.6.2  bouyer 
     81  1.1.6.2  bouyer (top of module)
     82  1.1.6.2  bouyer 	-----------------
     83  1.1.6.2  bouyer 	|		| - 128 byte-sized section
     84  1.1.6.2  bouyer    (1)  |   Call-Out    | - 4 bytes per entry (user fills these in)
     85  1.1.6.2  bouyer 	|		| - example routines in iskeleton.s
     86  1.1.6.2  bouyer 	-----------------
     87  1.1.6.2  bouyer 	|		| - 8 bytes per entry
     88  1.1.6.2  bouyer    (2)  | Entry Point   | - user does a "bra" or "jmp" to this address
     89  1.1.6.2  bouyer 	|               | 
     90  1.1.6.2  bouyer 	-----------------
     91  1.1.6.2  bouyer 	|		| - code section
     92  1.1.6.2  bouyer    (3)  ~		~
     93  1.1.6.2  bouyer 	|		|
     94  1.1.6.2  bouyer 	-----------------
     95  1.1.6.2  bouyer (bottom of module)
     96  1.1.6.2  bouyer 
     97  1.1.6.2  bouyer The first section of this module is the "Call-out" section. This section
     98  1.1.6.2  bouyer is NOT INCLUDED in isp.sa (an example "Call-out" section is provided at
     99  1.1.6.2  bouyer the end of the file iskeleton.s). The purpose of this section is to allow 
    100  1.1.6.2  bouyer the ISP routines to reference external functions that must be provided 
    101  1.1.6.2  bouyer by the host operating system. This section MUST be exactly 128 bytes in 
    102  1.1.6.2  bouyer size. There are 32 fields, each 4 bytes in size. Each field corresponds
    103  1.1.6.2  bouyer to a function required by the ISP (these functions and their location are
    104  1.1.6.2  bouyer listed in "68060ISP call-outs" below). Each field entry should contain
    105  1.1.6.2  bouyer the address of the corresponding function RELATIVE to the starting address
    106  1.1.6.2  bouyer of the "call-out" section. The "Call-out" section must sit adjacent to the 
    107  1.1.6.2  bouyer isp.sa image in memory.
    108  1.1.6.2  bouyer 
    109  1.1.6.2  bouyer The second section, the "Entry-point" section, is used by external routines
    110  1.1.6.2  bouyer to access the functions within the ISP. Since the isp.sa hex file contains
    111  1.1.6.2  bouyer no symbol names, this section contains function entry points that are fixed
    112  1.1.6.2  bouyer with respect to the top of the package. The currently defined entry-points
    113  1.1.6.2  bouyer are listed in section "68060 ISP entry points" below. A calling routine
    114  1.1.6.2  bouyer would simply execute a "bra" or "jmp" that jumped to the selected function
    115  1.1.6.2  bouyer entry-point.
    116  1.1.6.2  bouyer 
    117  1.1.6.2  bouyer For example, if the 68060 hardware took a "Unimplemented Integer Instruction"
    118  1.1.6.2  bouyer exception (vector #61), the operating system should execute something
    119  1.1.6.2  bouyer similar to:
    120  1.1.6.2  bouyer 
    121  1.1.6.2  bouyer 	bra	_060ISP_TOP+128+0
    122  1.1.6.2  bouyer 
    123  1.1.6.2  bouyer (_060ISP_TOP is the starting address of the "Call-out" section; the "Call-out"
    124  1.1.6.2  bouyer section is 128 bytes long; and the Unimplemented Integer ISP handler entry 
    125  1.1.6.2  bouyer point is located 0 bytes from the top of the "Entry-point" section.)
    126  1.1.6.2  bouyer 
    127  1.1.6.2  bouyer The third section is the code section. After entering through an "Entry-point",
    128  1.1.6.2  bouyer the entry code jumps to the appropriate emulation code within the code section.
    129  1.1.6.2  bouyer 
    130  1.1.6.2  bouyer 68060ISP call-outs: (details in iskeleton.s)
    131  1.1.6.2  bouyer --------------------
    132  1.1.6.2  bouyer 0x000:	_060_real_chk
    133  1.1.6.2  bouyer 0x004:	_060_real_divbyzero
    134  1.1.6.2  bouyer 0x008:	_060_real_trace
    135  1.1.6.2  bouyer 0x00c:	_060_real_access
    136  1.1.6.2  bouyer 0x010:	_060_isp_done
    137  1.1.6.2  bouyer 
    138  1.1.6.2  bouyer 0x014:	_060_real_cas
    139  1.1.6.2  bouyer 0x018:	_060_real_cas2
    140  1.1.6.2  bouyer 0x01c:	_060_real_lock_page
    141  1.1.6.2  bouyer 0x020:	_060_real_unlock_page
    142  1.1.6.2  bouyer 
    143  1.1.6.2  bouyer 0x024:	(Motorola reserved)
    144  1.1.6.2  bouyer 0x028:	(Motorola reserved)
    145  1.1.6.2  bouyer 0x02c:	(Motorola reserved)
    146  1.1.6.2  bouyer 0x030:	(Motorola reserved)
    147  1.1.6.2  bouyer 0x034:	(Motorola reserved)
    148  1.1.6.2  bouyer 0x038:	(Motorola reserved)
    149  1.1.6.2  bouyer 0x03c:	(Motorola reserved)
    150  1.1.6.2  bouyer 
    151  1.1.6.2  bouyer 0x040:	_060_imem_read
    152  1.1.6.2  bouyer 0x044:	_060_dmem_read
    153  1.1.6.2  bouyer 0x048:	_060_dmem_write
    154  1.1.6.2  bouyer 0x04c:	_060_imem_read_word
    155  1.1.6.2  bouyer 0x050:	_060_imem_read_long
    156  1.1.6.2  bouyer 0x054:	_060_dmem_read_byte
    157  1.1.6.2  bouyer 0x058:	_060_dmem_read_word
    158  1.1.6.2  bouyer 0x05c:	_060_dmem_read_long
    159  1.1.6.2  bouyer 0x060:	_060_dmem_write_byte
    160  1.1.6.2  bouyer 0x064:	_060_dmem_write_word
    161  1.1.6.2  bouyer 0x068:	_060_dmem_write_long
    162  1.1.6.2  bouyer 
    163  1.1.6.2  bouyer 0x06c:	(Motorola reserved)
    164  1.1.6.2  bouyer 0x070:	(Motorola reserved)
    165  1.1.6.2  bouyer 0x074:	(Motorola reserved)
    166  1.1.6.2  bouyer 0x078:	(Motorola reserved)
    167  1.1.6.2  bouyer 0x07c:	(Motorola reserved)
    168  1.1.6.2  bouyer 
    169  1.1.6.2  bouyer 68060ISP entry points:
    170  1.1.6.2  bouyer -----------------------
    171  1.1.6.2  bouyer 0x000:	_060_isp_unimp
    172  1.1.6.2  bouyer 
    173  1.1.6.2  bouyer 0x008:	_060_isp_cas
    174  1.1.6.2  bouyer 0x010:	_060_isp_cas2
    175  1.1.6.2  bouyer 0x018:	_060_isp_cas_finish
    176  1.1.6.2  bouyer 0x020:	_060_isp_cas2_finish
    177  1.1.6.2  bouyer 0x028:	_060_isp_cas_inrange
    178  1.1.6.2  bouyer 0x030:	_060_isp_cas_terminate
    179  1.1.6.2  bouyer 0x038:	_060_isp_cas_restart
    180  1.1.6.2  bouyer 
    181  1.1.6.2  bouyer Integrating cas/cas2:
    182  1.1.6.2  bouyer ---------------------
    183  1.1.6.2  bouyer The instructions "cas2" and "cas" (when used with a misaligned effective
    184  1.1.6.2  bouyer address) take the Unimplemented Integer Instruction exception. When the
    185  1.1.6.2  bouyer 060ISP is installed properly, these instructions will enter through the
    186  1.1.6.2  bouyer _060_isp_unimp() entry point of the ISP.
    187  1.1.6.2  bouyer 
    188  1.1.6.2  bouyer After the 060ISP decodes the instruction type and fetches the appropriate
    189  1.1.6.2  bouyer data registers, and BEFORE the actual emulated transfers occur, the 
    190  1.1.6.2  bouyer package calls either the "Call-out" _060_real_cas() or _060_real_cas2().
    191  1.1.6.2  bouyer If the emulation code provided by the 060ISP is sufficient for the
    192  1.1.6.2  bouyer host system (see isp.s source code), then these "Call-out"s should be
    193  1.1.6.2  bouyer made, by the system integrator, to point directly back into the package
    194  1.1.6.2  bouyer through the "Entry-point"s _060_isp_cas() or _060_isp_cas2().
    195  1.1.6.2  bouyer 
    196  1.1.6.2  bouyer One other necessary action by the integrator is to supply the routines
    197  1.1.6.2  bouyer _060_real_lock_page() and _060_real_unlock_page(). These functions are
    198  1.1.6.2  bouyer defined further in iskeleton.s and the 68060 Software Package Specification.
    199  1.1.6.2  bouyer 
    200  1.1.6.2  bouyer If the "core" emulation routines of either "cas" or "cas2" perform some
    201  1.1.6.2  bouyer actions which are too system-specific, then the system integrator must
    202  1.1.6.2  bouyer supply new emulation code. This new emulation code should reside within
    203  1.1.6.2  bouyer the functions _060_real_cas() or _060_real_cas2(). When this new emulation
    204  1.1.6.2  bouyer code has completed, then it should re-enter the 060ISP package through the
    205  1.1.6.2  bouyer "Entry-point" _060_isp_cas_finish() or _060_isp_cas2_finish().
    206  1.1.6.2  bouyer To see what the register state is upon entering _060_real_cas() or
    207  1.1.6.2  bouyer _060_real_cas2() and what it should be upon return to the package through
    208  1.1.6.2  bouyer _060_isp_cas_finish() or _060_isp_cas2_finish(), please refer to the
    209  1.1.6.2  bouyer source code in isp.s.
    210  1.1.6.2  bouyer 
    211  1.1.6.2  bouyer Miscellaneous:
    212  1.1.6.2  bouyer --------------
    213  1.1.6.2  bouyer 
    214  1.1.6.2  bouyer _060_isp_unimp:
    215  1.1.6.2  bouyer ----------------
    216  1.1.6.2  bouyer - documented in 2.2 in spec.
    217  1.1.6.2  bouyer - Basic flow:
    218  1.1.6.2  bouyer 	exception taken ---> enter _060_isp_unimp   --|
    219  1.1.6.2  bouyer 						      |
    220  1.1.6.2  bouyer 						      |
    221  1.1.6.2  bouyer             may exit through _060_real_itrace    <----|
    222  1.1.6.2  bouyer 						  or  |
    223  1.1.6.2  bouyer             may exit through _060_real_chk       <----|
    224  1.1.6.2  bouyer 						  or  |
    225  1.1.6.2  bouyer             may exit through _060_real_divbyzero <----|
    226  1.1.6.2  bouyer 						  or  |
    227  1.1.6.2  bouyer             may exit through _060_isp_done       <----|
    228