efi: ESRT creation tests
authorJose Marinho <jose.marinho@arm.com>
Thu, 11 Mar 2021 13:18:52 +0000 (13:18 +0000)
committerHeinrich Schuchardt <xypron.glpk@gmx.de>
Thu, 25 Mar 2021 19:19:42 +0000 (20:19 +0100)
commit4ac6041c3cbf2e1ad751199a4645d95f87977579
tree35dc7561f730bf5c83af3c7c0660584e3cd6d03a
parentaa31a87d7a4aeaa0b784dcc97fdac0e4317a4573
efi: ESRT creation tests

This commmit exercises the ESRT creation in a EFI selftest.

 A fake FMP, with TEST_ESRT_NUM_ENTRIES FW images, is installed in the
 system leading to the corresponding ESRT entries being populated.
 The ESRT entries are checked against the datastructure used to
 initialize the FMP.

Invocation from the sandbox platform:
add to sandbox_defconfig:
  +CONFIG_CMD_BOOTEFI_SELFTEST=y

 make sandbox_capsule_defconfig all
 ./u-boot -d arch/sandbox/dts/test.dtb
 bootefi selftest

CC: Heinrich Schuchardt <xypron.glpk@gmx.de>
CC: Sughosh Ganu <sughosh.ganu@linaro.org>
CC: AKASHI Takahiro <takahiro.akashi@linaro.org>
CC: Ilias Apalodimas <ilias.apalodimas@linaro.org>
CC: Andre Przywara <andre.przywara@arm.com>
CC: Alexander Graf <agraf@csgraf.de>
CC: nd@arm.com
Signed-off-by: Jose Marinho <jose.marinho@arm.com>
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
lib/efi_selftest/Makefile
lib/efi_selftest/efi_selftest_esrt.c [new file with mode: 0644]