Angel Pons has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/43092 )
Change subject: nb/intel/haswell: Drop unnecessary variable
......................................................................
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(a)gmail.com>
---
M src/cpu/intel/haswell/romstage.c
1 file changed, 3 insertions(+), 6 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/92/43092/1
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);
--
To view, visit https://review.coreboot.org/c/coreboot/+/43092
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I260d10f231f5de765d2675416d7047717d391d8f
Gerrit-Change-Number: 43092
Gerrit-PatchSet: 1
Gerrit-Owner: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Reviewer: Patrick Rudolph <siro(a)das-labor.org>
Gerrit-MessageType: newchange
Felix Held has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/42363 )
Change subject: cpu,soc/amd: Consolidate smm_lock()
......................................................................
Patch Set 2:
(1 comment)
https://review.coreboot.org/c/coreboot/+/42363/2/src/cpu/amd/smm/smram_lock…
File src/cpu/amd/smm/smram_lock.c:
https://review.coreboot.org/c/coreboot/+/42363/2/src/cpu/amd/smm/smram_lock…
PS2, Line 13: if (hwcr.lo & SMM_LOCK) /* Skip if already locked, avoid GPF */
> Felix, Marshall: Can you check this and maybe improve the header? […]
Done. see CB:43309
--
To view, visit https://review.coreboot.org/c/coreboot/+/42363
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I993bac03d100644a35e6546d40adea1079292d5a
Gerrit-Change-Number: 42363
Gerrit-PatchSet: 2
Gerrit-Owner: Kyösti Mälkki <kyosti.malkki(a)gmail.com>
Gerrit-Reviewer: Felix Held <felix-coreboot(a)felixheld.de>
Gerrit-Reviewer: Martin Roth <martinroth(a)google.com>
Gerrit-Reviewer: Patrick Georgi <pgeorgi(a)google.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Comment-Date: Wed, 08 Jul 2020 22:15:03 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Kyösti Mälkki <kyosti.malkki(a)gmail.com>
Gerrit-MessageType: comment