summaryrefslogtreecommitdiff
path: root/src/soc/intel/common
diff options
context:
space:
mode:
authorKyösti Mälkki <kyosti.malkki@gmail.com>2020-06-28 12:29:13 +0300
committerNico Huber <nico.h@gmx.de>2021-01-10 11:25:12 +0000
commit9f441dfc702b5c99ad466b9ada4e462a1b350bc7 (patch)
treed8b156f09d72e421e6cb4c9ecd6dc97ad23da84a /src/soc/intel/common
parent46e37c6343a1f4fa325d0ab66385d3acae4ffa12 (diff)
ACPI: Replace uses of CBMEM_ID_ACPI_GNVS
Change-Id: I45a2d9cb7f07609a1ff03fd70f17c3f2d4f013b9 Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/48705 Reviewed-by: Arthur Heymans <arthur@aheymans.xyz> Reviewed-by: Angel Pons <th3fanbus@gmail.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/soc/intel/common')
-rw-r--r--src/soc/intel/common/block/acpi/acpi.c16
1 files changed, 5 insertions, 11 deletions
diff --git a/src/soc/intel/common/block/acpi/acpi.c b/src/soc/intel/common/block/acpi/acpi.c
index fc4352834a..e1766ea06d 100644
--- a/src/soc/intel/common/block/acpi/acpi.c
+++ b/src/soc/intel/common/block/acpi/acpi.c
@@ -241,18 +241,12 @@ __weak void acpi_create_gnvs(struct global_nvs *gnvs)
void southbridge_inject_dsdt(const struct device *device)
{
- struct global_nvs *gnvs;
-
- gnvs = cbmem_find(CBMEM_ID_ACPI_GNVS);
-
- if (gnvs) {
- acpi_create_gnvs(gnvs);
+ struct global_nvs *gnvs = acpi_get_gnvs();
+ if (!gnvs)
+ return;
- /* Add it to DSDT. */
- acpigen_write_scope("\\");
- acpigen_write_name_dword("NVSA", (uintptr_t) gnvs);
- acpigen_pop_len();
- }
+ acpi_create_gnvs(gnvs);
+ acpi_inject_nvsa();
}
int common_calculate_power_ratio(int tdp, int p1_ratio, int ratio)