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

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

1.1       nbrk        1: #
                      2: # $OpenBSD: fpsp.doc,v 1.2 1996/05/30 22:14:16 niklas Exp $
                      3: # $NetBSD: fpsp.doc,v 1.2 1996/05/15 19:47:51 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 FLOATING-POINT SOFTWARE PACKAGE (Kernel version)
                     40: -------------------------------------------------------
                     41:
                     42: The file fpsp.sa contains the 68060 Floating-Point Software
                     43: Package. This package is essentially a set of exception handlers
                     44: that can be integrated into an operating system.
                     45: These exception handlers emulate Unimplemented FP instructions,
                     46: instructions using unimplemented data types, and instructions
                     47: using unimplemented addressing modes. In addition, this package
                     48: includes exception handlers to provide full IEEE-754 compliant
                     49: exception handling.
                     50:
                     51: Release file format:
                     52: --------------------
                     53: The file fpsp.sa is essentially a hexadecimal image of the
                     54: release package. This is the ONLY format which will be supported.
                     55: The hex image was created by assembling the source code and
                     56: then converting the resulting binary output image into an
                     57: ASCII text file. The hexadecimal numbers are listed
                     58: using the Motorola Assembly Syntax assembler directive "dc.l"
                     59: (define constant longword). The file can be converted to other
                     60: assembly syntaxes by using any word processor with a global
                     61: search and replace function.
                     62:
                     63: To assist in assembling and linking this module with other modules,
                     64: the installer should add a symbolic label to the top of the file.
                     65: This will allow calling routines to access the entry points
                     66: of this package.
                     67:
                     68: The source code fpsp.s has also been included but only for
                     69: documentation purposes.
                     70:
                     71: Release file structure:
                     72: -----------------------
                     73:
                     74: (top of module)
                     75:        -----------------
                     76:        |               | - 128 byte-sized section
                     77:    (1)  |   Call-Out   | - 4 bytes per entry (user fills these in)
                     78:        |               | - example routines in fskeleton.s
                     79:        -----------------
                     80:        |               | - 8 bytes per entry
                     81:    (2)  | Entry Point  | - user does "bra" or "jmp" to this address
                     82:        |               |
                     83:        -----------------
                     84:        |               | - code section
                     85:    (3)  ~              ~
                     86:        |               |
                     87:        -----------------
                     88: (bottom of module)
                     89:
                     90: The first section of this module is the "Call-out" section. This section
                     91: is NOT INCLUDED in fpsp.sa (an example "Call-out" section is provided at
                     92: the end of the file fskeleton.s). The purpose of this section is to allow
                     93: the FPSP routines to reference external functions that must be provided
                     94: by the host operating system. This section MUST be exactly 128 bytes in
                     95: size. There are 32 fields, each 4 bytes in size. Each field corresponds
                     96: to a function required by the FPSP (these functions and their location are
                     97: listed in "68060FPSP call-outs" below). Each field entry should contain
                     98: the address of the corresponding function RELATIVE to the starting address
                     99: of the "call-out" section. The "Call-out" section must sit adjacent to the
                    100: fpsp.sa image in memory.
                    101:
                    102: The second section, the "Entry-point" section, is used by external routines
                    103: to access the functions within the FPSP. Since the fpsp.sa hex file contains
                    104: no symbol names, this section contains function entry points that are fixed
                    105: with respect to the top of the package. The currently defined entry-points
                    106: are listed in section "68060 FPSP entry points" below. A calling routine
                    107: would simply execute a "bra" or "jmp" that jumped to the selected function
                    108: entry-point.
                    109:
                    110: For example, if the 68060 hardware took a "Line-F Emulator" exception
                    111: (vector #11), the operating system should execute something similar to:
                    112:
                    113:        bra     _060FPSP_TOP+128+48
                    114:
                    115: (_060FPSP_TOP is the starting address of the "Call-out" section; the "Call-out"
                    116: section is 128 bytes long; and the F-Line FPSP handler entry point is located
                    117: 48 bytes from the top of the "Entry-point" section.)
                    118:
                    119: The third section is the code section. After entering through an "Entry-point",
                    120: the entry code jumps to the appropriate emulation code within the code section.
                    121:
                    122: 68060FPSP call-outs: (details in fskeleton.s)
                    123: --------------------
                    124: 0x000: _060_real_bsun
                    125: 0x004: _060_real_snan
                    126: 0x008: _060_real_operr
                    127: 0x00c: _060_real_ovfl
                    128: 0x010: _060_real_unfl
                    129: 0x014: _060_real_dz
                    130: 0x018: _060_real_inex
                    131: 0x01c: _060_real_fline
                    132: 0x020: _060_real_fpu_disabled
                    133: 0x024: _060_real_trap
                    134: 0x028: _060_real_trace
                    135: 0x02c: _060_real_access
                    136: 0x030: _060_fpsp_done
                    137:
                    138: 0x034: (Motorola reserved)
                    139: 0x038: (Motorola reserved)
                    140: 0x03c: (Motorola reserved)
                    141:
                    142: 0x040: _060_imem_read
                    143: 0x044: _060_dmem_read
                    144: 0x048: _060_dmem_write
                    145: 0x04c: _060_imem_read_word
                    146: 0x050: _060_imem_read_long
                    147: 0x054: _060_dmem_read_byte
                    148: 0x058: _060_dmem_read_word
                    149: 0x05c: _060_dmem_read_long
                    150: 0x060: _060_dmem_write_byte
                    151: 0x064: _060_dmem_write_word
                    152: 0x068: _060_dmem_write_long
                    153:
                    154: 0x06c: (Motorola reserved)
                    155: 0x070: (Motorola reserved)
                    156: 0x074: (Motorola reserved)
                    157: 0x078: (Motorola reserved)
                    158: 0x07c: (Motorola reserved)
                    159:
                    160: 68060FPSP entry points:
                    161: -----------------------
                    162: 0x000: _060_fpsp_snan
                    163: 0x008: _060_fpsp_operr
                    164: 0x010: _060_fpsp_ovfl
                    165: 0x018: _060_fpsp_unfl
                    166: 0x020: _060_fpsp_dz
                    167: 0x028: _060_fpsp_inex
                    168: 0x030: _060_fpsp_fline
                    169: 0x038: _060_fpsp_unsupp
                    170: 0x040: _060_fpsp_effadd
                    171:
                    172: 
                    173: Miscellaneous:
                    174: --------------
                    175:
                    176: _060_fpsp_snan:
                    177: ----------------
                    178: - documented in 3.5 of 060SP spec.
                    179: - Basic flow:
                    180:        exception taken ---> enter _060_fpsp_snan --|
                    181:                                                    |
                    182:             always exits through _060_real_snan <----
                    183:
                    184: _060_fpsp_operr:
                    185: ----------------
                    186: - documented in 3.5 of 060SP spec.
                    187: - Basic flow:
                    188:        exception taken ---> enter _060_fpsp_operr --|
                    189:                                                     |
                    190:            always exits through _060_real_operr <-----
                    191:
                    192: _060_fpsp_dz:
                    193: ----------------
                    194: - documented in 3.7 of 060SP spec.
                    195: - Basic flow:
                    196:        exception taken ---> enter _060_fpsp_dz   --|
                    197:                                                    |
                    198:             always exits through _060_real_dz   <----
                    199:
                    200: _060_fpsp_inex:
                    201: ----------------
                    202: - documented in 3.6 of 060SP spec.
                    203: - Basic flow:
                    204:        exception taken ---> enter _060_fpsp_inex --|
                    205:                                                    |
                    206:             always exits through _060_real_inex <----
                    207: 
                    208: _060_fpsp_ovfl:
                    209: ----------------
                    210: - documented in 3.4 of 060SP spec.
                    211: - Basic flow:
                    212:        exception taken ---> enter _060_fpsp_ovfl --|
                    213:                                                    |
                    214:             may exit through _060_real_inex     <---|
                    215:                                                 or |
                    216:             may exit through _060_real_ovfl     <---|
                    217:                                                 or |
                    218:             may exit through _060_fpsp_done     <---|
                    219:
                    220: _060_fpsp_unfl:
                    221: ----------------
                    222: - documented in 3.4 of 060SP spec.
                    223: - Basic flow:
                    224:        exception taken ---> enter _060_fpsp_unfl --|
                    225:                                                    |
                    226:             may exit through _060_real_inex     <---|
                    227:                                                 or |
                    228:             may exit through _060_real_unfl     <---|
                    229:                                                 or |
                    230:             may exit through _060_fpsp_done     <---|
                    231: 
                    232: _060_fpsp_fline:
                    233: -----------------
                    234: - not fully documented in 060SP spec.
                    235: - Basic flow:
                    236:        exception taken ---> enter _060_fpsp_fline --|
                    237:                                                     |
                    238:             -------------------------------------------
                    239:             |               |                     |
                    240:             v               v                     v
                    241:    (unimplemented   (fpu disabled)       (possible F-line illegal)
                    242:      stack frame)           |                     v
                    243:             |               v               special case "fmovecr"?
                    244:             |         exit through                    |
                    245:             |     _060_real_fpu_disabled        -------------
                    246:             |                                   |           |
                    247:             |               ^                   v           v
                    248:             |               |                 (yes)        (no)
                    249:             |               |                   v           v
                    250:             |               |             fpu disabled?   exit through
                    251:             |               |                   |         _060_real_fline
                    252:             v               |             -------------
                    253:             |               |             |           |
                    254:             |               |             v           v
                    255:             |               |-----------(yes)        (no)
                    256:             |                                         |
                    257:             |----<------------------------------------|
                    258:             |
                    259:             |
                    260:             |----> may exit through _060_real_trace
                    261:             |
                    262:             |----> may exit through _060_real_trap
                    263:             |
                    264:             |----> may exit thorugh _060_real_bsun
                    265:             |
                    266:             |----> may exit through _060_fpsp_done
                    267: 
                    268: _060_fpsp_unsupp:
                    269: ------------------
                    270: - documented in 3.1 of 060SP spec.
                    271: - Basic flow:
                    272:        exception taken ---> enter _060_fpsp_unsupp --|
                    273:                                                      |
                    274:                                                      |
                    275:             may exit through _060_real_snan      <----|
                    276:                                                  or  |
                    277:             may exit through _060_real_operr     <----|
                    278:                                                  or  |
                    279:             may exit through _060_real_ovfl      <----|
                    280:                                                  or  |
                    281:             may exit through _060_real_unfl      <----|
                    282:                                                  or  |
                    283:             may exit through _060_real_inex      <----|
                    284:                                                  or  |
                    285:             may exit through _060_real_trace     <----|
                    286:                                                  or  |
                    287:             may exit through _060_fpsp_done      <----|
                    288: 
                    289: _060_fpsp_effadd:
                    290: ------------------
                    291: - documented in 3.3 of 060 spec.
                    292: - Basic flow:
                    293:        exception taken ---> enter _060_fpsp_effadd --|
                    294:                                                      |
                    295:                                                      |
                    296:             may exit through _060_real_trace     <----|
                    297:                                                  or  |
                    298:      may exit through _060_real_fpu_disabled     <----|
                    299:                                                  or  |
                    300:             may exit through _060_fpsp_done      <----|

CVSweb