diff options
author | Subrata Banik <subratabanik@google.com> | 2022-01-27 19:55:10 +0530 |
---|---|---|
committer | Felix Held <felix-coreboot@felixheld.de> | 2022-01-28 15:14:51 +0000 |
commit | 5e84a42055cd741d38923dc152745a759ee4587f (patch) | |
tree | c2c05686877ef3712f3008da9d1bf428db5bbc18 /src | |
parent | e15aa7fc7a0146152db5e36fd612b3c69421ff30 (diff) |
soc/intel/common/gpio: Skip GPIO PAD locking in recovery mode
The recovery mode is meant to provide fixes for the platform deformity
hence, skip locking the GPIO PAD configuration to provide the same
flexibility to the platform owner while booting in recovery mode.
BUG=b:211950520
TEST=Able to build and boot the brya.
Signed-off-by: Subrata Banik <subratabanik@google.com>
Change-Id: I0f0a3cfb2be7f2a5485679f6a3d8cb4fb407fcf4
Reviewed-on: https://review.coreboot.org/c/coreboot/+/61424
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: EricR Lai <ericr_lai@compal.corp-partner.google.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/soc/intel/common/block/gpio/gpio.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/soc/intel/common/block/gpio/gpio.c b/src/soc/intel/common/block/gpio/gpio.c index dcec12a8f0..3c5d3f371c 100644 --- a/src/soc/intel/common/block/gpio/gpio.c +++ b/src/soc/intel/common/block/gpio/gpio.c @@ -13,6 +13,7 @@ #include <intelblocks/itss.h> #include <intelblocks/p2sb.h> #include <intelblocks/pcr.h> +#include <security/vboot/vboot_common.h> #include <soc/pci_devs.h> #include <soc/pm.h> #include <stdlib.h> @@ -616,8 +617,8 @@ static int gpio_non_smm_lock_pad(const struct gpio_lock_config *pad_info) int gpio_lock_pad(const gpio_t pad, enum gpio_lock_action lock_action) { - /* Skip locking GPIO PAD in early stages */ - if (ENV_ROMSTAGE_OR_BEFORE) + /* Skip locking GPIO PAD in early stages or in recovery mode */ + if (ENV_ROMSTAGE_OR_BEFORE || vboot_recovery_mode_enabled()) return -1; const struct gpio_lock_config pads = { |