soc/amd/picasso: Move Type 17 DMI generation to common
Move dmi.c code to common/fsp to be shared among different SOCs.
BUG=b:184124605
Change-Id: I46071556bbbbf6435d9e3724bba19e102bd02535
Signed-off-by: Nikolai Vyssotski <nikolai.vyssotski@amd.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/52746
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
diff --git a/src/soc/amd/common/Kconfig.common b/src/soc/amd/common/Kconfig.common
index 8050881..06fd8c5 100644
--- a/src/soc/amd/common/Kconfig.common
+++ b/src/soc/amd/common/Kconfig.common
@@ -12,6 +12,9 @@
if PLATFORM_USES_FSP2_0
+config SOC_AMD_COMMON_FSP_DMI_TABLES
+ bool
+
source "src/soc/amd/common/fsp/*/Kconfig"
endif # PLATFORM_USES_FSP2_0
diff --git a/src/soc/amd/common/fsp/Makefile.inc b/src/soc/amd/common/fsp/Makefile.inc
index ff25eba..8a5cef5 100644
--- a/src/soc/amd/common/fsp/Makefile.inc
+++ b/src/soc/amd/common/fsp/Makefile.inc
@@ -2,6 +2,7 @@
romstage-y += fsp_reset.c
ramstage-y += fsp_reset.c
ramstage-$(CONFIG_HAVE_ACPI_TABLES) += fsp-acpi.c
+ramstage-$(CONFIG_SOC_AMD_COMMON_FSP_DMI_TABLES) += dmi.c
subdirs-y += ./*
diff --git a/src/soc/amd/picasso/dmi.c b/src/soc/amd/common/fsp/dmi.c
similarity index 98%
rename from src/soc/amd/picasso/dmi.c
rename to src/soc/amd/common/fsp/dmi.c
index 69928ad..b3eb574 100644
--- a/src/soc/amd/picasso/dmi.c
+++ b/src/soc/amd/common/fsp/dmi.c
@@ -13,7 +13,7 @@
#include <bootstate.h>
#include <lib.h>
#include <dimm_info_util.h>
-#include <vendorcode/amd/fsp/picasso/dmi_info.h>
+#include <dmi_info.h>
#include <device/dram/ddr4.h>
/**
diff --git a/src/soc/amd/picasso/Kconfig b/src/soc/amd/picasso/Kconfig
index 594ed75..9518f64 100644
--- a/src/soc/amd/picasso/Kconfig
+++ b/src/soc/amd/picasso/Kconfig
@@ -55,6 +55,7 @@
select SOC_AMD_COMMON_BLOCK_TSC_FAM17H_19H
select SOC_AMD_COMMON_BLOCK_UART
select SOC_AMD_COMMON_BLOCK_UCODE
+ select SOC_AMD_COMMON_FSP_DMI_TABLES
select PROVIDES_ROM_SHARING
select BOOT_DEVICE_SUPPORTS_WRITES if BOOT_DEVICE_SPI_FLASH
select PARALLEL_MP_AP_WORK
diff --git a/src/soc/amd/picasso/Makefile.inc b/src/soc/amd/picasso/Makefile.inc
index 214f76d..e111186 100644
--- a/src/soc/amd/picasso/Makefile.inc
+++ b/src/soc/amd/picasso/Makefile.inc
@@ -50,7 +50,6 @@
ramstage-y += graphics.c
ramstage-y += pcie_gpp.c
ramstage-y += xhci.c
-ramstage-y += dmi.c
smm-y += smihandler.c
ifeq ($(CONFIG_DEBUG_SMI),y)