Ravi Kumar Bokka has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/63407 )
Change subject: src/commonlib/bsd: Fix bugs introduced with CB:59195 ......................................................................
src/commonlib/bsd: Fix bugs introduced with CB:59195
BUG=b:182963902,b:177917361 TEST=Validated on qualcomm sc7280 development board
Signed-off-by: Ravi Kumar Bokka rbokka@codeaurora.org Change-Id: Iaada45d63b82c28495166024a9655d871ba65b20 --- M src/commonlib/bsd/include/commonlib/bsd/mem_chip_info.h 1 file changed, 7 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/07/63407/1
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 8dc6db3..d07f4d6 100644 --- a/src/commonlib/bsd/include/commonlib/bsd/mem_chip_info.h +++ b/src/commonlib/bsd/include/commonlib/bsd/mem_chip_info.h @@ -3,6 +3,8 @@ #ifndef _COMMONLIB_BSD_MEM_CHIP_INFO_H_ #define _COMMONLIB_BSD_MEM_CHIP_INFO_H_
+#include <stddef.h> + enum mem_chip_type { MEM_CHIP_DDR3 = 0x30, MEM_CHIP_LPDDR3 = 0x38, @@ -25,4 +27,9 @@ } channel[0]; };
+static inline size_t mem_chip_info_size(struct mem_chip_info *info) +{ + return sizeof(*info) + sizeof(info->channel[0]) * info->num_channels; +}; + #endif /* _COMMONLIB_BSD_MEM_CHIP_INFO_H_ */