First Support on Ginger and OMAP TI
[linux-ginger.git] / arch / x86 / include / asm / microcode.h
blobef51b501e22a6e53bf4ae7e2d9e2566760f72ee1
1 #ifndef _ASM_X86_MICROCODE_H
2 #define _ASM_X86_MICROCODE_H
4 struct cpu_signature {
5 unsigned int sig;
6 unsigned int pf;
7 unsigned int rev;
8 };
10 struct device;
12 enum ucode_state { UCODE_ERROR, UCODE_OK, UCODE_NFOUND };
14 struct microcode_ops {
15 enum ucode_state (*request_microcode_user) (int cpu,
16 const void __user *buf, size_t size);
18 enum ucode_state (*request_microcode_fw) (int cpu,
19 struct device *device);
21 void (*microcode_fini_cpu) (int cpu);
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.
29 int (*apply_microcode) (int cpu);
30 int (*collect_cpu_info) (int cpu, struct cpu_signature *csig);
33 struct ucode_cpu_info {
34 struct cpu_signature cpu_sig;
35 int valid;
36 void *mc;
38 extern struct ucode_cpu_info ucode_cpu_info[];
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)
45 return NULL;
47 #endif /* CONFIG_MICROCODE_INTEL */
49 #ifdef CONFIG_MICROCODE_AMD
50 extern struct microcode_ops * __init init_amd_microcode(void);
51 #else
52 static inline struct microcode_ops * __init init_amd_microcode(void)
54 return NULL;
56 #endif
58 #endif /* _ASM_X86_MICROCODE_H */