Hello Jason Glenesk,
I'd like you to do a code review. Please visit
https://review.coreboot.org/c/coreboot/+/46326
to review the following change.
Change subject: soc/amd/common: Add weak function definitions to get ioapic IDs ......................................................................
soc/amd/common: Add weak function definitions to get ioapic IDs
Add weak definitions for soc_get_fch_ioapic_id() and soc_get_gnb_ioapic_id(). If not overriddden return CONFIG_MAX_CPUS and CONFIG_MAX_CPUS +1 respectively.
BUG=b:167421913 TEST=Boot morphius to shell. Confirm weak function return values dumping MADT. BRANCH=Zork
Signed-off-by: Jason Glenesk jason.glenesk@amd.corp-partner.google.com Change-Id: Ib6778bf5141df580759e8158010a63d6af77e8ae --- M src/soc/amd/common/block/cpu/Makefile.inc A src/soc/amd/common/block/cpu/cpu.c A src/soc/amd/common/block/include/amdblocks/cpu.h 3 files changed, 27 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/26/46326/1
diff --git a/src/soc/amd/common/block/cpu/Makefile.inc b/src/soc/amd/common/block/cpu/Makefile.inc index 395ab08..51e322d 100644 --- a/src/soc/amd/common/block/cpu/Makefile.inc +++ b/src/soc/amd/common/block/cpu/Makefile.inc @@ -6,3 +6,5 @@
romstage-$(CONFIG_SOC_AMD_COMMON_BLOCK_CAR) += car/ap_exit_car.S romstage-$(CONFIG_SOC_AMD_COMMON_BLOCK_CAR) += car/exit_car.S + +ramstage-y += cpu.c diff --git a/src/soc/amd/common/block/cpu/cpu.c b/src/soc/amd/common/block/cpu/cpu.c new file mode 100644 index 0000000..7d2d5c9 --- /dev/null +++ b/src/soc/amd/common/block/cpu/cpu.c @@ -0,0 +1,14 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ + +#include <types.h> +#include <amdblocks/cpu.h> + +__weak uint8_t soc_get_fch_ioapic_id(void) +{ + return CONFIG_MAX_CPUS; +} + +__weak uint8_t soc_get_gnb_ioapic_id(void) +{ + return CONFIG_MAX_CPUS + 1; +} diff --git a/src/soc/amd/common/block/include/amdblocks/cpu.h b/src/soc/amd/common/block/include/amdblocks/cpu.h new file mode 100644 index 0000000..7282161 --- /dev/null +++ b/src/soc/amd/common/block/include/amdblocks/cpu.h @@ -0,0 +1,11 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ + +#ifndef __AMDBLOCKS_CPU_H__ +#define __AMDBLOCKS_CPU_H__ + +#include <types.h> + +uint8_t soc_get_fch_ioapic_id(void); +uint8_t soc_get_gnb_ioapic_id(void); + +#endif