1 extern int microcode_init(void *opaque, struct module *module);
2 extern void microcode_exit(void);
5 long (*get_next_ucode)(void **mc, long offset);
6 long (*microcode_get_next_ucode)(void **mc, long offset);
7 int (*get_matching_microcode)(void *mc, int cpu);
8 int (*apply_microcode_check_cpu)(int cpu);
9 int (*microcode_sanity_check)(void *mc);
10 int (*cpu_request_microcode)(int cpu);
11 void (*collect_cpu_info)(int cpu_num);
12 void (*apply_microcode)(int cpu);
13 void (*microcode_fini_cpu)(int cpu);
14 void (*clear_patch)(void *data);
17 struct microcode_header_intel {
25 unsigned int datasize;
26 unsigned int totalsize;
27 unsigned int reserved[3];
30 struct microcode_intel {
31 struct microcode_header_intel hdr;
35 /* microcode format is extended from prescott processors */
36 struct extended_signature {
42 struct extended_sigtable {
45 unsigned int reserved[3];
46 struct extended_signature sigs[0];
49 struct equiv_cpu_entry {
50 unsigned int installed_cpu;
51 unsigned int fixed_errata_mask;
52 unsigned int fixed_errata_compare;
53 unsigned int equiv_cpu;
56 struct microcode_header_amd {
57 unsigned int data_code;
58 unsigned int patch_id;
59 unsigned char mc_patch_data_id[2];
60 unsigned char mc_patch_data_len;
61 unsigned char init_flag;
62 unsigned int mc_patch_data_checksum;
63 unsigned int nb_dev_id;
64 unsigned int sb_dev_id;
65 unsigned char processor_rev_id[2];
66 unsigned char nb_rev_id;
67 unsigned char sb_rev_id;
68 unsigned char bios_api_rev;
69 unsigned char reserved1[3];
70 unsigned int match_reg[8];
73 struct microcode_amd {
74 struct microcode_header_amd hdr;
78 struct ucode_cpu_info {
84 struct microcode_intel *mc_intel;
85 struct microcode_amd *mc_amd;