<p>Marshall Dawson has uploaded this change for <strong>review</strong>.</p><p><a href="https://review.coreboot.org/21857">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">soc/amd: Move DRAM structure loading to agesawrapper<br><br>Let the generic AGESA wrapper load the PlatformMemoryConfiguration<br>pointer with a mainboard default. For more complex configurations<br>the mainboard may still override any structure(s) in the list.<br><br>Change-Id: I2bb6e188f17644c57099c0696bae613e5dd8d34f<br>Signed-off-by: Marshall Dawson <marshalldawson3rd@gmail.com><br>---<br>M src/mainboard/amd/gardenia/OemCustomize.c<br>M src/mainboard/google/kahlee/OemCustomize.c<br>M src/soc/amd/common/agesawrapper.c<br>3 files changed, 8 insertions(+), 11 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://review.coreboot.org:29418/coreboot refs/changes/57/21857/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">diff --git a/src/mainboard/amd/gardenia/OemCustomize.c b/src/mainboard/amd/gardenia/OemCustomize.c<br>index b8b3fea..560ece8 100644<br>--- a/src/mainboard/amd/gardenia/OemCustomize.c<br>+++ b/src/mainboard/amd/gardenia/OemCustomize.c<br>@@ -23,7 +23,7 @@<br> #error "Too many DIMM sockets defined for the mainboard"<br> #endif<br> <br>-static const PSO_ENTRY DDR4PlatformMemoryConfiguration[] = {<br>+const PSO_ENTRY mainboard_dram_defaults[] = {<br> DRAM_TECHNOLOGY(ANY_SOCKET, DDR4_TECHNOLOGY),<br> NUMBER_OF_DIMMS_SUPPORTED(ANY_SOCKET, ANY_CHANNEL, MB_DIMM_SLOTS),<br> NUMBER_OF_CHANNELS_SUPPORTED(ANY_SOCKET, MAX_DRAM_CH),<br>@@ -36,9 +36,3 @@<br> 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00),<br> PSO_END<br> };<br>-<br>-void OemPostParams(AMD_POST_PARAMS *PostParams)<br>-{<br>- PostParams->MemConfig.PlatformMemoryConfiguration =<br>- (PSO_ENTRY *)DDR4PlatformMemoryConfiguration;<br>-}<br>diff --git a/src/mainboard/google/kahlee/OemCustomize.c b/src/mainboard/google/kahlee/OemCustomize.c<br>index 878e2b9..50d504d 100644<br>--- a/src/mainboard/google/kahlee/OemCustomize.c<br>+++ b/src/mainboard/google/kahlee/OemCustomize.c<br>@@ -23,7 +23,7 @@<br> #error "Too many DIMM sockets defined for the mainboard"<br> #endif<br> <br>-static const PSO_ENTRY DDR4PlatformMemoryConfiguration[] = {<br>+const PSO_ENTRY mainboard_dram_defaults[] = {<br> DRAM_TECHNOLOGY(ANY_SOCKET, DDR4_TECHNOLOGY),<br> NUMBER_OF_DIMMS_SUPPORTED(ANY_SOCKET, ANY_CHANNEL, MB_DIMM_SLOTS),<br> NUMBER_OF_CHANNELS_SUPPORTED(ANY_SOCKET, MAX_DRAM_CH),<br>@@ -39,8 +39,6 @@<br> <br> void OemPostParams(AMD_POST_PARAMS *PostParams)<br> {<br>- PostParams->MemConfig.PlatformMemoryConfiguration =<br>- (PSO_ENTRY *)DDR4PlatformMemoryConfiguration;<br> /* disable memory clear for pstore memory storage and boot time */<br> PostParams->MemConfig.EnableMemClr = FALSE;<br> }<br>diff --git a/src/soc/amd/common/agesawrapper.c b/src/soc/amd/common/agesawrapper.c<br>index 93f7eb4..95c20d7 100644<br>--- a/src/soc/amd/common/agesawrapper.c<br>+++ b/src/soc/amd/common/agesawrapper.c<br>@@ -24,11 +24,14 @@<br> #include <FchPlatform.h><br> #include <heapManager.h><br> #include <agesawrapper.h><br>+#include <PlatformMemoryConfiguration.h><br> #include <BiosCallOuts.h><br> <br> void __attribute__((weak)) OemPostParams(AMD_POST_PARAMS *PostParams) {}<br> <br> #define FILECODE UNASSIGNED_FILE_FILECODE<br>+<br>+extern const PSO_ENTRY mainboard_dram_defaults[];<br> <br> #ifndef __PRE_RAM__<br> /* ACPI table pointers returned by AmdInitLate */<br>@@ -156,7 +159,9 @@<br> UMA_AUTO : UMA_NONE;<br> }<br> PostParams->MemConfig.BottomIo = (UINT16)<br>- (CONFIG_BOTTOMIO_POSITION >> 24);<br>+ (CONFIG_BOTTOMIO_POSITION >> 24);<br>+ PostParams->MemConfig.PlatformMemoryConfiguration =<br>+ (PSO_ENTRY *)mainboard_dram_defaults;<br> <br> OemPostParams(PostParams);<br> <br></pre><p>To view, visit <a href="https://review.coreboot.org/21857">change 21857</a>. To unsubscribe, visit <a href="https://review.coreboot.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://review.coreboot.org/21857"/><meta itemprop="name" content="View Change"/></div></div>
<div style="display:none"> Gerrit-Project: coreboot </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>
<div style="display:none"> Gerrit-Change-Id: I2bb6e188f17644c57099c0696bae613e5dd8d34f </div>
<div style="display:none"> Gerrit-Change-Number: 21857 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Marshall Dawson <marshalldawson3rd@gmail.com> </div>