Rob Barnes has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/45343 )
Change subject: device/dram: Add method for converting MHz to MT/s ......................................................................
Patch Set 6:
(4 comments)
https://review.coreboot.org/c/coreboot/+/45343/1/src/device/dram/ddr4.c File src/device/dram/ddr4.c:
https://review.coreboot.org/c/coreboot/+/45343/1/src/device/dram/ddr4.c@24 PS1, Line 24: 800,
That would be false advertising, though. […]
Rounding to the closest standard speed grade does not follow the spec. e.g. 935 MHZ is explicitly in the 2133 speed grade range, not 1866.
Another approach would be to report the standard speed grade in the SMBIOS type 17 "max speed" field and the unrounded speed in the "configured speed" field.
https://review.coreboot.org/c/coreboot/+/45343/3/src/device/dram/ddr4.c File src/device/dram/ddr4.c:
https://review.coreboot.org/c/coreboot/+/45343/3/src/device/dram/ddr4.c@69 PS3, Line 69: 1466
No, just questioning since 1067 will get doubled to 2133, should we not have 2933 include 1467 MHz a […]
I prefer to follow the spec. If this fails it should be fixed at the source of the data.
https://review.coreboot.org/c/coreboot/+/45343/5/src/device/dram/ddr4.c File src/device/dram/ddr4.c:
https://review.coreboot.org/c/coreboot/+/45343/5/src/device/dram/ddr4.c@144 PS5, Line 144: DDR4_MIN; speed <= DDR4_MAX
Can be done using ARRAY_SIZE().
Done
https://review.coreboot.org/c/coreboot/+/45343/5/src/device/dram/ddr4.c@145 PS5, Line 145: speed_attr = ddr4_speeds[speed]
*speed_attr = &ddr4_speeds[speed]
Done