diff --git a/src/platform/apollolake/include/platform/lib/memory.h b/src/platform/apollolake/include/platform/lib/memory.h index 953049b7c98c..396905f3a95a 100644 --- a/src/platform/apollolake/include/platform/lib/memory.h +++ b/src/platform/apollolake/include/platform/lib/memory.h @@ -309,7 +309,11 @@ #define HEAP_SYSTEM_SHARED_SIZE 0x1500 #define HEAP_BUFFER_BLOCK_SIZE 0x100 -#define HEAP_BUFFER_COUNT_MAX (HP_SRAM_SIZE / HEAP_BUFFER_BLOCK_SIZE) +/* + * The buffer zone will not occupy more than half of the HP SRAM on APL, + * enforcing this limit due to the the SRAM size limitations on APL. + */ +#define HEAP_BUFFER_COUNT_MAX (HP_SRAM_SIZE / (HEAP_BUFFER_BLOCK_SIZE * 2)) #define HEAP_SYSTEM_M_SIZE 0x4000 /* heap primary core size */ #define HEAP_SYSTEM_S_SIZE 0x3000 /* heap secondary core size */ diff --git a/src/platform/library/include/platform/lib/memory.h b/src/platform/library/include/platform/lib/memory.h index c81d44d99e26..f64118c03257 100644 --- a/src/platform/library/include/platform/lib/memory.h +++ b/src/platform/library/include/platform/lib/memory.h @@ -65,6 +65,7 @@ static inline uint32_t arch_get_stack_size(void) #define SRAM_BANK_SIZE 0x10000 #define LP_SRAM_SIZE SRAM_BANK_SIZE +/* use big enough HP_SRAM_SIZE to build all components for the test bench at once */ #define HP_SRAM_SIZE (SRAM_BANK_SIZE * 47) #define HP_SRAM_BASE 0xBE000000 diff --git a/test/cmocka/src/lib/alloc/alloc.c b/test/cmocka/src/lib/alloc/alloc.c index 16a472c7f32e..13c1fb4c2a35 100644 --- a/test/cmocka/src/lib/alloc/alloc.c +++ b/test/cmocka/src/lib/alloc/alloc.c @@ -200,8 +200,6 @@ static struct test_case test_cases[] = { 2, TEST_BULK, "rballoc_dma"), TEST_CASE(256, SOF_MEM_ZONE_BUFFER, SOF_MEM_CAPS_RAM | SOF_MEM_CAPS_DMA, 2, TEST_BULK, "rballoc_dma"), - TEST_CASE(2048, SOF_MEM_ZONE_BUFFER, SOF_MEM_CAPS_RAM | - SOF_MEM_CAPS_DMA, 100, TEST_IMMEDIATE_FREE, "rballoc_dma"), }; static int setup(void **state)