aarch64: remove bogus os_border calculation 09/3809/3
authorMatthias Welwarsky <matthias.welwarsky@sysgo.com>
Mon, 26 Sep 2016 09:08:11 +0000 (11:08 +0200)
committerMatthias Welwarsky <matthias.welwarsky@sysgo.com>
Fri, 10 Feb 2017 13:18:34 +0000 (14:18 +0100)
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.welwarsky@sysgo.com>
src/target/armv8.c
src/target/armv8.h

index 467c7716fc741bd0e1a4cd82544c0fde43aa41bb..d644963b9c7c1439a36e751a7c492f455bc6785c 100644 (file)
@@ -441,7 +441,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;
@@ -511,48 +511,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  */
index 2862ebd8c538e4fa9846e98f173559fad24d91ca..07e3b419a715fc65671f4164680406f277d0a47c 100644 (file)
@@ -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];

Linking to existing account procedure

If you already have an account and want to add another login method you MUST first sign in with your existing account and then change URL to read https://review.openocd.org/login/?link to get to this page again but this time it'll work for linking. Thank you.

SSH host keys fingerprints

1024 SHA256:YKx8b7u5ZWdcbp7/4AeXNaqElP49m6QrwfXaqQGJAOk gerrit-code-review@openocd.zylin.com (DSA)
384 SHA256:jHIbSQa4REvwCFG4cq5LBlBLxmxSqelQPem/EXIrxjk gerrit-code-review@openocd.org (ECDSA)
521 SHA256:UAOPYkU9Fjtcao0Ul/Rrlnj/OsQvt+pgdYSZ4jOYdgs gerrit-code-review@openocd.org (ECDSA)
256 SHA256:A13M5QlnozFOvTllybRZH6vm7iSt0XLxbA48yfc2yfY gerrit-code-review@openocd.org (ECDSA)
256 SHA256:spYMBqEYoAOtK7yZBrcwE8ZpYt6b68Cfh9yEVetvbXg gerrit-code-review@openocd.org (ED25519)
+--[ED25519 256]--+
|=..              |
|+o..   .         |
|*.o   . .        |
|+B . . .         |
|Bo. = o S        |
|Oo.+ + =         |
|oB=.* = . o      |
| =+=.+   + E     |
|. .=o   . o      |
+----[SHA256]-----+
2048 SHA256:0Onrb7/PHjpo6iVZ7xQX2riKN83FJ3KGU0TvI0TaFG4 gerrit-code-review@openocd.zylin.com (RSA)