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>
This commit is contained in:
@@ -31,4 +31,10 @@ config ACPI_BERT_SIZE
|
|||||||
Specify the amount of DRAM reserved for gathering the data used to
|
Specify the amount of DRAM reserved for gathering the data used to
|
||||||
generate the ACPI table.
|
generate the ACPI table.
|
||||||
|
|
||||||
|
config HAVE_PAM0_REGISTER
|
||||||
|
bool
|
||||||
|
default y
|
||||||
|
help
|
||||||
|
Specify if the SOC has a PAM0 register
|
||||||
|
|
||||||
endif
|
endif
|
||||||
|
@@ -305,7 +305,7 @@ void enable_power_aware_intr(void)
|
|||||||
void sa_lock_pam(void)
|
void sa_lock_pam(void)
|
||||||
{
|
{
|
||||||
const struct device *dev = pcidev_path_on_root(SA_DEVFN_ROOT);
|
const struct device *dev = pcidev_path_on_root(SA_DEVFN_ROOT);
|
||||||
if (!dev)
|
if (!CONFIG(HAVE_PAM0_REGISTER) || !dev)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
pci_or_config8(dev, PAM0, PAM_LOCK);
|
pci_or_config8(dev, PAM0, PAM_LOCK);
|
||||||
|
Reference in New Issue
Block a user