summaryrefslogtreecommitdiff
path: root/src/mainboard/emulation/qemu-i440fx/romstage.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mainboard/emulation/qemu-i440fx/romstage.c')
-rw-r--r--src/mainboard/emulation/qemu-i440fx/romstage.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/mainboard/emulation/qemu-i440fx/romstage.c b/src/mainboard/emulation/qemu-i440fx/romstage.c
index e31394c282..e1d4f62708 100644
--- a/src/mainboard/emulation/qemu-i440fx/romstage.c
+++ b/src/mainboard/emulation/qemu-i440fx/romstage.c
@@ -23,11 +23,25 @@
asmlinkage void car_stage_entry(void)
{
+ struct postcar_frame pcf;
+
console_init();
cbmem_recovery(0);
timestamp_add_now(TS_START_ROMSTAGE);
- run_ramstage();
+ /**
+ * The LZMA decoder needs about 4 KiB stack.
+ * Leave 1 KiB stack for general postcar code.
+ */
+ if (postcar_frame_init(&pcf, 5 * KiB))
+ die("Unable to initialize postcar frame.\n");
+
+ /**
+ * Run postcar to tear down CAR and load relocatable ramstage.
+ * There's no CAR on qemu, but for educational purposes and
+ * testing the postcar stage is used on qemu, too.
+ */
+ run_postcar_phase(&pcf);
}