bluefield.cfg 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. # SPDX-License-Identifier: GPL-2.0-or-later
  2. # BlueField SoC Target
  3. set _CHIPNAME bluefield
  4. # Specify the target device
  5. #rshim device /dev/rshim0/rshim
  6. # Main DAP
  7. if { [info exists DAP_TAPID] } {
  8. set _DAP_TAPID $DAP_TAPID
  9. } else {
  10. set _DAP_TAPID 0x4ba00477
  11. }
  12. adapter speed 1500
  13. swd newdap $_CHIPNAME cpu -expected-id $_DAP_TAPID
  14. dap create $_CHIPNAME.dap -chain-position $_CHIPNAME.cpu
  15. # Initialize the target name and command variable.
  16. set _TARGETNAME $_CHIPNAME.cpu
  17. set _smp_command ""
  18. # CTI relative address
  19. set $_TARGETNAME.cti(0) 0xC4020000
  20. set $_TARGETNAME.cti(1) 0xC4120000
  21. set $_TARGETNAME.cti(2) 0xC8020000
  22. set $_TARGETNAME.cti(3) 0xC8120000
  23. set $_TARGETNAME.cti(4) 0xCC020000
  24. set $_TARGETNAME.cti(5) 0xCC120000
  25. set $_TARGETNAME.cti(6) 0xD0020000
  26. set $_TARGETNAME.cti(7) 0xD0120000
  27. set $_TARGETNAME.cti(8) 0xD4020000
  28. set $_TARGETNAME.cti(9) 0xD4120000
  29. set $_TARGETNAME.cti(10) 0xD8020000
  30. set $_TARGETNAME.cti(11) 0xD8120000
  31. set $_TARGETNAME.cti(12) 0xDC020000
  32. set $_TARGETNAME.cti(13) 0xDC120000
  33. set $_TARGETNAME.cti(14) 0xE0020000
  34. set $_TARGETNAME.cti(15) 0xE0120000
  35. # Create debug targets for a number of cores starting from core '_core_start'.
  36. # Adjust the numbers according to board configuration.
  37. set _core_start 0
  38. set _cores 16
  39. # Create each core
  40. for { set _core $_core_start } { $_core < $_core_start + $_cores } { incr _core 1 } {
  41. cti create cti$_core -dap $_CHIPNAME.dap -baseaddr [set $_TARGETNAME.cti($_core)] -ap-num 0
  42. set _command "target create ${_TARGETNAME}$_core aarch64 \
  43. -dap $_CHIPNAME.dap -coreid $_core -cti cti$_core"
  44. if { $_core != $_core_start } {
  45. set _smp_command "$_smp_command ${_TARGETNAME}$_core"
  46. } else {
  47. set _smp_command "target smp ${_TARGETNAME}$_core"
  48. }
  49. eval $_command
  50. }
  51. # Configure SMP
  52. if { $_cores > 1 } {
  53. eval $_smp_command
  54. }
  55. # Make sure the default target is the boot core
  56. targets ${_TARGETNAME}0
  57. proc core_up { args } {
  58. global _TARGETNAME
  59. # Examine remaining cores
  60. foreach _core $args {
  61. ${_TARGETNAME}$_core arp_examine
  62. }
  63. }