coreboot-kgpe-d16/tests/lib
Subrata Banik 3306f37fd6 lib: Add new argument as `ddr_type` to smbios_bus_width_to_spd_width()
Add DDR5 and LPDDR5 memory type checks while calculating bus width
extension (in bits).

Additionally, update all caller functions of
smbios_bus_width_to_spd_width() to pass `MemoryType` as argument.

Update `test_smbios_bus_width_to_spd_width()` to accommodate
different memory types.

Create new macro to fix incorrect bus width reporting
on platform with DDR5 and LPDDR5 memory.

With this code changes, on DDR5 system with 2 Ch per DIMM, 32 bit
primary bus width per Ch showed the Total width as:

Handle 0x000F, DMI type 17, 40 bytes
Memory Device
	Array Handle: 0x0009
	Error Information Handle: Not Provided
	Total Width: 80 bits
	Data Width: 64 bits
	Size: 16 GB
	...

BUG=b:194659789
Tested=On Alder Lake DDR5 RVP, SMBIOS type 17 shows expected `Total Width`.

Change-Id: I79ec64c9d522a34cb44b3f575725571823048380
Signed-off-by: Subrata Banik <subrata.banik@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/58601
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Reviewed-by: Rob Barnes <robbarnes@google.com>
2021-11-02 08:13:25 +00:00
..
Makefile.inc tests: Add lib/lzma-test test case 2021-10-14 13:13:07 +00:00
b64_decode-test.c tests: Improve test output readability 2021-09-01 19:38:09 +00:00
bootmem-test.c tests: Improve test output readability 2021-09-01 19:38:09 +00:00
cbfs-lookup-test.c tests: Add lib/cbfs-lookup-test test case 2021-09-14 23:35:38 +00:00
cbfs-verification-test.c tests: Add lib/cbfs-verification-test test case 2021-09-02 00:31:02 +00:00
cbmem_console-test.c tests: Improve test output readability 2021-09-01 19:38:09 +00:00
cbmem_stage_cache-test.c tests: Improve test output readability 2021-09-01 19:38:09 +00:00
compute_ip_checksum-test.c tests: Improve test output readability 2021-09-01 19:38:09 +00:00
coreboot_table-test.c tests: Improve test output readability 2021-09-01 19:38:09 +00:00
crc_byte-test.c tests: Improve test output readability 2021-09-01 19:38:09 +00:00
dimm_info_util-test.c lib: Add new argument as `ddr_type` to smbios_bus_width_to_spd_width() 2021-11-02 08:13:25 +00:00
edid-test.c tests: Improve test output readability 2021-09-01 19:38:09 +00:00
fmap-test.c tests: Improve test output readability 2021-09-01 19:38:09 +00:00
hexstrtobin-test.c tests: Improve test output readability 2021-09-01 19:38:09 +00:00
imd-test.c tests: Improve test output readability 2021-09-01 19:38:09 +00:00
imd_cbmem-test.c tests: Improve test output readability 2021-09-01 19:38:09 +00:00
libgcc-test.c tests: Improve test output readability 2021-09-01 19:38:09 +00:00
list-test.c tests: Improve test output readability 2021-09-01 19:38:09 +00:00
lzma-test.c tests: Add lib/lzma-test test case 2021-10-14 13:13:07 +00:00
malloc-test.c tests: Improve test output readability 2021-09-01 19:38:09 +00:00
memchr-test.c tests: Improve test output readability 2021-09-01 19:38:09 +00:00
memcmp-test.c tests: Improve test output readability 2021-09-01 19:38:09 +00:00
memcpy-test.c tests: Improve test output readability 2021-09-01 19:38:09 +00:00
memmove-test.c tests: Improve test output readability 2021-09-01 19:38:09 +00:00
memrange-test.c tests: Improve test output readability 2021-09-01 19:38:09 +00:00
memset-test.c tests: Improve test output readability 2021-09-01 19:38:09 +00:00
region_file-test.c tests: Improve test output readability 2021-09-01 19:38:09 +00:00
rtc-test.c tests: Improve test output readability 2021-09-01 19:38:09 +00:00
spd_cache-test.c tests: Improve test output readability 2021-09-01 19:38:09 +00:00
stack-test.c tests: Improve test output readability 2021-09-01 19:38:09 +00:00
string-test.c tests: Improve test output readability 2021-09-01 19:38:09 +00:00
timestamp-test.c tests: Improve test output readability 2021-09-01 19:38:09 +00:00
uuid-test.c tests: Improve test output readability 2021-09-01 19:38:09 +00:00