]>
Commit | Line | Data |
---|---|---|
26bf7a48 PO |
1 | struct microcode_ops { |
2 | long (*get_next_ucode)(void **mc, long offset); | |
3 | long (*microcode_get_next_ucode)(void **mc, long offset); | |
4 | int (*get_matching_microcode)(void *mc, int cpu); | |
5 | int (*apply_microcode_check_cpu)(int cpu); | |
6 | int (*microcode_sanity_check)(void *mc); | |
7 | int (*cpu_request_microcode)(int cpu); | |
8 | void (*collect_cpu_info)(int cpu_num); | |
9 | void (*apply_microcode)(int cpu); | |
10 | void (*microcode_fini_cpu)(int cpu); | |
11 | void (*clear_patch)(void *data); | |
12 | }; | |
13 | ||
d4ee3668 | 14 | struct microcode_header_intel { |
9a56a0f8 PO |
15 | unsigned int hdrver; |
16 | unsigned int rev; | |
17 | unsigned int date; | |
18 | unsigned int sig; | |
19 | unsigned int cksum; | |
20 | unsigned int ldrver; | |
21 | unsigned int pf; | |
22 | unsigned int datasize; | |
23 | unsigned int totalsize; | |
24 | unsigned int reserved[3]; | |
25 | }; | |
26 | ||
d4ee3668 PO |
27 | struct microcode_intel { |
28 | struct microcode_header_intel hdr; | |
9a56a0f8 PO |
29 | unsigned int bits[0]; |
30 | }; | |
31 | ||
9a56a0f8 PO |
32 | /* microcode format is extended from prescott processors */ |
33 | struct extended_signature { | |
34 | unsigned int sig; | |
35 | unsigned int pf; | |
36 | unsigned int cksum; | |
37 | }; | |
38 | ||
39 | struct extended_sigtable { | |
40 | unsigned int count; | |
41 | unsigned int cksum; | |
42 | unsigned int reserved[3]; | |
43 | struct extended_signature sigs[0]; | |
44 | }; | |
c3b71bce | 45 | |
9835fd4a PO |
46 | struct equiv_cpu_entry { |
47 | unsigned int installed_cpu; | |
48 | unsigned int fixed_errata_mask; | |
49 | unsigned int fixed_errata_compare; | |
50 | unsigned int equiv_cpu; | |
51 | }; | |
52 | ||
53 | struct microcode_header_amd { | |
54 | unsigned int data_code; | |
55 | unsigned int patch_id; | |
56 | unsigned char mc_patch_data_id[2]; | |
57 | unsigned char mc_patch_data_len; | |
58 | unsigned char init_flag; | |
59 | unsigned int mc_patch_data_checksum; | |
60 | unsigned int nb_dev_id; | |
61 | unsigned int sb_dev_id; | |
62 | unsigned char processor_rev_id[2]; | |
63 | unsigned char nb_rev_id; | |
64 | unsigned char sb_rev_id; | |
65 | unsigned char bios_api_rev; | |
66 | unsigned char reserved1[3]; | |
67 | unsigned int match_reg[8]; | |
68 | }; | |
69 | ||
70 | struct microcode_amd { | |
71 | struct microcode_header_amd hdr; | |
72 | unsigned int mpb[0]; | |
73 | }; | |
74 | ||
c3b71bce PO |
75 | struct ucode_cpu_info { |
76 | int valid; | |
77 | unsigned int sig; | |
78 | unsigned int pf; | |
79 | unsigned int rev; | |
d4ee3668 PO |
80 | union { |
81 | struct microcode_intel *mc_intel; | |
9835fd4a | 82 | struct microcode_amd *mc_amd; |
d4ee3668 | 83 | } mc; |
c3b71bce | 84 | }; |