Attention is currently required from: Pratikkumar Prajapati.
Hello Pratikkumar Prajapati,
I'd like you to do a code review. Please visit
https://review.coreboot.org/c/coreboot/+/76400?usp=email
to review the following change.
Change subject: soc/intel/meteorlake: Adjust discovery table offset based on CPUID ......................................................................
soc/intel/meteorlake: Adjust discovery table offset based on CPUID
BUG=b:289600699 TEST= <TBD>
Change-Id: I90647fb6190a52b42298398263978beaf931b035 Signed-off-by: Pratikkumar Prajapati pratikkumar.v.prajapati@intel.corp-partner.google.com --- M src/soc/intel/meteorlake/crashlog.c 1 file changed, 12 insertions(+), 8 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/00/76400/1
diff --git a/src/soc/intel/meteorlake/crashlog.c b/src/soc/intel/meteorlake/crashlog.c index 2e3c97a..381d816 100644 --- a/src/soc/intel/meteorlake/crashlog.c +++ b/src/soc/intel/meteorlake/crashlog.c @@ -2,6 +2,8 @@
#include <arch/bert_storage.h> #include <console/console.h> +#include <cpu/cpu.h> +#include <cpu/intel/cpu_ids.h> #include <device/pci_ops.h> #include <intelblocks/crashlog.h> #include <intelblocks/pmc_ipc.h> @@ -353,21 +355,23 @@
static bool cpu_cl_gen_discovery_table(void) { - u32 bar_addr = 0, disc_tab_addr = 0; + u32 bar_addr = 0, disc_tab_addr = 0, disc_table_offset = 0; bar_addr = cl_get_cpu_bar_addr();
if (!bar_addr) return false;
- disc_tab_addr = bar_addr + - cpu_cl_devsc_cap.discovery_data.fields.discovery_table_offset; + disc_table_offset = cpu_cl_devsc_cap.discovery_data.fields.discovery_table_offset; + printk(BIOS_DEBUG, "cpu discovery table offset: 0x%x\n", disc_table_offset); + if (cpu_get_cpuid() >= CPUID_METEORLAKE_B0) { + disc_table_offset <<= 3; + printk(BIOS_DEBUG, "adjusted cpu discovery table offset: 0x%x\n", disc_table_offset); + } + + disc_tab_addr = bar_addr + disc_table_offset; memset(&cpu_cl_disc_tab, 0, sizeof(cpu_crashlog_discovery_table_t)); - - printk(BIOS_DEBUG, "cpu discovery table offset: 0x%x\n", - cpu_cl_devsc_cap.discovery_data.fields.discovery_table_offset); - cpu_cl_disc_tab.header.data = ((u64)read32((u32 *)disc_tab_addr) + - ((u64)read32((u32 *)(disc_tab_addr + 4)) << 32)); + ((u64)read32((u32 *)(disc_tab_addr + 4)) << 32));
printk(BIOS_DEBUG, "cpu_crashlog_discovery_table buffer count: 0x%x\n", cpu_cl_disc_tab.header.fields.count);