From 385743acbcbd7990e5b1ca2e2f5bd1db10e69ceb Mon Sep 17 00:00:00 2001 From: Vladimir Serbinenko Date: Sat, 18 Oct 2014 02:26:21 +0200 Subject: [PATCH] i945: Consolidate common GNVS init MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: Idc3522807b17e56bdaf8f04b4bd68c6ed9777363 Signed-off-by: Vladimir Serbinenko Reviewed-on: http://review.coreboot.org/7110 Reviewed-by: Kyösti Mälkki Reviewed-by: Edward O'Callaghan Tested-by: build bot (Jenkins) --- src/mainboard/apple/macbook21/acpi_tables.c | 4 ---- src/mainboard/getac/p470/acpi_tables.c | 4 ---- src/mainboard/ibase/mb899/acpi_tables.c | 4 ---- src/mainboard/intel/d945gclf/acpi_tables.c | 3 --- src/mainboard/kontron/986lcd-m/acpi_tables.c | 4 ---- src/mainboard/lenovo/t60/acpi_tables.c | 4 ---- src/mainboard/lenovo/x60/acpi_tables.c | 4 ---- src/mainboard/roda/rk886ex/acpi_tables.c | 4 ---- src/southbridge/intel/i82801gx/lpc.c | 4 ++++ 9 files changed, 4 insertions(+), 31 deletions(-) diff --git a/src/mainboard/apple/macbook21/acpi_tables.c b/src/mainboard/apple/macbook21/acpi_tables.c index ada7d086bf..c890677f54 100644 --- a/src/mainboard/apple/macbook21/acpi_tables.c +++ b/src/mainboard/apple/macbook21/acpi_tables.c @@ -33,10 +33,6 @@ #include "southbridge/intel/i82801gx/nvs.h" void acpi_create_gnvs(global_nvs_t *gnvs) { - memset((void *)gnvs, 0, sizeof(*gnvs)); - gnvs->apic = 1; - gnvs->mpen = 1; /* Enable Multi Processing */ - /* Enable both COM ports */ gnvs->cmap = 0x01; gnvs->cmbp = 0x01; diff --git a/src/mainboard/getac/p470/acpi_tables.c b/src/mainboard/getac/p470/acpi_tables.c index 1e22eae3dd..d421101eaf 100644 --- a/src/mainboard/getac/p470/acpi_tables.c +++ b/src/mainboard/getac/p470/acpi_tables.c @@ -35,10 +35,6 @@ void acpi_create_gnvs(global_nvs_t *gnvs) { - memset((void *)gnvs, 0, sizeof(*gnvs)); - gnvs->apic = 1; - gnvs->mpen = 1; /* Enable Multi Processing */ - /* Enable COM port(s) */ gnvs->cmap = 0x01; gnvs->cmbp = 0x00; diff --git a/src/mainboard/ibase/mb899/acpi_tables.c b/src/mainboard/ibase/mb899/acpi_tables.c index d7012d10d4..dba2953cfb 100644 --- a/src/mainboard/ibase/mb899/acpi_tables.c +++ b/src/mainboard/ibase/mb899/acpi_tables.c @@ -32,10 +32,6 @@ #include "southbridge/intel/i82801gx/nvs.h" void acpi_create_gnvs(global_nvs_t *gnvs) { - memset((void *)gnvs, 0, sizeof(*gnvs)); - gnvs->apic = 1; - gnvs->mpen = 1; /* Enable Multi Processing */ - /* Enable both COM ports */ gnvs->cmap = 0x01; gnvs->cmbp = 0x01; diff --git a/src/mainboard/intel/d945gclf/acpi_tables.c b/src/mainboard/intel/d945gclf/acpi_tables.c index a27ea57e3e..35c23a5498 100644 --- a/src/mainboard/intel/d945gclf/acpi_tables.c +++ b/src/mainboard/intel/d945gclf/acpi_tables.c @@ -33,9 +33,6 @@ void acpi_create_gnvs(global_nvs_t *gnvs) { - memset((void *)gnvs, 0, sizeof(*gnvs)); - gnvs->apic = 1; - gnvs->mpen = 1; /* Enable Multi Processing */ } unsigned long acpi_fill_madt(unsigned long current) diff --git a/src/mainboard/kontron/986lcd-m/acpi_tables.c b/src/mainboard/kontron/986lcd-m/acpi_tables.c index 0560f8a874..2e775ae3e0 100644 --- a/src/mainboard/kontron/986lcd-m/acpi_tables.c +++ b/src/mainboard/kontron/986lcd-m/acpi_tables.c @@ -32,10 +32,6 @@ #include "southbridge/intel/i82801gx/nvs.h" void acpi_create_gnvs(global_nvs_t *gnvs) { - memset((void *)gnvs, 0, sizeof(*gnvs)); - gnvs->apic = 1; - gnvs->mpen = 1; /* Enable Multi Processing */ - /* Enable both COM ports */ gnvs->cmap = 0x01; gnvs->cmbp = 0x01; diff --git a/src/mainboard/lenovo/t60/acpi_tables.c b/src/mainboard/lenovo/t60/acpi_tables.c index ada7d086bf..c890677f54 100644 --- a/src/mainboard/lenovo/t60/acpi_tables.c +++ b/src/mainboard/lenovo/t60/acpi_tables.c @@ -33,10 +33,6 @@ #include "southbridge/intel/i82801gx/nvs.h" void acpi_create_gnvs(global_nvs_t *gnvs) { - memset((void *)gnvs, 0, sizeof(*gnvs)); - gnvs->apic = 1; - gnvs->mpen = 1; /* Enable Multi Processing */ - /* Enable both COM ports */ gnvs->cmap = 0x01; gnvs->cmbp = 0x01; diff --git a/src/mainboard/lenovo/x60/acpi_tables.c b/src/mainboard/lenovo/x60/acpi_tables.c index ada7d086bf..c890677f54 100644 --- a/src/mainboard/lenovo/x60/acpi_tables.c +++ b/src/mainboard/lenovo/x60/acpi_tables.c @@ -33,10 +33,6 @@ #include "southbridge/intel/i82801gx/nvs.h" void acpi_create_gnvs(global_nvs_t *gnvs) { - memset((void *)gnvs, 0, sizeof(*gnvs)); - gnvs->apic = 1; - gnvs->mpen = 1; /* Enable Multi Processing */ - /* Enable both COM ports */ gnvs->cmap = 0x01; gnvs->cmbp = 0x01; diff --git a/src/mainboard/roda/rk886ex/acpi_tables.c b/src/mainboard/roda/rk886ex/acpi_tables.c index ada7d086bf..c890677f54 100644 --- a/src/mainboard/roda/rk886ex/acpi_tables.c +++ b/src/mainboard/roda/rk886ex/acpi_tables.c @@ -33,10 +33,6 @@ #include "southbridge/intel/i82801gx/nvs.h" void acpi_create_gnvs(global_nvs_t *gnvs) { - memset((void *)gnvs, 0, sizeof(*gnvs)); - gnvs->apic = 1; - gnvs->mpen = 1; /* Enable Multi Processing */ - /* Enable both COM ports */ gnvs->cmap = 0x01; gnvs->cmbp = 0x01; diff --git a/src/southbridge/intel/i82801gx/lpc.c b/src/southbridge/intel/i82801gx/lpc.c index 04efa3e2a5..6b9d11e19b 100644 --- a/src/southbridge/intel/i82801gx/lpc.c +++ b/src/southbridge/intel/i82801gx/lpc.c @@ -618,6 +618,10 @@ static void southbridge_inject_dsdt(void) if (gnvs) { memset(gnvs, 0, sizeof(*gnvs)); + + gnvs->apic = 1; + gnvs->mpen = 1; /* Enable Multi Processing */ + acpi_create_gnvs(gnvs); /* And tell SMI about it */ smm_setup_structures(gnvs, NULL, NULL);