ACPI: Drop redundant CBMEM_ID_ACPI_GNVS allocations
Allocation now happens prior to device enumeration. The step cbmem_add() is a no-op here, if reached for some boards. The memset() here is also redundant and becomes harmful with followup works, as it would wipe out the CBMEM console and ChromeOS related fields without them being set again. Change-Id: I9b2625af15cae90b9c1eb601e606d0430336609f Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/48701 Reviewed-by: Lance Zhao Reviewed-by: Angel Pons <th3fanbus@gmail.com> Reviewed-by: Nico Huber <nico.h@gmx.de> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
committed by
Nico Huber
parent
fb777b5da8
commit
3139c8dc05
@ -593,8 +593,6 @@ static void pch_lpc_add_io_resources(struct device *dev)
|
||||
|
||||
static void pch_lpc_read_resources(struct device *dev)
|
||||
{
|
||||
struct global_nvs *gnvs;
|
||||
|
||||
/* Get the normal PCI resources of this device. */
|
||||
pci_dev_read_resources(dev);
|
||||
|
||||
@ -603,11 +601,6 @@ static void pch_lpc_read_resources(struct device *dev)
|
||||
|
||||
/* Add IO resources. */
|
||||
pch_lpc_add_io_resources(dev);
|
||||
|
||||
/* Allocate ACPI NVS in CBMEM */
|
||||
gnvs = cbmem_add(CBMEM_ID_ACPI_GNVS, sizeof(struct global_nvs));
|
||||
if (!acpi_is_wakeup_s3() && gnvs)
|
||||
memset(gnvs, 0, sizeof(struct global_nvs));
|
||||
}
|
||||
|
||||
static void southcluster_inject_dsdt(const struct device *device)
|
||||
@ -615,11 +608,6 @@ static void southcluster_inject_dsdt(const struct device *device)
|
||||
struct global_nvs *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) {
|
||||
acpi_create_gnvs(gnvs);
|
||||
|
Reference in New Issue
Block a user