diff options
author | Kyösti Mälkki <kyosti.malkki@gmail.com> | 2019-08-11 01:22:28 +0300 |
---|---|---|
committer | Patrick Georgi <pgeorgi@google.com> | 2020-06-06 09:24:44 +0000 |
commit | 0a9e72e87e573183d713fca928c75464f829e5a8 (patch) | |
tree | b117a6cad0872b4b9caee8878ea6b98432c3ef4d /src/southbridge/intel | |
parent | c328a680def0f589536c24ff547465bd7eb3546d (diff) |
arch/x86: Declare permanent_smi_handler()
Advertising SMI triggers in FADT is only valid if we exit with
SMI installed. There has been some experiments to delay SMM
installation to OS, yet there are new platforms that allow some
configuration access only to be done inside SMM.
Splitting static HAVE_SMI_HANDLER variable helps to manage cases
where SMM might be both installed and cleared prior to entering
payload.
Change-Id: Iad92c4a180524e15199633693446a087787ad3a2
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/41910
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Diffstat (limited to 'src/southbridge/intel')
-rw-r--r-- | src/southbridge/intel/bd82x6x/lpc.c | 2 | ||||
-rw-r--r-- | src/southbridge/intel/i82371eb/fadt.c | 2 | ||||
-rw-r--r-- | src/southbridge/intel/i82801gx/lpc.c | 2 | ||||
-rw-r--r-- | src/southbridge/intel/i82801jx/lpc.c | 2 | ||||
-rw-r--r-- | src/southbridge/intel/ibexpeak/lpc.c | 2 | ||||
-rw-r--r-- | src/southbridge/intel/lynxpoint/lpc.c | 2 |
6 files changed, 6 insertions, 6 deletions
diff --git a/src/southbridge/intel/bd82x6x/lpc.c b/src/southbridge/intel/bd82x6x/lpc.c index 45215f1c94..0f1d33e1c8 100644 --- a/src/southbridge/intel/bd82x6x/lpc.c +++ b/src/southbridge/intel/bd82x6x/lpc.c @@ -698,7 +698,7 @@ void acpi_fill_fadt(acpi_fadt_t *fadt) fadt->sci_int = 0x9; - if (CONFIG(HAVE_SMI_HANDLER)) { + if (permanent_smi_handler()) { fadt->smi_cmd = APM_CNT; fadt->acpi_enable = APM_CNT_ACPI_ENABLE; fadt->acpi_disable = APM_CNT_ACPI_DISABLE; diff --git a/src/southbridge/intel/i82371eb/fadt.c b/src/southbridge/intel/i82371eb/fadt.c index 09e027f407..66781beedc 100644 --- a/src/southbridge/intel/i82371eb/fadt.c +++ b/src/southbridge/intel/i82371eb/fadt.c @@ -36,7 +36,7 @@ void acpi_create_fadt(acpi_fadt_t *fadt, acpi_facs_t *facs, void *dsdt) fadt->preferred_pm_profile = 0; /* unspecified */ fadt->sci_int = 9; - if (CONFIG(HAVE_SMI_HANDLER)) { + if (permanent_smi_handler()) { /* TODO: SMI handler is not implemented. */ fadt->smi_cmd = 0x00; } diff --git a/src/southbridge/intel/i82801gx/lpc.c b/src/southbridge/intel/i82801gx/lpc.c index 86c3e58750..d4aef55f43 100644 --- a/src/southbridge/intel/i82801gx/lpc.c +++ b/src/southbridge/intel/i82801gx/lpc.c @@ -522,7 +522,7 @@ void acpi_fill_fadt(acpi_fadt_t *fadt) fadt->reserved = 0; fadt->sci_int = 0x9; - if (CONFIG(HAVE_SMI_HANDLER)) { + if (permanent_smi_handler()) { fadt->smi_cmd = APM_CNT; fadt->acpi_enable = APM_CNT_ACPI_ENABLE; fadt->acpi_disable = APM_CNT_ACPI_DISABLE; diff --git a/src/southbridge/intel/i82801jx/lpc.c b/src/southbridge/intel/i82801jx/lpc.c index b3aeda22f7..7a1b24b92b 100644 --- a/src/southbridge/intel/i82801jx/lpc.c +++ b/src/southbridge/intel/i82801jx/lpc.c @@ -533,7 +533,7 @@ void acpi_fill_fadt(acpi_fadt_t *fadt) fadt->reserved = 0; fadt->sci_int = 0x9; - if (CONFIG(HAVE_SMI_HANDLER)) { + if (permanent_smi_handler()) { fadt->smi_cmd = APM_CNT; fadt->acpi_enable = APM_CNT_ACPI_ENABLE; fadt->acpi_disable = APM_CNT_ACPI_DISABLE; diff --git a/src/southbridge/intel/ibexpeak/lpc.c b/src/southbridge/intel/ibexpeak/lpc.c index 1209f9b685..742b86dfdf 100644 --- a/src/southbridge/intel/ibexpeak/lpc.c +++ b/src/southbridge/intel/ibexpeak/lpc.c @@ -592,7 +592,7 @@ void acpi_fill_fadt(acpi_fadt_t *fadt) fadt->sci_int = 0x9; - if (CONFIG(HAVE_SMI_HANDLER)) { + if (permanent_smi_handler()) { fadt->smi_cmd = APM_CNT; fadt->acpi_enable = APM_CNT_ACPI_ENABLE; fadt->acpi_disable = APM_CNT_ACPI_DISABLE; diff --git a/src/southbridge/intel/lynxpoint/lpc.c b/src/southbridge/intel/lynxpoint/lpc.c index da744bfa64..1d755555d3 100644 --- a/src/southbridge/intel/lynxpoint/lpc.c +++ b/src/southbridge/intel/lynxpoint/lpc.c @@ -741,7 +741,7 @@ void acpi_fill_fadt(acpi_fadt_t *fadt) fadt->sci_int = 0x9; - if (CONFIG(HAVE_SMI_HANDLER)) { + if (permanent_smi_handler()) { fadt->smi_cmd = APM_CNT; fadt->acpi_enable = APM_CNT_ACPI_ENABLE; fadt->acpi_disable = APM_CNT_ACPI_DISABLE; |