ipdbg: fix double free of virtual-ir data
[openocd.git] / tcl / target / renesas_rcar_gen3.cfg
index 36e654491580deac545155be4cbaada9b6519992..8dc0e7a0ddc695a21949ce1f5500c9b87f97ab6d 100644 (file)
@@ -1,3 +1,5 @@
+# SPDX-License-Identifier: GPL-2.0-or-later
+
 # Renesas R-Car Generation 3 SOCs
 # - There are a combination of Cortex-A57s, Cortex-A53s, and Cortex-R7 for each Gen3 SOC
 # - Each SOC can boot through any of the, up to 3, core types that it has
@@ -7,6 +9,7 @@
 #  H3: Cortex-A57 x 4, Cortex-A53 x 4, Cortex-R7 x 2 (Lock-Step)
 # M3W: Cortex-A57 x 2, Cortex-A53 x 4, Cortex-R7 x 2 (Lock-Step)
 # M3N: Cortex-A57 x 2,                 Cortex-R7 x 2 (Lock-Step)
+# V3U:                 Cortex-A76 x 8, Cortex-R52 x2 (Lock-Step)
 # V3H:                 Cortex-A53 x 4, Cortex-R7 x 2 (Lock-Step)
 # V3M:                 Cortex-A53 x 2, Cortex-R7 x 2 (Lock-Step)
 #  E3:                 Cortex-A53 x 1, Cortex-R7 x 2 (Lock-Step)
@@ -24,6 +27,12 @@ if { [info exists SOC] } {
        set _soc H3
 }
 
