~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/arch/m68k/ifpsp060/os.S

Version: ~ [ linux-6.12-rc7 ] ~ [ linux-6.11.7 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.60 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.116 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.171 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.229 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.285 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.323 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.12 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

Diff markup

Differences between /arch/m68k/ifpsp060/os.S (Version linux-6.12-rc7) and /arch/mips/ifpsp060/os.S (Version linux-4.17.19)


  1 |~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~    
  2 |MOTOROLA MICROPROCESSOR & MEMORY TECHNOLOGY G    
  3 |M68000 Hi-Performance Microprocessor Division    
  4 |M68060 Software Package                          
  5 |Production Release P1.00 -- October 10, 1994     
  6 |                                                 
  7 |M68060 Software Package Copyright © 1993, 19    
  8 |                                                 
  9 |THE SOFTWARE is provided on an "AS IS" basis     
 10 |To the maximum extent permitted by applicable    
 11 |MOTOROLA DISCLAIMS ALL WARRANTIES WHETHER EXP    
 12 |INCLUDING IMPLIED WARRANTIES OF MERCHANTABILI    
 13 |and any warranty against infringement with re    
 14 |(INCLUDING ANY MODIFIED VERSIONS THEREOF) and    
 15 |                                                 
 16 |To the maximum extent permitted by applicable    
 17 |IN NO EVENT SHALL MOTOROLA BE LIABLE FOR ANY     
 18 |(INCLUDING WITHOUT LIMITATION, DAMAGES FOR LO    
 19 |BUSINESS INTERRUPTION, LOSS OF BUSINESS INFOR    
 20 |ARISING OF THE USE OR INABILITY TO USE THE SO    
 21 |Motorola assumes no responsibility for the ma    
 22 |                                                 
 23 |You are hereby granted a copyright license to    
 24 |so long as this entire notice is retained wit    
 25 |redistributed versions, and that such modifie    
 26 |No licenses are granted by implication, estop    
 27 |or trademarks of Motorola, Inc.                  
 28 |~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~    
 29 | os.s                                            
 30 |                                                 
 31 | This file contains:                             
 32 |       - example "Call-Out"s required by both    
 33 |                                                 
 34                                                   
 35 #include <linux/linkage.h>                        
 36                                                   
 37 |################################                 
 38 | EXAMPLE CALL-OUTS             #                 
 39 |                               #                 
 40 | _060_dmem_write()             #                 
 41 | _060_dmem_read()              #                 
 42 | _060_imem_read()              #                 
 43 | _060_dmem_read_byte()         #                 
 44 | _060_dmem_read_word()         #                 
 45 | _060_dmem_read_long()         #                 
 46 | _060_imem_read_word()         #                 
 47 | _060_imem_read_long()         #                 
 48 | _060_dmem_write_byte()        #                 
 49 | _060_dmem_write_word()        #                 
 50 | _060_dmem_write_long()        #                 
 51 |                               #                 
 52 | _060_real_trace()             #                 
 53 | _060_real_access()            #                 
 54 |################################                 
 55                                                   
 56 |                                                 
 57 | Each IO routine checks to see if the memory     
 58 | or supervisor application space. The example    
 59 | instructions for supervisor mode application    
 60 | for user mode applications.                     
 61 | When installing the 060SP, the _copyin()/_co    
 62 | given operating system should be substituted    
 63 |                                                 
 64 | The addresses within the 060SP are guarantee    
 65 | The result is that Unix processes are allowe    
 66 | of a page fault during a _copyout.              
 67 |                                                 
 68 | Linux/68k: The _060_[id]mem_{read,write}_{by    
 69 | (i.e. all the known length <= 4) are impleme    
 70 | statements instead of (more expensive) copy{    
 71 | working in user space                           
 72                                                   
 73 |                                                 
 74 | _060_dmem_write():                              
 75 |                                                 
 76 | Writes to data memory while in supervisor mo    
 77 |                                                 
 78 | INPUTS:                                         
 79 |       a0 - supervisor source address            
 80 |       a1 - user destination address             
 81 |       d0 - number of bytes to write             
 82 |       0x4(%a6),bit5 - 1 = supervisor mode, 0    
 83 | OUTPUTS:                                        
 84 |       d1 - 0 = success, !0 = failure            
 85 |                                                 
 86         .global         _060_dmem_write           
 87 _060_dmem_write:                                  
 88         subq.l          #1,%d0                    
 89         btst            #0x5,0x4(%a6)             
 90         beqs            user_write                
 91 super_write:                                      
 92         move.b          (%a0)+,(%a1)+             
 93         dbra            %d0,super_write           
 94         clr.l           %d1                       
 95         rts                                       
 96 user_write:                                       
 97         move.b          (%a0)+,%d1                
 98 copyoutae:                                        
 99         movs.b          %d1,(%a1)+                
100         dbra            %d0,user_write            
101         clr.l           %d1                       
102         rts                                       
103                                                   
104 |                                                 
105 | _060_imem_read(), _060_dmem_read():             
106 |                                                 
107 | Reads from data/instruction memory while in     
108 |                                                 
109 | INPUTS:                                         
110 |       a0 - user source address                  
111 |       a1 - supervisor destination address       
112 |       d0 - number of bytes to read              
113 |       0x4(%a6),bit5 - 1 = supervisor mode, 0    
114 | OUTPUTS:                                        
115 |       d1 - 0 = success, !0 = failure            
116 |                                                 
117         .global         _060_imem_read            
118         .global         _060_dmem_read            
119 _060_imem_read:                                   
120 _060_dmem_read:                                   
121         subq.l          #1,%d0                    
122         btst            #0x5,0x4(%a6)             
123         beqs            user_read                 
124 super_read:                                       
125         move.b          (%a0)+,(%a1)+             
126         dbra            %d0,super_read            
127         clr.l           %d1                       
128         rts                                       
129 user_read:                                        
130 copyinae:                                         
131         movs.b          (%a0)+,%d1                
132         move.b          %d1,(%a1)+                
133         dbra            %d0,user_read             
134         clr.l           %d1                       
135         rts                                       
136                                                   
137 |                                                 
138 | _060_dmem_read_byte():                          
139 |                                                 
140 | Read a data byte from user memory.              
141 |                                                 
142 | INPUTS:                                         
143 |       a0 - user source address                  
144 |       0x4(%a6),bit5 - 1 = supervisor mode, 0    
145 | OUTPUTS:                                        
146 |       d0 - data byte in d0                      
147 |       d1 - 0 = success, !0 = failure            
148 |                                                 
149         .global         _060_dmem_read_byte       
150 _060_dmem_read_byte:                              
151         clr.l           %d0                       
152         clr.l           %d1                       
153         btst            #0x5,0x4(%a6)             
154         bnes            dmrbs                     
155 dmrbuae:movs.b          (%a0),%d0                 
156         rts                                       
157 dmrbs:  move.b          (%a0),%d0                 
158         rts                                       
159                                                   
160 |                                                 
161 | _060_dmem_read_word():                          
162 |                                                 
163 | Read a data word from user memory.              
164 |                                                 
165 | INPUTS:                                         
166 |       a0 - user source address                  
167 |       0x4(%a6),bit5 - 1 = supervisor mode, 0    
168 | OUTPUTS:                                        
169 |       d0 - data word in d0                      
170 |       d1 - 0 = success, !0 = failure            
171 |                                                 
172 | _060_imem_read_word():                          
173 |                                                 
174 | Read an instruction word from user memory.      
175 |                                                 
176 | INPUTS:                                         
177 |       a0 - user source address                  
178 |       0x4(%a6),bit5 - 1 = supervisor mode, 0    
179 | OUTPUTS:                                        
180 |       d0 - instruction word in d0               
181 |       d1 - 0 = success, !0 = failure            
182 |                                                 
183         .global         _060_dmem_read_word       
184         .global         _060_imem_read_word       
185 _060_dmem_read_word:                              
186 _060_imem_read_word:                              
187         clr.l           %d1                       
188         clr.l           %d0                       
189         btst            #0x5,0x4(%a6)             
190         bnes            dmrws                     
191 dmrwuae:movs.w          (%a0), %d0                
192         rts                                       
193 dmrws:  move.w          (%a0), %d0                
194         rts                                       
195                                                   
196 |                                                 
197 | _060_dmem_read_long():                          
198 |                                                 
199                                                   
200 |                                                 
201 | INPUTS:                                         
202 |       a0 - user source address                  
203 |       0x4(%a6),bit5 - 1 = supervisor mode, 0    
204 | OUTPUTS:                                        
205 |       d0 - data longword in d0                  
206 |       d1 - 0 = success, !0 = failure            
207 |                                                 
208 | _060_imem_read_long():                          
209 |                                                 
210 | Read an instruction longword from user memor    
211 |                                                 
212 | INPUTS:                                         
213 |       a0 - user source address                  
214 |       0x4(%a6),bit5 - 1 = supervisor mode, 0    
215 | OUTPUTS:                                        
216 |       d0 - instruction longword in d0           
217 |       d1 - 0 = success, !0 = failure            
218 |                                                 
219         .global         _060_dmem_read_long       
220         .global         _060_imem_read_long       
221 _060_dmem_read_long:                              
222 _060_imem_read_long:                              
223         clr.l           %d1                       
224         btst            #0x5,0x4(%a6)             
225         bnes            dmrls                     
226 dmrluae:movs.l          (%a0),%d0                 
227         rts                                       
228 dmrls:  move.l          (%a0),%d0                 
229         rts                                       
230                                                   
231 |                                                 
232 | _060_dmem_write_byte():                         
233 |                                                 
234 | Write a data byte to user memory.               
235 |                                                 
236 | INPUTS:                                         
237 |       a0 - user destination address             
238 |       d0 - data byte in d0                      
239 |       0x4(%a6),bit5 - 1 = supervisor mode, 0    
240 | OUTPUTS:                                        
241 |       d1 - 0 = success, !0 = failure            
242 |                                                 
243         .global         _060_dmem_write_byte      
244 _060_dmem_write_byte:                             
245         clr.l           %d1                       
246         btst            #0x5,0x4(%a6)             
247         bnes            dmwbs                     
248 dmwbuae:movs.b          %d0,(%a0)                 
249         rts                                       
250 dmwbs:  move.b          %d0,(%a0)                 
251         rts                                       
252                                                   
253 |                                                 
254 | _060_dmem_write_word():                         
255 |                                                 
256 | Write a data word to user memory.               
257 |                                                 
258 | INPUTS:                                         
259 |       a0 - user destination address             
260 |       d0 - data word in d0                      
261 |       0x4(%a6),bit5 - 1 = supervisor mode, 0    
262 | OUTPUTS:                                        
263 |       d1 - 0 = success, !0 = failure            
264 |                                                 
265         .global         _060_dmem_write_word      
266 _060_dmem_write_word:                             
267         clr.l           %d1                       
268         btst            #0x5,0x4(%a6)             
269         bnes            dmwws                     
270 dmwwu:                                            
271 dmwwuae:movs.w          %d0,(%a0)                 
272         bras            dmwwr                     
273 dmwws:  move.w          %d0,(%a0)                 
274 dmwwr:  clr.l           %d1                       
275         rts                                       
276                                                   
277 |                                                 
278 | _060_dmem_write_long():                         
279 |                                                 
280 | Write a data longword to user memory.           
281 |                                                 
282 | INPUTS:                                         
283 |       a0 - user destination address             
284 |       d0 - data longword in d0                  
285 |       0x4(%a6),bit5 - 1 = supervisor mode, 0    
286 | OUTPUTS:                                        
287 |       d1 - 0 = success, !0 = failure            
288 |                                                 
289         .global         _060_dmem_write_long      
290 _060_dmem_write_long:                             
291         clr.l           %d1                       
292         btst            #0x5,0x4(%a6)             
293         bnes            dmwls                     
294 dmwluae:movs.l          %d0,(%a0)                 
295         rts                                       
296 dmwls:  move.l          %d0,(%a0)                 
297         rts                                       
298                                                   
299                                                   
300 #if 0                                             
301 |#############################################    
302                                                   
303 |                                                 
304 | Use these routines if your kernel doesn't ha    
305 | Assumes that D0/D1/A0/A1 are scratch registe    
306 | below assume that the SFC/DFC have been set     
307 |                                                 
308 | Linux/68k: These are basically non-inlined v    
309 | memcpy_{to,from}fs, but without long-transfe    
310 | Note: Assumed that SFC/DFC are pointing corr    
311 | space... Should be right, or are there any e    
312                                                   
313 |                                                 
314 | int _copyout(supervisor_addr, user_addr, nby    
315 |                                                 
316         .global         _copyout                  
317 _copyout:                                         
318         move.l          4(%sp),%a0                
319         move.l          8(%sp),%a1                
320         move.l          12(%sp),%d0               
321         subq.l          #1,%d0                    
322 moreout:                                          
323         move.b          (%a0)+,%d1                
324 copyoutae:                                        
325         movs.b          %d1,(%a1)+                
326         dbra            %d0,moreout               
327         moveq           #0,%d0                    
328         rts                                       
329                                                   
330 |                                                 
331 | int _copyin(user_addr, supervisor_addr, nbyt    
332 |                                                 
333         .global         _copyin                   
334 _copyin:                                          
335         move.l          4(%sp),%a0                
336         move.l          8(%sp),%a1                
337         move.l          12(%sp),%d0               
338     subq.l      #1,%d0                            
339 morein:                                           
340 copyinae:                                         
341         movs.b          (%a0)+,%d1                
342         move.b          %d1,(%a1)+                
343         dbra            %d0,morein                
344         moveq           #0,%d0                    
345         rts                                       
346 #endif                                            
347                                                   
348 |#############################################    
349                                                   
350 |                                                 
351 | _060_real_trace():                              
352 |                                                 
353 | This is the exit point for the 060FPSP when     
354 | and there are no other higher priority excep    
355 | or they have already been processed.            
356 |                                                 
357 | The sample code below simply executes an "rt    
358 |                                                 
359         .global         _060_real_trace           
360 _060_real_trace:                                  
361         bral    trap                              
362                                                   
363 |                                                 
364 | _060_real_access():                             
365 |                                                 
366 | This is the exit point for the 060FPSP when     
367 | is encountered. The routine below should poi    
368 | handler for access error exceptions. The exc    
369 | 8-word access error frame.                      
370 |                                                 
371 | The sample routine below simply executes an     
372 | is most likely the incorrect thing to do and    
373 | into an infinite loop.                          
374 |                                                 
375         .global         _060_real_access          
376 _060_real_access:                                 
377         bral    buserr                            
378                                                   
379                                                   
380                                                   
381 | Execption handling for movs access to illega    
382         .section .fixup,"ax"                      
383         .even                                     
384 1:      moveq           #-1,%d1                   
385         rts                                       
386 .section __ex_table,"a"                           
387         .align 4                                  
388         .long   dmrbuae,1b                        
389         .long   dmrwuae,1b                        
390         .long   dmrluae,1b                        
391         .long   dmwbuae,1b                        
392         .long   dmwwuae,1b                        
393         .long   dmwluae,1b                        
394         .long   copyoutae,1b                      
395         .long   copyinae,1b                       
396         .text                                     
                                                      

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php