bcm2711.cfg 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. # SPDX-License-Identifier: GPL-2.0-or-later
  2. # The Broadcom BCM2711 used in Raspberry Pi 4
  3. # No documentation was found on Broadcom website
  4. # Partial information is available in raspberry pi website:
  5. # https://www.raspberrypi.org/documentation/hardware/raspberrypi/bcm2711/
  6. if { [info exists CHIPNAME] } {
  7. set _CHIPNAME $CHIPNAME
  8. } else {
  9. set _CHIPNAME bcm2711
  10. }
  11. if { [info exists CHIPCORES] } {
  12. set _cores $CHIPCORES
  13. } else {
  14. set _cores 4
  15. }
  16. if { [info exists USE_SMP] } {
  17. set _USE_SMP $USE_SMP
  18. } else {
  19. set _USE_SMP 0
  20. }
  21. if { [info exists DAP_TAPID] } {
  22. set _DAP_TAPID $DAP_TAPID
  23. } else {
  24. set _DAP_TAPID 0x4ba00477
  25. }
  26. jtag newtap $_CHIPNAME cpu -expected-id $_DAP_TAPID -irlen 4
  27. adapter speed 4000
  28. dap create $_CHIPNAME.dap -chain-position $_CHIPNAME.cpu
  29. # MEM-AP for direct access
  30. target create $_CHIPNAME.ap mem_ap -dap $_CHIPNAME.dap -ap-num 0
  31. # these addresses are obtained from the ROM table via 'dap info 0' command
  32. set _DBGBASE {0x80410000 0x80510000 0x80610000 0x80710000}
  33. set _CTIBASE {0x80420000 0x80520000 0x80620000 0x80720000}
  34. set _smp_command "target smp"
  35. for { set _core 0 } { $_core < $_cores } { incr _core } {
  36. set _CTINAME $_CHIPNAME.cti$_core
  37. set _TARGETNAME $_CHIPNAME.cpu$_core
  38. cti create $_CTINAME -dap $_CHIPNAME.dap -ap-num 0 -baseaddr [lindex $_CTIBASE $_core]
  39. target create $_TARGETNAME aarch64 -dap $_CHIPNAME.dap -ap-num 0 -dbgbase [lindex $_DBGBASE $_core] -cti $_CTINAME
  40. set _smp_command "$_smp_command $_TARGETNAME"
  41. }
  42. if {$_USE_SMP} {
  43. eval $_smp_command
  44. }
  45. # default target is cpu0
  46. targets $_CHIPNAME.cpu0