summaryrefslogtreecommitdiff
path: root/src/southbridge/intel/lynxpoint
diff options
context:
space:
mode:
authorDuncan Laurie <dlaurie@chromium.org>2013-03-22 11:08:39 -0700
committerRonald G. Minnich <rminnich@gmail.com>2013-04-01 23:35:48 +0200
commit9c07c8f53db10e1c93f41e37a9ba8a246fa0336e (patch)
tree24347356fef788fdb27031e8bb50ce89f4e7f370 /src/southbridge/intel/lynxpoint
parentebf142a12ce4911b766bd618483434519efba0d5 (diff)
lynxpoint: Move ACPI NVS into separate CBMEM table
The ACPI NVS region was setup in place and there was a CBMEM table that pointed to it. In order to be able to use NVS earlier the CBMEM region is allocated for NVS itself during the LPC device init and the ACPI tables point to it in CBMEM. The current cbmem region is renamed to ACPI_GNVS_PTR to indicate that it is really a pointer to the GNVS and does not actually contain the GNVS. Change-Id: I31ace432411c7f825d86ca75c63dd79cd658e891 Signed-off-by: Duncan Laurie <dlaurie@chromium.org> Reviewed-on: http://review.coreboot.org/2970 Tested-by: build bot (Jenkins) Reviewed-by: Ronald G. Minnich <rminnich@gmail.com>
Diffstat (limited to 'src/southbridge/intel/lynxpoint')
-rw-r--r--src/southbridge/intel/lynxpoint/lpc.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/southbridge/intel/lynxpoint/lpc.c b/src/southbridge/intel/lynxpoint/lpc.c
index 2864876a83..f6c64c56a0 100644
--- a/src/southbridge/intel/lynxpoint/lpc.c
+++ b/src/southbridge/intel/lynxpoint/lpc.c
@@ -32,6 +32,9 @@
#include <cpu/cpu.h>
#include <cpu/x86/smm.h>
#include <elog.h>
+#include <cbmem.h>
+#include <string.h>
+#include "nvs.h"
#include "pch.h"
#define NMI_OFF 0
@@ -699,6 +702,8 @@ static void pch_lpc_add_io_resources(device_t dev)
static void pch_lpc_read_resources(device_t dev)
{
+ global_nvs_t *gnvs;
+
/* Get the normal PCI resources of this device. */
pci_dev_read_resources(dev);
@@ -707,6 +712,11 @@ static void pch_lpc_read_resources(device_t dev)
/* Add IO resources. */
pch_lpc_add_io_resources(dev);
+
+ /* Allocate ACPI NVS in CBMEM */
+ gnvs = cbmem_add(CBMEM_ID_ACPI_GNVS, sizeof(global_nvs_t));
+ if (gnvs)
+ memset(gnvs, 0, sizeof(global_nvs_t));
}
static void pch_lpc_enable_resources(device_t dev)