summaryrefslogtreecommitdiff
path: root/src/soc/intel
diff options
context:
space:
mode:
authorAaron Durbin <adurbin@chromium.org>2013-11-14 13:47:08 -0600
committerKyösti Mälkki <kyosti.malkki@gmail.com>2014-05-07 22:05:48 +0200
commitebf7ec5dab9198a0a84174e72b8eaf1af68d7b73 (patch)
tree47aa675a7d5ad412e6e90156e07a789dbc4116ef /src/soc/intel
parentee3ec728d86c83fbbaaa84bb72137dca7cd511a2 (diff)
baytrail: ensure init_chromeos() is called in romstage
The TPM needs to have the TPM_Startup command sent to it on all boot paths. The call init_chromeos() in romstage_common() fulfills this requirement. BUG=chrome-os-partner:24057 BRANCH=None TEST=Built and booted. Was able to suspend to ram multiple times in a row. Change-Id: Id0339a9d82897249d20ff5f62d2dcb8b535310fa Signed-off-by: Aaron Durbin <adurbin@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/176803 Reviewed-by: Todd Broch <tbroch@chromium.org> Tested-by: Todd Broch <tbroch@chromium.org> Reviewed-by: Shawn Nematbakhsh <shawnn@chromium.org> Reviewed-on: http://review.coreboot.org/4974 Tested-by: build bot (Jenkins) Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Diffstat (limited to 'src/soc/intel')
-rw-r--r--src/soc/intel/baytrail/romstage/romstage.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/soc/intel/baytrail/romstage/romstage.c b/src/soc/intel/baytrail/romstage/romstage.c
index 969e8487f9..91637d51ae 100644
--- a/src/soc/intel/baytrail/romstage/romstage.c
+++ b/src/soc/intel/baytrail/romstage/romstage.c
@@ -32,6 +32,7 @@
#include <ramstage_cache.h>
#include <romstage_handoff.h>
#include <timestamp.h>
+#include <vendorcode/google/chromeos/chromeos.h>
#include <baytrail/gpio.h>
#include <baytrail/iomap.h>
#include <baytrail/lpc.h>
@@ -179,6 +180,16 @@ static int chipset_prev_sleep_state(void)
return prev_sleep_state;
}
+#if CONFIG_CHROMEOS
+static inline void chromeos_init(int prev_sleep_state)
+{
+ /* Normalize the sleep state to what init_chromeos() wants for S3: 2. */
+ init_chromeos(prev_sleep_state == 3 ? 2 : 0);
+}
+#else
+static inline void chromeos_init(int prev_sleep_state) {}
+#endif
+
/* Entry from the mainboard. */
void romstage_common(struct romstage_params *params)
{
@@ -206,6 +217,8 @@ void romstage_common(struct romstage_params *params)
else
printk(BIOS_DEBUG, "Romstage handoff structure not added!\n");
+ chromeos_init(prev_sleep_state);
+
/* Save timestamp information. */
timestamp_init(ts64_to_tsc(params->ts.times[0]));
timestamp_add(TS_START_ROMSTAGE, ts64_to_tsc(params->ts.times[1]));