2 * This file is part of the coreboot project.
4 * Copyright (C) 2011 Advanced Micro Devices, Inc.
5 * Copyright (C) 2014 Edward O'Callaghan <eocallaghan@alterapraxis.com>.
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; version 2 of the License.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
19 #include <northbridge/amd/agesa/state_machine.h>
20 #include <PlatformMemoryConfiguration.h>
22 static const PCIe_PORT_DESCRIPTOR PortList
[] = {
23 /* (PCIe port, Lanes 4, PCI Device Number 4, ...) */
26 PCIE_ENGINE_DATA_INITIALIZER(PciePortEngine
, 4, 4),
27 PCIE_PORT_DATA_INITIALIZER(PortEnabled
,
36 /* (PCIe port, Lanes 5, PCI Device Number 5, ...) */
39 PCIE_ENGINE_DATA_INITIALIZER(PciePortEngine
, 5, 5),
40 PCIE_PORT_DATA_INITIALIZER(PortEnabled
,
49 /* (PCIe port, Lanes 6, PCI Device Number 6, ...) */
52 PCIE_ENGINE_DATA_INITIALIZER(PciePortEngine
, 6, 6),
53 PCIE_PORT_DATA_INITIALIZER(PortEnabled
,
62 /* (PCIe port, Lanes 7, PCI Device Number 7, ...) */
65 PCIE_ENGINE_DATA_INITIALIZER(PciePortEngine
, 7, 7),
66 PCIE_PORT_DATA_INITIALIZER(PortDisabled
,
75 /* (PCIe port, Lanes 8, PCI Device Number 8, ...) */
77 DESCRIPTOR_TERMINATE_LIST
,
78 PCIE_ENGINE_DATA_INITIALIZER(PciePortEngine
, 0, 3),
79 PCIE_PORT_DATA_INITIALIZER(PortEnabled
,
90 static const PCIe_DDI_DESCRIPTOR DdiList
[] = {
91 /* (DDI interface Lanes 8:11, DdA, ...) */
94 PCIE_ENGINE_DATA_INITIALIZER(PcieDdiEngine
, 8, 11),
95 /* PCIE_DDI_DATA_INITIALIZER(ConnectorTypeDP, Aux1, Hdp1) */
96 {ConnectorTypeLvds
, Aux1
, Hdp1
}
98 /* (DDI interface Lanes 12:15, DdB, ...) */
100 DESCRIPTOR_TERMINATE_LIST
,
101 PCIE_ENGINE_DATA_INITIALIZER(PcieDdiEngine
, 12, 15),
102 /* PCIE_DDI_DATA_INITIALIZER(ConnectorTypeDP, Aux2, Hdp2) */
103 {ConnectorTypeDP
, Aux2
, Hdp2
}
107 static const PCIe_COMPLEX_DESCRIPTOR PcieComplex
= {
108 .Flags
= DESCRIPTOR_TERMINATE_LIST
,
110 .PciePortList
= PortList
,
111 .DdiLinkList
= DdiList
,
114 void board_BeforeInitEarly(struct sysinfo
*cb
, AMD_EARLY_PARAMS
*InitEarly
)
116 InitEarly
->GnbConfig
.PcieComplexList
= &PcieComplex
;
117 InitEarly
->GnbConfig
.PsppPolicy
= 0;
121 * @brief Customer Overides Memory Table
123 * Platform Specific Overriding Table allows IBV/OEM to pass in platform
124 * information to AGESA
125 * (e.g. MemClk routing, the number of DIMM slots per channel,...).
126 * If PlatformSpecificTable is populated, AGESA will base its settings on the
127 * data from the table. Otherwise, it will use its default conservative settings.
129 static const PSO_ENTRY ROMDATA PlatformMemoryTable
[] = {
130 NUMBER_OF_DIMMS_SUPPORTED(ANY_SOCKET
, ANY_CHANNEL
, 2),
131 NUMBER_OF_CHANNELS_SUPPORTED(ANY_SOCKET
, 1),
135 void board_BeforeInitPost(struct sysinfo
*cb
, AMD_POST_PARAMS
*InitPost
)
137 InitPost
->MemConfig
.PlatformMemoryConfiguration
= (PSO_ENTRY
*)PlatformMemoryTable
;