11da177e4SLinus Torvalds|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 21da177e4SLinus Torvalds|MOTOROLA MICROPROCESSOR & MEMORY TECHNOLOGY GROUP 31da177e4SLinus Torvalds|M68000 Hi-Performance Microprocessor Division 41da177e4SLinus Torvalds|M68060 Software Package 51da177e4SLinus Torvalds|Production Release P1.00 -- October 10, 1994 61da177e4SLinus Torvalds| 796de0e25SJan Engelhardt|M68060 Software Package Copyright © 1993, 1994 Motorola Inc. All rights reserved. 81da177e4SLinus Torvalds| 91da177e4SLinus Torvalds|THE SOFTWARE is provided on an "AS IS" basis and without warranty. 101da177e4SLinus Torvalds|To the maximum extent permitted by applicable law, 111da177e4SLinus Torvalds|MOTOROLA DISCLAIMS ALL WARRANTIES WHETHER EXPRESS OR IMPLIED, 121da177e4SLinus Torvalds|INCLUDING IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE 131da177e4SLinus Torvalds|and any warranty against infringement with regard to the SOFTWARE 141da177e4SLinus Torvalds|(INCLUDING ANY MODIFIED VERSIONS THEREOF) and any accompanying written materials. 151da177e4SLinus Torvalds| 161da177e4SLinus Torvalds|To the maximum extent permitted by applicable law, 171da177e4SLinus Torvalds|IN NO EVENT SHALL MOTOROLA BE LIABLE FOR ANY DAMAGES WHATSOEVER 181da177e4SLinus Torvalds|(INCLUDING WITHOUT LIMITATION, DAMAGES FOR LOSS OF BUSINESS PROFITS, 191da177e4SLinus Torvalds|BUSINESS INTERRUPTION, LOSS OF BUSINESS INFORMATION, OR OTHER PECUNIARY LOSS) 201da177e4SLinus Torvalds|ARISING OF THE USE OR INABILITY TO USE THE SOFTWARE. 211da177e4SLinus Torvalds|Motorola assumes no responsibility for the maintenance and support of the SOFTWARE. 221da177e4SLinus Torvalds| 231da177e4SLinus Torvalds|You are hereby granted a copyright license to use, modify, and distribute the SOFTWARE 241da177e4SLinus Torvalds|so long as this entire notice is retained without alteration in any modified and/or 251da177e4SLinus Torvalds|redistributed versions, and that such modified versions are clearly identified as such. 261da177e4SLinus Torvalds|No licenses are granted by implication, estoppel or otherwise under any patents 271da177e4SLinus Torvalds|or trademarks of Motorola, Inc. 281da177e4SLinus Torvalds|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 291da177e4SLinus Torvalds| os.s 301da177e4SLinus Torvalds| 311da177e4SLinus Torvalds| This file contains: 321da177e4SLinus Torvalds| - example "Call-Out"s required by both the ISP and FPSP. 331da177e4SLinus Torvalds| 341da177e4SLinus Torvalds 351da177e4SLinus Torvalds#include <linux/linkage.h> 361da177e4SLinus Torvalds 371da177e4SLinus Torvalds|################################ 381da177e4SLinus Torvalds| EXAMPLE CALL-OUTS # 391da177e4SLinus Torvalds| # 401da177e4SLinus Torvalds| _060_dmem_write() # 411da177e4SLinus Torvalds| _060_dmem_read() # 421da177e4SLinus Torvalds| _060_imem_read() # 431da177e4SLinus Torvalds| _060_dmem_read_byte() # 441da177e4SLinus Torvalds| _060_dmem_read_word() # 451da177e4SLinus Torvalds| _060_dmem_read_long() # 461da177e4SLinus Torvalds| _060_imem_read_word() # 471da177e4SLinus Torvalds| _060_imem_read_long() # 481da177e4SLinus Torvalds| _060_dmem_write_byte() # 491da177e4SLinus Torvalds| _060_dmem_write_word() # 501da177e4SLinus Torvalds| _060_dmem_write_long() # 511da177e4SLinus Torvalds| # 521da177e4SLinus Torvalds| _060_real_trace() # 531da177e4SLinus Torvalds| _060_real_access() # 541da177e4SLinus Torvalds|################################ 551da177e4SLinus Torvalds 561da177e4SLinus Torvalds| 571da177e4SLinus Torvalds| Each IO routine checks to see if the memory write/read is to/from user 581da177e4SLinus Torvalds| or supervisor application space. The examples below use simple "move" 591da177e4SLinus Torvalds| instructions for supervisor mode applications and call _copyin()/_copyout() 601da177e4SLinus Torvalds| for user mode applications. 611da177e4SLinus Torvalds| When installing the 060SP, the _copyin()/_copyout() equivalents for a 621da177e4SLinus Torvalds| given operating system should be substituted. 631da177e4SLinus Torvalds| 641da177e4SLinus Torvalds| The addresses within the 060SP are guaranteed to be on the stack. 651da177e4SLinus Torvalds| The result is that Unix processes are allowed to sleep as a consequence 661da177e4SLinus Torvalds| of a page fault during a _copyout. 671da177e4SLinus Torvalds| 681da177e4SLinus Torvalds| Linux/68k: The _060_[id]mem_{read,write}_{byte,word,long} functions 691da177e4SLinus Torvalds| (i.e. all the known length <= 4) are implemented by single moves 701da177e4SLinus Torvalds| statements instead of (more expensive) copy{in,out} calls, if 711da177e4SLinus Torvalds| working in user space 721da177e4SLinus Torvalds 731da177e4SLinus Torvalds| 741da177e4SLinus Torvalds| _060_dmem_write(): 751da177e4SLinus Torvalds| 761da177e4SLinus Torvalds| Writes to data memory while in supervisor mode. 771da177e4SLinus Torvalds| 781da177e4SLinus Torvalds| INPUTS: 791da177e4SLinus Torvalds| a0 - supervisor source address 801da177e4SLinus Torvalds| a1 - user destination address 811da177e4SLinus Torvalds| d0 - number of bytes to write 821da177e4SLinus Torvalds| 0x4(%a6),bit5 - 1 = supervisor mode, 0 = user mode 831da177e4SLinus Torvalds| OUTPUTS: 841da177e4SLinus Torvalds| d1 - 0 = success, !0 = failure 851da177e4SLinus Torvalds| 861da177e4SLinus Torvalds .global _060_dmem_write 871da177e4SLinus Torvalds_060_dmem_write: 881da177e4SLinus Torvalds subq.l #1,%d0 891da177e4SLinus Torvalds btst #0x5,0x4(%a6) | check for supervisor state 901da177e4SLinus Torvalds beqs user_write 911da177e4SLinus Torvaldssuper_write: 921da177e4SLinus Torvalds move.b (%a0)+,(%a1)+ | copy 1 byte 931da177e4SLinus Torvalds dbra %d0,super_write | quit if --ctr < 0 941da177e4SLinus Torvalds clr.l %d1 | return success 951da177e4SLinus Torvalds rts 961da177e4SLinus Torvaldsuser_write: 971da177e4SLinus Torvalds move.b (%a0)+,%d1 | copy 1 byte 981da177e4SLinus Torvaldscopyoutae: 991da177e4SLinus Torvalds movs.b %d1,(%a1)+ 1001da177e4SLinus Torvalds dbra %d0,user_write | quit if --ctr < 0 1011da177e4SLinus Torvalds clr.l %d1 | return success 1021da177e4SLinus Torvalds rts 1031da177e4SLinus Torvalds 1041da177e4SLinus Torvalds| 1051da177e4SLinus Torvalds| _060_imem_read(), _060_dmem_read(): 1061da177e4SLinus Torvalds| 1071da177e4SLinus Torvalds| Reads from data/instruction memory while in supervisor mode. 1081da177e4SLinus Torvalds| 1091da177e4SLinus Torvalds| INPUTS: 1101da177e4SLinus Torvalds| a0 - user source address 1111da177e4SLinus Torvalds| a1 - supervisor destination address 1121da177e4SLinus Torvalds| d0 - number of bytes to read 1131da177e4SLinus Torvalds| 0x4(%a6),bit5 - 1 = supervisor mode, 0 = user mode 1141da177e4SLinus Torvalds| OUTPUTS: 1151da177e4SLinus Torvalds| d1 - 0 = success, !0 = failure 1161da177e4SLinus Torvalds| 1171da177e4SLinus Torvalds .global _060_imem_read 1181da177e4SLinus Torvalds .global _060_dmem_read 1191da177e4SLinus Torvalds_060_imem_read: 1201da177e4SLinus Torvalds_060_dmem_read: 1211da177e4SLinus Torvalds subq.l #1,%d0 1221da177e4SLinus Torvalds btst #0x5,0x4(%a6) | check for supervisor state 1231da177e4SLinus Torvalds beqs user_read 1241da177e4SLinus Torvaldssuper_read: 1251da177e4SLinus Torvalds move.b (%a0)+,(%a1)+ | copy 1 byte 1261da177e4SLinus Torvalds dbra %d0,super_read | quit if --ctr < 0 1271da177e4SLinus Torvalds clr.l %d1 | return success 1281da177e4SLinus Torvalds rts 1291da177e4SLinus Torvaldsuser_read: 1301da177e4SLinus Torvaldscopyinae: 1311da177e4SLinus Torvalds movs.b (%a0)+,%d1 1321da177e4SLinus Torvalds move.b %d1,(%a1)+ | copy 1 byte 1331da177e4SLinus Torvalds dbra %d0,user_read | quit if --ctr < 0 1341da177e4SLinus Torvalds clr.l %d1 | return success 1351da177e4SLinus Torvalds rts 1361da177e4SLinus Torvalds 1371da177e4SLinus Torvalds| 1381da177e4SLinus Torvalds| _060_dmem_read_byte(): 1391da177e4SLinus Torvalds| 1401da177e4SLinus Torvalds| Read a data byte from user memory. 1411da177e4SLinus Torvalds| 1421da177e4SLinus Torvalds| INPUTS: 1431da177e4SLinus Torvalds| a0 - user source address 1441da177e4SLinus Torvalds| 0x4(%a6),bit5 - 1 = supervisor mode, 0 = user mode 1451da177e4SLinus Torvalds| OUTPUTS: 1461da177e4SLinus Torvalds| d0 - data byte in d0 1471da177e4SLinus Torvalds| d1 - 0 = success, !0 = failure 1481da177e4SLinus Torvalds| 1491da177e4SLinus Torvalds .global _060_dmem_read_byte 1501da177e4SLinus Torvalds_060_dmem_read_byte: 1511da177e4SLinus Torvalds clr.l %d0 | clear whole longword 1521da177e4SLinus Torvalds clr.l %d1 | assume success 1531da177e4SLinus Torvalds btst #0x5,0x4(%a6) | check for supervisor state 1541da177e4SLinus Torvalds bnes dmrbs | supervisor 1551da177e4SLinus Torvaldsdmrbuae:movs.b (%a0),%d0 | fetch user byte 1561da177e4SLinus Torvalds rts 1571da177e4SLinus Torvaldsdmrbs: move.b (%a0),%d0 | fetch super byte 1581da177e4SLinus Torvalds rts 1591da177e4SLinus Torvalds 1601da177e4SLinus Torvalds| 1611da177e4SLinus Torvalds| _060_dmem_read_word(): 1621da177e4SLinus Torvalds| 1631da177e4SLinus Torvalds| Read a data word from user memory. 1641da177e4SLinus Torvalds| 1651da177e4SLinus Torvalds| INPUTS: 1661da177e4SLinus Torvalds| a0 - user source address 1671da177e4SLinus Torvalds| 0x4(%a6),bit5 - 1 = supervisor mode, 0 = user mode 1681da177e4SLinus Torvalds| OUTPUTS: 1691da177e4SLinus Torvalds| d0 - data word in d0 1701da177e4SLinus Torvalds| d1 - 0 = success, !0 = failure 1711da177e4SLinus Torvalds| 1721da177e4SLinus Torvalds| _060_imem_read_word(): 1731da177e4SLinus Torvalds| 1741da177e4SLinus Torvalds| Read an instruction word from user memory. 1751da177e4SLinus Torvalds| 1761da177e4SLinus Torvalds| INPUTS: 1771da177e4SLinus Torvalds| a0 - user source address 1781da177e4SLinus Torvalds| 0x4(%a6),bit5 - 1 = supervisor mode, 0 = user mode 1791da177e4SLinus Torvalds| OUTPUTS: 1801da177e4SLinus Torvalds| d0 - instruction word in d0 1811da177e4SLinus Torvalds| d1 - 0 = success, !0 = failure 1821da177e4SLinus Torvalds| 1831da177e4SLinus Torvalds .global _060_dmem_read_word 1841da177e4SLinus Torvalds .global _060_imem_read_word 1851da177e4SLinus Torvalds_060_dmem_read_word: 1861da177e4SLinus Torvalds_060_imem_read_word: 1871da177e4SLinus Torvalds clr.l %d1 | assume success 1881da177e4SLinus Torvalds clr.l %d0 | clear whole longword 1891da177e4SLinus Torvalds btst #0x5,0x4(%a6) | check for supervisor state 1901da177e4SLinus Torvalds bnes dmrws | supervisor 1911da177e4SLinus Torvaldsdmrwuae:movs.w (%a0), %d0 | fetch user word 1921da177e4SLinus Torvalds rts 1931da177e4SLinus Torvaldsdmrws: move.w (%a0), %d0 | fetch super word 1941da177e4SLinus Torvalds rts 1951da177e4SLinus Torvalds 1961da177e4SLinus Torvalds| 1971da177e4SLinus Torvalds| _060_dmem_read_long(): 1981da177e4SLinus Torvalds| 1991da177e4SLinus Torvalds 2001da177e4SLinus Torvalds| 2011da177e4SLinus Torvalds| INPUTS: 2021da177e4SLinus Torvalds| a0 - user source address 2031da177e4SLinus Torvalds| 0x4(%a6),bit5 - 1 = supervisor mode, 0 = user mode 2041da177e4SLinus Torvalds| OUTPUTS: 2051da177e4SLinus Torvalds| d0 - data longword in d0 2061da177e4SLinus Torvalds| d1 - 0 = success, !0 = failure 2071da177e4SLinus Torvalds| 2081da177e4SLinus Torvalds| _060_imem_read_long(): 2091da177e4SLinus Torvalds| 2101da177e4SLinus Torvalds| Read an instruction longword from user memory. 2111da177e4SLinus Torvalds| 2121da177e4SLinus Torvalds| INPUTS: 2131da177e4SLinus Torvalds| a0 - user source address 2141da177e4SLinus Torvalds| 0x4(%a6),bit5 - 1 = supervisor mode, 0 = user mode 2151da177e4SLinus Torvalds| OUTPUTS: 2161da177e4SLinus Torvalds| d0 - instruction longword in d0 2171da177e4SLinus Torvalds| d1 - 0 = success, !0 = failure 2181da177e4SLinus Torvalds| 2191da177e4SLinus Torvalds .global _060_dmem_read_long 2201da177e4SLinus Torvalds .global _060_imem_read_long 2211da177e4SLinus Torvalds_060_dmem_read_long: 2221da177e4SLinus Torvalds_060_imem_read_long: 2231da177e4SLinus Torvalds clr.l %d1 | assume success 2241da177e4SLinus Torvalds btst #0x5,0x4(%a6) | check for supervisor state 2251da177e4SLinus Torvalds bnes dmrls | supervisor 2261da177e4SLinus Torvaldsdmrluae:movs.l (%a0),%d0 | fetch user longword 2271da177e4SLinus Torvalds rts 2281da177e4SLinus Torvaldsdmrls: move.l (%a0),%d0 | fetch super longword 2291da177e4SLinus Torvalds rts 2301da177e4SLinus Torvalds 2311da177e4SLinus Torvalds| 2321da177e4SLinus Torvalds| _060_dmem_write_byte(): 2331da177e4SLinus Torvalds| 2341da177e4SLinus Torvalds| Write a data byte to user memory. 2351da177e4SLinus Torvalds| 2361da177e4SLinus Torvalds| INPUTS: 2371da177e4SLinus Torvalds| a0 - user destination address 2381da177e4SLinus Torvalds| d0 - data byte in d0 2391da177e4SLinus Torvalds| 0x4(%a6),bit5 - 1 = supervisor mode, 0 = user mode 2401da177e4SLinus Torvalds| OUTPUTS: 2411da177e4SLinus Torvalds| d1 - 0 = success, !0 = failure 2421da177e4SLinus Torvalds| 2431da177e4SLinus Torvalds .global _060_dmem_write_byte 2441da177e4SLinus Torvalds_060_dmem_write_byte: 2451da177e4SLinus Torvalds clr.l %d1 | assume success 2461da177e4SLinus Torvalds btst #0x5,0x4(%a6) | check for supervisor state 2471da177e4SLinus Torvalds bnes dmwbs | supervisor 2481da177e4SLinus Torvaldsdmwbuae:movs.b %d0,(%a0) | store user byte 2491da177e4SLinus Torvalds rts 2501da177e4SLinus Torvaldsdmwbs: move.b %d0,(%a0) | store super byte 2511da177e4SLinus Torvalds rts 2521da177e4SLinus Torvalds 2531da177e4SLinus Torvalds| 2541da177e4SLinus Torvalds| _060_dmem_write_word(): 2551da177e4SLinus Torvalds| 2561da177e4SLinus Torvalds| Write a data word to user memory. 2571da177e4SLinus Torvalds| 2581da177e4SLinus Torvalds| INPUTS: 2591da177e4SLinus Torvalds| a0 - user destination address 2601da177e4SLinus Torvalds| d0 - data word in d0 2611da177e4SLinus Torvalds| 0x4(%a6),bit5 - 1 = supervisor mode, 0 = user mode 2621da177e4SLinus Torvalds| OUTPUTS: 2631da177e4SLinus Torvalds| d1 - 0 = success, !0 = failure 2641da177e4SLinus Torvalds| 2651da177e4SLinus Torvalds .global _060_dmem_write_word 2661da177e4SLinus Torvalds_060_dmem_write_word: 2671da177e4SLinus Torvalds clr.l %d1 | assume success 2681da177e4SLinus Torvalds btst #0x5,0x4(%a6) | check for supervisor state 2691da177e4SLinus Torvalds bnes dmwws | supervisor 2701da177e4SLinus Torvaldsdmwwu: 2711da177e4SLinus Torvaldsdmwwuae:movs.w %d0,(%a0) | store user word 2721da177e4SLinus Torvalds bras dmwwr 2731da177e4SLinus Torvaldsdmwws: move.w %d0,(%a0) | store super word 2741da177e4SLinus Torvaldsdmwwr: clr.l %d1 | return success 2751da177e4SLinus Torvalds rts 2761da177e4SLinus Torvalds 2771da177e4SLinus Torvalds| 2781da177e4SLinus Torvalds| _060_dmem_write_long(): 2791da177e4SLinus Torvalds| 2801da177e4SLinus Torvalds| Write a data longword to user memory. 2811da177e4SLinus Torvalds| 2821da177e4SLinus Torvalds| INPUTS: 2831da177e4SLinus Torvalds| a0 - user destination address 2841da177e4SLinus Torvalds| d0 - data longword in d0 2851da177e4SLinus Torvalds| 0x4(%a6),bit5 - 1 = supervisor mode, 0 = user mode 2861da177e4SLinus Torvalds| OUTPUTS: 2871da177e4SLinus Torvalds| d1 - 0 = success, !0 = failure 2881da177e4SLinus Torvalds| 2891da177e4SLinus Torvalds .global _060_dmem_write_long 2901da177e4SLinus Torvalds_060_dmem_write_long: 2911da177e4SLinus Torvalds clr.l %d1 | assume success 2921da177e4SLinus Torvalds btst #0x5,0x4(%a6) | check for supervisor state 2931da177e4SLinus Torvalds bnes dmwls | supervisor 2941da177e4SLinus Torvaldsdmwluae:movs.l %d0,(%a0) | store user longword 2951da177e4SLinus Torvalds rts 2961da177e4SLinus Torvaldsdmwls: move.l %d0,(%a0) | store super longword 2971da177e4SLinus Torvalds rts 2981da177e4SLinus Torvalds 2991da177e4SLinus Torvalds 3001da177e4SLinus Torvalds#if 0 3011da177e4SLinus Torvalds|############################################### 3021da177e4SLinus Torvalds 3031da177e4SLinus Torvalds| 3041da177e4SLinus Torvalds| Use these routines if your kernel doesn't have _copyout/_copyin equivalents. 3051da177e4SLinus Torvalds| Assumes that D0/D1/A0/A1 are scratch registers. The _copyin/_copyout 3061da177e4SLinus Torvalds| below assume that the SFC/DFC have been set previously. 3071da177e4SLinus Torvalds| 3081da177e4SLinus Torvalds| Linux/68k: These are basically non-inlined versions of 3091da177e4SLinus Torvalds| memcpy_{to,from}fs, but without long-transfer optimization 3101da177e4SLinus Torvalds| Note: Assumed that SFC/DFC are pointing correctly to user data 3111da177e4SLinus Torvalds| space... Should be right, or are there any exceptions? 3121da177e4SLinus Torvalds 3131da177e4SLinus Torvalds| 3141da177e4SLinus Torvalds| int _copyout(supervisor_addr, user_addr, nbytes) 3151da177e4SLinus Torvalds| 3161da177e4SLinus Torvalds .global _copyout 3171da177e4SLinus Torvalds_copyout: 3181da177e4SLinus Torvalds move.l 4(%sp),%a0 | source 3191da177e4SLinus Torvalds move.l 8(%sp),%a1 | destination 3201da177e4SLinus Torvalds move.l 12(%sp),%d0 | count 3211da177e4SLinus Torvalds subq.l #1,%d0 3221da177e4SLinus Torvaldsmoreout: 3231da177e4SLinus Torvalds move.b (%a0)+,%d1 | fetch supervisor byte 3241da177e4SLinus Torvaldscopyoutae: 3251da177e4SLinus Torvalds movs.b %d1,(%a1)+ | store user byte 3261da177e4SLinus Torvalds dbra %d0,moreout | are we through yet? 3271da177e4SLinus Torvalds moveq #0,%d0 | return success 3281da177e4SLinus Torvalds rts 3291da177e4SLinus Torvalds 3301da177e4SLinus Torvalds| 3311da177e4SLinus Torvalds| int _copyin(user_addr, supervisor_addr, nbytes) 3321da177e4SLinus Torvalds| 3331da177e4SLinus Torvalds .global _copyin 3341da177e4SLinus Torvalds_copyin: 3351da177e4SLinus Torvalds move.l 4(%sp),%a0 | source 3361da177e4SLinus Torvalds move.l 8(%sp),%a1 | destination 3371da177e4SLinus Torvalds move.l 12(%sp),%d0 | count 3381da177e4SLinus Torvalds subq.l #1,%d0 3391da177e4SLinus Torvaldsmorein: 3401da177e4SLinus Torvaldscopyinae: 3411da177e4SLinus Torvalds movs.b (%a0)+,%d1 | fetch user byte 3421da177e4SLinus Torvalds move.b %d1,(%a1)+ | write supervisor byte 3431da177e4SLinus Torvalds dbra %d0,morein | are we through yet? 3441da177e4SLinus Torvalds moveq #0,%d0 | return success 3451da177e4SLinus Torvalds rts 3461da177e4SLinus Torvalds#endif 3471da177e4SLinus Torvalds 3481da177e4SLinus Torvalds|########################################################################### 3491da177e4SLinus Torvalds 3501da177e4SLinus Torvalds| 3511da177e4SLinus Torvalds| _060_real_trace(): 3521da177e4SLinus Torvalds| 3531da177e4SLinus Torvalds| This is the exit point for the 060FPSP when an instruction is being traced 3541da177e4SLinus Torvalds| and there are no other higher priority exceptions pending for this instruction 3551da177e4SLinus Torvalds| or they have already been processed. 3561da177e4SLinus Torvalds| 3571da177e4SLinus Torvalds| The sample code below simply executes an "rte". 3581da177e4SLinus Torvalds| 3591da177e4SLinus Torvalds .global _060_real_trace 3601da177e4SLinus Torvalds_060_real_trace: 3611da177e4SLinus Torvalds bral trap 3621da177e4SLinus Torvalds 3631da177e4SLinus Torvalds| 3641da177e4SLinus Torvalds| _060_real_access(): 3651da177e4SLinus Torvalds| 3661da177e4SLinus Torvalds| This is the exit point for the 060FPSP when an access error exception 3671da177e4SLinus Torvalds| is encountered. The routine below should point to the operating system 3681da177e4SLinus Torvalds| handler for access error exceptions. The exception stack frame is an 3691da177e4SLinus Torvalds| 8-word access error frame. 3701da177e4SLinus Torvalds| 3711da177e4SLinus Torvalds| The sample routine below simply executes an "rte" instruction which 3721da177e4SLinus Torvalds| is most likely the incorrect thing to do and could put the system 3731da177e4SLinus Torvalds| into an infinite loop. 3741da177e4SLinus Torvalds| 3751da177e4SLinus Torvalds .global _060_real_access 3761da177e4SLinus Torvalds_060_real_access: 3771da177e4SLinus Torvalds bral buserr 3781da177e4SLinus Torvalds 3791da177e4SLinus Torvalds 3801da177e4SLinus Torvalds 3811da177e4SLinus Torvalds| Execption handling for movs access to illegal memory 382*922a9bd1SBen Hutchings .section .fixup,"ax" 3831da177e4SLinus Torvalds .even 3841da177e4SLinus Torvalds1: moveq #-1,%d1 3851da177e4SLinus Torvalds rts 386*922a9bd1SBen Hutchings.section __ex_table,"a" 3871da177e4SLinus Torvalds .align 4 3881da177e4SLinus Torvalds .long dmrbuae,1b 3891da177e4SLinus Torvalds .long dmrwuae,1b 3901da177e4SLinus Torvalds .long dmrluae,1b 3911da177e4SLinus Torvalds .long dmwbuae,1b 3921da177e4SLinus Torvalds .long dmwwuae,1b 3931da177e4SLinus Torvalds .long dmwluae,1b 3941da177e4SLinus Torvalds .long copyoutae,1b 3951da177e4SLinus Torvalds .long copyinae,1b 3961da177e4SLinus Torvalds .text 397