Peter Oruba | d4ee366 | 2008-07-28 18:44:18 +0200 | [diff] [blame] | 1 | struct microcode_header_intel { |
Peter Oruba | 9a56a0f | 2008-07-28 18:44:13 +0200 | [diff] [blame] | 2 | unsigned int hdrver; |
| 3 | unsigned int rev; |
| 4 | unsigned int date; |
| 5 | unsigned int sig; |
| 6 | unsigned int cksum; |
| 7 | unsigned int ldrver; |
| 8 | unsigned int pf; |
| 9 | unsigned int datasize; |
| 10 | unsigned int totalsize; |
| 11 | unsigned int reserved[3]; |
| 12 | }; |
| 13 | |
Peter Oruba | d4ee366 | 2008-07-28 18:44:18 +0200 | [diff] [blame] | 14 | struct microcode_intel { |
| 15 | struct microcode_header_intel hdr; |
Peter Oruba | 9a56a0f | 2008-07-28 18:44:13 +0200 | [diff] [blame] | 16 | unsigned int bits[0]; |
| 17 | }; |
| 18 | |
Peter Oruba | 9a56a0f | 2008-07-28 18:44:13 +0200 | [diff] [blame] | 19 | /* microcode format is extended from prescott processors */ |
| 20 | struct extended_signature { |
| 21 | unsigned int sig; |
| 22 | unsigned int pf; |
| 23 | unsigned int cksum; |
| 24 | }; |
| 25 | |
| 26 | struct extended_sigtable { |
| 27 | unsigned int count; |
| 28 | unsigned int cksum; |
| 29 | unsigned int reserved[3]; |
| 30 | struct extended_signature sigs[0]; |
| 31 | }; |
Peter Oruba | c3b71bc | 2008-07-28 18:44:15 +0200 | [diff] [blame] | 32 | |
Peter Oruba | 9835fd4 | 2008-07-28 18:44:19 +0200 | [diff] [blame^] | 33 | struct equiv_cpu_entry { |
| 34 | unsigned int installed_cpu; |
| 35 | unsigned int fixed_errata_mask; |
| 36 | unsigned int fixed_errata_compare; |
| 37 | unsigned int equiv_cpu; |
| 38 | }; |
| 39 | |
| 40 | struct microcode_header_amd { |
| 41 | unsigned int data_code; |
| 42 | unsigned int patch_id; |
| 43 | unsigned char mc_patch_data_id[2]; |
| 44 | unsigned char mc_patch_data_len; |
| 45 | unsigned char init_flag; |
| 46 | unsigned int mc_patch_data_checksum; |
| 47 | unsigned int nb_dev_id; |
| 48 | unsigned int sb_dev_id; |
| 49 | unsigned char processor_rev_id[2]; |
| 50 | unsigned char nb_rev_id; |
| 51 | unsigned char sb_rev_id; |
| 52 | unsigned char bios_api_rev; |
| 53 | unsigned char reserved1[3]; |
| 54 | unsigned int match_reg[8]; |
| 55 | }; |
| 56 | |
| 57 | struct microcode_amd { |
| 58 | struct microcode_header_amd hdr; |
| 59 | unsigned int mpb[0]; |
| 60 | }; |
| 61 | |
Peter Oruba | c3b71bc | 2008-07-28 18:44:15 +0200 | [diff] [blame] | 62 | struct ucode_cpu_info { |
| 63 | int valid; |
| 64 | unsigned int sig; |
| 65 | unsigned int pf; |
| 66 | unsigned int rev; |
Peter Oruba | d4ee366 | 2008-07-28 18:44:18 +0200 | [diff] [blame] | 67 | union { |
| 68 | struct microcode_intel *mc_intel; |
Peter Oruba | 9835fd4 | 2008-07-28 18:44:19 +0200 | [diff] [blame^] | 69 | struct microcode_amd *mc_amd; |
Peter Oruba | d4ee366 | 2008-07-28 18:44:18 +0200 | [diff] [blame] | 70 | } mc; |
Peter Oruba | c3b71bc | 2008-07-28 18:44:15 +0200 | [diff] [blame] | 71 | }; |