From 08c2217192ad44c08cf8635d2de31c4fc32de071 Mon Sep 17 00:00:00 2001 From: Julius Werner Date: Thu, 28 Apr 2022 18:23:14 -0700 Subject: [PATCH] commonlib/mem_chip_info: Add clarifying documentation comments This patch just adds some comments to the recently merged mem_chip_info struct for communicating memory type information to the payload/OS, to clarify the expected format in which values are to be written into the fields. Signed-off-by: Julius Werner Change-Id: I2c28b3bdcdb13b7f270fb87a8f06e2cf448cddec Reviewed-on: https://review.coreboot.org/c/coreboot/+/63944 Tested-by: build bot (Jenkins) Reviewed-by: Shelley Chen --- .../bsd/include/commonlib/bsd/mem_chip_info.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/commonlib/bsd/include/commonlib/bsd/mem_chip_info.h b/src/commonlib/bsd/include/commonlib/bsd/mem_chip_info.h index d07f4d60d0..0d92b52acc 100644 --- a/src/commonlib/bsd/include/commonlib/bsd/mem_chip_info.h +++ b/src/commonlib/bsd/include/commonlib/bsd/mem_chip_info.h @@ -14,16 +14,16 @@ enum mem_chip_type { }; struct mem_chip_info { - uint8_t type; /* enum mem_chip_type */ + uint8_t type; /* enum mem_chip_type */ uint8_t num_channels; uint8_t reserved[6]; struct mem_chip_channel { - uint64_t density; - uint8_t io_width; - uint8_t manufacturer_id; - uint8_t revision_id[2]; + uint64_t density; /* number in _bytes_, not Megabytes! */ + uint8_t io_width; /* should be `8`, `16`, `32` or `64` */ + uint8_t manufacturer_id; /* raw value from MR5 */ + uint8_t revision_id[2]; /* raw values from MR6 and MR7 */ uint8_t reserved[4]; - uint8_t serial_id[8]; /* LPDDR5 only */ + uint8_t serial_id[8]; /* LPDDR5 only, MR47 - MR54 */ } channel[0]; };