diff options
author | Arthur Heymans <arthur@aheymans.xyz> | 2022-11-12 18:51:04 +0100 |
---|---|---|
committer | Arthur Heymans <arthur@aheymans.xyz> | 2022-11-29 19:58:13 +0000 |
commit | cc22607dbfbab0c9ce42c071b5b3c4a304845313 (patch) | |
tree | 529d9b50ba52c291f72a5c6eb6df2459a5b61a93 /src/soc | |
parent | aab91213b2189472cc3f0e6bc11bf60e76902771 (diff) |
Revert "src/arch/x86: Use core apic id to get cpu_index()"
This reverts commit 095c931cf12924da9011b47aa64f4a6f11d89f13.
Previously cpu_info() was implemented with a struct on top of an
aligned stack. As FSP changed the stack value cpu_info() could not be
used in FSP context (which PPI is). Now cpu_info() uses GDT segments,
which FSP does not touch so it can be used.
This also exports cpu_infos from cpu.c as it's a convenient way to get
the struct device * for a certain index.
TESTED on aldrvp: FSP-S works and is able to run code on APs.
Change-Id: I3a40156ba275b572d7d1913d8c17c24b4c8f6d78
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/69509
Reviewed-by: Subrata Banik <subratabanik@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/soc')
-rw-r--r-- | src/soc/intel/xeon_sp/cpx/cpu.c | 2 | ||||
-rw-r--r-- | src/soc/intel/xeon_sp/skx/cpu.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/soc/intel/xeon_sp/cpx/cpu.c b/src/soc/intel/xeon_sp/cpx/cpu.c index 4ecfad0f89..8a7dd2ab20 100644 --- a/src/soc/intel/xeon_sp/cpx/cpu.c +++ b/src/soc/intel/xeon_sp/cpx/cpu.c @@ -79,7 +79,7 @@ static void each_cpu_init(struct device *cpu) { msr_t msr; - printk(BIOS_SPEW, "%s dev: %s, cpu: %d, apic_id: 0x%x\n", + printk(BIOS_SPEW, "%s dev: %s, cpu: %lu, apic_id: 0x%x\n", __func__, dev_path(cpu), cpu_index(), cpu->path.apic.apic_id); /* diff --git a/src/soc/intel/xeon_sp/skx/cpu.c b/src/soc/intel/xeon_sp/skx/cpu.c index d2e4af1cd9..24984e14e0 100644 --- a/src/soc/intel/xeon_sp/skx/cpu.c +++ b/src/soc/intel/xeon_sp/skx/cpu.c @@ -59,7 +59,7 @@ static void xeon_sp_core_init(struct device *cpu) { msr_t msr; - printk(BIOS_INFO, "%s dev: %s, cpu: %d, apic_id: 0x%x\n", + printk(BIOS_INFO, "%s dev: %s, cpu: %lu, apic_id: 0x%x\n", __func__, dev_path(cpu), cpu_index(), cpu->path.apic.apic_id); assert(chip_config); |