[coreboot-gerrit] Change in coreboot[master]: soc/intel/apollolake: Use common function to fill DIMM infor...

Martin Roth (Code Review) gerrit at coreboot.org
Tue Mar 21 17:57:27 CET 2017


Martin Roth has submitted this change and it was merged. ( https://review.coreboot.org/18451 )

Change subject: soc/intel/apollolake: Use common function to fill DIMM information
......................................................................


soc/intel/apollolake: Use common function to fill DIMM information

Extract SMBIOS memory information from FSP SMBIOS_MEM_INFO_HOB
and use common function dimm_info_fill() to save it in CBMEM.

BUG=chrome-os-partner:61729
BRANCH=none
TEST=Build and boot Reef to verify the type 17 DIMM info coming in
SMBIOS table from Kernel command "dmidecode".

Change-Id: I33c3a0bebf33c53beadd745bc3d991e1e51050b7
Signed-off-by: Barnali Sarkar <barnali.sarkar at intel.com>
Reviewed-on: https://review.coreboot.org/18451
Tested-by: build bot (Jenkins)
Reviewed-by: Aaron Durbin <adurbin at chromium.org>
Reviewed-by: Philippe Mathieu-Daudé <philippe.mathieu.daude at gmail.com>
Reviewed-by: Pratikkumar V Prajapati <pratikkumar.v.prajapati at intel.com>
---
M src/soc/intel/apollolake/meminit.c
1 file changed, 10 insertions(+), 30 deletions(-)

Approvals:
  Aaron Durbin: Looks good to me, approved
  Pratikkumar V Prajapati: Looks good to me, but someone else must approve
  Philippe Mathieu-Daudé: Looks good to me, but someone else must approve
  build bot (Jenkins): Verified



diff --git a/src/soc/intel/apollolake/meminit.c b/src/soc/intel/apollolake/meminit.c
index 0f553ee..9546c19 100644
--- a/src/soc/intel/apollolake/meminit.c
+++ b/src/soc/intel/apollolake/meminit.c
@@ -16,7 +16,7 @@
 #include <console/console.h>
 #include <fsp/util.h>
 #include <memory_info.h>
-#include <smbios.h>
+#include <soc/intel/common/smbios.h>
 #include <soc/meminit.h>
 #include <stddef.h> /* required for FspmUpd.h */
 #include <fsp/soc_binding.h>
@@ -304,35 +304,15 @@
 				continue;
 
 			/* Populate the DIMM information */
-			dest_dimm->dimm_size = src_dimm->SizeInMb;
-			dest_dimm->ddr_type = memory_info_hob->MemoryType;
-			dest_dimm->ddr_frequency =
-					memory_info_hob->MemoryFrequencyInMHz;
-			dest_dimm->channel_num = channel_info->ChannelId;
-			dest_dimm->dimm_num = src_dimm->DimmId;
-			strncpy((char *)dest_dimm->module_part_number,
-					lp4cfg->skus[mem_sku].part_num,
-					sizeof(dest_dimm->module_part_number));
-
-			switch (memory_info_hob->DataWidth) {
-			case 8:
-				dest_dimm->bus_width = MEMORY_BUS_WIDTH_8;
-				break;
-			case 16:
-				dest_dimm->bus_width = MEMORY_BUS_WIDTH_16;
-				break;
-			case 32:
-				dest_dimm->bus_width = MEMORY_BUS_WIDTH_32;
-				break;
-			case 64:
-				dest_dimm->bus_width = MEMORY_BUS_WIDTH_64;
-				break;
-			case 128:
-				dest_dimm->bus_width = MEMORY_BUS_WIDTH_128;
-				break;
-			default:
-				printk(BIOS_ERR, "Incorrect DIMM Data Width");
-			}
+			dimm_info_fill(dest_dimm,
+				src_dimm->SizeInMb,
+				memory_info_hob->MemoryType,
+				memory_info_hob->MemoryFrequencyInMHz,
+				channel_info->ChannelId,
+				src_dimm->DimmId,
+				lp4cfg->skus[mem_sku].part_num,
+				strlen(lp4cfg->skus[mem_sku].part_num),
+				memory_info_hob->DataWidth);
 			index++;
 		}
 	}

-- 
To view, visit https://review.coreboot.org/18451
To unsubscribe, visit https://review.coreboot.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I33c3a0bebf33c53beadd745bc3d991e1e51050b7
Gerrit-PatchSet: 9
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Owner: Barnali Sarkar <barnali.sarkar at intel.com>
Gerrit-Reviewer: Aaron Durbin <adurbin at chromium.org>
Gerrit-Reviewer: Andrey Petrov <andrey.petrov at intel.com>
Gerrit-Reviewer: Balaji Manigandan <balaji.manigandan at intel.com>
Gerrit-Reviewer: Barnali Sarkar <barnali.sarkar at intel.com>
Gerrit-Reviewer: Martin Roth <martinroth at google.com>
Gerrit-Reviewer: Paul Menzel <paulepanter at users.sourceforge.net>
Gerrit-Reviewer: Philippe Mathieu-Daudé <philippe.mathieu.daude at gmail.com>
Gerrit-Reviewer: Pratikkumar V Prajapati <pratikkumar.v.prajapati at intel.com>
Gerrit-Reviewer: Rizwan Qureshi <rizwan.qureshi at intel.com>
Gerrit-Reviewer: Subrata Banik <subrata.banik at intel.com>
Gerrit-Reviewer: build bot (Jenkins)



More information about the coreboot-gerrit mailing list