[BACK]Return to isp.doc CVS log [TXT][DIR] Up to [local] / sys / arch / m68k / 060sp

Annotation of sys/arch/m68k/060sp/isp.doc, Revision 1.1.1.1

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

CVSweb