summaryrefslogtreecommitdiff
path: root/src/cpu
diff options
context:
space:
mode:
authorDave Frodin <dave.frodin@se-eng.com>2015-02-21 08:22:51 -0700
committerPatrick Georgi <pgeorgi@google.com>2015-02-23 10:39:39 +0100
commitb85656f28575fdf3dbb6925aa047ea8db64d0495 (patch)
tree902ba84f63ec3df726257c6b3de36c8e17c63e07 /src/cpu
parentd3f3df3c6dcabaac43a1dd91a3ed50cb96d184d5 (diff)
cpu/amd/agesa: Use alloc_cbmem() only in ramstage
This copies a change made in commit 1cc3338 that allows alloc_cbmem() to be called only in ramstage. This will allow the */cpu/amd/agesa/* field to be removed from the list of illegal_globals EXCLUDE_FILEs. TEST: Booted the amd/parmer board. Change-Id: I2d4b5352815aae090ffce7b83e487f7c0a4d0c88 Signed-off-by: Dave Frodin <dave.frodin@se-eng.com> Reviewed-on: http://review.coreboot.org/8504 Tested-by: build bot (Jenkins) Reviewed-by: Marc Jones <marc.jones@se-eng.com>
Diffstat (limited to 'src/cpu')
-rw-r--r--src/cpu/amd/agesa/heapmanager.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/cpu/amd/agesa/heapmanager.c b/src/cpu/amd/agesa/heapmanager.c
index cc53d35662..f1333afc2e 100644
--- a/src/cpu/amd/agesa/heapmanager.c
+++ b/src/cpu/amd/agesa/heapmanager.c
@@ -26,7 +26,8 @@ void EmptyHeap(void)
memset(BiosManagerPtr, 0, BIOS_HEAP_SIZE);
}
-#if IS_ENABLED(CONFIG_NORTHBRIDGE_AMD_AGESA_FAMILY15_TN) || IS_ENABLED(CONFIG_NORTHBRIDGE_AMD_AGESA_FAMILY15_RL)
+#if (IS_ENABLED(CONFIG_NORTHBRIDGE_AMD_AGESA_FAMILY15_TN) || \
+ IS_ENABLED(CONFIG_NORTHBRIDGE_AMD_AGESA_FAMILY15_RL)) && !defined(__PRE_RAM__)
#define AGESA_RUNTIME_SIZE 4096
@@ -72,7 +73,8 @@ AGESA_STATUS agesa_AllocateBuffer (UINT32 Func, UINT32 Data, VOID *ConfigPtr)
AllocParams = ((AGESA_BUFFER_PARAMS *) ConfigPtr);
AllocParams->BufferPointer = NULL;
-#if IS_ENABLED(CONFIG_NORTHBRIDGE_AMD_AGESA_FAMILY15_TN) || IS_ENABLED(CONFIG_NORTHBRIDGE_AMD_AGESA_FAMILY15_RL)
+#if (IS_ENABLED(CONFIG_NORTHBRIDGE_AMD_AGESA_FAMILY15_TN) || \
+ IS_ENABLED(CONFIG_NORTHBRIDGE_AMD_AGESA_FAMILY15_RL)) && !defined(__PRE_RAM__)
/* if the allocation is for runtime use simple CBMEM data */
if (Data == HEAP_CALLOUT_RUNTIME)
return alloc_cbmem(AllocParams);