memory_info: add max_speed_mts and configured_speed_mts

ddr_frequency is ambiguous and is interpreted differently in several
places. Instead of renaming this field, this deprecates it and adds
two new fields with unambiguous naming, max_speed_mts and
configured_speed_mts. smbios.c falls back to using ddr_frequency
when either of these fields are 0.

The same value was being used for both configured memory speed and
max memory speed in SMBIOS type 17, which is not accurate when
configured speed is not the max speed.

BUG=b:167218112
TEST=Boot ezkinil, no change to dmidecode -t17

Change-Id: Iaa75401f9fc33642dbdce6c69bd9b20f96d1cc25
Signed-off-by: Rob Barnes <robbarnes@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/44549
Reviewed-by: Furquan Shaikh <furquan@google.com>
Reviewed-by: Raul Rangel <rrangel@chromium.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
diff --git a/src/include/memory_info.h b/src/include/memory_info.h
index f4a2009..d9d9c37 100644
--- a/src/include/memory_info.h
+++ b/src/include/memory_info.h
@@ -28,6 +28,10 @@
 	 * See the smbios.h smbios_memory_type enum.
 	 */
 	uint16_t ddr_type;
+	/*
+	 * ddr_frequency is deprecated.
+	 * Use max_speed_mts and configured_speed_mts instead.
+	 */
 	uint16_t ddr_frequency;
 	uint8_t rank_per_dimm;
 	uint8_t channel_num;
@@ -79,6 +83,16 @@
 	 * Voltage Level
 	 */
 	uint16_t vdd_voltage;
+	/*
+	 * Max speed in MT/s
+	 * If the value is 0, ddr_frequency should be used instead.
+	 */
+	uint16_t max_speed_mts;
+	/*
+	 * Configured speed in MT/s
+	 * If the value is 0, ddr_frequency should be used instead.
+	 */
+	uint16_t configured_speed_mts;
 } __packed;
 
 struct memory_info {