Marc Jones | 2d79f16 | 2017-05-22 21:35:16 -0600 | [diff] [blame] | 1 | /* |
| 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 Dawson | 3f6c400 | 2017-09-25 10:11:50 -0600 | [diff] [blame^] | 16 | #include <chip.h> |
Kyösti Mälkki | 525930b | 2017-09-23 16:21:02 +0300 | [diff] [blame] | 17 | #include <AGESA.h> |
Marc Jones | 2d79f16 | 2017-05-22 21:35:16 -0600 | [diff] [blame] | 18 | #include <agesawrapper.h> |
| 19 | #include <PlatformMemoryConfiguration.h> |
| 20 | |
Marshall Dawson | 3f6c400 | 2017-09-25 10:11:50 -0600 | [diff] [blame^] | 21 | #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 Jones | 2d79f16 | 2017-05-22 21:35:16 -0600 | [diff] [blame] | 26 | static const PSO_ENTRY DDR4PlatformMemoryConfiguration[] = { |
| 27 | DRAM_TECHNOLOGY(ANY_SOCKET, DDR4_TECHNOLOGY), |
Marshall Dawson | 3f6c400 | 2017-09-25 10:11:50 -0600 | [diff] [blame^] | 28 | NUMBER_OF_DIMMS_SUPPORTED(ANY_SOCKET, ANY_CHANNEL, DIMMS_PER_CHANNEL), |
| 29 | NUMBER_OF_CHANNELS_SUPPORTED(ANY_SOCKET, MAX_DRAM_CH), |
Marc Jones | 2d79f16 | 2017-05-22 21:35:16 -0600 | [diff] [blame] | 30 | 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 | |
| 40 | void OemPostParams(AMD_POST_PARAMS *PostParams) |
| 41 | { |
| 42 | PostParams->MemConfig.PlatformMemoryConfiguration = |
| 43 | (PSO_ENTRY *)DDR4PlatformMemoryConfiguration; |
Marc Jones | 2d79f16 | 2017-05-22 21:35:16 -0600 | [diff] [blame] | 44 | } |