From 5373190d6b1275b036a1b632860276258bf3827f Mon Sep 17 00:00:00 2001 From: Frank Livingston Date: Mon, 6 Nov 2017 08:32:58 -0600 Subject: [PATCH] PASDK-432:Add cache writeback on ARM for clearing of DDR3 & MSMC heaps --- pasdk/test_arm/application/main.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pasdk/test_arm/application/main.c b/pasdk/test_arm/application/main.c index ed6c3b93..21c9b360 100644 --- a/pasdk/test_arm/application/main.c +++ b/pasdk/test_arm/application/main.c @@ -49,6 +49,7 @@ All rights reserved. #include "pfp_app.h" /* contains all PFP ID's */ #include +#include #include // Number of control bytes used in heap buffer after heap initialized by SYSBIOS before main() #define HEAP_CONTROL_SZ ( 8 ) @@ -76,10 +77,17 @@ Int main() buf = (Ptr)heapmem_stats.buf+HEAP_CONTROL_SZ; size = (SizeT)heapmem_stats.size-HEAP_CONTROL_SZ; memset(buf, 0, size); + Cache_wb(buf, size, Cache_Type_ALLD, 0); + Cache_wait(); + HeapMem_getExtendedStats(heapMemDdr3, &heapmem_stats); buf = (Ptr)heapmem_stats.buf+HEAP_CONTROL_SZ; size = (SizeT)heapmem_stats.size-HEAP_CONTROL_SZ; memset(buf, 0, size); + Cache_wb(buf, size, Cache_Type_ALLD, 0); + Cache_wait(); + + #if 0 // debug: check ARM SYS/BIOS timestamp provider BOARD_initPerfCounters(); -- 2.26.2