bd82x6x, ibexpeak, lynxpoint: Ensure 0-filling of uninited GNVS vars.
Change-Id: I672c3ca9e7f30a21330cf1920a25b1ab38b3f282 Signed-off-by: Vladimir Serbinenko <phcoder@gmail.com> Reviewed-on: http://review.coreboot.org/7015 Tested-by: build bot (Jenkins) Reviewed-by: Aaron Durbin <adurbin@google.com>
This commit is contained in:
parent
60fccdc3d2
commit
7309c64d48
|
@ -33,6 +33,7 @@
|
|||
#include <arch/acpigen.h>
|
||||
#include <drivers/intel/gma/i915.h>
|
||||
#include <cbmem.h>
|
||||
#include <string.h>
|
||||
#include "pch.h"
|
||||
#include "nvs.h"
|
||||
|
||||
|
@ -680,6 +681,9 @@ static unsigned long southbridge_fill_ssdt(unsigned long current, const char *oe
|
|||
|
||||
if (gnvs) {
|
||||
int scopelen;
|
||||
|
||||
memset(gnvs, 0, sizeof (*gnvs));
|
||||
|
||||
acpi_create_gnvs(gnvs);
|
||||
/* IGD OpRegion Base Address */
|
||||
gnvs->aslb = (u32)opregion;
|
||||
|
|
|
@ -34,6 +34,7 @@
|
|||
#include <arch/acpigen.h>
|
||||
#include <drivers/intel/gma/i915.h>
|
||||
#include <cbmem.h>
|
||||
#include <string.h>
|
||||
#include "pch.h"
|
||||
#include "nvs.h"
|
||||
|
||||
|
@ -674,6 +675,9 @@ static unsigned long southbridge_fill_ssdt(unsigned long current, const char *oe
|
|||
|
||||
if (gnvs) {
|
||||
int scopelen;
|
||||
|
||||
memset(gnvs, 0, sizeof (*gnvs));
|
||||
|
||||
acpi_create_gnvs(gnvs);
|
||||
/* IGD OpRegion Base Address */
|
||||
gnvs->aslb = (u32)opregion;
|
||||
|
|
|
@ -745,7 +745,14 @@ static void set_subsystem(device_t dev, unsigned vendor, unsigned device)
|
|||
|
||||
static unsigned long southbridge_fill_ssdt(unsigned long current, const char *oem_table_id)
|
||||
{
|
||||
global_nvs_t *gnvs = cbmem_add (CBMEM_ID_ACPI_GNVS, sizeof (*gnvs));
|
||||
global_nvs_t *gnvs;
|
||||
|
||||
gnvs = cbmem_find(CBMEM_ID_ACPI_GNVS);
|
||||
if (!gnvs) {
|
||||
gnvs = cbmem_add(CBMEM_ID_ACPI_GNVS, sizeof (*gnvs));
|
||||
if (gnvs)
|
||||
memset(gnvs, 0, sizeof(*gnvs));
|
||||
}
|
||||
|
||||
if (gnvs) {
|
||||
int scopelen;
|
||||
|
|
Loading…
Reference in New Issue