nb/intel/haswell: Drop unnecessary variable
The "normalized" boot mode is only used in a single place, so there's no
need to use a variable. Also, reword the associated comment, which seems
to be unnecessarily vague: the hardcoded assumptions are inside the MRC.
Change-Id: I260d10f231f5de765d2675416d7047717d391d8f
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/43092
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tristan Corrick <tristan@corrick.kiwi>
diff --git a/src/cpu/intel/haswell/romstage.c b/src/cpu/intel/haswell/romstage.c
index 381d7bf..7886de0 100644
--- a/src/cpu/intel/haswell/romstage.c
+++ b/src/cpu/intel/haswell/romstage.c
@@ -15,7 +15,6 @@
void romstage_common(const struct romstage_params *params)
{
- int boot_mode;
int wake_from_s3;
enable_lapic();
@@ -37,16 +36,14 @@
#endif
}
- /* There are hard coded assumptions of 2 meaning s3 wake. Normalize
- * the users of the 2 literal here based off wake_from_s3. */
- boot_mode = wake_from_s3 ? 2 : 0;
-
/* Prepare USB controller early in S3 resume */
if (wake_from_s3)
enable_usb_bar();
post_code(0x3a);
- params->pei_data->boot_mode = boot_mode;
+
+ /* MRC has hardcoded assumptions of 2 meaning S3 wake. Normalize it here. */
+ params->pei_data->boot_mode = wake_from_s3 ? 2 : 0;
timestamp_add_now(TS_BEFORE_INITRAM);