[coreboot-gerrit] Patch set updated for coreboot: soc/apollolake/bootblock: Add transition to romstage
Alexandru Gagniuc (mr.nuke.me@gmail.com)
gerrit at coreboot.org
Mon Jan 25 06:40:24 CET 2016
Alexandru Gagniuc (mr.nuke.me at gmail.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/13322
-gerrit
commit 9851ded4ed8982f6e693176ebb41e5764c360c10
Author: Andrey Petrov <andrey.petrov at intel.com>
Date: Tue Oct 27 12:43:44 2015 -0700
soc/apollolake/bootblock: Add transition to romstage
This adds calling romstage. Since by default romstage is ran from CAR,
a workaround is added as well to keep CAR executable.
Change-Id: Ied49a5695c6499ad0cfaf27e3ba6860a884a6684
Signed-off-by: Andrey Petrov <andrey.petrov at intel.com>
---
src/soc/intel/apollolake/bootblock/bootblock_car.c | 26 +++++++++++++++++++---
1 file changed, 23 insertions(+), 3 deletions(-)
diff --git a/src/soc/intel/apollolake/bootblock/bootblock_car.c b/src/soc/intel/apollolake/bootblock/bootblock_car.c
index e9cbb09..7dd359b 100644
--- a/src/soc/intel/apollolake/bootblock/bootblock_car.c
+++ b/src/soc/intel/apollolake/bootblock/bootblock_car.c
@@ -11,9 +11,11 @@
*/
#include <arch/io.h>
+#include <cbfs.h>
#include <console/console.h>
#include <device/pci.h>
#include <soc/bootblock.h>
+#include <soc/cpu.h>
#include <soc/uart.h>
static void disable_watchdog(void)
@@ -32,8 +34,18 @@ static void disable_watchdog(void)
outl(reg, 0x400 + 0x68);
}
+static void call_romstage(void *entry)
+{
+ __asm__ volatile (
+ "call *%0"
+ :: "r" (entry)
+ );
+}
+
void bootblock_car_main(void)
{
+ void *romstage_entry;
+
/* Quick post code to show we made it to C code */
outb(0x30, 0x80);
@@ -45,7 +57,15 @@ void bootblock_car_main(void)
/* Wait until after we have console to disable this */
disable_watchdog();
- /* Don't return, so we see the above post code */
- while (1)
- ;
+ romstage_entry = cbfs_boot_load_stage_by_name("fallback/romstage");
+ if (!romstage_entry)
+ die("romstage not found\n");
+
+ /* APLK workaround: do this magic to keep cache executable on update */
+ bxt_remark_cache_exec();
+
+ /* Call the romstage entry point */
+ call_romstage(romstage_entry);
+
+ /* We should never reach this */
}
More information about the coreboot-gerrit
mailing list