alloc: use linker heap position in sanity check

This will replace a fixed position define with a real linker position, which allows to set heap position by linker

Signed-off-by: Adrian Bonislawski <adrian.bonislawski@linux.intel.com>
This commit is contained in:
Adrian Bonislawski 2019-05-28 10:26:57 +02:00 committed by Janusz Jankowski
parent 2962e2bfaa
commit f9eb86c354
1 changed files with 3 additions and 1 deletions

View File

@ -869,8 +869,10 @@ void heap_trace(struct mm_heap *heap, int size) { }
/* initialise map */
void init_heap(struct sof *sof)
{
extern uintptr_t _system_heap_start;
/* sanity check for malformed images or loader issues */
if (memmap.system[0].heap != HEAP_SYSTEM_0_BASE)
if (memmap.system[0].heap != (uintptr_t)&_system_heap_start)
panic(SOF_IPC_PANIC_MEM);
spinlock_init(&memmap.lock);