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>
This commit is contained in:
committed by
Ronald G. Minnich
parent
ebf142a12c
commit
9c07c8f53d
@@ -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)
|
||||
|
Reference in New Issue
Block a user