2008-10-23 07:26:29 +02:00
|
|
|
#ifndef _ASM_X86_MICROCODE_H
|
|
|
|
#define _ASM_X86_MICROCODE_H
|
2008-08-20 00:22:26 +02:00
|
|
|
|
2008-09-23 12:08:44 +02:00
|
|
|
struct cpu_signature {
|
|
|
|
unsigned int sig;
|
|
|
|
unsigned int pf;
|
|
|
|
unsigned int rev;
|
|
|
|
};
|
2008-07-28 18:44:21 +02:00
|
|
|
|
2008-09-11 23:27:52 +02:00
|
|
|
struct device;
|
2008-08-20 00:22:26 +02:00
|
|
|
|
2008-07-28 18:44:20 +02:00
|
|
|
struct microcode_ops {
|
2008-09-11 23:27:52 +02:00
|
|
|
int (*request_microcode_user) (int cpu, const void __user *buf, size_t size);
|
|
|
|
int (*request_microcode_fw) (int cpu, struct device *device);
|
|
|
|
|
|
|
|
void (*apply_microcode) (int cpu);
|
|
|
|
|
|
|
|
int (*collect_cpu_info) (int cpu, struct cpu_signature *csig);
|
|
|
|
void (*microcode_fini_cpu) (int cpu);
|
2008-07-28 18:44:20 +02:00
|
|
|
};
|
|
|
|
|
2008-08-20 00:22:26 +02:00
|
|
|
struct ucode_cpu_info {
|
|
|
|
struct cpu_signature cpu_sig;
|
|
|
|
int valid;
|
2008-09-23 12:08:44 +02:00
|
|
|
void *mc;
|
2008-07-28 18:44:15 +02:00
|
|
|
};
|
2008-08-20 00:22:26 +02:00
|
|
|
extern struct ucode_cpu_info ucode_cpu_info[];
|
|
|
|
|
2008-09-23 12:08:44 +02:00
|
|
|
#ifdef CONFIG_MICROCODE_INTEL
|
|
|
|
extern struct microcode_ops * __init init_intel_microcode(void);
|
|
|
|
#else
|
|
|
|
static inline struct microcode_ops * __init init_intel_microcode(void)
|
|
|
|
{
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
#endif /* CONFIG_MICROCODE_INTEL */
|
|
|
|
|
|
|
|
#ifdef CONFIG_MICROCODE_AMD
|
|
|
|
extern struct microcode_ops * __init init_amd_microcode(void);
|
|
|
|
#else
|
|
|
|
static inline struct microcode_ops * __init init_amd_microcode(void)
|
|
|
|
{
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
2008-10-23 07:26:29 +02:00
|
|
|
#endif /* _ASM_X86_MICROCODE_H */
|