chip_tile64.h 7.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258
  1. /*
  2. * Copyright 2010 Tilera Corporation. All Rights Reserved.
  3. *
  4. * This program is free software; you can redistribute it and/or
  5. * modify it under the terms of the GNU General Public License
  6. * as published by the Free Software Foundation, version 2.
  7. *
  8. * This program is distributed in the hope that it will be useful, but
  9. * WITHOUT ANY WARRANTY; without even the implied warranty of
  10. * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE or
  11. * NON INFRINGEMENT. See the GNU General Public License for
  12. * more details.
  13. */
  14. /*
  15. * @file
  16. * Global header file.
  17. * This header file specifies defines for TILE64.
  18. */
  19. #ifndef __ARCH_CHIP_H__
  20. #define __ARCH_CHIP_H__
  21. /** Specify chip version.
  22. * When possible, prefer the CHIP_xxx symbols below for future-proofing.
  23. * This is intended for cross-compiling; native compilation should
  24. * use the predefined __tile_chip__ symbol.
  25. */
  26. #define TILE_CHIP 0
  27. /** Specify chip revision.
  28. * This provides for the case of a respin of a particular chip type;
  29. * the normal value for this symbol is "0".
  30. * This is intended for cross-compiling; native compilation should
  31. * use the predefined __tile_chip_rev__ symbol.
  32. */
  33. #define TILE_CHIP_REV 0
  34. /** The name of this architecture. */
  35. #define CHIP_ARCH_NAME "tile64"
  36. /** The ELF e_machine type for binaries for this chip. */
  37. #define CHIP_ELF_TYPE() EM_TILE64
  38. /** The alternate ELF e_machine type for binaries for this chip. */
  39. #define CHIP_COMPAT_ELF_TYPE() 0x2506
  40. /** What is the native word size of the machine? */
  41. #define CHIP_WORD_SIZE() 32
  42. /** How many bits of a virtual address are used. Extra bits must be
  43. * the sign extension of the low bits.
  44. */
  45. #define CHIP_VA_WIDTH() 32
  46. /** How many bits are in a physical address? */
  47. #define CHIP_PA_WIDTH() 36
  48. /** Size of the L2 cache, in bytes. */
  49. #define CHIP_L2_CACHE_SIZE() 65536
  50. /** Log size of an L2 cache line in bytes. */
  51. #define CHIP_L2_LOG_LINE_SIZE() 6
  52. /** Size of an L2 cache line, in bytes. */
  53. #define CHIP_L2_LINE_SIZE() (1 << CHIP_L2_LOG_LINE_SIZE())
  54. /** Associativity of the L2 cache. */
  55. #define CHIP_L2_ASSOC() 2
  56. /** Size of the L1 data cache, in bytes. */
  57. #define CHIP_L1D_CACHE_SIZE() 8192
  58. /** Log size of an L1 data cache line in bytes. */
  59. #define CHIP_L1D_LOG_LINE_SIZE() 4
  60. /** Size of an L1 data cache line, in bytes. */
  61. #define CHIP_L1D_LINE_SIZE() (1 << CHIP_L1D_LOG_LINE_SIZE())
  62. /** Associativity of the L1 data cache. */
  63. #define CHIP_L1D_ASSOC() 2
  64. /** Size of the L1 instruction cache, in bytes. */
  65. #define CHIP_L1I_CACHE_SIZE() 8192
  66. /** Log size of an L1 instruction cache line in bytes. */
  67. #define CHIP_L1I_LOG_LINE_SIZE() 6
  68. /** Size of an L1 instruction cache line, in bytes. */
  69. #define CHIP_L1I_LINE_SIZE() (1 << CHIP_L1I_LOG_LINE_SIZE())
  70. /** Associativity of the L1 instruction cache. */
  71. #define CHIP_L1I_ASSOC() 1
  72. /** Stride with which flush instructions must be issued. */
  73. #define CHIP_FLUSH_STRIDE() CHIP_L2_LINE_SIZE()
  74. /** Stride with which inv instructions must be issued. */
  75. #define CHIP_INV_STRIDE() CHIP_L1D_LINE_SIZE()
  76. /** Stride with which finv instructions must be issued. */
  77. #define CHIP_FINV_STRIDE() CHIP_L1D_LINE_SIZE()
  78. /** Can the local cache coherently cache data that is homed elsewhere? */
  79. #define CHIP_HAS_COHERENT_LOCAL_CACHE() 0
  80. /** How many simultaneous outstanding victims can the L2 cache have? */
  81. #define CHIP_MAX_OUTSTANDING_VICTIMS() 2
  82. /** Does the TLB support the NC and NOALLOC bits? */
  83. #define CHIP_HAS_NC_AND_NOALLOC_BITS() 0
  84. /** Does the chip support hash-for-home caching? */
  85. #define CHIP_HAS_CBOX_HOME_MAP() 0
  86. /** Number of entries in the chip's home map tables. */
  87. /* #define CHIP_CBOX_HOME_MAP_SIZE() -- does not apply to chip 0 */
  88. /** Do uncacheable requests miss in the cache regardless of whether
  89. * there is matching data? */
  90. #define CHIP_HAS_ENFORCED_UNCACHEABLE_REQUESTS() 0
  91. /** Does the mf instruction wait for victims? */
  92. #define CHIP_HAS_MF_WAITS_FOR_VICTIMS() 1
  93. /** Does the chip have an "inv" instruction that doesn't also flush? */
  94. #define CHIP_HAS_INV() 0
  95. /** Does the chip have a "wh64" instruction? */
  96. #define CHIP_HAS_WH64() 0
  97. /** Does this chip have a 'dword_align' instruction? */
  98. #define CHIP_HAS_DWORD_ALIGN() 0
  99. /** Number of performance counters. */
  100. #define CHIP_PERFORMANCE_COUNTERS() 2
  101. /** Does this chip have auxiliary performance counters? */
  102. #define CHIP_HAS_AUX_PERF_COUNTERS() 0
  103. /** Is the CBOX_MSR1 SPR supported? */
  104. #define CHIP_HAS_CBOX_MSR1() 0
  105. /** Is the TILE_RTF_HWM SPR supported? */
  106. #define CHIP_HAS_TILE_RTF_HWM() 0
  107. /** Is the TILE_WRITE_PENDING SPR supported? */
  108. #define CHIP_HAS_TILE_WRITE_PENDING() 0
  109. /** Is the PROC_STATUS SPR supported? */
  110. #define CHIP_HAS_PROC_STATUS_SPR() 0
  111. /** Is the DSTREAM_PF SPR supported? */
  112. #define CHIP_HAS_DSTREAM_PF() 0
  113. /** Log of the number of mshims we have. */
  114. #define CHIP_LOG_NUM_MSHIMS() 2
  115. /** Are the bases of the interrupt vector areas fixed? */
  116. #define CHIP_HAS_FIXED_INTVEC_BASE() 1
  117. /** Are the interrupt masks split up into 2 SPRs? */
  118. #define CHIP_HAS_SPLIT_INTR_MASK() 1
  119. /** Is the cycle count split up into 2 SPRs? */
  120. #define CHIP_HAS_SPLIT_CYCLE() 1
  121. /** Does the chip have a static network? */
  122. #define CHIP_HAS_SN() 1
  123. /** Does the chip have a static network processor? */
  124. #define CHIP_HAS_SN_PROC() 1
  125. /** Size of the L1 static network processor instruction cache, in bytes. */
  126. #define CHIP_L1SNI_CACHE_SIZE() 2048
  127. /** Does the chip have DMA support in each tile? */
  128. #define CHIP_HAS_TILE_DMA() 1
  129. /** Does the chip have the second revision of the directly accessible
  130. * dynamic networks? This encapsulates a number of characteristics,
  131. * including the absence of the catch-all, the absence of inline message
  132. * tags, the absence of support for network context-switching, and so on.
  133. */
  134. #define CHIP_HAS_REV1_XDN() 0
  135. /** Does the chip have cmpexch and similar (fetchadd, exch, etc.)? */
  136. #define CHIP_HAS_CMPEXCH() 0
  137. /** Does the chip have memory-mapped I/O support? */
  138. #define CHIP_HAS_MMIO() 0
  139. /** Does the chip have post-completion interrupts? */
  140. #define CHIP_HAS_POST_COMPLETION_INTERRUPTS() 0
  141. /** Does the chip have native single step support? */
  142. #define CHIP_HAS_SINGLE_STEP() 0
  143. #ifndef __OPEN_SOURCE__ /* features only relevant to hypervisor-level code */
  144. /** How many entries are present in the instruction TLB? */
  145. #define CHIP_ITLB_ENTRIES() 8
  146. /** How many entries are present in the data TLB? */
  147. #define CHIP_DTLB_ENTRIES() 16
  148. /** How many MAF entries does the XAUI shim have? */
  149. #define CHIP_XAUI_MAF_ENTRIES() 16
  150. /** Does the memory shim have a source-id table? */
  151. #define CHIP_HAS_MSHIM_SRCID_TABLE() 1
  152. /** Does the L1 instruction cache clear on reset? */
  153. #define CHIP_HAS_L1I_CLEAR_ON_RESET() 0
  154. /** Does the chip come out of reset with valid coordinates on all tiles?
  155. * Note that if defined, this also implies that the upper left is 1,1.
  156. */
  157. #define CHIP_HAS_VALID_TILE_COORD_RESET() 0
  158. /** Does the chip have unified packet formats? */
  159. #define CHIP_HAS_UNIFIED_PACKET_FORMATS() 0
  160. /** Does the chip support write reordering? */
  161. #define CHIP_HAS_WRITE_REORDERING() 0
  162. /** Does the chip support Y-X routing as well as X-Y? */
  163. #define CHIP_HAS_Y_X_ROUTING() 0
  164. /** Is INTCTRL_3 managed with the correct MPL? */
  165. #define CHIP_HAS_INTCTRL_3_STATUS_FIX() 0
  166. /** Is it possible to configure the chip to be big-endian? */
  167. #define CHIP_HAS_BIG_ENDIAN_CONFIG() 0
  168. /** Is the CACHE_RED_WAY_OVERRIDDEN SPR supported? */
  169. #define CHIP_HAS_CACHE_RED_WAY_OVERRIDDEN() 0
  170. /** Is the DIAG_TRACE_WAY SPR supported? */
  171. #define CHIP_HAS_DIAG_TRACE_WAY() 0
  172. /** Is the MEM_STRIPE_CONFIG SPR supported? */
  173. #define CHIP_HAS_MEM_STRIPE_CONFIG() 0
  174. /** Are the TLB_PERF SPRs supported? */
  175. #define CHIP_HAS_TLB_PERF() 0
  176. /** Is the VDN_SNOOP_SHIM_CTL SPR supported? */
  177. #define CHIP_HAS_VDN_SNOOP_SHIM_CTL() 0
  178. /** Does the chip support rev1 DMA packets? */
  179. #define CHIP_HAS_REV1_DMA_PACKETS() 0
  180. /** Does the chip have an IPI shim? */
  181. #define CHIP_HAS_IPI() 0
  182. #endif /* !__OPEN_SOURCE__ */
  183. #endif /* __ARCH_CHIP_H__ */