coreboot-kgpe-d16/src
Furquan Shaikh e07532fb16 drivers/intel/fsp2_0: Add support to identify GPIO config changes
Traditionally, for each Intel platform using FSP, FSP-S has at some
point configured GPIOs differently than the mainboard configuration in
coreboot. This has resulted in various side-effects in coreboot,
payload and OS because of misconfigured GPIOs. On more recent Intel
platforms, a UPD `GpioOverride` is added that coreboot can use to
ensure that FSP does not touch any GPIO configuration.

This change adds a debug option `CHECK_GPIO_CONFIG_CHANGES` to fsp2_0
driver in coreboot that makes a platform callback `gpio_snapshot` to
snapshot GPIO configuration before making a call to FSP SiliconInit
and Notify phases. This snapshot is then compared against the GPIO
configuration using platform callback `gpio_verify_snapshot` after
returning from FSP. The callbacks are not added to romstage (FSP-M)
because mainboard configures all pads in ramstage.

This debug hook allows developers to dump information about any pads
that have a different configuration after call to FSP in ramstage. It
is useful to identify missed UPD configurations or bugs in FSP that
might not honor the UPDs set by coreboot.

This debug hook expects the platform to implement the callbacks
`gpio_snapshot` and `gpio_verify_snapshot`. These can be implemented
as part of the common GPIO driver for platforms using
FSP2.0+. Platforms that implement this support must select the config
`HAVE_GPIO_SNAPSHOT_VERIFY_SUPPORT` to make the debug config
`CHECK_GPIO_CONFIG_CHANGES` visible to user.

Proposal for the GPIO snapshot/verify support was discussed in the RFC
CB:50829.

Signed-off-by: Furquan Shaikh <furquan@google.com>
Change-Id: I5326fc98b6eba0f8ba946842253b288c0d42c523
Reviewed-on: https://review.coreboot.org/c/coreboot/+/50989
Reviewed-by: Michael Niewöhner <foss@mniewoehner.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2021-04-16 17:42:36 +00:00
..
acpi ACPI: Add SATC structure for DMAR table 2021-03-28 16:03:21 +00:00
arch *x86: Support x2apic mode 2021-04-15 10:56:13 +00:00
commonlib cbfs: mcache: Fix size calculation for perfectly full cache 2021-04-10 00:00:34 +00:00
console Rename do_printk() to printk() 2021-04-14 10:38:09 +00:00
cpu cpu/intel/common: use lapicid api 2021-04-15 10:57:12 +00:00
device Rename do_printk() to printk() 2021-04-14 10:38:09 +00:00
drivers drivers/intel/fsp2_0: Add support to identify GPIO config changes 2021-04-16 17:42:36 +00:00
ec chromeec: make ssfc optional in fw_config 2021-04-12 17:11:40 +00:00
include *x86: Support x2apic mode 2021-04-15 10:56:13 +00:00
lib lib/rtc: Remove unnecessary year constraint in rtc_calc_weekday 2021-04-15 07:39:31 +00:00
mainboard mb/google/guybrush: Enable backlight in the OS 2021-04-16 17:38:27 +00:00
northbridge nb/intel/x4x: Refactor sync DLL programming (part 2) 2021-04-12 20:42:08 +00:00
security vboot: ec_sync: Switch to new CBFS API 2021-04-14 01:03:22 +00:00
soc soc/amd/common: Correct Kconfig enable for ACPI GPIO functions 2021-04-16 17:23:14 +00:00
southbridge sb/amd/pi/hudson: remove unused Bolton PI FCH code 2021-04-11 21:06:29 +00:00
superio acpi/acpigen.h: Add more intuitive AML package closing functions 2021-03-22 11:21:55 +00:00
vendorcode vendorcode/intel/fsp: Add Alder Lake FSP headers for FSP v2117_00 2021-04-16 14:37:03 +00:00
Kconfig southbridge: Ensure common Kconfig gets included last 2021-02-18 10:11:39 +00:00