Hi,
Dne 17.4.2018 v 12:09 awokd via coreboot napsal(a):
At what byte locations in the header is the equivalence table? I was looking for this...
Hm I'm not aware where is it documented, or if there is some tool to manipulate it/dump the structure. Maybe it could be added to some existing tool?
Here is what I deduced from Linux arch/x86/kernel/cpu/microcode/amd.c + header files
+ 0 u32 UCODE_MAGIC + 4 u32 UCODE_EQUIV_CPU_TABLE_TYPE (0x0) + 8 u32 size of following equiv table say "N"
Then this follows, the last table has installed_cpu_cpuid == 0
u32 installed_cpu_cpuid u32 fixed_errata_mask u32 fixed_errata_compare u16 equiv_cpu u16 res
+ N u32 UCODE_UCODE_TYPE (0x1) + N + 4 u32 sizeof blob (without this header) + N + 8 microcode blob from github follows here ... Then after that, there clould be again
+ X u32 UCODE_UCODE_TYPE + X + 4 u32 SECTION_SIZE + X + 8 microcode header (blob from github follows here)
The microcode blob has the header which already matches the usual microcode header:
struct microcode_header_amd { u32 data_code; u32 patch_id; u16 mc_patch_data_id; u8 mc_patch_data_len; u8 init_flag; u32 mc_patch_data_checksum; u32 nb_dev_id; u32 sb_dev_id; u16 processor_rev_id; u8 nb_rev_id; u8 sb_rev_id; u8 bios_api_rev; u8 reserved1[3]; u32 match_reg[8]; } __attribute__((packed));
Thanks Rudolf