| 1 |
|
| 2 |
|
| 3 |
#include <arch/cpu.h> |
| 4 |
#include <console/console.h> |
| 5 |
#include <fsp/util.h> |
| 6 |
|
| 7 |
static bool use_fsp_v1(void) |
| 8 |
{ |
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
uint32_t cpuid = cpu_get_cpuid(); |
| 15 |
switch (cpuid) { |
| 16 |
case 0x000A0660: |
| 17 |
case 0x000806EC: |
| 18 |
printk(BIOS_INFO, "CPUID %08X is Comet Lake v1\n", cpuid); |
| 19 |
return true; |
| 20 |
case 0x000A0661: |
| 21 |
printk(BIOS_INFO, "CPUID %08X is Comet Lake v2\n", cpuid); |
| 22 |
return false; |
| 23 |
default: |
| 24 |
|
| 25 |
|
| 26 |
|
| 27 |
|
| 28 |
|
| 29 |
printk(BIOS_ERR, "CPUID %08X is unknown, guessing Comet Lake v2\n", |
| 30 |
cpuid); |
| 31 |
return false; |
| 32 |
} |
| 33 |
} |
| 34 |
|
| 35 |
const char *soc_select_fsp_m_cbfs(void) |
| 36 |
{ |
| 37 |
return use_fsp_v1() ? CONFIG_FSP_M_CBFS : CONFIG_FSP_M_CBFS_2; |
| 38 |
} |
| 39 |
|
| 40 |
const char *soc_select_fsp_s_cbfs(void) |
| 41 |
{ |
| 42 |
return use_fsp_v1() ? CONFIG_FSP_S_CBFS : CONFIG_FSP_S_CBFS_2; |
| 43 |
} |