Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
microcode.h
Go to the documentation of this file.
1 #ifndef _ASM_X86_MICROCODE_H
2 #define _ASM_X86_MICROCODE_H
3 
4 struct cpu_signature {
5  unsigned int sig;
6  unsigned int pf;
7  unsigned int rev;
8 };
9 
10 struct device;
11 
13 
14 struct microcode_ops {
16  const void __user *buf, size_t size);
17 
18  enum ucode_state (*request_microcode_fw) (int cpu, struct device *,
19  bool refresh_fw);
20 
22 
23  /*
24  * The generic 'microcode_core' part guarantees that
25  * the callbacks below run on a target cpu when they
26  * are being called.
27  * See also the "Synchronization" section in microcode_core.c.
28  */
30  int (*collect_cpu_info) (int cpu, struct cpu_signature *csig);
31 };
32 
35  int valid;
36  void *mc;
37 };
38 extern struct ucode_cpu_info ucode_cpu_info[];
39 
40 #ifdef CONFIG_MICROCODE_INTEL
41 extern struct microcode_ops * __init init_intel_microcode(void);
42 #else
43 static inline struct microcode_ops * __init init_intel_microcode(void)
44 {
45  return NULL;
46 }
47 #endif /* CONFIG_MICROCODE_INTEL */
48 
49 #ifdef CONFIG_MICROCODE_AMD
50 extern struct microcode_ops * __init init_amd_microcode(void);
51 extern void __exit exit_amd_microcode(void);
52 #else
53 static inline struct microcode_ops * __init init_amd_microcode(void)
54 {
55  return NULL;
56 }
57 static inline void __exit exit_amd_microcode(void) {}
58 #endif
59 
60 #endif /* _ASM_X86_MICROCODE_H */