From 3487095304dbbbf66de86f8bce0e40b7acb3ea27 Mon Sep 17 00:00:00 2001 From: Furquan Shaikh Date: Tue, 23 Oct 2018 07:29:42 -0700 Subject: mb/google/octopus: Use DIMM_INFO_PART_NUMBER_SIZE for part_num_store This change uses DIMM_INFO_PART_NUMBER_SIZE to decide the size of part_num_store that holds the number of DRAM part. It ensures that host advertises the supported size to read part number from the EC. BUG=b:115697578 Change-Id: I8439a301fc037b0acdc8b1226ad04d2f363838ef Signed-off-by: Furquan Shaikh Reviewed-on: https://review.coreboot.org/29241 Tested-by: build bot (Jenkins) Reviewed-by: Aaron Durbin Reviewed-by: Justin TerAvest Reviewed-by: Karthik Ramasubramanian Reviewed-by: Jett Rink --- src/mainboard/google/octopus/romstage.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/mainboard/google/octopus/romstage.c') diff --git a/src/mainboard/google/octopus/romstage.c b/src/mainboard/google/octopus/romstage.c index 9e5734bb67..43349a0660 100644 --- a/src/mainboard/google/octopus/romstage.c +++ b/src/mainboard/google/octopus/romstage.c @@ -17,6 +17,7 @@ #include #include #include +#include #include #include @@ -33,7 +34,7 @@ static void save_dimm_info_by_sku_config(void) void mainboard_save_dimm_info(void) { - char part_num_store[32]; + char part_num_store[DIMM_INFO_PART_NUMBER_SIZE]; const char *part_num = NULL; if (!IS_ENABLED(CONFIG_DRAM_PART_NUM_IN_CBI)) { -- cgit v1.2.3