diff options
author | Kyösti Mälkki <kyosti.malkki@gmail.com> | 2019-07-13 17:28:37 +0300 |
---|---|---|
committer | Kyösti Mälkki <kyosti.malkki@gmail.com> | 2019-07-17 04:26:30 +0000 |
commit | 6feb4dadd85518c5e4603cb7da48ac4bec484c62 (patch) | |
tree | f5b06399b0eaadafdc36c862a7604f6363e65eb7 /src/southbridge | |
parent | 83d6a8a30cafa192dd39aba989e999b60f8e8b95 (diff) | |
download | coreboot-6feb4dadd85518c5e4603cb7da48ac4bec484c62.tar.xz |
intel/i82801ix: Refactor lock_smm()
Move the SMM lock outside the function as it is renamed.
Replace conditional !PARALLEL_MP with SMM_ASEG to better
reflect the use.
Change-Id: I93bf0d2f711f94a5bb741bdcd92c1e0fec228684
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/34302
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Diffstat (limited to 'src/southbridge')
-rw-r--r-- | src/southbridge/intel/i82801ix/lpc.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/southbridge/intel/i82801ix/lpc.c b/src/southbridge/intel/i82801ix/lpc.c index 546fbced77..ba2b0282e5 100644 --- a/src/southbridge/intel/i82801ix/lpc.c +++ b/src/southbridge/intel/i82801ix/lpc.c @@ -366,7 +366,7 @@ static void enable_clock_gating(void) RCBA32(0x38c0) |= 7; } -static void i82801ix_lock_smm(struct device *dev) +static void i82801ix_set_acpi_mode(struct device *dev) { if (!acpi_is_wakeup_s3()) { #if ENABLE_ACPI_MODE_IN_COREBOOT @@ -382,11 +382,6 @@ static void i82801ix_lock_smm(struct device *dev) printk(BIOS_DEBUG, "S3 wakeup, enabling ACPI via APMC\n"); outb(APM_CNT_ACPI_ENABLE, APM_CNT); } - /* Don't allow evil boot loaders, kernels, or - * userspace applications to deceive us: - */ - if (!CONFIG(PARALLEL_MP)) - aseg_smm_lock(); } static void lpc_init(struct device *dev) @@ -430,7 +425,13 @@ static void lpc_init(struct device *dev) i8259_configure_irq_trigger(9, 1); if (CONFIG(HAVE_SMI_HANDLER)) - i82801ix_lock_smm(dev); + i82801ix_set_acpi_mode(dev); + + /* Don't allow evil boot loaders, kernels, or + * userspace applications to deceive us: + */ + if (CONFIG(HAVE_SMI_HANDLER) && CONFIG(SMM_ASEG)) + aseg_smm_lock(); } static void i82801ix_lpc_read_resources(struct device *dev) |