Angel Pons has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/47003 )
Change subject: soc/intel/broadwell/pei_data: Rename and retype fields ......................................................................
soc/intel/broadwell/pei_data: Rename and retype fields
This is to reduce the differences with Haswell MRC.
Tested with BUILD_TIMELESS=1, Purism Librem 13 v1 remains identical.
Change-Id: I6c33e7b897316bb34cbefccf79fc3065f69e7585 Signed-off-by: Angel Pons th3fanbus@gmail.com --- M src/soc/intel/broadwell/pei_data.h M src/soc/intel/broadwell/raminit.c M src/soc/intel/broadwell/refcode.c 3 files changed, 20 insertions(+), 20 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/03/47003/1
diff --git a/src/soc/intel/broadwell/pei_data.h b/src/soc/intel/broadwell/pei_data.h index 67d73d9..875f697 100644 --- a/src/soc/intel/broadwell/pei_data.h +++ b/src/soc/intel/broadwell/pei_data.h @@ -234,15 +234,15 @@ uint8_t dqs_map[2][8];
/* Data read from flash and passed into MRC */ - const void *saved_data; - int saved_data_size; + const void *mrc_input; + unsigned int mrc_input_len;
/* Disable use of saved data (can be set by mainboard) */ int disable_saved_data;
/* Data from MRC that should be saved to flash */ - void *data_to_save; - int data_to_save_size; + void *mrc_output; + unsigned int mrc_output_len; struct pei_memory_info meminfo; } __packed;
diff --git a/src/soc/intel/broadwell/raminit.c b/src/soc/intel/broadwell/raminit.c index 5339daa..a9b0d16 100644 --- a/src/soc/intel/broadwell/raminit.c +++ b/src/soc/intel/broadwell/raminit.c @@ -21,15 +21,15 @@
void save_mrc_data(struct pei_data *pei_data) { - printk(BIOS_DEBUG, "MRC data at %p %d bytes\n", pei_data->data_to_save, - pei_data->data_to_save_size); + printk(BIOS_DEBUG, "MRC data at %p %d bytes\n", pei_data->mrc_output, + pei_data->mrc_output_len);
- if (pei_data->data_to_save == NULL || !pei_data->data_to_save_size) + if (pei_data->mrc_output == NULL || !pei_data->mrc_output_len) return;
/* Save the MRC S3 restore data to cbmem */ - mrc_cache_stash_data(MRC_TRAINING_DATA, MRC_CACHE_VERSION, pei_data->data_to_save, - pei_data->data_to_save_size); + mrc_cache_stash_data(MRC_TRAINING_DATA, MRC_CACHE_VERSION, pei_data->mrc_output, + pei_data->mrc_output_len); }
static void prepare_mrc_cache(struct pei_data *pei_data) @@ -37,21 +37,21 @@ size_t mrc_size;
/* Preset just in case there is an error */ - pei_data->saved_data = NULL; - pei_data->saved_data_size = 0; + pei_data->mrc_input = NULL; + pei_data->mrc_input_len = 0;
- pei_data->saved_data = + pei_data->mrc_input = mrc_cache_current_mmap_leak(MRC_TRAINING_DATA, MRC_CACHE_VERSION, &mrc_size);
- if (!pei_data->saved_data) { + if (!pei_data->mrc_input) { printk(BIOS_DEBUG, "No MRC cache found.\n"); return; }
- pei_data->saved_data_size = mrc_size; + pei_data->mrc_input_len = mrc_size;
- printk(BIOS_DEBUG, "MRC data at %p %d bytes\n", pei_data->saved_data, - pei_data->saved_data_size); + printk(BIOS_DEBUG, "MRC data at %p %d bytes\n", pei_data->mrc_input, + pei_data->mrc_input_len); }
static const char *const ecc_decoder[] = { @@ -126,7 +126,7 @@ }
/* If MRC data is not found, we cannot continue S3 resume */ - if (pei_data->boot_mode == ACPI_S3 && !pei_data->saved_data) { + if (pei_data->boot_mode == ACPI_S3 && !pei_data->mrc_input) { post_code(POST_RESUME_FAILURE); printk(BIOS_DEBUG, "Giving up in %s: No MRC data\n", __func__); system_reset(); @@ -138,8 +138,8 @@ */ if (pei_data->disable_saved_data) { printk(BIOS_DEBUG, "Disabling PEI saved data by request\n"); - pei_data->saved_data = NULL; - pei_data->saved_data_size = 0; + pei_data->mrc_input = NULL; + pei_data->mrc_input_len = 0; }
/* Determine if mrc.bin is in the cbfs. */ diff --git a/src/soc/intel/broadwell/refcode.c b/src/soc/intel/broadwell/refcode.c index b3058d3..4ec1fc2 100644 --- a/src/soc/intel/broadwell/refcode.c +++ b/src/soc/intel/broadwell/refcode.c @@ -64,7 +64,7 @@ broadwell_fill_pei_data(&pei_data);
pei_data.boot_mode = acpi_is_wakeup_s3() ? ACPI_S3 : 0; - pei_data.saved_data = (void *) &dummy; + pei_data.mrc_input = (void *)&dummy;
entry = load_reference_code(); if (entry == NULL) {