Kyösti Mälkki has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/42490 )
Change subject: ACPI: Final APM_CNT_GNVS_UPATE cleanup ......................................................................
ACPI: Final APM_CNT_GNVS_UPATE cleanup
All platforms moved to initialise GNVS at the time of SMM module loading.
Change-Id: I31b5652a946b0d9bd1909ff8bde53b43e06e2cd9 Signed-off-by: Kyösti Mälkki kyosti.malkki@gmail.com --- M src/acpi/gnvs.c M src/arch/x86/acpi_s3.c M src/cpu/x86/smm/smi_trigger.c M src/include/acpi/acpi_gnvs.h M src/include/cpu/x86/smm.h 5 files changed, 0 insertions(+), 49 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/90/42490/1
diff --git a/src/acpi/gnvs.c b/src/acpi/gnvs.c index a8e8ba9..fbc84b3 100644 --- a/src/acpi/gnvs.c +++ b/src/acpi/gnvs.c @@ -54,9 +54,6 @@ if (CONFIG(CHROMEOS)) gnvs_assign_chromeos();
- /* And tell SMI about it. */ - smm_gnvs_update(); - return gnvs; }
diff --git a/src/arch/x86/acpi_s3.c b/src/arch/x86/acpi_s3.c index bdf010d..768674b 100644 --- a/src/arch/x86/acpi_s3.c +++ b/src/arch/x86/acpi_s3.c @@ -6,7 +6,6 @@ #include <arch/cpu.h> #include <cbmem.h> #include <commonlib/helpers.h> -#include <cpu/x86/smm.h> #include <fallback.h> #include <timestamp.h> #include <romstage_handoff.h> @@ -79,9 +78,6 @@
void acpi_resume(void *wake_vec) { - /* Restore GNVS pointer in SMM if found. */ - apm_control(APM_CNT_GNVS_UPDATE); - /* Call mainboard resume handler first, if defined. */ mainboard_suspend_resume();
diff --git a/src/cpu/x86/smm/smi_trigger.c b/src/cpu/x86/smm/smi_trigger.c index 6cf4db4..7e3ddb1 100644 --- a/src/cpu/x86/smm/smi_trigger.c +++ b/src/cpu/x86/smm/smi_trigger.c @@ -1,6 +1,5 @@ /* SPDX-License-Identifier: GPL-2.0-only */
-#include <acpi/acpi_gnvs.h> #include <arch/io.h> #include <console/console.h> #include <cpu/x86/smm.h> @@ -21,9 +20,6 @@ case APM_CNT_ACPI_ENABLE: printk(BIOS_DEBUG, "Enabling ACPI via APMC.\n"); break; - case APM_CNT_GNVS_UPDATE: - set_smm_gnvs_ptr(); - return 0; case APM_CNT_FINALIZE: printk(BIOS_DEBUG, "Finalizing SMM.\n"); break; @@ -43,37 +39,3 @@ printk(BIOS_DEBUG, "APMC done.\n"); return 0; } - -void smm_gnvs_update(void) -{ - apm_control(APM_CNT_GNVS_UPDATE); -} - -void set_smm_gnvs_ptr(void) -{ - uintptr_t gnvs_address; - - if (CONFIG(ACPI_NO_SMI_GNVS)) { - printk(BIOS_WARNING, "%s() is not implemented\n", __func__); - return; - } - - gnvs_address = (uintptr_t)acpi_get_gnvs(); - if (!gnvs_address) - return; - - /* - * Issue SMI to set the gnvs pointer in SMM. - * - * EAX = APM_CNT_GNVS_UPDATE - * EBX = gnvs pointer - * EDX = APM_CNT - */ - asm volatile ( - "outb %%al, %%dx\n\t" - : /* ignore result */ - : "a" (APM_CNT_GNVS_UPDATE), - "b" (gnvs_address), - "d" (APM_CNT) - ); -} diff --git a/src/include/acpi/acpi_gnvs.h b/src/include/acpi/acpi_gnvs.h index 552a79f..cc0c471 100644 --- a/src/include/acpi/acpi_gnvs.h +++ b/src/include/acpi/acpi_gnvs.h @@ -16,7 +16,4 @@ uint32_t *gnvs_cbmc_ptr(void); void *gnvs_chromeos_ptr(void);
-/* Will be obsoleted with gnvs_ptr in smmstub. */ -void smm_gnvs_update(void); - #endif diff --git a/src/include/cpu/x86/smm.h b/src/include/cpu/x86/smm.h index 3ad511c..8888f52 100644 --- a/src/include/cpu/x86/smm.h +++ b/src/include/cpu/x86/smm.h @@ -22,7 +22,6 @@ #define APM_CNT_ACPI_DISABLE 0x1e #define APM_CNT_ACPI_ENABLE 0xe1 #define APM_CNT_MBI_UPDATE 0xeb -#define APM_CNT_GNVS_UPDATE 0xea #define APM_CNT_FINALIZE 0xcb #define APM_CNT_LEGACY 0xcc #define APM_CNT_SMMINFO 0xec
Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/42490 )
Change subject: ACPI: Final APM_CNT_GNVS_UPATE cleanup ......................................................................
Patch Set 1:
(1 comment)
https://review.coreboot.org/c/coreboot/+/42490/1//COMMIT_MSG Commit Message:
https://review.coreboot.org/c/coreboot/+/42490/1//COMMIT_MSG@7 PS1, Line 7: UPATE UPDATE
Paul Menzel has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/42490 )
Change subject: ACPI: Final APM_CNT_GNVS_UPATE cleanup ......................................................................
Patch Set 1: Code-Review+1
(1 comment)
What should be done for testing? Just boot test one real platform? Or is QEMU enough?
https://review.coreboot.org/c/coreboot/+/42490/1//COMMIT_MSG Commit Message:
https://review.coreboot.org/c/coreboot/+/42490/1//COMMIT_MSG@7 PS1, Line 7: ACPI: Final APM_CNT_GNVS_UPATE cleanup Statement?
ACPI: Do final APM_CNT_GNVS_UPATE cleanup
Kyösti Mälkki has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/42490 )
Change subject: ACPI: Final APM_CNT_GNVS_UPATE cleanup ......................................................................
Patch Set 1:
Patch Set 1: Code-Review+1
(1 comment)
What should be done for testing? Just boot test one real platform? Or is QEMU enough?
There are TODOs still in the dependencies. Need to test with HAVE_SMI_HANDLER=y and DEBUG_SMI=y and verify GNVS pointer is correct for SMM.
Hello build bot (Jenkins), Paul Menzel,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/42490
to look at the new patch set (#2).
Change subject: ACPI: Final APM_CNT_GNVS_UPDATE cleanup ......................................................................
ACPI: Final APM_CNT_GNVS_UPDATE cleanup
All platforms moved to initialise GNVS at the time of SMM module loading.
Change-Id: I31b5652a946b0d9bd1909ff8bde53b43e06e2cd9 Signed-off-by: Kyösti Mälkki kyosti.malkki@gmail.com --- M src/arch/x86/acpi_s3.c M src/cpu/x86/smm/smi_trigger.c M src/include/cpu/x86/smm.h 3 files changed, 1 insertion(+), 41 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/90/42490/2
Kyösti Mälkki has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/42490 )
Change subject: ACPI: Final APM_CNT_GNVS_UPDATE cleanup ......................................................................
Patch Set 3:
(1 comment)
https://review.coreboot.org/c/coreboot/+/42490/1//COMMIT_MSG Commit Message:
https://review.coreboot.org/c/coreboot/+/42490/1//COMMIT_MSG@7 PS1, Line 7: UPATE
UPDATE
Done
Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/42490 )
Change subject: ACPI: Final APM_CNT_GNVS_UPDATE cleanup ......................................................................
Patch Set 4: Code-Review+1
Kyösti Mälkki has abandoned this change. ( https://review.coreboot.org/c/coreboot/+/42490 )
Change subject: ACPI: Final APM_CNT_GNVS_UPDATE cleanup ......................................................................
Abandoned