This is an automated email from Gerrit.

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

-- gerrit

commit 257c9b26e8888fffcf76479cd4a6fb5473d7ccb6
Author: Alamy Liu <[email protected]>
Date:   Thu Oct 8 11:14:18 2015 -0700

    aarch64: Add dpm_to_armv8() & dpm_to_aarch64() helper functions
    
    Get "aarch64_common" and "armv8_common" structures from
    "struct arm_dpm" structure.
    
    Change-Id: Ief3468ebd432b10874b99a58715acd9c032c5db0
    Signed-off-by: Alamy Liu <[email protected]>

diff --git a/src/target/aarch64.h b/src/target/aarch64.h
index 5be9f5c..090af69 100644
--- a/src/target/aarch64.h
+++ b/src/target/aarch64.h
@@ -76,45 +76,16 @@ target_to_aarch64(struct target *target)
        return container_of(target->arch_info, struct aarch64_common, 
armv8_common.arm);
 }
 
-/*
- * DDI0487A_f_armv8_arm.pdf
- * H9.2.41 EDSCR, External Debug Status and Control Register
- *
- * Valid PE status values are:
- *     bit[5:4]        bit[3:0]
- *     00                      0001  0010  0111
- *     01                      0011,       1011, 1111
- *     10                      0011, 0111, 1011, 1111
- *     11                      0011, 0111, 1011
- */
-static inline bool is_pe_status_valid(uint32_t edscr)
+static inline struct aarch64_common *dpm_to_aarch64(struct arm_dpm *dpm)
 {
-       uint16_t status = (edscr & 0b111111);
-       uint16_t status_bit54 = (status & 0b110000) >> 4;       /* bits[5:4] */
-       uint16_t status_bit30 = (status & 0b001111);            /* bits[3:0] */
-       uint16_t status_bit10 = (status & 0b000011);            /* bits[1:0] */
-
-       if (status_bit54 == 0b00) {
-               /* 3 special cases */
-               if ((status_bit30 == 0b0010) || (status == 0b0001) || (status 
== 0b0111))
-                       return true;
-               else
-                       return false;
-       } else if (status_bit10 == 0b11) {
-               /* Mostly valid, except 0b010011 & 0b111111 */
-               if ((status == 0b010111) || (status == 0b111111))
-                       return false;
-               else
-                       return true;
-       } else {
-               /* All other values are reserved: invalid */
-               return false;
-       }
-
-       return false;
+       return container_of(dpm, struct aarch64_common, armv8_common.dpm);
 }
 
+static inline struct armv8_common *dpm_to_armv8(struct arm_dpm *dpm)
+{
+       return container_of(dpm, struct armv8_common, dpm);
+}
 
-#define        IS_PE_STATUS_HALTED(status)
+// #define     IS_PE_STATUS_HALTED(status)
 
 #endif /* AARCH64_H */

-- 

------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140
_______________________________________________
OpenOCD-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openocd-devel

Reply via email to