Changeset View
Changeset View
Standalone View
Standalone View
sys/x86/x86/ucode_subr.c
| Show First 20 Lines • Show All 92 Lines • ▼ Show 20 Lines | |||||
| * It has been reverse engineered from studying Coreboot, illumos and Linux | * It has been reverse engineered from studying Coreboot, illumos and Linux | ||||
| * source code. | * source code. | ||||
| */ | */ | ||||
| const void * | const void * | ||||
| ucode_amd_find(const char *path, uint32_t signature, uint32_t *revision, | ucode_amd_find(const char *path, uint32_t signature, uint32_t *revision, | ||||
| const uint8_t *fw_data, size_t fw_size, size_t *selected_sizep) | const uint8_t *fw_data, size_t fw_size, size_t *selected_sizep) | ||||
| { | { | ||||
| const amd_10h_fw_header_t *fw_header; | const amd_10h_fw_header_t *fw_header; | ||||
| const amd_10h_fw_header_t *selected_fw; | const amd_10h_fw_header_t *selected_fw = NULL; | ||||
| const equiv_cpu_entry_t *equiv_cpu_table; | const equiv_cpu_entry_t *equiv_cpu_table; | ||||
| const section_header_t *section_header; | const section_header_t *section_header; | ||||
| const container_header_t *container_header; | const container_header_t *container_header; | ||||
| size_t selected_size; | size_t selected_size = 0; | ||||
| uint16_t equiv_id; | uint16_t equiv_id; | ||||
| int i; | int i; | ||||
| WARNX(1, "found cpu family %#x model %#x " | WARNX(1, "found cpu family %#x model %#x " | ||||
| "stepping %#x extfamily %#x extmodel %#x.", | "stepping %#x extfamily %#x extmodel %#x.", | ||||
| ((signature >> 8) & 0x0f) + ((signature >> 20) & 0xff), | ((signature >> 8) & 0x0f) + ((signature >> 20) & 0xff), | ||||
| (signature >> 4) & 0x0f, | (signature >> 4) & 0x0f, | ||||
| (signature >> 0) & 0x0f, (signature >> 20) & 0xff, | (signature >> 0) & 0x0f, (signature >> 20) & 0xff, | ||||
| ▲ Show 20 Lines • Show All 126 Lines • Show Last 20 Lines | |||||