blob: 6e6992de4362ad39ddee9830d97c2250c6c75a4c [file] [log] [blame]
Marc Jones2d79f162017-05-22 21:35:16 -06001/*
2 * This file is part of the coreboot project.
3 *
4 * Copyright (C) 2015-2016 Advanced Micro Devices, Inc.
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; version 2 of the License.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 */
15
Marshall Dawson3f6c4002017-09-25 10:11:50 -060016#include <chip.h>
Richard Spiegel0ad74ac2017-12-08 16:53:29 -070017#include <amdblocks/agesawrapper.h>
Marc Jones2d79f162017-05-22 21:35:16 -060018
Marshall Dawson3f6c4002017-09-25 10:11:50 -060019#define DIMMS_PER_CHANNEL 1
20#if DIMMS_PER_CHANNEL > MAX_DIMMS_PER_CH
21#error "Too many DIMM sockets defined for the mainboard"
22#endif
23
Marc Jones2d79f162017-05-22 21:35:16 -060024static const PSO_ENTRY DDR4PlatformMemoryConfiguration[] = {
25 DRAM_TECHNOLOGY(ANY_SOCKET, DDR4_TECHNOLOGY),
Marshall Dawson3f6c4002017-09-25 10:11:50 -060026 NUMBER_OF_DIMMS_SUPPORTED(ANY_SOCKET, ANY_CHANNEL, DIMMS_PER_CHANNEL),
27 NUMBER_OF_CHANNELS_SUPPORTED(ANY_SOCKET, MAX_DRAM_CH),
Marc Jones2d79f162017-05-22 21:35:16 -060028 MOTHER_BOARD_LAYERS(LAYERS_6),
29 MEMCLK_DIS_MAP(ANY_SOCKET, ANY_CHANNEL,
30 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00),
31 CKE_TRI_MAP(ANY_SOCKET, ANY_CHANNEL, 0xff, 0xff, 0xff, 0xff),
32 ODT_TRI_MAP(ANY_SOCKET, ANY_CHANNEL, 0xff, 0xff, 0xff, 0xff),
33 CS_TRI_MAP(ANY_SOCKET, ANY_CHANNEL,
34 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00),
35 PSO_END
36};
37
38void OemPostParams(AMD_POST_PARAMS *PostParams)
39{
40 PostParams->MemConfig.PlatformMemoryConfiguration =
41 (PSO_ENTRY *)DDR4PlatformMemoryConfiguration;
Richard Spiegel9b3da9f2018-02-16 14:33:59 -070042
43 /*
44 * Bank interleaving is enabled by default in AGESA. However, from AMD's
45 * explanation, bank interleaving is really chip select interleave,
46 * requiring 2 chip select arriving to the DIMM (rank interleaving). As
47 * both kahlee and grunt are hardware limited to a single chip select
48 * arriving at the DIMM, interleave will not work. This causes AGESA to
49 * throw a warning. To avoid the warning, interleaving needs to be
50 * disabled.
51 */
52 PostParams->MemConfig.EnableBankIntlv = FALSE;
Marc Jones2d79f162017-05-22 21:35:16 -060053}