Felix Held has uploaded this change for review.

View Change

arch/x86/mpspec: turn compile-time check into Kconfig dependency

Instead of checking if there is more than one PCI segment group and
erroring out in that case during the build, add this requirement as a
dependency to the GENERATE_MP_TABLE Kconfig option. The mpspec.c source
file only gets included in the build if GENERATE_MP_TABLE is selected.

Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Suggested-by: Martin Roth <gaumless@gmail.com>
Change-Id: Ie532a401ad0161890d0fb4ca2889af022d5f6b47
---
M src/Kconfig
M src/arch/x86/mpspec.c
2 files changed, 1 insertion(+), 4 deletions(-)

git pull ssh://review.coreboot.org:29418/coreboot refs/changes/94/79994/1
diff --git a/src/Kconfig b/src/Kconfig
index 5cb9a1a..9797624 100644
--- a/src/Kconfig
+++ b/src/Kconfig
@@ -907,6 +907,7 @@
config GENERATE_MP_TABLE
prompt "Generate an MP table" if HAVE_MP_TABLE
bool
+ depends on !ECAM_MMCONF_SUPPORT || ECAM_MMCONF_BUS_NUMBER <= 256
default HAVE_MP_TABLE
help
Generate an MP table (conforming to the Intel MultiProcessor
diff --git a/src/arch/x86/mpspec.c b/src/arch/x86/mpspec.c
index 3b4c8ad..7744f68 100644
--- a/src/arch/x86/mpspec.c
+++ b/src/arch/x86/mpspec.c
@@ -14,10 +14,6 @@
#include <stdint.h>
#include <string.h>

-#if CONFIG(ECAM_MMCONF_SUPPORT) && PCI_SEGMENT_GROUP_COUNT > 1
-#error "MPTable doesn't support systems with multiple PCI segment groups"
-#endif
-
/* Initialize the specified "mc" struct with initial values. */
void mptable_init(struct mp_config_table *mc)
{

To view, visit change 79994. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: coreboot
Gerrit-Branch: main
Gerrit-Change-Id: Ie532a401ad0161890d0fb4ca2889af022d5f6b47
Gerrit-Change-Number: 79994
Gerrit-PatchSet: 1
Gerrit-Owner: Felix Held <felix-coreboot@felixheld.de>
Gerrit-MessageType: newchange