AGESA: Log heap initialisation

This is useful for debugging S3 issues and in general
to understand AGESA memory allocator behaviour.

Change-Id: I422f2620ed0023f3920b8d2949ee1c33a6c227e0
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/18535
Reviewed-by: Nico Huber <nico.h@gmx.de>
Tested-by: build bot (Jenkins)
This commit is contained in:
Kyösti Mälkki 2016-11-27 06:37:52 +02:00
parent 86690eb0a1
commit 50e6daff95
1 changed files with 6 additions and 0 deletions

View File

@ -57,6 +57,9 @@ void EmptyHeap(void)
{ {
void *base = GetHeapBase(); void *base = GetHeapBase();
memset(base, 0, BIOS_HEAP_SIZE); memset(base, 0, BIOS_HEAP_SIZE);
printk(BIOS_DEBUG, "Wiped HEAP at [%08x - %08x]\n",
(unsigned int)(uintptr_t) base, (unsigned int)(uintptr_t) base + BIOS_HEAP_SIZE - 1);
} }
void ResumeHeap(void **heap, size_t *len) void ResumeHeap(void **heap, size_t *len)
@ -64,6 +67,9 @@ void ResumeHeap(void **heap, size_t *len)
void *base = GetHeapBase(); void *base = GetHeapBase();
*heap = base; *heap = base;
*len = BIOS_HEAP_SIZE; *len = BIOS_HEAP_SIZE;
printk(BIOS_DEBUG, "Using resume HEAP at [%08x - %08x]\n",
(unsigned int)(uintptr_t) base, (unsigned int)(uintptr_t) base + BIOS_HEAP_SIZE - 1);
} }
#if (IS_ENABLED(CONFIG_NORTHBRIDGE_AMD_AGESA_FAMILY15_TN) || \ #if (IS_ENABLED(CONFIG_NORTHBRIDGE_AMD_AGESA_FAMILY15_TN) || \