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

TOMOYO Linux Cross Reference
Linux/arch/riscv/kernel/efi-header.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/riscv/kernel/efi-header.S (Architecture m68k) and /arch/alpha/kernel/efi-header.S (Architecture alpha)


  1 /* SPDX-License-Identifier: GPL-2.0-only */       
  2 /*                                                
  3  * Copyright (C) 2020 Western Digital Corporat    
  4  * Adapted from arch/arm64/kernel/efi-header.S    
  5  */                                               
  6                                                   
  7 #include <linux/pe.h>                             
  8 #include <linux/sizes.h>                          
  9 #include <asm/set_memory.h>                       
 10                                                   
 11         .macro  __EFI_PE_HEADER                   
 12         .long   PE_MAGIC                          
 13 coff_header:                                      
 14 #ifdef CONFIG_64BIT                               
 15         .short  IMAGE_FILE_MACHINE_RISCV64        
 16 #else                                             
 17         .short  IMAGE_FILE_MACHINE_RISCV32        
 18 #endif                                            
 19         .short  section_count                     
 20         .long   0                                 
 21         .long   0                                 
 22         .long   0                                 
 23         .short  section_table - optional_heade    
 24         .short  IMAGE_FILE_DEBUG_STRIPPED | \     
 25                 IMAGE_FILE_EXECUTABLE_IMAGE |     
 26                 IMAGE_FILE_LINE_NUMS_STRIPPED     
 27                                                   
 28 optional_header:                                  
 29 #ifdef CONFIG_64BIT                               
 30         .short  PE_OPT_MAGIC_PE32PLUS             
 31 #else                                             
 32         .short  PE_OPT_MAGIC_PE32                 
 33 #endif                                            
 34         .byte   0x02                              
 35         .byte   0x14                              
 36         .long   __pecoff_text_end - efi_header    
 37 #ifdef __clang__                                  
 38         .long   __pecoff_data_virt_size           
 39 #else                                             
 40         .long   __pecoff_data_virt_end - __pec    
 41 #endif                                            
 42         .long   0                                 
 43         .long   __efistub_efi_pe_entry - _star    
 44         .long   efi_header_end - _start           
 45 #ifdef CONFIG_32BIT                               
 46         .long  __pecoff_text_end - _start         
 47 #endif                                            
 48                                                   
 49 extra_header_fields:                              
 50         .quad   0                                 
 51         .long   PECOFF_SECTION_ALIGNMENT          
 52         .long   PECOFF_FILE_ALIGNMENT             
 53         .short  0                                 
 54         .short  0                                 
 55         .short  LINUX_EFISTUB_MAJOR_VERSION       
 56         .short  LINUX_EFISTUB_MINOR_VERSION       
 57         .short  0                                 
 58         .short  0                                 
 59         .long   0                                 
 60                                                   
 61         .long   _end - _start                     
 62                                                   
 63         // Everything before the kernel image     
 64         .long   efi_header_end - _start           
 65         .long   0                                 
 66         .short  IMAGE_SUBSYSTEM_EFI_APPLICATIO    
 67         .short  IMAGE_DLL_CHARACTERISTICS_NX_C    
 68         .quad   0                                 
 69         .quad   0                                 
 70         .quad   0                                 
 71         .quad   0                                 
 72         .long   0                                 
 73         .long   (section_table - .) / 8           
 74                                                   
 75         .quad   0                                 
 76         .quad   0                                 
 77         .quad   0                                 
 78         .quad   0                                 
 79         .quad   0                                 
 80         .quad   0                                 
 81                                                   
 82         // Section table                          
 83 section_table:                                    
 84         .ascii  ".text\0\0\0"                     
 85         .long   __pecoff_text_end - efi_header    
 86         .long   efi_header_end - _start           
 87         .long   __pecoff_text_end - efi_header    
 88         .long   efi_header_end - _start           
 89                                                   
 90         .long   0                                 
 91         .long   0                                 
 92         .short  0                                 
 93         .short  0                                 
 94         .long   IMAGE_SCN_CNT_CODE | \            
 95                 IMAGE_SCN_MEM_READ | \            
 96                 IMAGE_SCN_MEM_EXECUTE             
 97                                                   
 98         .ascii  ".data\0\0\0"                     
 99 #ifdef __clang__                                  
100         .long   __pecoff_data_virt_size           
101 #else                                             
102         .long   __pecoff_data_virt_end - __pec    
103 #endif                                            
104         .long   __pecoff_text_end - _start        
105 #ifdef __clang__                                  
106         .long   __pecoff_data_raw_size            
107 #else                                             
108         .long   __pecoff_data_raw_end - __peco    
109 #endif                                            
110         .long   __pecoff_text_end - _start        
111                                                   
112         .long   0                                 
113         .long   0                                 
114         .short  0                                 
115         .short  0                                 
116         .long   IMAGE_SCN_CNT_INITIALIZED_DATA    
117                 IMAGE_SCN_MEM_READ | \            
118                 IMAGE_SCN_MEM_WRITE               
119                                                   
120         .set    section_count, (. - section_ta    
121                                                   
122         .balign 0x1000                            
123 efi_header_end:                                   
124         .endm                                     
                                                      

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