This is an automated email from Gerrit.

Matthias Welwarsky (matth...@welwarsky.de) just uploaded a new patch set to 
Gerrit, which you can find at http://openocd.zylin.com/3809

-- gerrit

commit b017bf041683b65d0110272a78bad8e53c91adf2
Author: Matthias Welwarsky <matthias.welwar...@sysgo.com>
Date:   Mon Sep 26 11:08:11 2016 +0200

    aarch64: remove bogus os_border calculation
    
    The artificial "os_border" doesn't exist in aarch64 state and is wrong
    for aarch32 state as well. Remove it.
    
    Change-Id: I7c673a1404b03aa78dbd505e115fa3a93f7ca05f
    Signed-off-by: Matthias Welwarsky <matthias.welwar...@sysgo.com>

diff --git a/src/target/armv8.c b/src/target/armv8.c
index 5127c5a..a9617cb 100644
--- a/src/target/armv8.c
+++ b/src/target/armv8.c
@@ -447,7 +447,7 @@ done:
        return retval;
 }
 
-static int armv8_read_ttbcr(struct target *target)
+static __unused int armv8_read_ttbcr(struct target *target)
 {
        struct armv8_common *armv8 = target_to_armv8(target);
        struct arm_dpm *dpm = armv8->arm.dpm;
@@ -517,48 +517,18 @@ static int armv8_read_ttbcr(struct target *target)
        if (retval != ERROR_OK)
                goto done;
 
-#if 0
-       LOG_INFO("ttb1 %s ,ttb0_mask %llx",
-               armv8->armv8_mmu.ttbr1_used ? "used" : "not used",
-               armv8->armv8_mmu.ttbr0_mask);
-#endif
-       if (armv8->armv8_mmu.ttbr1_used == 1) {
-               LOG_INFO("TTBR0 access above %" PRIx64,
-                        (uint64_t)(armv8->armv8_mmu.ttbr0_mask));
-               armv8->armv8_mmu.os_border = armv8->armv8_mmu.ttbr0_mask;
-       } else {
-               /*  fix me , default is hard coded LINUX border  */
-               armv8->armv8_mmu.os_border = 0xc0000000;
-       }
+       if (armv8->armv8_mmu.ttbr1_used == 1)
+               LOG_INFO("TTBR0 access above %" PRIx64, 
(uint64_t)(armv8->armv8_mmu.ttbr0_mask));
+
 done:
        dpm->finish(dpm);
        return retval;
 }
 
-static int armv8_4K_translate(struct target *target,  target_addr_t va, 
target_addr_t *val)
-{
-       LOG_ERROR("4K page Address translation need to add");
-       return ERROR_FAIL;
-}
-
-
 /*  method adapted to cortex A : reused arm v4 v5 method*/
 int armv8_mmu_translate_va(struct target *target,  target_addr_t va, 
target_addr_t *val)
 {
-       int retval = ERROR_FAIL;
-       struct armv8_common *armv8 = target_to_armv8(target);
-       struct arm_dpm *dpm = armv8->arm.dpm;
-
-       retval = dpm->prepare(dpm);
-       retval += armv8_read_ttbcr(target);
-       if (retval != ERROR_OK)
-               goto done;
-       if (armv8->page_size == 0)
-               return armv8_4K_translate(target, va, val);
-
-done:
-       dpm->finish(dpm);
-       return ERROR_FAIL;
+       return ERROR_OK;
 }
 
 /*  V8 method VA TO PA  */
diff --git a/src/target/armv8.h b/src/target/armv8.h
index 2862ebd..07e3b41 100644
--- a/src/target/armv8.h
+++ b/src/target/armv8.h
@@ -124,7 +124,6 @@ struct armv8_mmu_common {
        /* following field mmu working way */
        int32_t ttbr1_used; /*  -1 not initialized, 0 no ttbr1 1 ttbr1 used and 
 */
        uint64_t ttbr0_mask;/*  masked to be used  */
-       uint32_t os_border;
 
        uint32_t ttbcr;     /* cache for ttbcr register */
        uint32_t ttbr_mask[2];

-- 

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
OpenOCD-devel mailing list
OpenOCD-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openocd-devel

Reply via email to