summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/cpu/amd/agesa/Makefile.inc3
-rw-r--r--src/cpu/amd/pi/Makefile.inc2
-rw-r--r--src/northbridge/amd/agesa/def_callouts.c10
3 files changed, 9 insertions, 6 deletions
diff --git a/src/cpu/amd/agesa/Makefile.inc b/src/cpu/amd/agesa/Makefile.inc
index 2a34ee041f..c8e125e445 100644
--- a/src/cpu/amd/agesa/Makefile.inc
+++ b/src/cpu/amd/agesa/Makefile.inc
@@ -27,7 +27,8 @@ cpu_incs-y += $(src)/cpu/amd/agesa/cache_as_ram.S
romstage-y += romstage.c
endif
-romstage-y += heapmanager.c
+romstage-$(CONFIG_AGESA_LEGACY_WRAPPER) += heapmanager.c
+
ramstage-y += heapmanager.c
ramstage-$(CONFIG_AGESA_LEGACY_WRAPPER) += amd_late_init.c
diff --git a/src/cpu/amd/pi/Makefile.inc b/src/cpu/amd/pi/Makefile.inc
index af24b48001..df79c82d61 100644
--- a/src/cpu/amd/pi/Makefile.inc
+++ b/src/cpu/amd/pi/Makefile.inc
@@ -22,9 +22,9 @@ cpu_incs-y += $(src)/cpu/amd/agesa/cache_as_ram.S
ifeq ($(CONFIG_BINARYPI_LEGACY_WRAPPER), y)
romstage-y += romstage.c
ramstage-y += amd_late_init.c
+romstage-y += ../agesa/heapmanager.c
else
romstage-y += ../agesa/romstage.c
endif
-romstage-y += ../agesa/heapmanager.c
ramstage-y += ../agesa/heapmanager.c
diff --git a/src/northbridge/amd/agesa/def_callouts.c b/src/northbridge/amd/agesa/def_callouts.c
index d5e8ba5315..e0999266f4 100644
--- a/src/northbridge/amd/agesa/def_callouts.c
+++ b/src/northbridge/amd/agesa/def_callouts.c
@@ -37,10 +37,12 @@ AGESA_STATUS GetBiosCallout (UINT32 Func, UINTN Data, VOID *ConfigPtr)
AGESA_STATUS status;
UINTN i;
- /* One HeapManager serves them all. */
- status = HeapManagerCallout(Func, Data, ConfigPtr);
- if (status != AGESA_UNSUPPORTED)
- return status;
+ if (HAS_LEGACY_WRAPPER || ENV_RAMSTAGE) {
+ /* One HeapManager serves them all. */
+ status = HeapManagerCallout(Func, Data, ConfigPtr);
+ if (status != AGESA_UNSUPPORTED)
+ return status;
+ }
#if HAS_AGESA_FCH_OEM_CALLOUT
if (!HAS_LEGACY_WRAPPER && Func == AGESA_FCH_OEM_CALLOUT) {