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

TOMOYO Linux Cross Reference
Linux/arch/x86/include/asm/microcode.h

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/x86/include/asm/microcode.h (Architecture ppc) and /arch/alpha/include/asm-alpha/microcode.h (Architecture alpha)


  1 /* SPDX-License-Identifier: GPL-2.0 */              1 
  2 #ifndef _ASM_X86_MICROCODE_H                      
  3 #define _ASM_X86_MICROCODE_H                      
  4                                                   
  5 struct cpu_signature {                            
  6         unsigned int sig;                         
  7         unsigned int pf;                          
  8         unsigned int rev;                         
  9 };                                                
 10                                                   
 11 struct ucode_cpu_info {                           
 12         struct cpu_signature    cpu_sig;          
 13         void                    *mc;              
 14 };                                                
 15                                                   
 16 #ifdef CONFIG_MICROCODE                           
 17 void load_ucode_bsp(void);                        
 18 void load_ucode_ap(void);                         
 19 void microcode_bsp_resume(void);                  
 20 #else                                             
 21 static inline void load_ucode_bsp(void) { }       
 22 static inline void load_ucode_ap(void) { }        
 23 static inline void microcode_bsp_resume(void)     
 24 #endif                                            
 25                                                   
 26 extern unsigned long initrd_start_early;          
 27                                                   
 28 #ifdef CONFIG_CPU_SUP_INTEL                       
 29 /* Intel specific microcode defines. Public fo    
 30 struct microcode_header_intel {                   
 31         unsigned int    hdrver;                   
 32         unsigned int    rev;                      
 33         unsigned int    date;                     
 34         unsigned int    sig;                      
 35         unsigned int    cksum;                    
 36         unsigned int    ldrver;                   
 37         unsigned int    pf;                       
 38         unsigned int    datasize;                 
 39         unsigned int    totalsize;                
 40         unsigned int    metasize;                 
 41         unsigned int    min_req_ver;              
 42         unsigned int    reserved;                 
 43 };                                                
 44                                                   
 45 struct microcode_intel {                          
 46         struct microcode_header_intel   hdr;      
 47         unsigned int                    bits[]    
 48 };                                                
 49                                                   
 50 #define DEFAULT_UCODE_DATASIZE          (2000)    
 51 #define MC_HEADER_SIZE                  (sizeo    
 52 #define MC_HEADER_TYPE_MICROCODE        1         
 53 #define MC_HEADER_TYPE_IFS              2         
 54                                                   
 55 static inline int intel_microcode_get_datasize    
 56 {                                                 
 57         return hdr->datasize ? : DEFAULT_UCODE    
 58 }                                                 
 59                                                   
 60 static inline u32 intel_get_microcode_revision    
 61 {                                                 
 62         u32 rev, dummy;                           
 63                                                   
 64         native_wrmsrl(MSR_IA32_UCODE_REV, 0);     
 65                                                   
 66         /* As documented in the SDM: Do a CPUI    
 67         native_cpuid_eax(1);                      
 68                                                   
 69         /* get the current revision from MSR 0    
 70         native_rdmsr(MSR_IA32_UCODE_REV, dummy    
 71                                                   
 72         return rev;                               
 73 }                                                 
 74 #endif /* !CONFIG_CPU_SUP_INTEL */                
 75                                                   
 76 bool microcode_nmi_handler(void);                 
 77 void microcode_offline_nmi_handler(void);         
 78                                                   
 79 #ifdef CONFIG_MICROCODE_LATE_LOADING              
 80 DECLARE_STATIC_KEY_FALSE(microcode_nmi_handler    
 81 static __always_inline bool microcode_nmi_hand    
 82 {                                                 
 83         return static_branch_unlikely(&microco    
 84 }                                                 
 85 #else                                             
 86 static __always_inline bool microcode_nmi_hand    
 87 #endif                                            
 88                                                   
 89 #endif /* _ASM_X86_MICROCODE_H */                 
 90                                                   

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