From 55d17ba4392cb739e280a45ebce827b18768c87d Mon Sep 17 00:00:00 2001 From: Lars Rademacher Date: Tue, 31 Dec 2013 16:41:09 +0100 Subject: [PATCH] openocd: always try to aggregate mmu config writes As memory writes have high fix costs, we want to minimize the number of writes in consequence of the mmu configuration. This commit aggregates writes as far as possible. Change-Id: I4ba6618fc9023ae4a353585710e2933d3d7a6051 --- debuggers/openocd/openocd_wrapper.cc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/debuggers/openocd/openocd_wrapper.cc b/debuggers/openocd/openocd_wrapper.cc index ef1f1ece..f388a94c 100644 --- a/debuggers/openocd/openocd_wrapper.cc +++ b/debuggers/openocd/openocd_wrapper.cc @@ -1734,9 +1734,10 @@ static bool update_mmu_watch_add() if (first_lvl->mapped) { uint32_t descr_content = (cand_it->index << 20) | 0xc00; uint32_t descr_addr = sym_addr_PageTableFirstLevel + (cand_it->index * 4); - LOG << "Writing to " << hex << descr_addr << dec << endl; - oocdw_write_to_memory(descr_addr, 4, 1, (unsigned char*)(&descr_content), true); - LOG << "Writing entry at " << hex << descr_addr << " content: " << descr_content << dec << endl; + //LOG << "Writing to " << hex << descr_addr << dec << endl; + buffer_for_chunked_write.push_back(std::pair(descr_addr,descr_content)); + // oocdw_write_to_memory(descr_addr, 4, 1, (unsigned char*)(&descr_content), true); + //LOG << "Writing entry at " << hex << descr_addr << " content: " << descr_content << dec << endl; first_lvl->mapped = false; invalidate = true; }