From c87e5965b7a43a516f1226e76364d6737bef43e9 Mon Sep 17 00:00:00 2001 From: Abdelatif Guettouche Date: Wed, 20 Jan 2021 10:30:15 +0100 Subject: [PATCH] xtensa/esp_allocateheap.c: Correct ROM memory boundries. SMP was broken because the ROM memory wasn't set correctly. Some regions were shared with the ROM code. Signed-off-by: Abdelatif Guettouche --- arch/xtensa/src/esp32/esp32_allocateheap.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/xtensa/src/esp32/esp32_allocateheap.c b/arch/xtensa/src/esp32/esp32_allocateheap.c index 95effb3058..a2f28d45da 100644 --- a/arch/xtensa/src/esp32/esp32_allocateheap.c +++ b/arch/xtensa/src/esp32/esp32_allocateheap.c @@ -58,7 +58,7 @@ * script as "_sheap". Then end is defined here, as follows: */ -#define HEAP_REGION1_END 0x3ffe0000 +#define HEAP_REGION1_END 0x3ffdfff0 /* Region 2 of the heap is the area from the end of the ROM data to the end * of DRAM. The linker script has already set "_eheap" as the end of DRAM, @@ -67,10 +67,10 @@ * enabled include APP's region with the heap. */ -#ifdef CONFIG_SMP -# define HEAP_REGION2_START 0x3ffe4350 +#ifndef CONFIG_SMP +# define HEAP_REGION2_START 0x3ffe1330 #else -# define HEAP_REGION2_START 0x3ffe0400 +# define HEAP_REGION2_START 0x3ffe7e40 #endif /****************************************************************************