coreboot/src/soc/amd/common
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
..
acpi soc/amd/common/acpi/upep: Add Low Power State Entry Notifications 2021-10-14 13:09:46 +00:00
block amd/lpc: Remove the weak function 2021-11-01 15:55:56 +00:00
fsp lib: Add new argument as ddr_type to smbios_bus_width_to_spd_width() 2021-11-02 08:13:25 +00:00
pi lib: Add new argument as ddr_type to smbios_bus_width_to_spd_width() 2021-11-02 08:13:25 +00:00
psp_verstage psp_verstage: remove psp_ef_table struct 2021-10-20 15:47:29 +00:00
vboot amd/vboot: remove bl_syscall_public.h from include 2021-04-23 16:33:44 +00:00
Kconfig.common soc/amd/common/psp_verstage: Introduce boot device driver 2021-09-27 13:40:03 +00:00
Makefile.inc soc/amd/common: move block/pi out of the block folder 2021-09-24 15:47:59 +00:00