bluefield.cfg 2.0 KB

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