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>
diff --git a/src/include/acpi/acpi.h b/src/include/acpi/acpi.h
index ba056c0..e6c18c2 100644
--- a/src/include/acpi/acpi.h
+++ b/src/include/acpi/acpi.h
@@ -1019,6 +1019,13 @@
 /* Read and clear GPE status */
 int acpi_get_gpe(int gpe);
 
+/* Once we enter payload, is SMI handler installed and capable of
+   responding to APM_CNT Advanced Power Management Control commands. */
+static inline int permanent_smi_handler(void)
+{
+	return CONFIG(HAVE_SMI_HANDLER);
+}
+
 static inline int acpi_s3_resume_allowed(void)
 {
 	return CONFIG(HAVE_ACPI_RESUME);