Kyösti Mälkki has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/48697 )
Change subject: [WIP] ACPI: Allocate GNVS early in ramstage ......................................................................
[WIP] ACPI: Allocate GNVS early in ramstage
We need this to happen prior to SMM module loader. If there is some debugging output it's better they do not appear in the middle of CPU bringup.
Change-Id: I45b4b5c0c5bf8bee258a465d1e364bfe98190e44 Signed-off-by: Kyösti Mälkki kyosti.malkki@gmail.com --- M src/acpi/gnvs.c M src/lib/hardwaremain.c 2 files changed, 8 insertions(+), 3 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/97/48697/1
diff --git a/src/acpi/gnvs.c b/src/acpi/gnvs.c index fbc84b3..40c9745 100644 --- a/src/acpi/gnvs.c +++ b/src/acpi/gnvs.c @@ -59,11 +59,10 @@
void acpi_inject_nvsa(void) { - uintptr_t gnvs_address = (uintptr_t)acpi_get_gnvs(); - if (!gnvs_address) + if (!gnvs) return;
acpigen_write_scope("\"); - acpigen_write_name_dword("NVSA", gnvs_address); + acpigen_write_name_dword("NVSA", (uintptr_t)gnvs); acpigen_pop_len(); } diff --git a/src/lib/hardwaremain.c b/src/lib/hardwaremain.c index 173ee97..947f418 100644 --- a/src/lib/hardwaremain.c +++ b/src/lib/hardwaremain.c @@ -7,6 +7,7 @@
#include <adainit.h> #include <acpi/acpi.h> +#include <acpi/acpi_gnvs.h> #include <arch/exception.h> #include <bootstate.h> #include <console/console.h> @@ -447,6 +448,11 @@ acpi_is_wakeup_s3(); threads_initialize();
+ /* Initialise GNVS early. + FIXME: Platform gnvs_size_of_array() and friends not there yet. */ + if (0) + gnvs_get_or_create(); + /* Schedule the static boot state entries. */ boot_state_schedule_static_entries();