+set _num_ca53 0
+set _num_ca57 0
+set _num_ca76 0
+set _num_cr52 0
+set _num_cr7 0
+
 # Set configuration for each SOC and the default 'BOOT_CORE'
 switch $_soc {
        H3 {
@@ -75,6 +84,12 @@ switch $_soc {
                set _num_cr7 0
                set _boot_core CA53
        }
+       V3U {
+               set _CHIPNAME r8a779a0
+               set _num_ca76 8
+               set _num_cr52 1
+               set _boot_core CA76
+       }
        default {
                error "'$_soc' is invalid!"
        }
@@ -96,7 +111,7 @@ if { [info exists DAP_TAPID] } {
        set _DAP_TAPID 0x5ba00477
 }
 
-echo "\t$_soc - $_num_ca57 CA57(s), $_num_ca53 CA53(s), $_num_cr7 CR7(s)"
+echo "\t$_soc - $_num_ca76 CA76(s), $_num_ca57 CA57(s), $_num_ca53 CA53(s), $_num_cr52 CR52(s), $_num_cr7 CR7(s)"
 echo "\tBoot Core - $_boot_core\n"
 
 set _DAPNAME $_CHIPNAME.dap
@@ -105,10 +120,14 @@ set _DAPNAME $_CHIPNAME.dap
 jtag newtap $_CHIPNAME cpu -irlen 4 -ircapture 0x01 -irmask 0x0f -expected-id $_DAP_TAPID
 dap create $_DAPNAME -chain-position $_CHIPNAME.cpu
 
+set CA76_DBGBASE {0x81410000 0x81510000 0x81610000 0x81710000 0x81c10000 0x81d10000 0x81e10000 0x81f10000}
+set CA76_CTIBASE {0x81420000 0x81520000 0x81620000 0x81720000 0x81c20000 0x81d20000 0x81e20000 0x81f20000}
 set CA57_DBGBASE {0x80410000 0x80510000 0x80610000 0x80710000}
 set CA57_CTIBASE {0x80420000 0x80520000 0x80620000 0x80720000}
 set CA53_DBGBASE {0x80C10000 0x80D10000 0x80E10000 0x80F10000}
 set CA53_CTIBASE {0x80C20000 0x80D20000 0x80E20000 0x80F20000}
+set CR52_DBGBASE 0x80c10000
+set CR52_CTIBASE 0x80c20000
 set  CR7_DBGBASE 0x80910000
 set  CR7_CTIBASE 0x80918000
 
@@ -137,33 +156,46 @@ proc setup_a5x {core_name dbgbase ctibase num boot} {
        }
 }
 
-proc setup_cr7 {dbgbase ctibase boot} {
+proc setup_crx {core_name dbgbase ctibase num boot} {
        global _CHIPNAME
        global _DAPNAME
-       set _TARGETNAME $_CHIPNAME.r7
-       set _CTINAME $_TARGETNAME.cti
-       cti create $_CTINAME -dap $_DAPNAME -ap-num 1 -baseaddr $ctibase
-       set _command "target create $_TARGETNAME cortex_r4 -dap $_DAPNAME \
-               -ap-num 1 -dbgbase $dbgbase"
-       if { $boot == 1 } {
-               set _targets "$_TARGETNAME"
-       } else {
-               set _command "$_command -defer-examine"
+       for { set _core 0 } { $_core < $num } { incr _core } {
+               set _TARGETNAME $_CHIPNAME.$core_name
+               set _CTINAME $_TARGETNAME.cti
+               cti create $_CTINAME -dap $_DAPNAME -ap-num 1 -baseaddr $ctibase
+               if { $core_name == "r52" } {
+                       set _command "target create $_TARGETNAME armv8r -dap $_DAPNAME \
+                               -ap-num 1 -dbgbase $dbgbase -cti $_CTINAME"
+               } else {
+                       set _command "target create $_TARGETNAME cortex_r4 -dap $_DAPNAME \
+                               -ap-num 1 -dbgbase $dbgbase"
+               }
+               if { $boot == 1 } {
+                       set _targets "$_TARGETNAME"
+               } else {
+                       set _command "$_command -defer-examine"
+               }
+               eval $_command
        }
-       eval $_command
 }
 
 # Organize target list based on the boot core
-if { [string equal $_boot_core CA57] } {
+if { [string equal $_boot_core CA76] } {
+       setup_a5x a76 $CA76_DBGBASE $CA76_CTIBASE $_num_ca76 1
+       setup_crx r52 $CR52_DBGBASE $CR52_CTIBASE $_num_cr52 0
+} elseif { [string equal $_boot_core CA57] } {
        setup_a5x a57 $CA57_DBGBASE $CA57_CTIBASE $_num_ca57 1
        setup_a5x a53 $CA53_DBGBASE $CA53_CTIBASE $_num_ca53 0
-       setup_cr7 $CR7_DBGBASE $CR7_CTIBASE 0
+       setup_crx r7  $CR7_DBGBASE  $CR7_CTIBASE  $_num_cr7  0
 } elseif { [string equal $_boot_core CA53] } {
        setup_a5x a53 $CA53_DBGBASE $CA53_CTIBASE $_num_ca53 1
        setup_a5x a57 $CA57_DBGBASE $CA57_CTIBASE $_num_ca57 0
-       setup_cr7 $CR7_DBGBASE $CR7_CTIBASE 0
+       setup_crx r7  $CR7_DBGBASE  $CR7_CTIBASE  $_num_cr7  0
+} elseif { [string equal $_boot_core CR52] } {
+       setup_crx r52 $CR52_DBGBASE $CR52_CTIBASE $_num_cr52 1
+       setup_a5x a76 $CA76_DBGBASE $CA76_CTIBASE $_num_ca76 0
 } else {
-       setup_cr7 $CR7_DBGBASE $CR7_CTIBASE 1
+       setup_crx r7  $CR7_DBGBASE  $CR7_CTIBASE  $_num_cr7  1
        setup_a5x a57 $CA57_DBGBASE $CA57_CTIBASE $_num_ca57 0
        setup_a5x a53 $CA53_DBGBASE $CA53_CTIBASE $_num_ca53 0
 }

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)