diff options
author | Kyösti Mälkki <kyosti.malkki@gmail.com> | 2020-06-17 13:45:16 +0300 |
---|---|---|
committer | Hung-Te Lin <hungte@chromium.org> | 2020-12-25 02:29:14 +0000 |
commit | e0183d6540b8e8a8281f4317b881dfbc57f12bc4 (patch) | |
tree | c3399bb67dc9489c105f1757a3ffc7dfeca27bd4 /src/acpi/chromeos-gnvs.c | |
parent | 61bc2191c3d3a66f33688ee498985a588fc8ec82 (diff) |
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>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/48697
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Diffstat (limited to 'src/acpi/chromeos-gnvs.c')
-rw-r--r-- | src/acpi/chromeos-gnvs.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/acpi/chromeos-gnvs.c b/src/acpi/chromeos-gnvs.c index 4bcf892745..bdd7d69cc5 100644 --- a/src/acpi/chromeos-gnvs.c +++ b/src/acpi/chromeos-gnvs.c @@ -4,9 +4,18 @@ #include <ec/google/chromeec/ec.h> #include <vendorcode/google/chromeos/gnvs.h> +/* Remove once implemented on platform code. */ +__weak void *gnvs_chromeos_ptr(struct global_nvs *gnvs) +{ + return NULL; +} + void gnvs_assign_chromeos(void) { - chromeos_acpi_t *gnvs_chromeos = gnvs_chromeos_ptr(); + chromeos_acpi_t *gnvs_chromeos = gnvs_chromeos_ptr(acpi_get_gnvs()); + if (!gnvs_chromeos) + return; + chromeos_init_chromeos_acpi(gnvs_chromeos); /* EC can override to ECFW_RW. */ |