Arthur Heymans has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/32998
Change subject: soc/intel/quark: Don't use CAR_GLOBAL ......................................................................
soc/intel/quark: Don't use CAR_GLOBAL
This soc has NO_CAR_GLOBAL_MIGRATION and does not require CAR_GLOBAL and car_get/set_x.
Change-Id: I4e2c1c5766e3bcdd4763b42fb925074f7ccd7002 Signed-off-by: Arthur Heymans arthur@aheymans.xyz --- M src/soc/intel/quark/romstage/fsp2_0.c M src/soc/intel/quark/romstage/romstage.c M src/soc/intel/quark/storage_test.c 3 files changed, 13 insertions(+), 17 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/98/32998/1
diff --git a/src/soc/intel/quark/romstage/fsp2_0.c b/src/soc/intel/quark/romstage/fsp2_0.c index e4abcc0..d8daaf9 100644 --- a/src/soc/intel/quark/romstage/fsp2_0.c +++ b/src/soc/intel/quark/romstage/fsp2_0.c @@ -13,7 +13,6 @@ * GNU General Public License for more details. */
-#include <arch/early_variables.h> #include <console/console.h> #include <cbmem.h> #include "../chip.h" @@ -85,20 +84,19 @@ run_postcar_phase(&pcf); }
-static struct chipset_power_state power_state CAR_GLOBAL; +static struct chipset_power_state power_state;
struct chipset_power_state *get_power_state(void) { - return (struct chipset_power_state *)car_get_var_ptr(&power_state); + return &power_state; }
int fill_power_state(void) { - struct chipset_power_state *ps = get_power_state(); - - ps->prev_sleep_state = 0; - printk(BIOS_SPEW, "prev_sleep_state %d\n", ps->prev_sleep_state); - return ps->prev_sleep_state; + power_state.prev_sleep_state = 0; + printk(BIOS_SPEW, "prev_sleep_state %d\n", + power_state.prev_sleep_state); + return power_state.prev_sleep_state; }
void platform_fsp_memory_init_params_cb(FSPM_UPD *fspm_upd, uint32_t version) diff --git a/src/soc/intel/quark/romstage/romstage.c b/src/soc/intel/quark/romstage/romstage.c index f2a280e..4ac580e 100644 --- a/src/soc/intel/quark/romstage/romstage.c +++ b/src/soc/intel/quark/romstage/romstage.c @@ -14,7 +14,6 @@ * GNU General Public License for more details. */
-#include <arch/early_variables.h> #include <cbfs.h> #include <console/console.h> #include <fsp/util.h> diff --git a/src/soc/intel/quark/storage_test.c b/src/soc/intel/quark/storage_test.c index bdf86b1..d79ae7b 100644 --- a/src/soc/intel/quark/storage_test.c +++ b/src/soc/intel/quark/storage_test.c @@ -13,7 +13,6 @@ * GNU General Public License for more details. */
-#include <arch/early_variables.h> #include <device/pci_ops.h> #include <assert.h> #include <cbmem.h> @@ -29,13 +28,13 @@ #include <string.h>
#if CONFIG(STORAGE_LOG) -struct log_entry log[LOG_ENTRIES] CAR_GLOBAL; -uint8_t log_index CAR_GLOBAL; -int log_full CAR_GLOBAL; -long log_start_time CAR_GLOBAL; +struct log_entry log[LOG_ENTRIES]; +uint8_t log_index; +int log_full; +long log_start_time; #endif
-static uint8_t drivers_storage[256] CAR_GLOBAL; +static uint8_t drivers_storage[256];
#define STORAGE_DEBUG BIOS_DEBUG #define LOG_DEBUG (CONFIG(STORAGE_LOG) ? STORAGE_DEBUG : BIOS_NEVER) @@ -175,7 +174,7 @@ /* Get the structure addresses */ media = NULL; if (ENV_ROMSTAGE) - media = car_get_var_ptr(drivers_storage); + media = drivers_storage; else media = cbmem_find(CBMEM_ID_STORAGE_DATA); sdhci_ctrlr = (void *)(((uintptr_t)(media + 1) + 0x7) & ~7); @@ -255,7 +254,7 @@ sdhci_ctrlr = (void *)(((uintptr_t)(media + 1) + 0x7) & ~7);
/* Migrate the data into CBMEM */ - memcpy(media, car_get_var_ptr(drivers_storage), size); + memcpy(media, drivers_storage, size); media->ctrlr = &sdhci_ctrlr->sd_mmc_ctrlr; }
Hello build bot (Jenkins),
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/32998
to look at the new patch set (#2).
Change subject: soc/intel/quark: Don't use CAR_GLOBAL ......................................................................
soc/intel/quark: Don't use CAR_GLOBAL
This soc has NO_CAR_GLOBAL_MIGRATION and does not require CAR_GLOBAL and car_get/set_x.
Change-Id: I4e2c1c5766e3bcdd4763b42fb925074f7ccd7002 Signed-off-by: Arthur Heymans arthur@aheymans.xyz --- M src/soc/intel/quark/romstage/fsp2_0.c M src/soc/intel/quark/romstage/romstage.c M src/soc/intel/quark/storage_test.c 3 files changed, 14 insertions(+), 17 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/98/32998/2
Kyösti Mälkki has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/32998 )
Change subject: soc/intel/quark: Don't use CAR_GLOBAL ......................................................................
Patch Set 4:
(1 comment)
https://review.coreboot.org/#/c/32998/4/src/soc/intel/quark/storage_test.c File src/soc/intel/quark/storage_test.c:
https://review.coreboot.org/#/c/32998/4/src/soc/intel/quark/storage_test.c@3... PS4, Line 34: long log_start_time; I can't see why these are declared with extern in storage_test.h.
Patrick Georgi has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/32998 )
Change subject: soc/intel/quark: Don't use CAR_GLOBAL ......................................................................
Patch Set 5: Code-Review+2
Patrick Georgi has submitted this change and it was merged. ( https://review.coreboot.org/c/coreboot/+/32998 )
Change subject: soc/intel/quark: Don't use CAR_GLOBAL ......................................................................
soc/intel/quark: Don't use CAR_GLOBAL
This soc has NO_CAR_GLOBAL_MIGRATION and does not require CAR_GLOBAL and car_get/set_x.
Change-Id: I4e2c1c5766e3bcdd4763b42fb925074f7ccd7002 Signed-off-by: Arthur Heymans arthur@aheymans.xyz Reviewed-on: https://review.coreboot.org/c/coreboot/+/32998 Reviewed-by: Patrick Georgi pgeorgi@google.com Tested-by: build bot (Jenkins) no-reply@coreboot.org --- M src/soc/intel/quark/romstage/fsp2_0.c M src/soc/intel/quark/romstage/romstage.c M src/soc/intel/quark/storage_test.c 3 files changed, 14 insertions(+), 17 deletions(-)
Approvals: build bot (Jenkins): Verified Patrick Georgi: Looks good to me, approved
diff --git a/src/soc/intel/quark/romstage/fsp2_0.c b/src/soc/intel/quark/romstage/fsp2_0.c index e4abcc0..5ebbacb 100644 --- a/src/soc/intel/quark/romstage/fsp2_0.c +++ b/src/soc/intel/quark/romstage/fsp2_0.c @@ -13,7 +13,7 @@ * GNU General Public License for more details. */
-#include <arch/early_variables.h> +#include <arch/symbols.h> #include <console/console.h> #include <cbmem.h> #include "../chip.h" @@ -85,20 +85,19 @@ run_postcar_phase(&pcf); }
-static struct chipset_power_state power_state CAR_GLOBAL; +static struct chipset_power_state power_state;
struct chipset_power_state *get_power_state(void) { - return (struct chipset_power_state *)car_get_var_ptr(&power_state); + return &power_state; }
int fill_power_state(void) { - struct chipset_power_state *ps = get_power_state(); - - ps->prev_sleep_state = 0; - printk(BIOS_SPEW, "prev_sleep_state %d\n", ps->prev_sleep_state); - return ps->prev_sleep_state; + power_state.prev_sleep_state = 0; + printk(BIOS_SPEW, "prev_sleep_state %d\n", + power_state.prev_sleep_state); + return power_state.prev_sleep_state; }
void platform_fsp_memory_init_params_cb(FSPM_UPD *fspm_upd, uint32_t version) diff --git a/src/soc/intel/quark/romstage/romstage.c b/src/soc/intel/quark/romstage/romstage.c index f2a280e..4ac580e 100644 --- a/src/soc/intel/quark/romstage/romstage.c +++ b/src/soc/intel/quark/romstage/romstage.c @@ -14,7 +14,6 @@ * GNU General Public License for more details. */
-#include <arch/early_variables.h> #include <cbfs.h> #include <console/console.h> #include <fsp/util.h> diff --git a/src/soc/intel/quark/storage_test.c b/src/soc/intel/quark/storage_test.c index bdf86b1..653466a 100644 --- a/src/soc/intel/quark/storage_test.c +++ b/src/soc/intel/quark/storage_test.c @@ -13,7 +13,6 @@ * GNU General Public License for more details. */
-#include <arch/early_variables.h> #include <device/pci_ops.h> #include <assert.h> #include <cbmem.h> @@ -29,13 +28,13 @@ #include <string.h>
#if CONFIG(STORAGE_LOG) -struct log_entry log[LOG_ENTRIES] CAR_GLOBAL; -uint8_t log_index CAR_GLOBAL; -int log_full CAR_GLOBAL; -long log_start_time CAR_GLOBAL; +struct log_entry log[LOG_ENTRIES]; +uint8_t log_index; +int log_full; +long log_start_time; #endif
-static uint8_t drivers_storage[256] CAR_GLOBAL; +static uint8_t drivers_storage[256];
#define STORAGE_DEBUG BIOS_DEBUG #define LOG_DEBUG (CONFIG(STORAGE_LOG) ? STORAGE_DEBUG : BIOS_NEVER) @@ -175,7 +174,7 @@ /* Get the structure addresses */ media = NULL; if (ENV_ROMSTAGE) - media = car_get_var_ptr(drivers_storage); + media = (struct storage_media *)drivers_storage; else media = cbmem_find(CBMEM_ID_STORAGE_DATA); sdhci_ctrlr = (void *)(((uintptr_t)(media + 1) + 0x7) & ~7); @@ -255,7 +254,7 @@ sdhci_ctrlr = (void *)(((uintptr_t)(media + 1) + 0x7) & ~7);
/* Migrate the data into CBMEM */ - memcpy(media, car_get_var_ptr(drivers_storage), size); + memcpy(media, drivers_storage, size); media->ctrlr = &sdhci_ctrlr->sd_mmc_ctrlr; }