summaryrefslogtreecommitdiff
path: root/src/southbridge/intel/bd82x6x
diff options
context:
space:
mode:
authorKyösti Mälkki <kyosti.malkki@gmail.com>2020-06-28 21:28:54 +0300
committerNico Huber <nico.h@gmx.de>2021-01-10 11:27:06 +0000
commit4b4e995988884855b800ccb392847965aec3cd83 (patch)
tree8696abdbf2120a6d722f0a4748e1f20d21314b5a /src/southbridge/intel/bd82x6x
parent9f441dfc702b5c99ad466b9ada4e462a1b350bc7 (diff)
sb/intel: Factor out soc_fill_gnvs()
Name the common part of GNVS initialisation as soc_fill_gnvs(). It is also moved before the call to acpi_create_gnvs(), which followup will rename to mainbord_fill_gnvs() to reflect that implementation is under mb/. Change-Id: Ic4cf1548b65a86212d6e45d460fcd23bb8036365 Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/48706 Reviewed-by: Lance Zhao Reviewed-by: Arthur Heymans <arthur@aheymans.xyz> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/southbridge/intel/bd82x6x')
-rw-r--r--src/southbridge/intel/bd82x6x/lpc.c25
1 files changed, 12 insertions, 13 deletions
diff --git a/src/southbridge/intel/bd82x6x/lpc.c b/src/southbridge/intel/bd82x6x/lpc.c
index a37d298d06..5b8921012e 100644
--- a/src/southbridge/intel/bd82x6x/lpc.c
+++ b/src/southbridge/intel/bd82x6x/lpc.c
@@ -15,7 +15,6 @@
#include <acpi/acpi_gnvs.h>
#include <acpi/acpigen.h>
#include <cpu/x86/smm.h>
-#include <cbmem.h>
#include <string.h>
#include "chip.h"
#include "pch.h"
@@ -652,23 +651,23 @@ void *gnvs_chromeos_ptr(struct global_nvs *gnvs)
return &gnvs->chromeos;
}
+void soc_fill_gnvs(struct global_nvs *gnvs)
+{
+ gnvs->apic = 1;
+ gnvs->mpen = 1; /* Enable Multi Processing */
+ gnvs->pcnt = dev_count_cpu();
+}
+
void southbridge_inject_dsdt(const struct device *dev)
{
struct global_nvs *gnvs = acpi_get_gnvs();
+ if (!gnvs)
+ return;
- if (gnvs) {
-
- acpi_create_gnvs(gnvs);
-
- gnvs->apic = 1;
- gnvs->mpen = 1; /* Enable Multi Processing */
- gnvs->pcnt = dev_count_cpu();
+ soc_fill_gnvs(gnvs);
+ acpi_create_gnvs(gnvs);
- /* Add it to DSDT. */
- acpigen_write_scope("\\");
- acpigen_write_name_dword("NVSA", (u32) gnvs);
- acpigen_pop_len();
- }
+ acpi_inject_nvsa();
}
static const char *lpc_acpi_name(const struct device *dev)