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 <pgeorgi@chromium.org> Original-Commit-Id: ce39dc3b0b9448635f878ce8c1aea5b4743594c4 Original-Change-Id: I870b3dfa2c4f358defb9263e759de477bb32e620 Original-Signed-off-by: Brandon Breitenstein <brandon.breitenstein@intel.com> Original-Reviewed-on: https://chromium-review.googlesource.com/312546 Original-Commit-Ready: Freddy Paul <freddy.paul@intel.com> Original-Tested-by: Freddy Paul <freddy.paul@intel.com> Original-Reviewed-by: Aaron Durbin <adurbin@chromium.org> Original-Reviewed-by: Pratikkumar V Prajapati <pratikkumar.v.prajapati@intel.com> Reviewed-on: https://review.coreboot.org/12590 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
This commit is contained in:
parent
fb622cc471
commit
ad77bf9320
|
@ -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
|
|
|
@ -18,14 +18,14 @@ romstage-y += spd.c
|
||||||
|
|
||||||
SPD_BIN = $(obj)/spd.bin
|
SPD_BIN = $(obj)/spd.bin
|
||||||
|
|
||||||
SPD_SOURCES = hynix_dimm_H9CCNNN8JTALAR-NUD-1G-1866 # 0b0000
|
SPD_SOURCES = hynix_dimm_H9CCNNN8JTALAR-NUD-1G-1866 # 0b0000 Dual Channel 4GB
|
||||||
SPD_SOURCES += hynix_dimm_H9CCNNNBLTALAR-NUD-2G-1866 # 0b0001
|
SPD_SOURCES += hynix_dimm_H9CCNNN8JTALAR-NUD-1G-1866 # 0b0001 Single Channel 2GB
|
||||||
SPD_SOURCES += samsung_dimm_K4E8E304EE-EGCF-1G-1866 # 0b0010
|
SPD_SOURCES += samsung_dimm_K4E8E304EE-EGCF-1G-1866 # 0b0010 Dual Channel 4GB
|
||||||
SPD_SOURCES += samsung_dimm_K4E6E304EE-EGCF-2G-1866 # 0b0011
|
SPD_SOURCES += samsung_dimm_K4E6E304EE-EGCF-2G-1866 # 0b0011 Dual Channel 8GB
|
||||||
SPD_SOURCES += empty # 0b0100
|
SPD_SOURCES += samsung_dimm_K4E8E304EE-EGCF-1G-1866 # 0b0100 Single Channel 4GB
|
||||||
SPD_SOURCES += empty # 0b0101
|
SPD_SOURCES += mic_dimm_EDF8132A3MA-JD-F-1G-1866 # 0b0101 Single Channel 4GB SPD FILE NOT HERE YET
|
||||||
SPD_SOURCES += empty # 0b0110
|
SPD_SOURCES += hynix_dimm_H9CCNNN8JTBLAR-NUD-1G-1866 # 0b0110 Dual Channel 4GB SPD FILE NOT HERE YET
|
||||||
SPD_SOURCES += empty # 0b0111
|
SPD_SOURCES += hynix_dimm_H9CCNNNBLTBLAR-NUD-2G-1866 # 0b0111 Dual Channel 8GB SPD FILE NOT HERE YET
|
||||||
SPD_SOURCES += empty # 0b1000
|
SPD_SOURCES += empty # 0b1000
|
||||||
SPD_SOURCES += empty # 0b1001
|
SPD_SOURCES += empty # 0b1001
|
||||||
SPD_SOURCES += empty # 0b1010
|
SPD_SOURCES += empty # 0b1010
|
||||||
|
|
|
@ -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
|
|
@ -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
|
|
@ -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
|
|
@ -15,14 +15,12 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <arch/byteorder.h>
|
#include <arch/byteorder.h>
|
||||||
#include <boardid.h>
|
|
||||||
#include <cbfs.h>
|
#include <cbfs.h>
|
||||||
#include <console/console.h>
|
#include <console/console.h>
|
||||||
#include <soc/pei_data.h>
|
#include <soc/pei_data.h>
|
||||||
#include <soc/romstage.h>
|
#include <soc/romstage.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#include "../boardid.h"
|
|
||||||
#include "spd.h"
|
#include "spd.h"
|
||||||
|
|
||||||
static void mainboard_print_spd_info(uint8_t spd[])
|
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;
|
char *spd_file;
|
||||||
size_t spd_file_len;
|
size_t spd_file_len;
|
||||||
int spd_index, sku_id;
|
int spd_index, spd_span;
|
||||||
|
|
||||||
|
|
||||||
spd_index = pei_data->mem_cfg_id;
|
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, "SPD index %d\n", spd_index);
|
||||||
printk(BIOS_INFO, "Board ID %d\n", sku_id);
|
|
||||||
|
|
||||||
/* Load SPD data from CBFS */
|
/* Load SPD data from CBFS */
|
||||||
spd_file = cbfs_boot_map_with_leak("spd.bin", CBFS_TYPE_SPD,
|
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 */
|
/* Assume same memory in both channels */
|
||||||
spd_index *= SPD_LEN;
|
spd_span = spd_index * SPD_LEN;
|
||||||
memcpy(pei_data->spd_data[0][0], spd_file + spd_index, SPD_LEN);
|
memcpy(pei_data->spd_data[0][0], spd_file + spd_span, 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)
|
if (spd_index != HYNIX_SINGLE_CHAN && spd_index != SAMSUNG_SINGLE_CHAN
|
||||||
memcpy(pei_data->spd_data[1][0], spd_file + spd_index, SPD_LEN);
|
&& 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 */
|
/* Make sure a valid SPD was found */
|
||||||
if (pei_data->spd_data[0][0][0] == 0)
|
if (pei_data->spd_data[0][0][0] == 0)
|
||||||
|
|
|
@ -30,4 +30,7 @@
|
||||||
#define SPD_PART_LEN 18
|
#define SPD_PART_LEN 18
|
||||||
#define SPD_MANU_OFF 148
|
#define SPD_MANU_OFF 148
|
||||||
|
|
||||||
|
#define HYNIX_SINGLE_CHAN 0x1
|
||||||
|
#define SAMSUNG_SINGLE_CHAN 0x4
|
||||||
|
#define MIC_SINGLE_CHAN 0x5
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue