summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarthikeyan Ramasubramanian <kramasub@google.com>2022-04-19 14:34:59 -0600
committerFelix Held <felix-coreboot@felixheld.de>2022-04-25 13:48:00 +0000
commit43f51a041d9f8ee5867031d043d541812b7fcab9 (patch)
treed004f05e9c8fb66819a05954b91b3fa2b432ee00
parent6c3796beabaace369fd1389494f4a62b40025525 (diff)
mb/google/skyrim: Prepare for enabling PSP verstage
Add various verstage init functions to prepare for enable PSP verstage. BUG=None TEST=Build Skyrim BIOS image with PSP verstage enabled. Signed-off-by: Karthikeyan Ramasubramanian <kramasub@google.com> Change-Id: I0d0dba05d4d083e2c6860078676e59cf8f487c87 Reviewed-on: https://review.coreboot.org/c/coreboot/+/63731 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Raul Rangel <rrangel@chromium.org>
-rw-r--r--src/mainboard/google/skyrim/Makefile.inc2
-rw-r--r--src/mainboard/google/skyrim/variants/baseboard/Makefile.inc1
-rw-r--r--src/mainboard/google/skyrim/verstage.c37
3 files changed, 40 insertions, 0 deletions
diff --git a/src/mainboard/google/skyrim/Makefile.inc b/src/mainboard/google/skyrim/Makefile.inc
index f76a961965..3a91cff1d7 100644
--- a/src/mainboard/google/skyrim/Makefile.inc
+++ b/src/mainboard/google/skyrim/Makefile.inc
@@ -8,6 +8,8 @@ ramstage-y += mainboard.c
ramstage-y += ec.c
ramstage-$(CONFIG_CHROMEOS) += chromeos.c
+verstage-$(CONFIG_VBOOT_STARTS_BEFORE_BOOTBLOCK) += verstage.c
+
subdirs-y += variants/baseboard
subdirs-y += variants/$(VARIANT_DIR)
diff --git a/src/mainboard/google/skyrim/variants/baseboard/Makefile.inc b/src/mainboard/google/skyrim/variants/baseboard/Makefile.inc
index 7706e50527..2864241719 100644
--- a/src/mainboard/google/skyrim/variants/baseboard/Makefile.inc
+++ b/src/mainboard/google/skyrim/variants/baseboard/Makefile.inc
@@ -7,5 +7,6 @@ ramstage-y += gpio.c
ramstage-y += tpm_tis.c
verstage-y += tpm_tis.c
+verstage-$(CONFIG_VBOOT_STARTS_BEFORE_BOOTBLOCK) += gpio.c
smm-y += gpio.c
diff --git a/src/mainboard/google/skyrim/verstage.c b/src/mainboard/google/skyrim/verstage.c
new file mode 100644
index 0000000000..8aaf70cd6e
--- /dev/null
+++ b/src/mainboard/google/skyrim/verstage.c
@@ -0,0 +1,37 @@
+/* SPDX-License-Identifier: GPL-2.0-or-later */
+
+#include <amdblocks/acpimmio.h>
+#include <amdblocks/gpio.h>
+#include <arch/io.h>
+#include <baseboard/variants.h>
+#include <psp_verstage.h>
+#include <security/vboot/vboot_common.h>
+#include <soc/southbridge.h>
+
+void verstage_mainboard_early_init(void)
+{
+ const struct soc_amd_gpio *gpios, *override_gpios;
+ size_t num_gpios, override_num_gpios;
+
+ variant_early_gpio_table(&gpios, &num_gpios);
+ variant_early_override_gpio_table(&override_gpios, &override_num_gpios);
+ gpio_configure_pads_with_override(gpios, num_gpios, override_gpios, override_num_gpios);
+}
+
+void verstage_mainboard_espi_init(void)
+{
+ const struct soc_amd_gpio *gpios;
+ size_t num_gpios;
+
+ variant_espi_gpio_table(&gpios, &num_gpios);
+ gpio_configure_pads(gpios, num_gpios);
+}
+
+void verstage_mainboard_tpm_init(void)
+{
+ const struct soc_amd_gpio *gpios;
+ size_t num_gpios;
+
+ variant_tpm_gpio_table(&gpios, &num_gpios);
+ gpio_configure_pads(gpios, num_gpios);
+}