war.h 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182
  1. /*
  2. * This file is subject to the terms and conditions of the GNU General Public
  3. * License. See the file "COPYING" in the main directory of this archive
  4. * for more details.
  5. *
  6. * Copyright (C) 2002, 2004, 2007 by Ralf Baechle
  7. */
  8. #ifndef _ASM_WAR_H
  9. #define _ASM_WAR_H
  10. #include <war.h>
  11. /*
  12. * Another R4600 erratum. Due to the lack of errata information the exact
  13. * technical details aren't known. I've experimentally found that disabling
  14. * interrupts during indexed I-cache flushes seems to be sufficient to deal
  15. * with the issue.
  16. */
  17. #ifndef R4600_V1_INDEX_ICACHEOP_WAR
  18. #error Check setting of R4600_V1_INDEX_ICACHEOP_WAR for your platform
  19. #endif
  20. /*
  21. * Pleasures of the R4600 V1.x. Cite from the IDT R4600 V1.7 errata:
  22. *
  23. * 18. The CACHE instructions Hit_Writeback_Invalidate_D, Hit_Writeback_D,
  24. * Hit_Invalidate_D and Create_Dirty_Excl_D should only be
  25. * executed if there is no other dcache activity. If the dcache is
  26. * accessed for another instruction immeidately preceding when these
  27. * cache instructions are executing, it is possible that the dcache
  28. * tag match outputs used by these cache instructions will be
  29. * incorrect. These cache instructions should be preceded by at least
  30. * four instructions that are not any kind of load or store
  31. * instruction.
  32. *
  33. * This is not allowed: lw
  34. * nop
  35. * nop
  36. * nop
  37. * cache Hit_Writeback_Invalidate_D
  38. *
  39. * This is allowed: lw
  40. * nop
  41. * nop
  42. * nop
  43. * nop
  44. * cache Hit_Writeback_Invalidate_D
  45. */
  46. #ifndef R4600_V1_HIT_CACHEOP_WAR
  47. #error Check setting of R4600_V1_HIT_CACHEOP_WAR for your platform
  48. #endif
  49. /*
  50. * Writeback and invalidate the primary cache dcache before DMA.
  51. *
  52. * R4600 v2.0 bug: "The CACHE instructions Hit_Writeback_Inv_D,
  53. * Hit_Writeback_D, Hit_Invalidate_D and Create_Dirty_Exclusive_D will only
  54. * operate correctly if the internal data cache refill buffer is empty. These
  55. * CACHE instructions should be separated from any potential data cache miss
  56. * by a load instruction to an uncached address to empty the response buffer."
  57. * (Revision 2.0 device errata from IDT available on http://www.idt.com/
  58. * in .pdf format.)
  59. */
  60. #ifndef R4600_V2_HIT_CACHEOP_WAR
  61. #error Check setting of R4600_V2_HIT_CACHEOP_WAR for your platform
  62. #endif
  63. /*
  64. * When an interrupt happens on a CP0 register read instruction, CPU may
  65. * lock up or read corrupted values of CP0 registers after it enters
  66. * the exception handler.
  67. *
  68. * This workaround makes sure that we read a "safe" CP0 register as the
  69. * first thing in the exception handler, which breaks one of the
  70. * pre-conditions for this problem.
  71. */
  72. #ifndef R5432_CP0_INTERRUPT_WAR
  73. #error Check setting of R5432_CP0_INTERRUPT_WAR for your platform
  74. #endif
  75. /*
  76. * Workaround for the Sibyte M3 errata the text of which can be found at
  77. *
  78. * http://sibyte.broadcom.com/hw/bcm1250/docs/pass2errata.txt
  79. *
  80. * This will enable the use of a special TLB refill handler which does a
  81. * consistency check on the information in c0_badvaddr and c0_entryhi and
  82. * will just return and take the exception again if the information was
  83. * found to be inconsistent.
  84. */
  85. #ifndef BCM1250_M3_WAR
  86. #error Check setting of BCM1250_M3_WAR for your platform
  87. #endif
  88. /*
  89. * This is a DUART workaround related to glitches around register accesses
  90. */
  91. #ifndef SIBYTE_1956_WAR
  92. #error Check setting of SIBYTE_1956_WAR for your platform
  93. #endif
  94. /*
  95. * Fill buffers not flushed on CACHE instructions
  96. *
  97. * Hit_Invalidate_I cacheops invalidate an icache line but the refill
  98. * for that line can get stale data from the fill buffer instead of
  99. * accessing memory if the previous icache miss was also to that line.
  100. *
  101. * Workaround: generate an icache refill from a different line
  102. *
  103. * Affects:
  104. * MIPS 4K RTL revision <3.0, PRID revision <4
  105. */
  106. #ifndef MIPS4K_ICACHE_REFILL_WAR
  107. #error Check setting of MIPS4K_ICACHE_REFILL_WAR for your platform
  108. #endif
  109. /*
  110. * Missing implicit forced flush of evictions caused by CACHE
  111. * instruction
  112. *
  113. * Evictions caused by a CACHE instructions are not forced on to the
  114. * bus. The BIU gives higher priority to fetches than to the data from
  115. * the eviction buffer and no collision detection is performed between
  116. * fetches and pending data from the eviction buffer.
  117. *
  118. * Workaround: Execute a SYNC instruction after the cache instruction
  119. *
  120. * Affects:
  121. * MIPS 5Kc,5Kf RTL revision <2.3, PRID revision <8
  122. * MIPS 20Kc RTL revision <4.0, PRID revision <?
  123. */
  124. #ifndef MIPS_CACHE_SYNC_WAR
  125. #error Check setting of MIPS_CACHE_SYNC_WAR for your platform
  126. #endif
  127. /*
  128. * From TX49/H2 manual: "If the instruction (i.e. CACHE) is issued for
  129. * the line which this instruction itself exists, the following
  130. * operation is not guaranteed."
  131. *
  132. * Workaround: do two phase flushing for Index_Invalidate_I
  133. */
  134. #ifndef TX49XX_ICACHE_INDEX_INV_WAR
  135. #error Check setting of TX49XX_ICACHE_INDEX_INV_WAR for your platform
  136. #endif
  137. /*
  138. * On the RM9000 there is a problem which makes the CreateDirtyExclusive
  139. * eache operation unusable on SMP systems.
  140. */
  141. #ifndef RM9000_CDEX_SMP_WAR
  142. #error Check setting of RM9000_CDEX_SMP_WAR for your platform
  143. #endif
  144. /*
  145. * The RM7000 processors and the E9000 cores have a bug (though PMC-Sierra
  146. * opposes it being called that) where invalid instructions in the same
  147. * I-cache line worth of instructions being fetched may case spurious
  148. * exceptions.
  149. */
  150. #ifndef ICACHE_REFILLS_WORKAROUND_WAR
  151. #error Check setting of ICACHE_REFILLS_WORKAROUND_WAR for your platform
  152. #endif
  153. /*
  154. * On the R10000 upto version 2.6 (not sure about 2.7) there is a bug that
  155. * may cause ll / sc and lld / scd sequences to execute non-atomically.
  156. */
  157. #ifndef R10000_LLSC_WAR
  158. #error Check setting of R10000_LLSC_WAR for your platform
  159. #endif
  160. /*
  161. * 34K core erratum: "Problems Executing the TLBR Instruction"
  162. */
  163. #ifndef MIPS34K_MISSED_ITLB_WAR
  164. #error Check setting of MIPS34K_MISSED_ITLB_WAR for your platform
  165. #endif
  166. #endif /* _ASM_WAR_H */