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

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


  1 /* SPDX-License-Identifier: GPL-2.0-only */       
  2 /*                                                
  3  *  PS3 bootwrapper hvcalls.                      
  4  *                                                
  5  *  Copyright (C) 2007 Sony Computer Entertain    
  6  *  Copyright 2007 Sony Corp.                     
  7  */                                               
  8                                                   
  9 #include "ppc_asm.h"                              
 10                                                   
 11         .machine "ppc64"                          
 12                                                   
 13 /*                                                
 14  * The PS3 hypervisor uses a 64 bit "C" langua    
 15  * The routines here marshal arguments between    
 16  * program and the 64 bit hvcalls.                
 17  *                                                
 18  *  wrapper           lv1                         
 19  *  32-bit (h,l)      64-bit                      
 20  *                                                
 21  *  1: r3,r4          <-> r3                      
 22  *  2: r5,r6          <-> r4                      
 23  *  3: r7,r8          <-> r5                      
 24  *  4: r9,r10         <-> r6                      
 25  *  5: 8(r1),12(r1)   <-> r7                      
 26  *  6: 16(r1),20(r1)  <-> r8                      
 27  *  7: 24(r1),28(r1)  <-> r9                      
 28  *  8: 32(r1),36(r1)  <-> r10                     
 29  *                                                
 30  */                                               
 31                                                   
 32 .macro GLOBAL name                                
 33         .section ".text"                          
 34         .balign 4                                 
 35         .globl \name                              
 36 \name:                                            
 37 .endm                                             
 38                                                   
 39 .macro NO_SUPPORT name                            
 40         GLOBAL \name                              
 41         b ps3_no_support                          
 42 .endm                                             
 43                                                   
 44 .macro HVCALL num                                 
 45         li r11, \num                              
 46         .long 0x44000022                          
 47         extsw r3, r3                              
 48 .endm                                             
 49                                                   
 50 .macro SAVE_LR offset=4                           
 51         mflr r0                                   
 52         stw r0, \offset(r1)                       
 53 .endm                                             
 54                                                   
 55 .macro LOAD_LR offset=4                           
 56         lwz r0, \offset(r1)                       
 57         mtlr r0                                   
 58 .endm                                             
 59                                                   
 60 .macro LOAD_64_REG target,high,low                
 61         sldi r11, \high, 32                       
 62         or \target, r11, \low                     
 63 .endm                                             
 64                                                   
 65 .macro LOAD_64_STACK target,offset                
 66         ld \target, \offset(r1)                   
 67 .endm                                             
 68                                                   
 69 .macro LOAD_R3                                    
 70         LOAD_64_REG r3,r3,r4                      
 71 .endm                                             
 72                                                   
 73 .macro LOAD_R4                                    
 74         LOAD_64_REG r4,r5,r6                      
 75 .endm                                             
 76                                                   
 77 .macro LOAD_R5                                    
 78         LOAD_64_REG r5,r7,r8                      
 79 .endm                                             
 80                                                   
 81 .macro LOAD_R6                                    
 82         LOAD_64_REG r6,r9,r10                     
 83 .endm                                             
 84                                                   
 85 .macro LOAD_R7                                    
 86         LOAD_64_STACK r7,8                        
 87 .endm                                             
 88                                                   
 89 .macro LOAD_R8                                    
 90         LOAD_64_STACK r8,16                       
 91 .endm                                             
 92                                                   
 93 .macro LOAD_R9                                    
 94         LOAD_64_STACK r9,24                       
 95 .endm                                             
 96                                                   
 97 .macro LOAD_R10                                   
 98         LOAD_64_STACK r10,32                      
 99 .endm                                             
100                                                   
101 .macro LOAD_REGS_0                                
102         stwu 1,-16(1)                             
103         stw 3, 8(1)                               
104 .endm                                             
105                                                   
106 .macro LOAD_REGS_5                                
107         LOAD_R3                                   
108         LOAD_R4                                   
109         LOAD_R5                                   
110         LOAD_R6                                   
111         LOAD_R7                                   
112 .endm                                             
113                                                   
114 .macro LOAD_REGS_6                                
115         LOAD_REGS_5                               
116         LOAD_R8                                   
117 .endm                                             
118                                                   
119 .macro LOAD_REGS_8                                
120         LOAD_REGS_6                               
121         LOAD_R9                                   
122         LOAD_R10                                  
123 .endm                                             
124                                                   
125 .macro STORE_REGS_0_1                             
126         lwz r11, 8(r1)                            
127         std r4, 0(r11)                            
128         mr r4, r3                                 
129         li r3, 0                                  
130         addi r1,r1,16                             
131 .endm                                             
132                                                   
133 .macro STORE_REGS_5_2                             
134         lwz r11, 16(r1)                           
135         std r4, 0(r11)                            
136         lwz r11, 20(r1)                           
137         std r5, 0(r11)                            
138 .endm                                             
139                                                   
140 .macro STORE_REGS_6_1                             
141         lwz r11, 24(r1)                           
142         std r4, 0(r11)                            
143 .endm                                             
144                                                   
145 GLOBAL lv1_get_logical_ppe_id                     
146         SAVE_LR                                   
147         LOAD_REGS_0                               
148         HVCALL 69                                 
149         STORE_REGS_0_1                            
150         LOAD_LR                                   
151         blr                                       
152                                                   
153 GLOBAL lv1_get_logical_partition_id               
154         SAVE_LR                                   
155         LOAD_REGS_0                               
156         HVCALL 74                                 
157         STORE_REGS_0_1                            
158         LOAD_LR                                   
159         blr                                       
160                                                   
161 GLOBAL lv1_get_repository_node_value              
162         SAVE_LR                                   
163         LOAD_REGS_5                               
164         HVCALL 91                                 
165         STORE_REGS_5_2                            
166         LOAD_LR                                   
167         blr                                       
168                                                   
169 GLOBAL lv1_panic                                  
170         SAVE_LR                                   
171         LOAD_REGS_8                               
172         HVCALL 255                                
173         LOAD_LR                                   
174         blr                                       
                                                      

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