From 3139c8dc05a363810b4dd9c45f01667760e22a58 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ky=C3=B6sti=20M=C3=A4lkki?= Date: Sun, 28 Jun 2020 16:33:33 +0300 Subject: ACPI: Drop redundant CBMEM_ID_ACPI_GNVS allocations MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-on: https://review.coreboot.org/c/coreboot/+/48701 Reviewed-by: Lance Zhao Reviewed-by: Angel Pons Reviewed-by: Nico Huber Tested-by: build bot (Jenkins) --- src/soc/intel/apollolake/acpi.c | 2 -- src/soc/intel/apollolake/chip.c | 4 ---- 2 files changed, 6 deletions(-) (limited to 'src/soc/intel/apollolake') diff --git a/src/soc/intel/apollolake/acpi.c b/src/soc/intel/apollolake/acpi.c index d0e7a73a3f..61d42a5407 100644 --- a/src/soc/intel/apollolake/acpi.c +++ b/src/soc/intel/apollolake/acpi.c @@ -77,8 +77,6 @@ void acpi_create_gnvs(struct global_nvs *gnvs) struct soc_intel_apollolake_config *cfg; cfg = config_of_soc(); - /* Clear out GNVS. */ - memset(gnvs, 0, sizeof(*gnvs)); if (CONFIG(CONSOLE_CBMEM)) gnvs->cbmc = (uintptr_t) cbmem_find(CBMEM_ID_CONSOLE); diff --git a/src/soc/intel/apollolake/chip.c b/src/soc/intel/apollolake/chip.c index fdbeef2d88..9670a31eba 100644 --- a/src/soc/intel/apollolake/chip.c +++ b/src/soc/intel/apollolake/chip.c @@ -28,7 +28,6 @@ #include #include #include -#include #include #include #include @@ -318,9 +317,6 @@ static void soc_init(void *data) */ p2sb_unhide(); - /* Allocate ACPI NVS in CBMEM */ - cbmem_add(CBMEM_ID_ACPI_GNVS, sizeof(struct global_nvs)); - if (CONFIG(APL_SKIP_SET_POWER_LIMITS)) { printk(BIOS_INFO, "Skip setting RAPL per configuration\n"); } else { -- cgit v1.2.3