From ad77bf93200cba5fd47378cbadfeb467f1fc4740 Mon Sep 17 00:00:00 2001 From: Brandon Breitenstein Date: Tue, 27 Oct 2015 13:49:14 -0700 Subject: intel/Kunimitsu: FAB 4 SPD changes Updated Memory IDs and SKU IDs for FAB 4 Updated detection of single/dual channel memory to use SPD Index (Memory ID) Added spd files for new dimms Removed boardid.h as it is no longer needed BUG=None BRANCH=None TEST=Tested on FAB4 SKU1 and SKU3 Change-Id: I60403c0e636ea28797d94cff9431af921631323e Signed-off-by: Patrick Georgi Original-Commit-Id: ce39dc3b0b9448635f878ce8c1aea5b4743594c4 Original-Change-Id: I870b3dfa2c4f358defb9263e759de477bb32e620 Original-Signed-off-by: Brandon Breitenstein Original-Reviewed-on: https://chromium-review.googlesource.com/312546 Original-Commit-Ready: Freddy Paul Original-Tested-by: Freddy Paul Original-Reviewed-by: Aaron Durbin Original-Reviewed-by: Pratikkumar V Prajapati Reviewed-on: https://review.coreboot.org/12590 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer --- src/mainboard/intel/kunimitsu/boardid.h | 27 --------------------- src/mainboard/intel/kunimitsu/spd/Makefile.inc | 16 ++++++------- .../hynix_dimm_H9CCNNN8JTBLAR-NUD-1G-1866.spd.hex | 16 +++++++++++++ .../hynix_dimm_H9CCNNNBLTBLAR-NUD-2G-1866.spd.hex | 16 +++++++++++++ .../spd/mic_dimm_EDF8132A3MA-JD-F-1G-1866.spd.hex | 16 +++++++++++++ src/mainboard/intel/kunimitsu/spd/spd.c | 28 +++++++--------------- src/mainboard/intel/kunimitsu/spd/spd.h | 3 +++ 7 files changed, 68 insertions(+), 54 deletions(-) delete mode 100644 src/mainboard/intel/kunimitsu/boardid.h create mode 100644 src/mainboard/intel/kunimitsu/spd/hynix_dimm_H9CCNNN8JTBLAR-NUD-1G-1866.spd.hex create mode 100644 src/mainboard/intel/kunimitsu/spd/hynix_dimm_H9CCNNNBLTBLAR-NUD-2G-1866.spd.hex create mode 100644 src/mainboard/intel/kunimitsu/spd/mic_dimm_EDF8132A3MA-JD-F-1G-1866.spd.hex (limited to 'src/mainboard') diff --git a/src/mainboard/intel/kunimitsu/boardid.h b/src/mainboard/intel/kunimitsu/boardid.h deleted file mode 100644 index 0c6de8b9bf..0000000000 --- a/src/mainboard/intel/kunimitsu/boardid.h +++ /dev/null @@ -1,27 +0,0 @@ -/* - * This file is part of the coreboot project. - * - * Copyright (C) 2013 Google Inc. - * Copyright (C) 2015 Intel Corporation - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; version 2 of the License. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the - * GNU General Public License for more details. - */ - -#ifndef _BOARDID_H_ -#define _BOARDID_H_ - -#define SCRD_SKU1 0x3 -#define SCRD_SKU2 0x4 -#define SCRD_SKU3 0x1 -#define SCRD_SKU4 0x2 -#define SCRD_SKU5 0x5 -#define SCRD_SKU6 0x6 - -#endif diff --git a/src/mainboard/intel/kunimitsu/spd/Makefile.inc b/src/mainboard/intel/kunimitsu/spd/Makefile.inc index cdb84ab654..69446643fa 100644 --- a/src/mainboard/intel/kunimitsu/spd/Makefile.inc +++ b/src/mainboard/intel/kunimitsu/spd/Makefile.inc @@ -18,14 +18,14 @@ romstage-y += spd.c SPD_BIN = $(obj)/spd.bin -SPD_SOURCES = hynix_dimm_H9CCNNN8JTALAR-NUD-1G-1866 # 0b0000 -SPD_SOURCES += hynix_dimm_H9CCNNNBLTALAR-NUD-2G-1866 # 0b0001 -SPD_SOURCES += samsung_dimm_K4E8E304EE-EGCF-1G-1866 # 0b0010 -SPD_SOURCES += samsung_dimm_K4E6E304EE-EGCF-2G-1866 # 0b0011 -SPD_SOURCES += empty # 0b0100 -SPD_SOURCES += empty # 0b0101 -SPD_SOURCES += empty # 0b0110 -SPD_SOURCES += empty # 0b0111 +SPD_SOURCES = hynix_dimm_H9CCNNN8JTALAR-NUD-1G-1866 # 0b0000 Dual Channel 4GB +SPD_SOURCES += hynix_dimm_H9CCNNN8JTALAR-NUD-1G-1866 # 0b0001 Single Channel 2GB +SPD_SOURCES += samsung_dimm_K4E8E304EE-EGCF-1G-1866 # 0b0010 Dual Channel 4GB +SPD_SOURCES += samsung_dimm_K4E6E304EE-EGCF-2G-1866 # 0b0011 Dual Channel 8GB +SPD_SOURCES += samsung_dimm_K4E8E304EE-EGCF-1G-1866 # 0b0100 Single Channel 4GB +SPD_SOURCES += mic_dimm_EDF8132A3MA-JD-F-1G-1866 # 0b0101 Single Channel 4GB SPD FILE NOT HERE YET +SPD_SOURCES += hynix_dimm_H9CCNNN8JTBLAR-NUD-1G-1866 # 0b0110 Dual Channel 4GB SPD FILE NOT HERE YET +SPD_SOURCES += hynix_dimm_H9CCNNNBLTBLAR-NUD-2G-1866 # 0b0111 Dual Channel 8GB SPD FILE NOT HERE YET SPD_SOURCES += empty # 0b1000 SPD_SOURCES += empty # 0b1001 SPD_SOURCES += empty # 0b1010 diff --git a/src/mainboard/intel/kunimitsu/spd/hynix_dimm_H9CCNNN8JTBLAR-NUD-1G-1866.spd.hex b/src/mainboard/intel/kunimitsu/spd/hynix_dimm_H9CCNNN8JTBLAR-NUD-1G-1866.spd.hex new file mode 100644 index 0000000000..a8e0c26d61 --- /dev/null +++ b/src/mainboard/intel/kunimitsu/spd/hynix_dimm_H9CCNNN8JTBLAR-NUD-1G-1866.spd.hex @@ -0,0 +1,16 @@ +91 20 F1 03 04 11 05 0B 03 11 01 08 09 00 40 05 +78 78 90 50 90 11 50 E0 10 04 3C 3C 01 90 00 00 +00 00 CA FA 00 00 00 A8 00 00 00 00 00 00 00 00 +00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +00 00 00 00 00 80 AD 01 00 00 00 00 00 00 00 00 +48 39 43 43 4E 4E 4E 38 4A 54 42 4C 41 52 2D 4E +55 44 00 00 80 AD 00 00 00 00 00 00 00 00 00 00 +00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 diff --git a/src/mainboard/intel/kunimitsu/spd/hynix_dimm_H9CCNNNBLTBLAR-NUD-2G-1866.spd.hex b/src/mainboard/intel/kunimitsu/spd/hynix_dimm_H9CCNNNBLTBLAR-NUD-2G-1866.spd.hex new file mode 100644 index 0000000000..f777127038 --- /dev/null +++ b/src/mainboard/intel/kunimitsu/spd/hynix_dimm_H9CCNNNBLTBLAR-NUD-2G-1866.spd.hex @@ -0,0 +1,16 @@ +91 20 F1 03 04 12 05 0A 03 11 01 08 09 00 40 05 +78 78 90 50 90 11 50 E0 10 04 3C 3C 01 90 00 00 +00 00 CA FA 00 00 00 A8 00 00 00 00 00 00 00 00 +00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +00 00 00 00 00 80 AD 01 00 00 00 00 00 00 00 00 +48 39 43 43 4E 4E 4E 42 4C 54 42 4C 41 52 2D 4E +55 44 00 00 80 AD 00 00 00 00 00 00 00 00 00 00 +00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 diff --git a/src/mainboard/intel/kunimitsu/spd/mic_dimm_EDF8132A3MA-JD-F-1G-1866.spd.hex b/src/mainboard/intel/kunimitsu/spd/mic_dimm_EDF8132A3MA-JD-F-1G-1866.spd.hex new file mode 100644 index 0000000000..2938c3bf0f --- /dev/null +++ b/src/mainboard/intel/kunimitsu/spd/mic_dimm_EDF8132A3MA-JD-F-1G-1866.spd.hex @@ -0,0 +1,16 @@ +91 20 F1 03 04 12 05 02 03 11 01 08 09 00 00 05 +78 78 90 50 90 11 50 E0 10 04 3C 3C 01 90 00 00 +00 21 CA FA 00 00 00 A8 00 00 00 00 00 00 00 00 +00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +00 00 00 00 00 80 2C 00 00 00 00 00 00 00 00 00 +00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 diff --git a/src/mainboard/intel/kunimitsu/spd/spd.c b/src/mainboard/intel/kunimitsu/spd/spd.c index d352969fa9..faf67913e2 100644 --- a/src/mainboard/intel/kunimitsu/spd/spd.c +++ b/src/mainboard/intel/kunimitsu/spd/spd.c @@ -15,14 +15,12 @@ */ #include -#include #include #include #include #include #include -#include "../boardid.h" #include "spd.h" static void mainboard_print_spd_info(uint8_t spd[]) @@ -81,17 +79,11 @@ void mainboard_fill_spd_data(struct pei_data *pei_data) { char *spd_file; size_t spd_file_len; - int spd_index, sku_id; + int spd_index, spd_span; spd_index = pei_data->mem_cfg_id; - /* - * XXX: This is incorrect usage.The Board ID should be the revision ID - * and not SKU ID but on SCRD it indicates SKU. - */ - sku_id = board_id(); printk(BIOS_INFO, "SPD index %d\n", spd_index); - printk(BIOS_INFO, "Board ID %d\n", sku_id); /* Load SPD data from CBFS */ spd_file = cbfs_boot_map_with_leak("spd.bin", CBFS_TYPE_SPD, @@ -110,16 +102,14 @@ void mainboard_fill_spd_data(struct pei_data *pei_data) } /* Assume same memory in both channels */ - spd_index *= SPD_LEN; - memcpy(pei_data->spd_data[0][0], spd_file + spd_index, SPD_LEN); - /* - * XXX: This is incorrect usage. mem_cfg should be used here instead of - * SKU ID. The current implementation of mem_config does not - * support channel population. - */ - - if (sku_id != SCRD_SKU1) - memcpy(pei_data->spd_data[1][0], spd_file + spd_index, SPD_LEN); + spd_span = spd_index * SPD_LEN; + memcpy(pei_data->spd_data[0][0], spd_file + spd_span, SPD_LEN); + + if (spd_index != HYNIX_SINGLE_CHAN && spd_index != SAMSUNG_SINGLE_CHAN + && spd_index != MIC_SINGLE_CHAN) { + memcpy(pei_data->spd_data[1][0], spd_file + spd_span, SPD_LEN); + printk(BIOS_INFO, "Dual channel SPD detected writing second channel\n"); + } /* Make sure a valid SPD was found */ if (pei_data->spd_data[0][0][0] == 0) diff --git a/src/mainboard/intel/kunimitsu/spd/spd.h b/src/mainboard/intel/kunimitsu/spd/spd.h index babadd2c9f..cdff9ceacc 100644 --- a/src/mainboard/intel/kunimitsu/spd/spd.h +++ b/src/mainboard/intel/kunimitsu/spd/spd.h @@ -30,4 +30,7 @@ #define SPD_PART_LEN 18 #define SPD_MANU_OFF 148 +#define HYNIX_SINGLE_CHAN 0x1 +#define SAMSUNG_SINGLE_CHAN 0x4 +#define MIC_SINGLE_CHAN 0x5 #endif -- cgit v1.2.3