Arthur Heymans has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/33002
Change subject: soc/intel/common/pmc: Don't use CAR_GLOBAL ......................................................................
soc/intel/common/pmc: Don't use CAR_GLOBAL
All platforms using this code use NO_CAR_GLOBAL_MIGRATION.
Change-Id: I426dee60521045db4711cd253432c65223a64b93 Signed-off-by: Arthur Heymans arthur@aheymans.xyz --- M src/soc/intel/common/block/pmc/pmclib.c 1 file changed, 3 insertions(+), 6 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/02/33002/1
diff --git a/src/soc/intel/common/block/pmc/pmclib.c b/src/soc/intel/common/block/pmc/pmclib.c index f58d362..564aacb 100644 --- a/src/soc/intel/common/block/pmc/pmclib.c +++ b/src/soc/intel/common/block/pmc/pmclib.c @@ -13,7 +13,6 @@ * GNU General Public License for more details. */
-#include <arch/early_variables.h> #include <arch/io.h> #include <device/mmio.h> #include <cbmem.h> @@ -27,7 +26,7 @@ #include <timer.h> #include <security/vboot/vboot_common.h>
-static struct chipset_power_state power_state CAR_GLOBAL; +static struct chipset_power_state power_state;
struct chipset_power_state *pmc_get_power_state(void) { @@ -38,7 +37,7 @@
/* cbmem is online but ptr is not populated yet */ if (ptr == NULL && !(ENV_RAMSTAGE || ENV_POSTCAR)) - return car_get_var_ptr(&power_state); + return &power_state;
return ptr; } @@ -46,16 +45,14 @@ static void migrate_power_state(int is_recovery) { struct chipset_power_state *ps_cbmem; - struct chipset_power_state *ps_car;
- ps_car = car_get_var_ptr(&power_state); ps_cbmem = cbmem_add(CBMEM_ID_POWER_STATE, sizeof(*ps_cbmem));
if (ps_cbmem == NULL) { printk(BIOS_DEBUG, "Not adding power state to cbmem!\n"); return; } - memcpy(ps_cbmem, ps_car, sizeof(*ps_cbmem)); + memcpy(ps_cbmem, &power_state, sizeof(*ps_cbmem)); } ROMSTAGE_CBMEM_INIT_HOOK(migrate_power_state)