From 9c07c8f53db10e1c93f41e37a9ba8a246fa0336e Mon Sep 17 00:00:00 2001 From: Duncan Laurie Date: Fri, 22 Mar 2013 11:08:39 -0700 Subject: 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 Reviewed-on: http://review.coreboot.org/2970 Tested-by: build bot (Jenkins) Reviewed-by: Ronald G. Minnich --- src/southbridge/intel/lynxpoint/lpc.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/southbridge/intel/lynxpoint/lpc.c') 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 #include #include +#include +#include +#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) -- cgit v1.2.3