home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / sys / m68k / 1095 < prev    next >
Encoding:
Internet Message Format  |  1992-09-08  |  1.8 KB

  1. Path: sparky!uunet!mcsun!sun4nl!hgatenl!tedux!F_HOME!ontnix2!leo
  2. From: leo@ontnix2.ahwau.ahold.nl (Leo Weppelman)
  3. Newsgroups: comp.sys.m68k
  4. Subject: problems with m68882
  5. Keywords: m68882
  6. Message-ID: <219@F_HOME.ahwau.ahold.nl>
  7. Date: 4 Sep 92 06:29:49 GMT
  8. Sender: usenet@F_HOME.ahwau.ahold.nl
  9. Lines: 37
  10. Nntp-Posting-Host: ontnix
  11.  
  12. I am working on an multi-tasking kernel on my Atari-TT. It contains an
  13. 68030 main processor and an 68882 coprocessor on 33Mhz.
  14.  
  15. I am getting coprocessor protocol violations at random but especially
  16. when a lot of interrupts occur (i.e. during disk accesses).
  17.  
  18. I added the the following functions to the kernel to support floating
  19. point support:
  20.    - when a process is created, an frestore is performed on a null frame
  21.      (a long value of 0). This should reset the coprocessor for that process.
  22.    - Just before I switch to a new process context, I carry out the following
  23.      instruction sequence:
  24.        move    #proc_fpu_save, a0
  25.        fsave (a0)
  26.        btst    (a0)
  27.        beq    no_more
  28.        fmove    fp0-fp7, x(a0) /* I don't know the exact offset */
  29.        fmove    fpcr/fpiar/fpsr, x2(a0)
  30.      nomore:
  31.        rts
  32.    - when a process resumes executing, the fpu context is restored with
  33.      code simular to the above code fragment.
  34.  
  35. Is there somebody out there who can tell me what I am doing wrong here.
  36. I am pretty sure that my kernel code does not use floating point (exept
  37. for the above mentioned fragments).
  38. I don't understand the exact problem I am having. According to the manuals
  39. interrupts shouldn't be a problem.
  40.  
  41. I also have a second question, the manual (as contained in the 68000 family
  42. reference) says that when handling floating point exeptions I should
  43. sometimes set (or reset) bit 27 of the BUI in the save-context. Does 
  44. anybody know why and when I should set this bit and the location of the
  45. BIU in the saved context.
  46.  
  47. Thanks in advance, Leo (email: leo@ahwau.ahold.nl)
  48.  
  49.