diff options
Diffstat (limited to 'src/mainboard/emulation/qemu-q35')
-rw-r--r-- | src/mainboard/emulation/qemu-q35/Kconfig | 3 | ||||
-rw-r--r-- | src/mainboard/emulation/qemu-q35/Makefile.inc | 5 | ||||
-rw-r--r-- | src/mainboard/emulation/qemu-q35/romstage.c | 16 |
3 files changed, 22 insertions, 2 deletions
diff --git a/src/mainboard/emulation/qemu-q35/Kconfig b/src/mainboard/emulation/qemu-q35/Kconfig index 1ceb62c968..815b93b012 100644 --- a/src/mainboard/emulation/qemu-q35/Kconfig +++ b/src/mainboard/emulation/qemu-q35/Kconfig @@ -11,7 +11,8 @@ config BOARD_SPECIFIC_OPTIONS select BOARD_ROMSIZE_KB_2048 select MAINBOARD_HAS_NATIVE_VGA_INIT select MAINBOARD_FORCE_NATIVE_VGA_INIT - select NO_CAR_GLOBAL_MIGRATION + select POSTCAR_STAGE + select POSTCAR_CONSOLE config MAINBOARD_DIR string diff --git a/src/mainboard/emulation/qemu-q35/Makefile.inc b/src/mainboard/emulation/qemu-q35/Makefile.inc index a52aad42fc..b18d2e4f97 100644 --- a/src/mainboard/emulation/qemu-q35/Makefile.inc +++ b/src/mainboard/emulation/qemu-q35/Makefile.inc @@ -3,4 +3,9 @@ ramstage-y += ../qemu-i440fx/memory.c ramstage-y += ../qemu-i440fx/fw_cfg.c romstage-y += ../qemu-i440fx/memory.c romstage-y += ../qemu-i440fx/fw_cfg.c + +postcar-y += ../qemu-i440fx/memory.c +postcar-y += ../qemu-i440fx/exit_car.S +postcar-y += ../qemu-i440fx/fw_cfg.c + bootblock-y += bootblock.c diff --git a/src/mainboard/emulation/qemu-q35/romstage.c b/src/mainboard/emulation/qemu-q35/romstage.c index 2b8d9351c0..3e0870ffec 100644 --- a/src/mainboard/emulation/qemu-q35/romstage.c +++ b/src/mainboard/emulation/qemu-q35/romstage.c @@ -24,6 +24,7 @@ asmlinkage void car_stage_entry(void) { + struct postcar_frame pcf; i82801ix_early_init(); console_init(); @@ -31,5 +32,18 @@ asmlinkage void car_stage_entry(void) 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); } |