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

TOMOYO Linux Cross Reference
Linux/arch/powerpc/boot/opal-calls.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/powerpc/boot/opal-calls.S (Version linux-6.12-rc7) and /arch/m68k/boot/opal-calls.S (Version linux-6.8.12)


  1 /* SPDX-License-Identifier: GPL-2.0-or-later *    
  2 /*                                                
  3  * Copyright (c) 2016 IBM Corporation.            
  4  */                                               
  5                                                   
  6 #include "ppc_asm.h"                              
  7 #include "../include/asm/opal-api.h"              
  8                                                   
  9         .text                                     
 10                                                   
 11         .globl opal_kentry                        
 12 opal_kentry:                                      
 13         /* r3 is the fdt ptr */                   
 14         mtctr r4                                  
 15         li      r4, 0                             
 16         li      r5, 0                             
 17         li      r6, 0                             
 18         li      r7, 0                             
 19         LOAD_REG_ADDR(r11, opal)                  
 20         ld      r8,0(r11)                         
 21         ld      r9,8(r11)                         
 22         bctr                                      
 23                                                   
 24 #define OPAL_CALL(name, token)                    
 25         .globl name;                              
 26 name:                                             
 27         li      r0, token;                        
 28         b       opal_call;                        
 29                                                   
 30 opal_call:                                        
 31         mflr    r11                               
 32         std     r11,16(r1)                        
 33         mfcr    r12                               
 34         stw     r12,8(r1)                         
 35         mr      r13,r2                            
 36                                                   
 37         /* Set opal return address */             
 38         LOAD_REG_ADDR(r11, opal_return)           
 39         mtlr    r11                               
 40         mfmsr   r12                               
 41                                                   
 42         /* switch to BE when we enter OPAL */     
 43         li      r11,MSR_LE                        
 44         andc    r12,r12,r11                       
 45         mtspr   SPRN_HSRR1,r12                    
 46                                                   
 47         /* load the opal call entry point and     
 48         LOAD_REG_ADDR(r11, opal)                  
 49         ld      r12,8(r11)                        
 50         ld      r2,0(r11)                         
 51         mtspr   SPRN_HSRR0,r12                    
 52         hrfid                                     
 53                                                   
 54 opal_return:                                      
 55         FIXUP_ENDIAN                              
 56         mr      r2,r13;                           
 57         lwz     r11,8(r1);                        
 58         ld      r12,16(r1)                        
 59         mtcr    r11;                              
 60         mtlr    r12                               
 61         blr                                       
 62                                                   
 63 OPAL_CALL(opal_console_write,                     
 64 OPAL_CALL(opal_console_read,                      
 65 OPAL_CALL(opal_console_write_buffer_space,        
 66 OPAL_CALL(opal_poll_events,                       
 67 OPAL_CALL(opal_console_flush,                     
                                                      

~ [ 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