[coreboot-gerrit] Patch set updated for coreboot: northbridge/amd/pi: Add support for memory settings
Dave Frodin (dave.frodin@se-eng.com)
gerrit at coreboot.org
Wed Jul 1 14:37:06 CEST 2015
Dave Frodin (dave.frodin at se-eng.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/10672
-gerrit
commit 9fd76040e904ef39a3130f83f5ac349f84fe56e8
Author: Dave Frodin <dave.frodin at se-eng.com>
Date: Wed May 20 10:33:51 2015 -0600
northbridge/amd/pi: Add support for memory settings
This adds support for binarypi based boards that have
to make adjustments to the memory configuration settings.
A PlatformMemoryConfiguration[] table that describes
the memory configuration must be defined in the
mainboard folder.
Change-Id: I5e4b476a4adf3dd1f3b7843274a81ecb243d10ab
Signed-off-by: Dave Frodin <dave.frodin at se-eng.com>
---
src/northbridge/amd/pi/agesawrapper.c | 15 +++++++++++++++
src/northbridge/amd/pi/def_callouts.c | 3 +++
2 files changed, 18 insertions(+)
diff --git a/src/northbridge/amd/pi/agesawrapper.c b/src/northbridge/amd/pi/agesawrapper.c
index 255b31d..e716f9b 100644
--- a/src/northbridge/amd/pi/agesawrapper.c
+++ b/src/northbridge/amd/pi/agesawrapper.c
@@ -26,6 +26,9 @@
#include <heapManager.h>
#include <northbridge/amd/pi/agesawrapper.h>
#include <northbridge/amd/pi/BiosCallOuts.h>
+#include <PlatformMemoryConfiguration.h>
+
+extern const PSO_ENTRY PlatformMemoryConfiguration[];
VOID FchInitS3LateRestore (IN FCH_DATA_BLOCK *FchDataPtr);
VOID FchInitS3EarlyRestore (IN FCH_DATA_BLOCK *FchDataPtr);
@@ -136,6 +139,18 @@ AGESA_STATUS agesawrapper_amdinitpost(void)
AmdCreateStruct (&AmdParamStruct);
PostParams = (AMD_POST_PARAMS *)AmdParamStruct.NewStructPtr;
+ /*
+ * A PlatformMemoryConfiguration[] table must be added in the
+ * mainboard folder to any boards that need the memory configuation
+ * settings altered from the standard settings. Examples of boards
+ * requiring this change might be boards with soldered down memory,
+ * or boards that use a non-standard memory clock routing scheme
+ * There are PlatformMemoryConfiguration[] tables in many existing
+ * mainboards that can be used as an example.
+ */
+ if (PlatformMemoryConfiguration[0] != PSO_END)
+ PostParams->MemConfig.PlatformMemoryConfiguration = (PSO_ENTRY *)PlatformMemoryConfiguration;
+
// Do not use IS_ENABLED here. CONFIG_GFXUMA should always have a value. Allow
// the compiler to flag the error if CONFIG_GFXUMA is not set.
PostParams->MemConfig.UmaMode = CONFIG_GFXUMA ? UMA_AUTO : UMA_NONE;
diff --git a/src/northbridge/amd/pi/def_callouts.c b/src/northbridge/amd/pi/def_callouts.c
index 8a4472c..389742c 100644
--- a/src/northbridge/amd/pi/def_callouts.c
+++ b/src/northbridge/amd/pi/def_callouts.c
@@ -27,6 +27,9 @@
#include "agesawrapper.h"
#include "BiosCallOuts.h"
#include "dimmSpd.h"
+#include <PlatformMemoryConfiguration.h>
+
+const PSO_ENTRY __attribute__((weak)) PlatformMemoryConfiguration[] = { PSO_END };
AGESA_STATUS GetBiosCallout (UINT32 Func, UINT32 Data, VOID *ConfigPtr)
{
More information about the coreboot-gerrit
mailing list