This is an automated email from Gerrit.

Brad Riensche (brad.riens...@gmail.com) just uploaded a new patch set to 
Gerrit, which you can find at http://openocd.zylin.com/1914

-- gerrit

commit 1389726956bdbbdee60ec878bf1603f18373a53c
Author: Brad Riensche <brad.riens...@gmail.com>
Date:   Thu Jan 30 08:57:20 2014 -0600

    targets: merge 1518 into 1427
    
    Change-Id: Ie8442700dd4f409e7fc6560074856d1bee65ab45
    Signed-off-by: Brad Riensche <brad.riens...@gmail.com>

diff --git a/src/target/arm_adi_v5.c b/src/target/arm_adi_v5.c
index f71a798..28106be 100644
--- a/src/target/arm_adi_v5.c
+++ b/src/target/arm_adi_v5.c
@@ -1031,17 +1031,16 @@ static int dap_rom_display(struct command_context 
*cmd_ctx,
        int retval;
        uint32_t cid0, cid1, cid2, cid3, memtype, romentry;
        uint16_t entry_offset;
-       int i;
-       char tabs[16 + 1];
+       char tabs[20];
 
        if (depth > 16) {
                command_print(cmd_ctx, "\tTables too deep");
                return ERROR_FAIL;
        }
-
-       for (i = 0; i < depth; ++i)
-               tabs[i] = '\t';
-       tabs[i] = '\0';
+       if (depth == 0)
+               tabs[0] = '\0';
+       else
+               snprintf(tabs, sizeof(tabs)-1, "[L%02i] ", depth);
 
        /* bit 16 of apid indicates a memory access port */
        if (dbgbase & 0x02)
@@ -1139,12 +1138,12 @@ static int dap_rom_display(struct command_context 
*cmd_ctx,
                                return retval;
                        c_cid3 &= 0xff;
 
-                       command_print(cmd_ctx, "\t%s\tComponent base address 
0x%" PRIx32 ","
-                                       "start address 0x%" PRIx32, tabs, 
component_base,
+                       command_print(cmd_ctx, "\t\tComponent base address 0x%" 
PRIx32 ","
+                                       "start address 0x%" PRIx32, 
component_base,
                        /* component may take multiple 4K pages */
                        component_base - 0x1000*(c_pid4 >> 4));
-                       command_print(cmd_ctx, "\t%s\tComponent class is 0x%x, 
%s",
-                                       tabs, (int) (c_cid1 >> 4) & 0xf,
+                       command_print(cmd_ctx, "\t\tComponent class is 0x%x, 
%s",
+                                       (int) (c_cid1 >> 4) & 0xf,
                                        /* See ARM IHI 0029B Table 3-3 */
                                        class_description[(c_cid1 >> 4) & 0xf]);
 
@@ -1255,26 +1254,25 @@ static int dap_rom_display(struct command_context 
*cmd_ctx,
                                        }
                                        break;
                                }
-                               command_print(cmd_ctx, "\t%s\tType is 0x%2.2x, 
%s, %s",
-                                               tabs, (unsigned) (devtype & 
0xff),
+                               command_print(cmd_ctx, "\t\tType is 0x%2.2x, 
%s, %s",
+                                               (unsigned) (devtype & 0xff),
                                                major, subtype);
                                /* REVISIT also show 0xfc8 DevId */
                        }
 
                        if (!is_dap_cid_ok(cid3, cid2, cid1, cid0))
                                command_print(cmd_ctx,
-                                               "\t%s\tCID3 0%2.2x"
+                                               "\t\tCID3 0%2.2x"
                                                ", CID2 0%2.2x"
                                                ", CID1 0%2.2x"
                                                ", CID0 0%2.2x",
-                                               tabs,
                                                (int) c_cid3,
                                                (int) c_cid2,
                                                (int)c_cid1,
                                                (int)c_cid0);
                        command_print(cmd_ctx,
-                       "\t%s\tPeripheral ID[4..0] = hex "
-                       "%2.2x %2.2x %2.2x %2.2x %2.2x", tabs,
+                       "\t\tPeripheral ID[4..0] = hex "
+                       "%2.2x %2.2x %2.2x %2.2x %2.2x",
                        (int) c_pid4, (int) c_pid3, (int) c_pid2,
                        (int) c_pid1, (int) c_pid0);
 
@@ -1368,6 +1366,14 @@ static int dap_rom_display(struct command_context 
*cmd_ctx,
                                type = "Cortex-R4 ETM";
                                full = "(Embedded Trace)";
                                break;
+                       case 0x950:
+                               type = "CoreSight Component";
+                               full = "(unidentified Cortex-A9 component)";
+                               break;
+                       case 0x9a0:
+                               type = "CoreSight PMU";
+                               full = "(Performance Monitoring Unit)";
+                               break;
                        case 0x9a1:
                                type = "Cortex-M4 TPUI";
                                full = "(Trace Port Interface Unit)";
@@ -1385,8 +1391,8 @@ static int dap_rom_display(struct command_context 
*cmd_ctx,
                                full = "";
                                break;
                        }
-                       command_print(cmd_ctx, "\t%s\tPart is %s %s",
-                                       tabs, type, full);
+                       command_print(cmd_ctx, "\t\tPart is %s %s",
+                                       type, full);
 
                        /* ROM Table? */
                        if (((c_cid1 >> 4) & 0x0f) == 1) {

-- 

------------------------------------------------------------------------------
WatchGuard Dimension instantly turns raw network data into actionable 
security intelligence. It gives you real-time visual feedback on key
security issues and trends.  Skip the complicated setup - simply import
a virtual appliance and go from zero to informed in seconds.
http://pubads.g.doubleclick.net/gampad/clk?id=123612991&iu=/4140/ostg.clktrk
_______________________________________________
OpenOCD-devel mailing list
OpenOCD-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openocd-devel

Reply via email to