tests: Add lib/spd_cache-test test case

Signed-off-by: Jakub Czapiga <jacz@semihalf.com>
Change-Id: Ic9a1420e49e1e80d180117c931e630e54c90cd75
Reviewed-on: https://review.coreboot.org/c/coreboot/+/52938
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Paul Fagerburg <pfagerburg@chromium.org>
This commit is contained in:
Jakub Czapiga
2021-04-22 20:14:02 +02:00
committed by Patrick Georgi
parent bfa60433cb
commit 2b8d7216ef
3 changed files with 387 additions and 0 deletions

View File

@@ -28,6 +28,8 @@ tests-y += bootmem-test
tests-y += dimm_info_util-test
tests-y += coreboot_table-test
tests-y += rtc-test
tests-y += spd_cache-ddr3-test
tests-y += spd_cache-ddr4-test
string-test-srcs += tests/lib/string-test.c
string-test-srcs += src/lib/string.c
@@ -144,3 +146,24 @@ coreboot_table-test-mocks += cbmem_top_chipset
rtc-test-srcs += tests/lib/rtc-test.c
rtc-test-srcs += src/lib/rtc.c
spd_cache-ddr3-test-srcs += tests/lib/spd_cache-test.c
spd_cache-ddr3-test-srcs += tests/stubs/console.c
spd_cache-ddr3-test-srcs += src/lib/spd_cache.c
spd_cache-ddr3-test-srcs += src/lib/crc_byte.c
spd_cache-ddr3-test-srcs += src/commonlib/region.c
spd_cache-ddr3-test-mocks += fmap_locate_area_as_rdev
spd_cache-ddr3-test-config += CONFIG_SPD_CACHE_FMAP_NAME=\"RW_SPD_CACHE\" \
CONFIG_DIMM_MAX=4 CONFIG_DIMM_SPD_SIZE=256 \
CONFIG_BOOT_DEVICE_MEMORY_MAPPED=1
spd_cache-ddr3-test-cflags += -D__TEST_SPD_CACHE_DDR=3
spd_cache-ddr4-test-srcs += tests/lib/spd_cache-test.c
spd_cache-ddr4-test-srcs += tests/stubs/console.c
spd_cache-ddr4-test-srcs += src/lib/spd_cache.c
spd_cache-ddr4-test-srcs += src/lib/crc_byte.c
spd_cache-ddr4-test-srcs += src/commonlib/region.c
spd_cache-ddr4-test-mocks += fmap_locate_area_as_rdev
spd_cache-ddr4-test-config += CONFIG_SPD_CACHE_FMAP_NAME=\"RW_SPD_CACHE\" \
CONFIG_DIMM_MAX=4 CONFIG_DIMM_SPD_SIZE=512 \
CONFIG_BOOT_DEVICE_MEMORY_MAPPED=1
spd_cache-ddr4-test-cflags += -D__TEST_SPD_CACHE_DDR=4