diff options
author | Sean Rhodes <sean@starlabs.systems> | 2022-08-07 20:59:57 +0100 |
---|---|---|
committer | Felix Held <felix-coreboot@felixheld.de> | 2022-09-22 18:35:31 +0000 |
commit | 9a3e9a495c54915761a52fc45013208b9c018109 (patch) | |
tree | 5a2d93cadd0b6f3f597a5aa66a06714f26bcd99c | |
parent | 026f00476e11f6e9e53d19fba09d4d97c54e79cf (diff) |
soc/common/lockdown: Guard sa_lock_pam
Guard sa_lock_pam with PAM0_REGISTER so it doesn't run on platforms
that don't select this.
Signed-off-by: Sean Rhodes <sean@starlabs.systems>
Change-Id: I5055d09c634851e9f869ab0b67a7bcab130f928c
Reviewed-on: https://review.coreboot.org/c/coreboot/+/66492
Reviewed-by: Nico Huber <nico.h@gmx.de>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
-rw-r--r-- | src/soc/intel/common/block/systemagent/Kconfig | 6 | ||||
-rw-r--r-- | src/soc/intel/common/block/systemagent/systemagent.c | 2 |
2 files changed, 7 insertions, 1 deletions
diff --git a/src/soc/intel/common/block/systemagent/Kconfig b/src/soc/intel/common/block/systemagent/Kconfig index e7f6ba49d8..4ba83f8817 100644 --- a/src/soc/intel/common/block/systemagent/Kconfig +++ b/src/soc/intel/common/block/systemagent/Kconfig @@ -31,4 +31,10 @@ config ACPI_BERT_SIZE Specify the amount of DRAM reserved for gathering the data used to generate the ACPI table. +config HAVE_PAM0_REGISTER + bool + default y + help + Specify if the SOC has a PAM0 register + endif diff --git a/src/soc/intel/common/block/systemagent/systemagent.c b/src/soc/intel/common/block/systemagent/systemagent.c index 0861e62fc8..c2ce999c9f 100644 --- a/src/soc/intel/common/block/systemagent/systemagent.c +++ b/src/soc/intel/common/block/systemagent/systemagent.c @@ -305,7 +305,7 @@ void enable_power_aware_intr(void) void sa_lock_pam(void) { const struct device *dev = pcidev_path_on_root(SA_DEVFN_ROOT); - if (!dev) + if (!CONFIG(HAVE_PAM0_REGISTER) || !dev) return; pci_or_config8(dev, PAM0, PAM_LOCK); |