summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorVladimir Serbinenko <phcoder@gmail.com>2014-10-12 00:26:21 +0200
committerVladimir Serbinenko <phcoder@gmail.com>2014-10-18 22:16:24 +0200
commit1b409fd132f20f5f67f5717675a639683e6da61f (patch)
treee8f8d8d3888c80c805edd8cde3b188959dccd476 /src
parentb6200969ec931db8a7805b899d16fde139309f6e (diff)
lynxpoint: Consolidate common GNVS init
Change-Id: Ie8e4fffcec308d1cd5e696605e78671f3ababf40 Signed-off-by: Vladimir Serbinenko <phcoder@gmail.com> Reviewed-on: http://review.coreboot.org/7054 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Diffstat (limited to 'src')
-rw-r--r--src/mainboard/google/bolt/acpi_tables.c10
-rw-r--r--src/mainboard/google/falco/acpi_tables.c10
-rw-r--r--src/mainboard/google/panther/acpi_tables.c10
-rw-r--r--src/mainboard/google/peppy/acpi_tables.c10
-rw-r--r--src/mainboard/google/samus/acpi_tables.c10
-rw-r--r--src/mainboard/google/slippy/acpi_tables.c10
-rw-r--r--src/mainboard/intel/baskingridge/acpi_tables.c9
-rw-r--r--src/mainboard/intel/wtm2/acpi_tables.c9
-rw-r--r--src/southbridge/intel/lynxpoint/lpc.c13
9 files changed, 13 insertions, 78 deletions
diff --git a/src/mainboard/google/bolt/acpi_tables.c b/src/mainboard/google/bolt/acpi_tables.c
index d2c18f8b49..3b851c46be 100644
--- a/src/mainboard/google/bolt/acpi_tables.c
+++ b/src/mainboard/google/bolt/acpi_tables.c
@@ -55,10 +55,6 @@ static void acpi_update_thermal_table(global_nvs_t *gnvs)
void acpi_create_gnvs(global_nvs_t *gnvs)
{
- gnvs->apic = 1;
- gnvs->mpen = 1; /* Enable Multi Processing */
- gnvs->pcnt = dev_count_cpu();
-
/* Enable USB ports in S3 */
gnvs->s3u0 = 1;
gnvs->s3u1 = 1;
@@ -79,16 +75,10 @@ void acpi_create_gnvs(global_nvs_t *gnvs)
gnvs->did[4] = 0x00000005;
#if CONFIG_CHROMEOS
- // TODO(reinauer) this could move elsewhere?
- chromeos_init_vboot(&(gnvs->chromeos));
-
gnvs->chromeos.vbt2 = google_ec_running_ro() ?
ACTIVE_ECFW_RO : ACTIVE_ECFW_RW;
#endif
- /* Update the mem console pointer. */
- gnvs->cbmc = (u32)cbmem_find(CBMEM_ID_CONSOLE);
-
acpi_update_thermal_table(gnvs);
}
diff --git a/src/mainboard/google/falco/acpi_tables.c b/src/mainboard/google/falco/acpi_tables.c
index addd6c3b1f..5849087e92 100644
--- a/src/mainboard/google/falco/acpi_tables.c
+++ b/src/mainboard/google/falco/acpi_tables.c
@@ -49,10 +49,6 @@ static void acpi_update_thermal_table(global_nvs_t *gnvs)
void acpi_create_gnvs(global_nvs_t *gnvs)
{
- gnvs->apic = 1;
- gnvs->mpen = 1; /* Enable Multi Processing */
- gnvs->pcnt = dev_count_cpu();
-
/* Enable USB ports in S3 */
gnvs->s3u0 = 1;
gnvs->s3u1 = 1;
@@ -73,16 +69,10 @@ void acpi_create_gnvs(global_nvs_t *gnvs)
gnvs->did[4] = 0x00000005;
#if CONFIG_CHROMEOS
- // TODO(reinauer) this could move elsewhere?
- chromeos_init_vboot(&(gnvs->chromeos));
-
gnvs->chromeos.vbt2 = google_ec_running_ro() ?
ACTIVE_ECFW_RO : ACTIVE_ECFW_RW;
#endif
- /* Update the mem console pointer. */
- gnvs->cbmc = (u32)cbmem_find(CBMEM_ID_CONSOLE);
-
acpi_update_thermal_table(gnvs);
}
diff --git a/src/mainboard/google/panther/acpi_tables.c b/src/mainboard/google/panther/acpi_tables.c
index 759426ea7e..9340c5ac29 100644
--- a/src/mainboard/google/panther/acpi_tables.c
+++ b/src/mainboard/google/panther/acpi_tables.c
@@ -66,10 +66,6 @@ static void acpi_update_thermal_table(global_nvs_t *gnvs)
void acpi_create_gnvs(global_nvs_t *gnvs)
{
- gnvs->apic = 1;
- gnvs->mpen = 1; /* Enable Multi Processing */
- gnvs->pcnt = dev_count_cpu();
-
/* Enable USB ports in S3 */
gnvs->s3u0 = 1;
gnvs->s3u1 = 1;
@@ -90,16 +86,10 @@ void acpi_create_gnvs(global_nvs_t *gnvs)
gnvs->did[4] = 0x00000005;
#if CONFIG_CHROMEOS
- // TODO(reinauer) this could move elsewhere?
- chromeos_init_vboot(&(gnvs->chromeos));
-
// SuperIO is always RO
gnvs->chromeos.vbt2 = ACTIVE_ECFW_RO;
#endif
- /* Update the mem console pointer. */
- gnvs->cbmc = (u32)cbmem_find(CBMEM_ID_CONSOLE);
-
acpi_update_thermal_table(gnvs);
}
diff --git a/src/mainboard/google/peppy/acpi_tables.c b/src/mainboard/google/peppy/acpi_tables.c
index 84b0ab5db9..265fe654eb 100644
--- a/src/mainboard/google/peppy/acpi_tables.c
+++ b/src/mainboard/google/peppy/acpi_tables.c
@@ -58,10 +58,6 @@ static void acpi_update_thermal_table(global_nvs_t *gnvs)
void acpi_create_gnvs(global_nvs_t *gnvs)
{
- gnvs->apic = 1;
- gnvs->mpen = 1; /* Enable Multi Processing */
- gnvs->pcnt = dev_count_cpu();
-
/* Enable USB ports in S3 */
gnvs->s3u0 = 1;
gnvs->s3u1 = 1;
@@ -82,16 +78,10 @@ void acpi_create_gnvs(global_nvs_t *gnvs)
gnvs->did[4] = 0x00000005;
#if CONFIG_CHROMEOS
- // TODO(reinauer) this could move elsewhere?
- chromeos_init_vboot(&(gnvs->chromeos));
-
gnvs->chromeos.vbt2 = google_ec_running_ro() ?
ACTIVE_ECFW_RO : ACTIVE_ECFW_RW;
#endif
- /* Update the mem console pointer. */
- gnvs->cbmc = (u32)cbmem_find(CBMEM_ID_CONSOLE);
-
acpi_update_thermal_table(gnvs);
}
diff --git a/src/mainboard/google/samus/acpi_tables.c b/src/mainboard/google/samus/acpi_tables.c
index 4179b7cd88..1978494014 100644
--- a/src/mainboard/google/samus/acpi_tables.c
+++ b/src/mainboard/google/samus/acpi_tables.c
@@ -49,10 +49,6 @@ static void acpi_update_thermal_table(global_nvs_t *gnvs)
void acpi_create_gnvs(global_nvs_t *gnvs)
{
- gnvs->apic = 1;
- gnvs->mpen = 1; /* Enable Multi Processing */
- gnvs->pcnt = dev_count_cpu();
-
/* Enable USB ports in S3 */
gnvs->s3u0 = 1;
gnvs->s3u1 = 1;
@@ -73,16 +69,10 @@ void acpi_create_gnvs(global_nvs_t *gnvs)
gnvs->did[4] = 0x00000005;
#if CONFIG_CHROMEOS
- // TODO(reinauer) this could move elsewhere?
- chromeos_init_vboot(&(gnvs->chromeos));
-
gnvs->chromeos.vbt2 = google_ec_running_ro() ?
ACTIVE_ECFW_RO : ACTIVE_ECFW_RW;
#endif
- /* Update the mem console pointer. */
- gnvs->cbmc = (u32)cbmem_find(CBMEM_ID_CONSOLE);
-
acpi_update_thermal_table(gnvs);
}
diff --git a/src/mainboard/google/slippy/acpi_tables.c b/src/mainboard/google/slippy/acpi_tables.c
index d2c18f8b49..3b851c46be 100644
--- a/src/mainboard/google/slippy/acpi_tables.c
+++ b/src/mainboard/google/slippy/acpi_tables.c
@@ -55,10 +55,6 @@ static void acpi_update_thermal_table(global_nvs_t *gnvs)
void acpi_create_gnvs(global_nvs_t *gnvs)
{
- gnvs->apic = 1;
- gnvs->mpen = 1; /* Enable Multi Processing */
- gnvs->pcnt = dev_count_cpu();
-
/* Enable USB ports in S3 */
gnvs->s3u0 = 1;
gnvs->s3u1 = 1;
@@ -79,16 +75,10 @@ void acpi_create_gnvs(global_nvs_t *gnvs)
gnvs->did[4] = 0x00000005;
#if CONFIG_CHROMEOS
- // TODO(reinauer) this could move elsewhere?
- chromeos_init_vboot(&(gnvs->chromeos));
-
gnvs->chromeos.vbt2 = google_ec_running_ro() ?
ACTIVE_ECFW_RO : ACTIVE_ECFW_RW;
#endif
- /* Update the mem console pointer. */
- gnvs->cbmc = (u32)cbmem_find(CBMEM_ID_CONSOLE);
-
acpi_update_thermal_table(gnvs);
}
diff --git a/src/mainboard/intel/baskingridge/acpi_tables.c b/src/mainboard/intel/baskingridge/acpi_tables.c
index 8149224be0..d5a5f03d80 100644
--- a/src/mainboard/intel/baskingridge/acpi_tables.c
+++ b/src/mainboard/intel/baskingridge/acpi_tables.c
@@ -65,10 +65,6 @@ static void acpi_update_thermal_table(global_nvs_t *gnvs)
void acpi_create_gnvs(global_nvs_t *gnvs)
{
- gnvs->apic = 1;
- gnvs->mpen = 1; /* Enable Multi Processing */
- gnvs->pcnt = dev_count_cpu();
-
/* Enable USB ports in S3 */
gnvs->s3u0 = 1;
gnvs->s3u1 = 1;
@@ -92,15 +88,10 @@ void acpi_create_gnvs(global_nvs_t *gnvs)
gnvs->did[4] = 0x00000005;
#if CONFIG_CHROMEOS
- // TODO(reinauer) this could move elsewhere?
- chromeos_init_vboot(&(gnvs->chromeos));
/* Emerald Lake has no EC (?) */
gnvs->chromeos.vbt2 = ACTIVE_ECFW_RO;
#endif
- /* Update the mem console pointer. */
- gnvs->cbmc = (u32)cbmem_find(CBMEM_ID_CONSOLE);
-
acpi_update_thermal_table(gnvs);
}
diff --git a/src/mainboard/intel/wtm2/acpi_tables.c b/src/mainboard/intel/wtm2/acpi_tables.c
index 3daf192432..20814ab676 100644
--- a/src/mainboard/intel/wtm2/acpi_tables.c
+++ b/src/mainboard/intel/wtm2/acpi_tables.c
@@ -65,10 +65,6 @@ static void acpi_update_thermal_table(global_nvs_t *gnvs)
void acpi_create_gnvs(global_nvs_t *gnvs)
{
- gnvs->apic = 1;
- gnvs->mpen = 1; /* Enable Multi Processing */
- gnvs->pcnt = dev_count_cpu();
-
/* Enable USB ports in S3 */
gnvs->s3u0 = 1;
gnvs->s3u1 = 1;
@@ -89,15 +85,10 @@ void acpi_create_gnvs(global_nvs_t *gnvs)
gnvs->did[4] = 0x00000005;
#if CONFIG_CHROMEOS
- // TODO(reinauer) this could move elsewhere?
- chromeos_init_vboot(&(gnvs->chromeos));
/* Emerald Lake has no EC (?) */
gnvs->chromeos.vbt2 = ACTIVE_ECFW_RO;
#endif
- /* Update the mem console pointer. */
- gnvs->cbmc = (u32)cbmem_find(CBMEM_ID_CONSOLE);
-
acpi_update_thermal_table(gnvs);
}
diff --git a/src/southbridge/intel/lynxpoint/lpc.c b/src/southbridge/intel/lynxpoint/lpc.c
index 9e860d0d5c..64b835f870 100644
--- a/src/southbridge/intel/lynxpoint/lpc.c
+++ b/src/southbridge/intel/lynxpoint/lpc.c
@@ -756,7 +756,20 @@ static void southbridge_inject_dsdt(void)
if (gnvs) {
int scopelen;
+
acpi_create_gnvs(gnvs);
+
+ gnvs->apic = 1;
+ gnvs->mpen = 1; /* Enable Multi Processing */
+ gnvs->pcnt = dev_count_cpu();
+
+#if CONFIG_CHROMEOS
+ chromeos_init_vboot(&(gnvs->chromeos));
+#endif
+
+ /* Update the mem console pointer. */
+ gnvs->cbmc = (u32)cbmem_find(CBMEM_ID_CONSOLE);
+
acpi_save_gnvs((unsigned long)gnvs);
/* And tell SMI about it */
smm_setup_structures(gnvs, NULL, NULL);