sb/intel: Use acpi_inject_nvsa()

Change-Id: I5f1762c4a25631af9d29a2cb038620d9e9698f8b
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/48715
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
Kyösti Mälkki 2020-06-28 21:28:54 +03:00 committed by Nico Huber
parent 4b4e995988
commit 8a5f157fdf
2 changed files with 8 additions and 20 deletions

View File

@ -15,7 +15,6 @@
#include <acpi/acpi_gnvs.h> #include <acpi/acpi_gnvs.h>
#include <cpu/x86/smm.h> #include <cpu/x86/smm.h>
#include <acpi/acpigen.h> #include <acpi/acpigen.h>
#include <cbmem.h>
#include <string.h> #include <string.h>
#include "chip.h" #include "chip.h"
#include "i82801ix.h" #include "i82801ix.h"
@ -467,16 +466,11 @@ void *gnvs_chromeos_ptr(struct global_nvs *gnvs)
void southbridge_inject_dsdt(const struct device *dev) void southbridge_inject_dsdt(const struct device *dev)
{ {
struct global_nvs *gnvs = acpi_get_gnvs(); struct global_nvs *gnvs = acpi_get_gnvs();
if (!gnvs)
return;
if (gnvs) {
acpi_create_gnvs(gnvs); acpi_create_gnvs(gnvs);
acpi_inject_nvsa();
/* Add it to SSDT. */
acpigen_write_scope("\\");
acpigen_write_name_dword("NVSA", (uintptr_t)gnvs);
acpigen_pop_len();
}
} }
static const char *lpc_acpi_name(const struct device *dev) static const char *lpc_acpi_name(const struct device *dev)

View File

@ -16,7 +16,6 @@
#include <cpu/x86/smm.h> #include <cpu/x86/smm.h>
#include <acpi/acpigen.h> #include <acpi/acpigen.h>
#include <arch/smp/mpspec.h> #include <arch/smp/mpspec.h>
#include <cbmem.h>
#include <string.h> #include <string.h>
#include "chip.h" #include "chip.h"
#include "i82801jx.h" #include "i82801jx.h"
@ -485,16 +484,11 @@ size_t gnvs_size_of_array(void)
void southbridge_inject_dsdt(const struct device *dev) void southbridge_inject_dsdt(const struct device *dev)
{ {
struct global_nvs *gnvs = acpi_get_gnvs(); struct global_nvs *gnvs = acpi_get_gnvs();
if (!gnvs)
return;
if (gnvs) {
acpi_create_gnvs(gnvs); acpi_create_gnvs(gnvs);
acpi_inject_nvsa();
/* Add it to SSDT. */
acpigen_write_scope("\\");
acpigen_write_name_dword("NVSA", (u32) gnvs);
acpigen_pop_len();
}
} }
static const char *lpc_acpi_name(const struct device *dev) static const char *lpc_acpi_name(const struct device *dev)