mb/emulation/qemu: Add VBOOT support

Add VBOOT support for testing purposes.
Add a 16 MiB FMAP containing RO + RW_A.

Tested on qemu.

Change-Id: I4039d77de44ade68c7bc1f8b4b0aa21387c50f8a
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/35400
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
This commit is contained in:
Patrick Rudolph 2019-09-13 12:56:14 +02:00 committed by Patrick Georgi
parent b4741616ea
commit f8251b9860
6 changed files with 96 additions and 4 deletions

View File

@ -9,10 +9,33 @@ config BOARD_SPECIFIC_OPTIONS
select HAVE_CMOS_DEFAULT
select HAVE_PIRQ_TABLE
select HAVE_ACPI_TABLES
select BOARD_ROMSIZE_KB_256
select BOARD_ROMSIZE_KB_256 if !VBOOT
select BOARD_ROMSIZE_KB_16384 if VBOOT
select MAINBOARD_HAS_NATIVE_VGA_INIT
select MAINBOARD_FORCE_NATIVE_VGA_INIT
config VBOOT
select VBOOT_MUST_REQUEST_DISPLAY
select VBOOT_STARTS_IN_BOOTBLOCK
select VBOOT_SEPARATE_VERSTAGE
select VBOOT_VBNV_CMOS
select VBOOT_NO_BOARD_SUPPORT
select GBB_FLAG_DISABLE_LID_SHUTDOWN
select GBB_FLAG_DISABLE_PD_SOFTWARE_SYNC
select GBB_FLAG_DISABLE_EC_SOFTWARE_SYNC
select GBB_FLAG_DISABLE_FWMP
config VBOOT_SLOTS_RW_A
default y
config FMDFILE
string
default "src/mainboard/$(CONFIG_MAINBOARD_DIR)/vboot-rwa-16M.fmd" if VBOOT_SLOTS_RW_A
config VBOOT_VBNV_OFFSET
hex
default 0x2c
config MAINBOARD_DIR
string
default emulation/qemu-i440fx

View File

@ -7,6 +7,10 @@ entries
400 1 e 1 power_on_after_fail
412 4 e 6 debug_level
456 1 e 1 ECC_memory
# VBOOT
464 128 r 0 vbnv
1008 16 h 0 check_sum
enumerations
@ -25,4 +29,4 @@ enumerations
checksums
checksum 392 1007 1008
checksum 392 463 1008

View File

@ -0,0 +1,19 @@
FLASH@0xff000000 0x1000000 {
SI_BIOS 0x1000000 {
RW_SECTION_A 0x7c0000 {
VBLOCK_A 0x10000
FW_MAIN_A(CBFS) 0x74ffc0
RW_FWID_A 0x40
}
RW_VPD(PRESERVE) 0x1000
WP_RO {
FMAP 0x800
RO_FRID 0x40
RO_PADDING 0x7c0
RO_VPD(PRESERVE) 0x1000
GBB 0x1e000
COREBOOT(CBFS)
}
}
}

View File

@ -8,10 +8,33 @@ config BOARD_SPECIFIC_OPTIONS
select HAVE_OPTION_TABLE
# select HAVE_PIRQ_TABLE
select HAVE_ACPI_TABLES
select BOARD_ROMSIZE_KB_2048
select BOARD_ROMSIZE_KB_2048 if !VBOOT
select BOARD_ROMSIZE_KB_16384 if VBOOT
select MAINBOARD_HAS_NATIVE_VGA_INIT
select MAINBOARD_FORCE_NATIVE_VGA_INIT
config VBOOT
select VBOOT_MUST_REQUEST_DISPLAY
select VBOOT_STARTS_IN_BOOTBLOCK
select VBOOT_SEPARATE_VERSTAGE
select VBOOT_VBNV_CMOS
select VBOOT_NO_BOARD_SUPPORT
select GBB_FLAG_DISABLE_LID_SHUTDOWN
select GBB_FLAG_DISABLE_PD_SOFTWARE_SYNC
select GBB_FLAG_DISABLE_EC_SOFTWARE_SYNC
select GBB_FLAG_DISABLE_FWMP
config FMDFILE
string
default "src/mainboard/$(CONFIG_MAINBOARD_DIR)/vboot-rwa-16M.fmd" if VBOOT_SLOTS_RW_A
config VBOOT_SLOTS_RW_A
default y
config VBOOT_VBNV_OFFSET
hex
default 0x2c
config MAINBOARD_DIR
string
default emulation/qemu-q35

View File

@ -7,6 +7,10 @@ entries
400 1 e 1 power_on_after_fail
412 4 e 6 debug_level
456 1 e 1 ECC_memory
# VBOOT
464 128 r 0 vbnv
1008 16 h 0 check_sum
enumerations
@ -25,4 +29,4 @@ enumerations
checksums
checksum 392 1007 1008
checksum 392 463 1008

View File

@ -0,0 +1,19 @@
FLASH@0xff000000 0x1000000 {
SI_BIOS 0x1000000 {
RW_SECTION_A 0x7c0000 {
VBLOCK_A 0x10000
FW_MAIN_A(CBFS) 0x74ffc0
RW_FWID_A 0x40
}
RW_VPD(PRESERVE) 0x1000
WP_RO {
FMAP 0x800
RO_FRID 0x40
RO_PADDING 0x7c0
RO_VPD(PRESERVE) 0x1000
GBB 0x1e000
COREBOOT(CBFS)
}
}
}