This is an automated email from Gerrit.

Oleksij Rempel ([email protected]) just uploaded a new patch set to 
Gerrit, which you can find at http://openocd.zylin.com/2703

-- gerrit

commit d7322f405924a43a5adb3162c8b717c7eecbfd9a
Author: Oleksij Rempel <[email protected]>
Date:   Thu Apr 9 14:20:30 2015 +0200

    target/cortex_a: add command to trigger flashing of all caches
    
    Cache handling is a new problematic topic. For testing we should be able
    to trigger cache flash.
    This command should not be used as solution.
    
    Change-Id: I4bdbddcaf2821f8d5aa40f603a4510657440ff18
    Signed-off-by: Oleksij Rempel <[email protected]>

diff --git a/src/target/cortex_a.c b/src/target/cortex_a.c
index 9ae0432..f2f6956 100644
--- a/src/target/cortex_a.c
+++ b/src/target/cortex_a.c
@@ -3190,6 +3190,22 @@ COMMAND_HANDLER(cortex_a_handle_smp_gdb_command)
        return ERROR_OK;
 }
 
+COMMAND_HANDLER(cortex_a_handle_flash_all_caches)
+{
+       struct target *target = get_current_target(CMD_CTX);
+       struct armv7a_common *armv7a = target_to_armv7a(target);
+
+       if (armv7a->armv7a_mmu.armv7a_cache.flush_all_data_cache)
+               armv7a->armv7a_mmu.armv7a_cache.flush_all_data_cache(target);
+       else {
+               LOG_ERROR("flush_all_data_cache are not defined");
+               return ERROR_FAIL;
+       }
+
+       return ERROR_OK;
+}
+
+
 static const struct command_registration cortex_a_exec_command_handlers[] = {
        {
                .name = "cache_info",
@@ -3224,6 +3240,13 @@ static const struct command_registration 
cortex_a_exec_command_handlers[] = {
                .help = "display/fix current core played to gdb",
                .usage = "",
        },
+       {
+               .name = "flash_all_caches",
+               .handler = cortex_a_handle_flash_all_caches,
+               .mode = COMMAND_EXEC,
+               .help = "flash l1 and if configured l2x cache",
+               .usage = "",
+       },
 
 
        COMMAND_REGISTRATION_DONE

-- 

------------------------------------------------------------------------------
BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT
Develop your own process in accordance with the BPMN 2 standard
Learn Process modeling best practices with Bonita BPM through live exercises
http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual- event?utm_
source=Sourceforge_BPM_Camp_5_6_15&utm_medium=email&utm_campaign=VA_SF
_______________________________________________
OpenOCD-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openocd-devel

Reply via email to