blob: bd58e0ecc8e71d1752c3409d374044537305501b [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>
Kyösti Mälkki525930b2017-09-23 16:21:02 +030017#include <AGESA.h>
Marc Jones2d79f162017-05-22 21:35:16 -060018#include <agesawrapper.h>
19#include <PlatformMemoryConfiguration.h>
20
Marshall Dawson3f6c4002017-09-25 10:11:50 -060021#define DIMMS_PER_CHANNEL 1
22#if DIMMS_PER_CHANNEL > MAX_DIMMS_PER_CH
23#error "Too many DIMM sockets defined for the mainboard"
24#endif
25
Marc Jones2d79f162017-05-22 21:35:16 -060026static const PSO_ENTRY DDR4PlatformMemoryConfiguration[] = {
27 DRAM_TECHNOLOGY(ANY_SOCKET, DDR4_TECHNOLOGY),
Marshall Dawson3f6c4002017-09-25 10:11:50 -060028 NUMBER_OF_DIMMS_SUPPORTED(ANY_SOCKET, ANY_CHANNEL, DIMMS_PER_CHANNEL),
29 NUMBER_OF_CHANNELS_SUPPORTED(ANY_SOCKET, MAX_DRAM_CH),
Marc Jones2d79f162017-05-22 21:35:16 -060030 MOTHER_BOARD_LAYERS(LAYERS_6),
31 MEMCLK_DIS_MAP(ANY_SOCKET, ANY_CHANNEL,
32 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00),
33 CKE_TRI_MAP(ANY_SOCKET, ANY_CHANNEL, 0xff, 0xff, 0xff, 0xff),
34 ODT_TRI_MAP(ANY_SOCKET, ANY_CHANNEL, 0xff, 0xff, 0xff, 0xff),
35 CS_TRI_MAP(ANY_SOCKET, ANY_CHANNEL,
36 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00),
37 PSO_END
38};
39
40void OemPostParams(AMD_POST_PARAMS *PostParams)
41{
42 PostParams->MemConfig.PlatformMemoryConfiguration =
43 (PSO_ENTRY *)DDR4PlatformMemoryConfiguration;
Marc Jones2d79f162017-05-22 21:35:16 -060044}