cpu/amd/pi: Use alloc_cbmem() only in ramstage
Without this change the builder would fail with the complaint that there was a global static variable in romstage. alloc_cbmem() is only called in ramstage. The alternative was to add */cpu/amd/pi/*.romstage.o to the list of illegal_globals EXCLUDE_FILEs in arch/x86/init/romstage.ld. TEST: Booted the amd/lamar board. Change-Id: I5167910ff790a3152a4ad8e5af0a4a3b17894f0f Signed-off-by: Dave Frodin <dave.frodin@se-eng.com> Reviewed-on: http://review.coreboot.org/8256 Tested-by: build bot (Jenkins) Reviewed-by: Marc Jones <marc.jones@se-eng.com>
This commit is contained in:
		@@ -28,7 +28,7 @@ void EmptyHeap(void)
 | 
				
			|||||||
	memset(BiosManagerPtr, 0, BIOS_HEAP_SIZE);
 | 
						memset(BiosManagerPtr, 0, BIOS_HEAP_SIZE);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#if IS_ENABLED(CONFIG_NORTHBRIDGE_AMD_PI_00630F01)
 | 
					#if IS_ENABLED(CONFIG_NORTHBRIDGE_AMD_PI_00630F01) && !defined(__PRE_RAM__)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#define AGESA_RUNTIME_SIZE 4096
 | 
					#define AGESA_RUNTIME_SIZE 4096
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -74,7 +74,7 @@ AGESA_STATUS agesa_AllocateBuffer (UINT32 Func, UINT32 Data, VOID *ConfigPtr)
 | 
				
			|||||||
	AllocParams = ((AGESA_BUFFER_PARAMS *) ConfigPtr);
 | 
						AllocParams = ((AGESA_BUFFER_PARAMS *) ConfigPtr);
 | 
				
			||||||
	AllocParams->BufferPointer = NULL;
 | 
						AllocParams->BufferPointer = NULL;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#if IS_ENABLED(CONFIG_NORTHBRIDGE_AMD_PI_00630F01)
 | 
					#if IS_ENABLED(CONFIG_NORTHBRIDGE_AMD_PI_00630F01) && !defined(__PRE_RAM__)
 | 
				
			||||||
	/* if the allocation is for runtime use simple CBMEM data */
 | 
						/* if the allocation is for runtime use simple CBMEM data */
 | 
				
			||||||
	if (Data == HEAP_CALLOUT_RUNTIME)
 | 
						if (Data == HEAP_CALLOUT_RUNTIME)
 | 
				
			||||||
		return alloc_cbmem(AllocParams);
 | 
							return alloc_cbmem(AllocParams);
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user