shubio.h 127 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359
  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) 1992 - 1997, 2000-2005 Silicon Graphics, Inc. All rights reserved.
  7. */
  8. #ifndef _ASM_IA64_SN_SHUBIO_H
  9. #define _ASM_IA64_SN_SHUBIO_H
  10. #define HUB_WIDGET_ID_MAX 0xf
  11. #define IIO_NUM_ITTES 7
  12. #define HUB_NUM_BIG_WINDOW (IIO_NUM_ITTES - 1)
  13. #define IIO_WID 0x00400000 /* Crosstalk Widget Identification */
  14. /* This register is also accessible from
  15. * Crosstalk at address 0x0. */
  16. #define IIO_WSTAT 0x00400008 /* Crosstalk Widget Status */
  17. #define IIO_WCR 0x00400020 /* Crosstalk Widget Control Register */
  18. #define IIO_ILAPR 0x00400100 /* IO Local Access Protection Register */
  19. #define IIO_ILAPO 0x00400108 /* IO Local Access Protection Override */
  20. #define IIO_IOWA 0x00400110 /* IO Outbound Widget Access */
  21. #define IIO_IIWA 0x00400118 /* IO Inbound Widget Access */
  22. #define IIO_IIDEM 0x00400120 /* IO Inbound Device Error Mask */
  23. #define IIO_ILCSR 0x00400128 /* IO LLP Control and Status Register */
  24. #define IIO_ILLR 0x00400130 /* IO LLP Log Register */
  25. #define IIO_IIDSR 0x00400138 /* IO Interrupt Destination */
  26. #define IIO_IGFX0 0x00400140 /* IO Graphics Node-Widget Map 0 */
  27. #define IIO_IGFX1 0x00400148 /* IO Graphics Node-Widget Map 1 */
  28. #define IIO_ISCR0 0x00400150 /* IO Scratch Register 0 */
  29. #define IIO_ISCR1 0x00400158 /* IO Scratch Register 1 */
  30. #define IIO_ITTE1 0x00400160 /* IO Translation Table Entry 1 */
  31. #define IIO_ITTE2 0x00400168 /* IO Translation Table Entry 2 */
  32. #define IIO_ITTE3 0x00400170 /* IO Translation Table Entry 3 */
  33. #define IIO_ITTE4 0x00400178 /* IO Translation Table Entry 4 */
  34. #define IIO_ITTE5 0x00400180 /* IO Translation Table Entry 5 */
  35. #define IIO_ITTE6 0x00400188 /* IO Translation Table Entry 6 */
  36. #define IIO_ITTE7 0x00400190 /* IO Translation Table Entry 7 */
  37. #define IIO_IPRB0 0x00400198 /* IO PRB Entry 0 */
  38. #define IIO_IPRB8 0x004001A0 /* IO PRB Entry 8 */
  39. #define IIO_IPRB9 0x004001A8 /* IO PRB Entry 9 */
  40. #define IIO_IPRBA 0x004001B0 /* IO PRB Entry A */
  41. #define IIO_IPRBB 0x004001B8 /* IO PRB Entry B */
  42. #define IIO_IPRBC 0x004001C0 /* IO PRB Entry C */
  43. #define IIO_IPRBD 0x004001C8 /* IO PRB Entry D */
  44. #define IIO_IPRBE 0x004001D0 /* IO PRB Entry E */
  45. #define IIO_IPRBF 0x004001D8 /* IO PRB Entry F */
  46. #define IIO_IXCC 0x004001E0 /* IO Crosstalk Credit Count Timeout */
  47. #define IIO_IMEM 0x004001E8 /* IO Miscellaneous Error Mask */
  48. #define IIO_IXTT 0x004001F0 /* IO Crosstalk Timeout Threshold */
  49. #define IIO_IECLR 0x004001F8 /* IO Error Clear Register */
  50. #define IIO_IBCR 0x00400200 /* IO BTE Control Register */
  51. #define IIO_IXSM 0x00400208 /* IO Crosstalk Spurious Message */
  52. #define IIO_IXSS 0x00400210 /* IO Crosstalk Spurious Sideband */
  53. #define IIO_ILCT 0x00400218 /* IO LLP Channel Test */
  54. #define IIO_IIEPH1 0x00400220 /* IO Incoming Error Packet Header, Part 1 */
  55. #define IIO_IIEPH2 0x00400228 /* IO Incoming Error Packet Header, Part 2 */
  56. #define IIO_ISLAPR 0x00400230 /* IO SXB Local Access Protection Regster */
  57. #define IIO_ISLAPO 0x00400238 /* IO SXB Local Access Protection Override */
  58. #define IIO_IWI 0x00400240 /* IO Wrapper Interrupt Register */
  59. #define IIO_IWEL 0x00400248 /* IO Wrapper Error Log Register */
  60. #define IIO_IWC 0x00400250 /* IO Wrapper Control Register */
  61. #define IIO_IWS 0x00400258 /* IO Wrapper Status Register */
  62. #define IIO_IWEIM 0x00400260 /* IO Wrapper Error Interrupt Masking Register */
  63. #define IIO_IPCA 0x00400300 /* IO PRB Counter Adjust */
  64. #define IIO_IPRTE0_A 0x00400308 /* IO PIO Read Address Table Entry 0, Part A */
  65. #define IIO_IPRTE1_A 0x00400310 /* IO PIO Read Address Table Entry 1, Part A */
  66. #define IIO_IPRTE2_A 0x00400318 /* IO PIO Read Address Table Entry 2, Part A */
  67. #define IIO_IPRTE3_A 0x00400320 /* IO PIO Read Address Table Entry 3, Part A */
  68. #define IIO_IPRTE4_A 0x00400328 /* IO PIO Read Address Table Entry 4, Part A */
  69. #define IIO_IPRTE5_A 0x00400330 /* IO PIO Read Address Table Entry 5, Part A */
  70. #define IIO_IPRTE6_A 0x00400338 /* IO PIO Read Address Table Entry 6, Part A */
  71. #define IIO_IPRTE7_A 0x00400340 /* IO PIO Read Address Table Entry 7, Part A */
  72. #define IIO_IPRTE0_B 0x00400348 /* IO PIO Read Address Table Entry 0, Part B */
  73. #define IIO_IPRTE1_B 0x00400350 /* IO PIO Read Address Table Entry 1, Part B */
  74. #define IIO_IPRTE2_B 0x00400358 /* IO PIO Read Address Table Entry 2, Part B */
  75. #define IIO_IPRTE3_B 0x00400360 /* IO PIO Read Address Table Entry 3, Part B */
  76. #define IIO_IPRTE4_B 0x00400368 /* IO PIO Read Address Table Entry 4, Part B */
  77. #define IIO_IPRTE5_B 0x00400370 /* IO PIO Read Address Table Entry 5, Part B */
  78. #define IIO_IPRTE6_B 0x00400378 /* IO PIO Read Address Table Entry 6, Part B */
  79. #define IIO_IPRTE7_B 0x00400380 /* IO PIO Read Address Table Entry 7, Part B */
  80. #define IIO_IPDR 0x00400388 /* IO PIO Deallocation Register */
  81. #define IIO_ICDR 0x00400390 /* IO CRB Entry Deallocation Register */
  82. #define IIO_IFDR 0x00400398 /* IO IOQ FIFO Depth Register */
  83. #define IIO_IIAP 0x004003A0 /* IO IIQ Arbitration Parameters */
  84. #define IIO_ICMR 0x004003A8 /* IO CRB Management Register */
  85. #define IIO_ICCR 0x004003B0 /* IO CRB Control Register */
  86. #define IIO_ICTO 0x004003B8 /* IO CRB Timeout */
  87. #define IIO_ICTP 0x004003C0 /* IO CRB Timeout Prescalar */
  88. #define IIO_ICRB0_A 0x00400400 /* IO CRB Entry 0_A */
  89. #define IIO_ICRB0_B 0x00400408 /* IO CRB Entry 0_B */
  90. #define IIO_ICRB0_C 0x00400410 /* IO CRB Entry 0_C */
  91. #define IIO_ICRB0_D 0x00400418 /* IO CRB Entry 0_D */
  92. #define IIO_ICRB0_E 0x00400420 /* IO CRB Entry 0_E */
  93. #define IIO_ICRB1_A 0x00400430 /* IO CRB Entry 1_A */
  94. #define IIO_ICRB1_B 0x00400438 /* IO CRB Entry 1_B */
  95. #define IIO_ICRB1_C 0x00400440 /* IO CRB Entry 1_C */
  96. #define IIO_ICRB1_D 0x00400448 /* IO CRB Entry 1_D */
  97. #define IIO_ICRB1_E 0x00400450 /* IO CRB Entry 1_E */
  98. #define IIO_ICRB2_A 0x00400460 /* IO CRB Entry 2_A */
  99. #define IIO_ICRB2_B 0x00400468 /* IO CRB Entry 2_B */
  100. #define IIO_ICRB2_C 0x00400470 /* IO CRB Entry 2_C */
  101. #define IIO_ICRB2_D 0x00400478 /* IO CRB Entry 2_D */
  102. #define IIO_ICRB2_E 0x00400480 /* IO CRB Entry 2_E */
  103. #define IIO_ICRB3_A 0x00400490 /* IO CRB Entry 3_A */
  104. #define IIO_ICRB3_B 0x00400498 /* IO CRB Entry 3_B */
  105. #define IIO_ICRB3_C 0x004004a0 /* IO CRB Entry 3_C */
  106. #define IIO_ICRB3_D 0x004004a8 /* IO CRB Entry 3_D */
  107. #define IIO_ICRB3_E 0x004004b0 /* IO CRB Entry 3_E */
  108. #define IIO_ICRB4_A 0x004004c0 /* IO CRB Entry 4_A */
  109. #define IIO_ICRB4_B 0x004004c8 /* IO CRB Entry 4_B */
  110. #define IIO_ICRB4_C 0x004004d0 /* IO CRB Entry 4_C */
  111. #define IIO_ICRB4_D 0x004004d8 /* IO CRB Entry 4_D */
  112. #define IIO_ICRB4_E 0x004004e0 /* IO CRB Entry 4_E */
  113. #define IIO_ICRB5_A 0x004004f0 /* IO CRB Entry 5_A */
  114. #define IIO_ICRB5_B 0x004004f8 /* IO CRB Entry 5_B */
  115. #define IIO_ICRB5_C 0x00400500 /* IO CRB Entry 5_C */
  116. #define IIO_ICRB5_D 0x00400508 /* IO CRB Entry 5_D */
  117. #define IIO_ICRB5_E 0x00400510 /* IO CRB Entry 5_E */
  118. #define IIO_ICRB6_A 0x00400520 /* IO CRB Entry 6_A */
  119. #define IIO_ICRB6_B 0x00400528 /* IO CRB Entry 6_B */
  120. #define IIO_ICRB6_C 0x00400530 /* IO CRB Entry 6_C */
  121. #define IIO_ICRB6_D 0x00400538 /* IO CRB Entry 6_D */
  122. #define IIO_ICRB6_E 0x00400540 /* IO CRB Entry 6_E */
  123. #define IIO_ICRB7_A 0x00400550 /* IO CRB Entry 7_A */
  124. #define IIO_ICRB7_B 0x00400558 /* IO CRB Entry 7_B */
  125. #define IIO_ICRB7_C 0x00400560 /* IO CRB Entry 7_C */
  126. #define IIO_ICRB7_D 0x00400568 /* IO CRB Entry 7_D */
  127. #define IIO_ICRB7_E 0x00400570 /* IO CRB Entry 7_E */
  128. #define IIO_ICRB8_A 0x00400580 /* IO CRB Entry 8_A */
  129. #define IIO_ICRB8_B 0x00400588 /* IO CRB Entry 8_B */
  130. #define IIO_ICRB8_C 0x00400590 /* IO CRB Entry 8_C */
  131. #define IIO_ICRB8_D 0x00400598 /* IO CRB Entry 8_D */
  132. #define IIO_ICRB8_E 0x004005a0 /* IO CRB Entry 8_E */
  133. #define IIO_ICRB9_A 0x004005b0 /* IO CRB Entry 9_A */
  134. #define IIO_ICRB9_B 0x004005b8 /* IO CRB Entry 9_B */
  135. #define IIO_ICRB9_C 0x004005c0 /* IO CRB Entry 9_C */
  136. #define IIO_ICRB9_D 0x004005c8 /* IO CRB Entry 9_D */
  137. #define IIO_ICRB9_E 0x004005d0 /* IO CRB Entry 9_E */
  138. #define IIO_ICRBA_A 0x004005e0 /* IO CRB Entry A_A */
  139. #define IIO_ICRBA_B 0x004005e8 /* IO CRB Entry A_B */
  140. #define IIO_ICRBA_C 0x004005f0 /* IO CRB Entry A_C */
  141. #define IIO_ICRBA_D 0x004005f8 /* IO CRB Entry A_D */
  142. #define IIO_ICRBA_E 0x00400600 /* IO CRB Entry A_E */
  143. #define IIO_ICRBB_A 0x00400610 /* IO CRB Entry B_A */
  144. #define IIO_ICRBB_B 0x00400618 /* IO CRB Entry B_B */
  145. #define IIO_ICRBB_C 0x00400620 /* IO CRB Entry B_C */
  146. #define IIO_ICRBB_D 0x00400628 /* IO CRB Entry B_D */
  147. #define IIO_ICRBB_E 0x00400630 /* IO CRB Entry B_E */
  148. #define IIO_ICRBC_A 0x00400640 /* IO CRB Entry C_A */
  149. #define IIO_ICRBC_B 0x00400648 /* IO CRB Entry C_B */
  150. #define IIO_ICRBC_C 0x00400650 /* IO CRB Entry C_C */
  151. #define IIO_ICRBC_D 0x00400658 /* IO CRB Entry C_D */
  152. #define IIO_ICRBC_E 0x00400660 /* IO CRB Entry C_E */
  153. #define IIO_ICRBD_A 0x00400670 /* IO CRB Entry D_A */
  154. #define IIO_ICRBD_B 0x00400678 /* IO CRB Entry D_B */
  155. #define IIO_ICRBD_C 0x00400680 /* IO CRB Entry D_C */
  156. #define IIO_ICRBD_D 0x00400688 /* IO CRB Entry D_D */
  157. #define IIO_ICRBD_E 0x00400690 /* IO CRB Entry D_E */
  158. #define IIO_ICRBE_A 0x004006a0 /* IO CRB Entry E_A */
  159. #define IIO_ICRBE_B 0x004006a8 /* IO CRB Entry E_B */
  160. #define IIO_ICRBE_C 0x004006b0 /* IO CRB Entry E_C */
  161. #define IIO_ICRBE_D 0x004006b8 /* IO CRB Entry E_D */
  162. #define IIO_ICRBE_E 0x004006c0 /* IO CRB Entry E_E */
  163. #define IIO_ICSML 0x00400700 /* IO CRB Spurious Message Low */
  164. #define IIO_ICSMM 0x00400708 /* IO CRB Spurious Message Middle */
  165. #define IIO_ICSMH 0x00400710 /* IO CRB Spurious Message High */
  166. #define IIO_IDBSS 0x00400718 /* IO Debug Submenu Select */
  167. #define IIO_IBLS0 0x00410000 /* IO BTE Length Status 0 */
  168. #define IIO_IBSA0 0x00410008 /* IO BTE Source Address 0 */
  169. #define IIO_IBDA0 0x00410010 /* IO BTE Destination Address 0 */
  170. #define IIO_IBCT0 0x00410018 /* IO BTE Control Terminate 0 */
  171. #define IIO_IBNA0 0x00410020 /* IO BTE Notification Address 0 */
  172. #define IIO_IBIA0 0x00410028 /* IO BTE Interrupt Address 0 */
  173. #define IIO_IBLS1 0x00420000 /* IO BTE Length Status 1 */
  174. #define IIO_IBSA1 0x00420008 /* IO BTE Source Address 1 */
  175. #define IIO_IBDA1 0x00420010 /* IO BTE Destination Address 1 */
  176. #define IIO_IBCT1 0x00420018 /* IO BTE Control Terminate 1 */
  177. #define IIO_IBNA1 0x00420020 /* IO BTE Notification Address 1 */
  178. #define IIO_IBIA1 0x00420028 /* IO BTE Interrupt Address 1 */
  179. #define IIO_IPCR 0x00430000 /* IO Performance Control */
  180. #define IIO_IPPR 0x00430008 /* IO Performance Profiling */
  181. /************************************************************************
  182. * *
  183. * Description: This register echoes some information from the *
  184. * LB_REV_ID register. It is available through Crosstalk as described *
  185. * above. The REV_NUM and MFG_NUM fields receive their values from *
  186. * the REVISION and MANUFACTURER fields in the LB_REV_ID register. *
  187. * The PART_NUM field's value is the Crosstalk device ID number that *
  188. * Steve Miller assigned to the SHub chip. *
  189. * *
  190. ************************************************************************/
  191. typedef union ii_wid_u {
  192. u64 ii_wid_regval;
  193. struct {
  194. u64 w_rsvd_1:1;
  195. u64 w_mfg_num:11;
  196. u64 w_part_num:16;
  197. u64 w_rev_num:4;
  198. u64 w_rsvd:32;
  199. } ii_wid_fld_s;
  200. } ii_wid_u_t;
  201. /************************************************************************
  202. * *
  203. * The fields in this register are set upon detection of an error *
  204. * and cleared by various mechanisms, as explained in the *
  205. * description. *
  206. * *
  207. ************************************************************************/
  208. typedef union ii_wstat_u {
  209. u64 ii_wstat_regval;
  210. struct {
  211. u64 w_pending:4;
  212. u64 w_xt_crd_to:1;
  213. u64 w_xt_tail_to:1;
  214. u64 w_rsvd_3:3;
  215. u64 w_tx_mx_rty:1;
  216. u64 w_rsvd_2:6;
  217. u64 w_llp_tx_cnt:8;
  218. u64 w_rsvd_1:8;
  219. u64 w_crazy:1;
  220. u64 w_rsvd:31;
  221. } ii_wstat_fld_s;
  222. } ii_wstat_u_t;
  223. /************************************************************************
  224. * *
  225. * Description: This is a read-write enabled register. It controls *
  226. * various aspects of the Crosstalk flow control. *
  227. * *
  228. ************************************************************************/
  229. typedef union ii_wcr_u {
  230. u64 ii_wcr_regval;
  231. struct {
  232. u64 w_wid:4;
  233. u64 w_tag:1;
  234. u64 w_rsvd_1:8;
  235. u64 w_dst_crd:3;
  236. u64 w_f_bad_pkt:1;
  237. u64 w_dir_con:1;
  238. u64 w_e_thresh:5;
  239. u64 w_rsvd:41;
  240. } ii_wcr_fld_s;
  241. } ii_wcr_u_t;
  242. /************************************************************************
  243. * *
  244. * Description: This register's value is a bit vector that guards *
  245. * access to local registers within the II as well as to external *
  246. * Crosstalk widgets. Each bit in the register corresponds to a *
  247. * particular region in the system; a region consists of one, two or *
  248. * four nodes (depending on the value of the REGION_SIZE field in the *
  249. * LB_REV_ID register, which is documented in Section 8.3.1.1). The *
  250. * protection provided by this register applies to PIO read *
  251. * operations as well as PIO write operations. The II will perform a *
  252. * PIO read or write request only if the bit for the requestor's *
  253. * region is set; otherwise, the II will not perform the requested *
  254. * operation and will return an error response. When a PIO read or *
  255. * write request targets an external Crosstalk widget, then not only *
  256. * must the bit for the requestor's region be set in the ILAPR, but *
  257. * also the target widget's bit in the IOWA register must be set in *
  258. * order for the II to perform the requested operation; otherwise, *
  259. * the II will return an error response. Hence, the protection *
  260. * provided by the IOWA register supplements the protection provided *
  261. * by the ILAPR for requests that target external Crosstalk widgets. *
  262. * This register itself can be accessed only by the nodes whose *
  263. * region ID bits are enabled in this same register. It can also be *
  264. * accessed through the IAlias space by the local processors. *
  265. * The reset value of this register allows access by all nodes. *
  266. * *
  267. ************************************************************************/
  268. typedef union ii_ilapr_u {
  269. u64 ii_ilapr_regval;
  270. struct {
  271. u64 i_region:64;
  272. } ii_ilapr_fld_s;
  273. } ii_ilapr_u_t;
  274. /************************************************************************
  275. * *
  276. * Description: A write to this register of the 64-bit value *
  277. * "SGIrules" in ASCII, will cause the bit in the ILAPR register *
  278. * corresponding to the region of the requestor to be set (allow *
  279. * access). A write of any other value will be ignored. Access *
  280. * protection for this register is "SGIrules". *
  281. * This register can also be accessed through the IAlias space. *
  282. * However, this access will not change the access permissions in the *
  283. * ILAPR. *
  284. * *
  285. ************************************************************************/
  286. typedef union ii_ilapo_u {
  287. u64 ii_ilapo_regval;
  288. struct {
  289. u64 i_io_ovrride:64;
  290. } ii_ilapo_fld_s;
  291. } ii_ilapo_u_t;
  292. /************************************************************************
  293. * *
  294. * This register qualifies all the PIO and Graphics writes launched *
  295. * from the SHUB towards a widget. *
  296. * *
  297. ************************************************************************/
  298. typedef union ii_iowa_u {
  299. u64 ii_iowa_regval;
  300. struct {
  301. u64 i_w0_oac:1;
  302. u64 i_rsvd_1:7;
  303. u64 i_wx_oac:8;
  304. u64 i_rsvd:48;
  305. } ii_iowa_fld_s;
  306. } ii_iowa_u_t;
  307. /************************************************************************
  308. * *
  309. * Description: This register qualifies all the requests launched *
  310. * from a widget towards the Shub. This register is intended to be *
  311. * used by software in case of misbehaving widgets. *
  312. * *
  313. * *
  314. ************************************************************************/
  315. typedef union ii_iiwa_u {
  316. u64 ii_iiwa_regval;
  317. struct {
  318. u64 i_w0_iac:1;
  319. u64 i_rsvd_1:7;
  320. u64 i_wx_iac:8;
  321. u64 i_rsvd:48;
  322. } ii_iiwa_fld_s;
  323. } ii_iiwa_u_t;
  324. /************************************************************************
  325. * *
  326. * Description: This register qualifies all the operations launched *
  327. * from a widget towards the SHub. It allows individual access *
  328. * control for up to 8 devices per widget. A device refers to *
  329. * individual DMA master hosted by a widget. *
  330. * The bits in each field of this register are cleared by the Shub *
  331. * upon detection of an error which requires the device to be *
  332. * disabled. These fields assume that 0=TNUM=7 (i.e., Bridge-centric *
  333. * Crosstalk). Whether or not a device has access rights to this *
  334. * Shub is determined by an AND of the device enable bit in the *
  335. * appropriate field of this register and the corresponding bit in *
  336. * the Wx_IAC field (for the widget which this device belongs to). *
  337. * The bits in this field are set by writing a 1 to them. Incoming *
  338. * replies from Crosstalk are not subject to this access control *
  339. * mechanism. *
  340. * *
  341. ************************************************************************/
  342. typedef union ii_iidem_u {
  343. u64 ii_iidem_regval;
  344. struct {
  345. u64 i_w8_dxs:8;
  346. u64 i_w9_dxs:8;
  347. u64 i_wa_dxs:8;
  348. u64 i_wb_dxs:8;
  349. u64 i_wc_dxs:8;
  350. u64 i_wd_dxs:8;
  351. u64 i_we_dxs:8;
  352. u64 i_wf_dxs:8;
  353. } ii_iidem_fld_s;
  354. } ii_iidem_u_t;
  355. /************************************************************************
  356. * *
  357. * This register contains the various programmable fields necessary *
  358. * for controlling and observing the LLP signals. *
  359. * *
  360. ************************************************************************/
  361. typedef union ii_ilcsr_u {
  362. u64 ii_ilcsr_regval;
  363. struct {
  364. u64 i_nullto:6;
  365. u64 i_rsvd_4:2;
  366. u64 i_wrmrst:1;
  367. u64 i_rsvd_3:1;
  368. u64 i_llp_en:1;
  369. u64 i_bm8:1;
  370. u64 i_llp_stat:2;
  371. u64 i_remote_power:1;
  372. u64 i_rsvd_2:1;
  373. u64 i_maxrtry:10;
  374. u64 i_d_avail_sel:2;
  375. u64 i_rsvd_1:4;
  376. u64 i_maxbrst:10;
  377. u64 i_rsvd:22;
  378. } ii_ilcsr_fld_s;
  379. } ii_ilcsr_u_t;
  380. /************************************************************************
  381. * *
  382. * This is simply a status registers that monitors the LLP error *
  383. * rate. *
  384. * *
  385. ************************************************************************/
  386. typedef union ii_illr_u {
  387. u64 ii_illr_regval;
  388. struct {
  389. u64 i_sn_cnt:16;
  390. u64 i_cb_cnt:16;
  391. u64 i_rsvd:32;
  392. } ii_illr_fld_s;
  393. } ii_illr_u_t;
  394. /************************************************************************
  395. * *
  396. * Description: All II-detected non-BTE error interrupts are *
  397. * specified via this register. *
  398. * NOTE: The PI interrupt register address is hardcoded in the II. If *
  399. * PI_ID==0, then the II sends an interrupt request (Duplonet PWRI *
  400. * packet) to address offset 0x0180_0090 within the local register *
  401. * address space of PI0 on the node specified by the NODE field. If *
  402. * PI_ID==1, then the II sends the interrupt request to address *
  403. * offset 0x01A0_0090 within the local register address space of PI1 *
  404. * on the node specified by the NODE field. *
  405. * *
  406. ************************************************************************/
  407. typedef union ii_iidsr_u {
  408. u64 ii_iidsr_regval;
  409. struct {
  410. u64 i_level:8;
  411. u64 i_pi_id:1;
  412. u64 i_node:11;
  413. u64 i_rsvd_3:4;
  414. u64 i_enable:1;
  415. u64 i_rsvd_2:3;
  416. u64 i_int_sent:2;
  417. u64 i_rsvd_1:2;
  418. u64 i_pi0_forward_int:1;
  419. u64 i_pi1_forward_int:1;
  420. u64 i_rsvd:30;
  421. } ii_iidsr_fld_s;
  422. } ii_iidsr_u_t;
  423. /************************************************************************
  424. * *
  425. * There are two instances of this register. This register is used *
  426. * for matching up the incoming responses from the graphics widget to *
  427. * the processor that initiated the graphics operation. The *
  428. * write-responses are converted to graphics credits and returned to *
  429. * the processor so that the processor interface can manage the flow *
  430. * control. *
  431. * *
  432. ************************************************************************/
  433. typedef union ii_igfx0_u {
  434. u64 ii_igfx0_regval;
  435. struct {
  436. u64 i_w_num:4;
  437. u64 i_pi_id:1;
  438. u64 i_n_num:12;
  439. u64 i_p_num:1;
  440. u64 i_rsvd:46;
  441. } ii_igfx0_fld_s;
  442. } ii_igfx0_u_t;
  443. /************************************************************************
  444. * *
  445. * There are two instances of this register. This register is used *
  446. * for matching up the incoming responses from the graphics widget to *
  447. * the processor that initiated the graphics operation. The *
  448. * write-responses are converted to graphics credits and returned to *
  449. * the processor so that the processor interface can manage the flow *
  450. * control. *
  451. * *
  452. ************************************************************************/
  453. typedef union ii_igfx1_u {
  454. u64 ii_igfx1_regval;
  455. struct {
  456. u64 i_w_num:4;
  457. u64 i_pi_id:1;
  458. u64 i_n_num:12;
  459. u64 i_p_num:1;
  460. u64 i_rsvd:46;
  461. } ii_igfx1_fld_s;
  462. } ii_igfx1_u_t;
  463. /************************************************************************
  464. * *
  465. * There are two instances of this registers. These registers are *
  466. * used as scratch registers for software use. *
  467. * *
  468. ************************************************************************/
  469. typedef union ii_iscr0_u {
  470. u64 ii_iscr0_regval;
  471. struct {
  472. u64 i_scratch:64;
  473. } ii_iscr0_fld_s;
  474. } ii_iscr0_u_t;
  475. /************************************************************************
  476. * *
  477. * There are two instances of this registers. These registers are *
  478. * used as scratch registers for software use. *
  479. * *
  480. ************************************************************************/
  481. typedef union ii_iscr1_u {
  482. u64 ii_iscr1_regval;
  483. struct {
  484. u64 i_scratch:64;
  485. } ii_iscr1_fld_s;
  486. } ii_iscr1_u_t;
  487. /************************************************************************
  488. * *
  489. * Description: There are seven instances of translation table entry *
  490. * registers. Each register maps a Shub Big Window to a 48-bit *
  491. * address on Crosstalk. *
  492. * For M-mode (128 nodes, 8 GBytes/node), SysAD[31:29] (Big Window *
  493. * number) are used to select one of these 7 registers. The Widget *
  494. * number field is then derived from the W_NUM field for synthesizing *
  495. * a Crosstalk packet. The 5 bits of OFFSET are concatenated with *
  496. * SysAD[28:0] to form Crosstalk[33:0]. The upper Crosstalk[47:34] *
  497. * are padded with zeros. Although the maximum Crosstalk space *
  498. * addressable by the SHub is thus the lower 16 GBytes per widget *
  499. * (M-mode), however only <SUP >7</SUP>/<SUB >32nds</SUB> of this *
  500. * space can be accessed. *
  501. * For the N-mode (256 nodes, 4 GBytes/node), SysAD[30:28] (Big *
  502. * Window number) are used to select one of these 7 registers. The *
  503. * Widget number field is then derived from the W_NUM field for *
  504. * synthesizing a Crosstalk packet. The 5 bits of OFFSET are *
  505. * concatenated with SysAD[27:0] to form Crosstalk[33:0]. The IOSP *
  506. * field is used as Crosstalk[47], and remainder of the Crosstalk *
  507. * address bits (Crosstalk[46:34]) are always zero. While the maximum *
  508. * Crosstalk space addressable by the Shub is thus the lower *
  509. * 8-GBytes per widget (N-mode), only <SUP >7</SUP>/<SUB >32nds</SUB> *
  510. * of this space can be accessed. *
  511. * *
  512. ************************************************************************/
  513. typedef union ii_itte1_u {
  514. u64 ii_itte1_regval;
  515. struct {
  516. u64 i_offset:5;
  517. u64 i_rsvd_1:3;
  518. u64 i_w_num:4;
  519. u64 i_iosp:1;
  520. u64 i_rsvd:51;
  521. } ii_itte1_fld_s;
  522. } ii_itte1_u_t;
  523. /************************************************************************
  524. * *
  525. * Description: There are seven instances of translation table entry *
  526. * registers. Each register maps a Shub Big Window to a 48-bit *
  527. * address on Crosstalk. *
  528. * For M-mode (128 nodes, 8 GBytes/node), SysAD[31:29] (Big Window *
  529. * number) are used to select one of these 7 registers. The Widget *
  530. * number field is then derived from the W_NUM field for synthesizing *
  531. * a Crosstalk packet. The 5 bits of OFFSET are concatenated with *
  532. * SysAD[28:0] to form Crosstalk[33:0]. The upper Crosstalk[47:34] *
  533. * are padded with zeros. Although the maximum Crosstalk space *
  534. * addressable by the Shub is thus the lower 16 GBytes per widget *
  535. * (M-mode), however only <SUP >7</SUP>/<SUB >32nds</SUB> of this *
  536. * space can be accessed. *
  537. * For the N-mode (256 nodes, 4 GBytes/node), SysAD[30:28] (Big *
  538. * Window number) are used to select one of these 7 registers. The *
  539. * Widget number field is then derived from the W_NUM field for *
  540. * synthesizing a Crosstalk packet. The 5 bits of OFFSET are *
  541. * concatenated with SysAD[27:0] to form Crosstalk[33:0]. The IOSP *
  542. * field is used as Crosstalk[47], and remainder of the Crosstalk *
  543. * address bits (Crosstalk[46:34]) are always zero. While the maximum *
  544. * Crosstalk space addressable by the Shub is thus the lower *
  545. * 8-GBytes per widget (N-mode), only <SUP >7</SUP>/<SUB >32nds</SUB> *
  546. * of this space can be accessed. *
  547. * *
  548. ************************************************************************/
  549. typedef union ii_itte2_u {
  550. u64 ii_itte2_regval;
  551. struct {
  552. u64 i_offset:5;
  553. u64 i_rsvd_1:3;
  554. u64 i_w_num:4;
  555. u64 i_iosp:1;
  556. u64 i_rsvd:51;
  557. } ii_itte2_fld_s;
  558. } ii_itte2_u_t;
  559. /************************************************************************
  560. * *
  561. * Description: There are seven instances of translation table entry *
  562. * registers. Each register maps a Shub Big Window to a 48-bit *
  563. * address on Crosstalk. *
  564. * For M-mode (128 nodes, 8 GBytes/node), SysAD[31:29] (Big Window *
  565. * number) are used to select one of these 7 registers. The Widget *
  566. * number field is then derived from the W_NUM field for synthesizing *
  567. * a Crosstalk packet. The 5 bits of OFFSET are concatenated with *
  568. * SysAD[28:0] to form Crosstalk[33:0]. The upper Crosstalk[47:34] *
  569. * are padded with zeros. Although the maximum Crosstalk space *
  570. * addressable by the Shub is thus the lower 16 GBytes per widget *
  571. * (M-mode), however only <SUP >7</SUP>/<SUB >32nds</SUB> of this *
  572. * space can be accessed. *
  573. * For the N-mode (256 nodes, 4 GBytes/node), SysAD[30:28] (Big *
  574. * Window number) are used to select one of these 7 registers. The *
  575. * Widget number field is then derived from the W_NUM field for *
  576. * synthesizing a Crosstalk packet. The 5 bits of OFFSET are *
  577. * concatenated with SysAD[27:0] to form Crosstalk[33:0]. The IOSP *
  578. * field is used as Crosstalk[47], and remainder of the Crosstalk *
  579. * address bits (Crosstalk[46:34]) are always zero. While the maximum *
  580. * Crosstalk space addressable by the SHub is thus the lower *
  581. * 8-GBytes per widget (N-mode), only <SUP >7</SUP>/<SUB >32nds</SUB> *
  582. * of this space can be accessed. *
  583. * *
  584. ************************************************************************/
  585. typedef union ii_itte3_u {
  586. u64 ii_itte3_regval;
  587. struct {
  588. u64 i_offset:5;
  589. u64 i_rsvd_1:3;
  590. u64 i_w_num:4;
  591. u64 i_iosp:1;
  592. u64 i_rsvd:51;
  593. } ii_itte3_fld_s;
  594. } ii_itte3_u_t;
  595. /************************************************************************
  596. * *
  597. * Description: There are seven instances of translation table entry *
  598. * registers. Each register maps a SHub Big Window to a 48-bit *
  599. * address on Crosstalk. *
  600. * For M-mode (128 nodes, 8 GBytes/node), SysAD[31:29] (Big Window *
  601. * number) are used to select one of these 7 registers. The Widget *
  602. * number field is then derived from the W_NUM field for synthesizing *
  603. * a Crosstalk packet. The 5 bits of OFFSET are concatenated with *
  604. * SysAD[28:0] to form Crosstalk[33:0]. The upper Crosstalk[47:34] *
  605. * are padded with zeros. Although the maximum Crosstalk space *
  606. * addressable by the SHub is thus the lower 16 GBytes per widget *
  607. * (M-mode), however only <SUP >7</SUP>/<SUB >32nds</SUB> of this *
  608. * space can be accessed. *
  609. * For the N-mode (256 nodes, 4 GBytes/node), SysAD[30:28] (Big *
  610. * Window number) are used to select one of these 7 registers. The *
  611. * Widget number field is then derived from the W_NUM field for *
  612. * synthesizing a Crosstalk packet. The 5 bits of OFFSET are *
  613. * concatenated with SysAD[27:0] to form Crosstalk[33:0]. The IOSP *
  614. * field is used as Crosstalk[47], and remainder of the Crosstalk *
  615. * address bits (Crosstalk[46:34]) are always zero. While the maximum *
  616. * Crosstalk space addressable by the SHub is thus the lower *
  617. * 8-GBytes per widget (N-mode), only <SUP >7</SUP>/<SUB >32nds</SUB> *
  618. * of this space can be accessed. *
  619. * *
  620. ************************************************************************/
  621. typedef union ii_itte4_u {
  622. u64 ii_itte4_regval;
  623. struct {
  624. u64 i_offset:5;
  625. u64 i_rsvd_1:3;
  626. u64 i_w_num:4;
  627. u64 i_iosp:1;
  628. u64 i_rsvd:51;
  629. } ii_itte4_fld_s;
  630. } ii_itte4_u_t;
  631. /************************************************************************
  632. * *
  633. * Description: There are seven instances of translation table entry *
  634. * registers. Each register maps a SHub Big Window to a 48-bit *
  635. * address on Crosstalk. *
  636. * For M-mode (128 nodes, 8 GBytes/node), SysAD[31:29] (Big Window *
  637. * number) are used to select one of these 7 registers. The Widget *
  638. * number field is then derived from the W_NUM field for synthesizing *
  639. * a Crosstalk packet. The 5 bits of OFFSET are concatenated with *
  640. * SysAD[28:0] to form Crosstalk[33:0]. The upper Crosstalk[47:34] *
  641. * are padded with zeros. Although the maximum Crosstalk space *
  642. * addressable by the Shub is thus the lower 16 GBytes per widget *
  643. * (M-mode), however only <SUP >7</SUP>/<SUB >32nds</SUB> of this *
  644. * space can be accessed. *
  645. * For the N-mode (256 nodes, 4 GBytes/node), SysAD[30:28] (Big *
  646. * Window number) are used to select one of these 7 registers. The *
  647. * Widget number field is then derived from the W_NUM field for *
  648. * synthesizing a Crosstalk packet. The 5 bits of OFFSET are *
  649. * concatenated with SysAD[27:0] to form Crosstalk[33:0]. The IOSP *
  650. * field is used as Crosstalk[47], and remainder of the Crosstalk *
  651. * address bits (Crosstalk[46:34]) are always zero. While the maximum *
  652. * Crosstalk space addressable by the Shub is thus the lower *
  653. * 8-GBytes per widget (N-mode), only <SUP >7</SUP>/<SUB >32nds</SUB> *
  654. * of this space can be accessed. *
  655. * *
  656. ************************************************************************/
  657. typedef union ii_itte5_u {
  658. u64 ii_itte5_regval;
  659. struct {
  660. u64 i_offset:5;
  661. u64 i_rsvd_1:3;
  662. u64 i_w_num:4;
  663. u64 i_iosp:1;
  664. u64 i_rsvd:51;
  665. } ii_itte5_fld_s;
  666. } ii_itte5_u_t;
  667. /************************************************************************
  668. * *
  669. * Description: There are seven instances of translation table entry *
  670. * registers. Each register maps a Shub Big Window to a 48-bit *
  671. * address on Crosstalk. *
  672. * For M-mode (128 nodes, 8 GBytes/node), SysAD[31:29] (Big Window *
  673. * number) are used to select one of these 7 registers. The Widget *
  674. * number field is then derived from the W_NUM field for synthesizing *
  675. * a Crosstalk packet. The 5 bits of OFFSET are concatenated with *
  676. * SysAD[28:0] to form Crosstalk[33:0]. The upper Crosstalk[47:34] *
  677. * are padded with zeros. Although the maximum Crosstalk space *
  678. * addressable by the Shub is thus the lower 16 GBytes per widget *
  679. * (M-mode), however only <SUP >7</SUP>/<SUB >32nds</SUB> of this *
  680. * space can be accessed. *
  681. * For the N-mode (256 nodes, 4 GBytes/node), SysAD[30:28] (Big *
  682. * Window number) are used to select one of these 7 registers. The *
  683. * Widget number field is then derived from the W_NUM field for *
  684. * synthesizing a Crosstalk packet. The 5 bits of OFFSET are *
  685. * concatenated with SysAD[27:0] to form Crosstalk[33:0]. The IOSP *
  686. * field is used as Crosstalk[47], and remainder of the Crosstalk *
  687. * address bits (Crosstalk[46:34]) are always zero. While the maximum *
  688. * Crosstalk space addressable by the Shub is thus the lower *
  689. * 8-GBytes per widget (N-mode), only <SUP >7</SUP>/<SUB >32nds</SUB> *
  690. * of this space can be accessed. *
  691. * *
  692. ************************************************************************/
  693. typedef union ii_itte6_u {
  694. u64 ii_itte6_regval;
  695. struct {
  696. u64 i_offset:5;
  697. u64 i_rsvd_1:3;
  698. u64 i_w_num:4;
  699. u64 i_iosp:1;
  700. u64 i_rsvd:51;
  701. } ii_itte6_fld_s;
  702. } ii_itte6_u_t;
  703. /************************************************************************
  704. * *
  705. * Description: There are seven instances of translation table entry *
  706. * registers. Each register maps a Shub Big Window to a 48-bit *
  707. * address on Crosstalk. *
  708. * For M-mode (128 nodes, 8 GBytes/node), SysAD[31:29] (Big Window *
  709. * number) are used to select one of these 7 registers. The Widget *
  710. * number field is then derived from the W_NUM field for synthesizing *
  711. * a Crosstalk packet. The 5 bits of OFFSET are concatenated with *
  712. * SysAD[28:0] to form Crosstalk[33:0]. The upper Crosstalk[47:34] *
  713. * are padded with zeros. Although the maximum Crosstalk space *
  714. * addressable by the Shub is thus the lower 16 GBytes per widget *
  715. * (M-mode), however only <SUP >7</SUP>/<SUB >32nds</SUB> of this *
  716. * space can be accessed. *
  717. * For the N-mode (256 nodes, 4 GBytes/node), SysAD[30:28] (Big *
  718. * Window number) are used to select one of these 7 registers. The *
  719. * Widget number field is then derived from the W_NUM field for *
  720. * synthesizing a Crosstalk packet. The 5 bits of OFFSET are *
  721. * concatenated with SysAD[27:0] to form Crosstalk[33:0]. The IOSP *
  722. * field is used as Crosstalk[47], and remainder of the Crosstalk *
  723. * address bits (Crosstalk[46:34]) are always zero. While the maximum *
  724. * Crosstalk space addressable by the SHub is thus the lower *
  725. * 8-GBytes per widget (N-mode), only <SUP >7</SUP>/<SUB >32nds</SUB> *
  726. * of this space can be accessed. *
  727. * *
  728. ************************************************************************/
  729. typedef union ii_itte7_u {
  730. u64 ii_itte7_regval;
  731. struct {
  732. u64 i_offset:5;
  733. u64 i_rsvd_1:3;
  734. u64 i_w_num:4;
  735. u64 i_iosp:1;
  736. u64 i_rsvd:51;
  737. } ii_itte7_fld_s;
  738. } ii_itte7_u_t;
  739. /************************************************************************
  740. * *
  741. * Description: There are 9 instances of this register, one per *
  742. * actual widget in this implementation of SHub and Crossbow. *
  743. * Note: Crossbow only has ports for Widgets 8 through F, widget 0 *
  744. * refers to Crossbow's internal space. *
  745. * This register contains the state elements per widget that are *
  746. * necessary to manage the PIO flow control on Crosstalk and on the *
  747. * Router Network. See the PIO Flow Control chapter for a complete *
  748. * description of this register *
  749. * The SPUR_WR bit requires some explanation. When this register is *
  750. * written, the new value of the C field is captured in an internal *
  751. * register so the hardware can remember what the programmer wrote *
  752. * into the credit counter. The SPUR_WR bit sets whenever the C field *
  753. * increments above this stored value, which indicates that there *
  754. * have been more responses received than requests sent. The SPUR_WR *
  755. * bit cannot be cleared until a value is written to the IPRBx *
  756. * register; the write will correct the C field and capture its new *
  757. * value in the internal register. Even if IECLR[E_PRB_x] is set, the *
  758. * SPUR_WR bit will persist if IPRBx hasn't yet been written. *
  759. * . *
  760. * *
  761. ************************************************************************/
  762. typedef union ii_iprb0_u {
  763. u64 ii_iprb0_regval;
  764. struct {
  765. u64 i_c:8;
  766. u64 i_na:14;
  767. u64 i_rsvd_2:2;
  768. u64 i_nb:14;
  769. u64 i_rsvd_1:2;
  770. u64 i_m:2;
  771. u64 i_f:1;
  772. u64 i_of_cnt:5;
  773. u64 i_error:1;
  774. u64 i_rd_to:1;
  775. u64 i_spur_wr:1;
  776. u64 i_spur_rd:1;
  777. u64 i_rsvd:11;
  778. u64 i_mult_err:1;
  779. } ii_iprb0_fld_s;
  780. } ii_iprb0_u_t;
  781. /************************************************************************
  782. * *
  783. * Description: There are 9 instances of this register, one per *
  784. * actual widget in this implementation of SHub and Crossbow. *
  785. * Note: Crossbow only has ports for Widgets 8 through F, widget 0 *
  786. * refers to Crossbow's internal space. *
  787. * This register contains the state elements per widget that are *
  788. * necessary to manage the PIO flow control on Crosstalk and on the *
  789. * Router Network. See the PIO Flow Control chapter for a complete *
  790. * description of this register *
  791. * The SPUR_WR bit requires some explanation. When this register is *
  792. * written, the new value of the C field is captured in an internal *
  793. * register so the hardware can remember what the programmer wrote *
  794. * into the credit counter. The SPUR_WR bit sets whenever the C field *
  795. * increments above this stored value, which indicates that there *
  796. * have been more responses received than requests sent. The SPUR_WR *
  797. * bit cannot be cleared until a value is written to the IPRBx *
  798. * register; the write will correct the C field and capture its new *
  799. * value in the internal register. Even if IECLR[E_PRB_x] is set, the *
  800. * SPUR_WR bit will persist if IPRBx hasn't yet been written. *
  801. * . *
  802. * *
  803. ************************************************************************/
  804. typedef union ii_iprb8_u {
  805. u64 ii_iprb8_regval;
  806. struct {
  807. u64 i_c:8;
  808. u64 i_na:14;
  809. u64 i_rsvd_2:2;
  810. u64 i_nb:14;
  811. u64 i_rsvd_1:2;
  812. u64 i_m:2;
  813. u64 i_f:1;
  814. u64 i_of_cnt:5;
  815. u64 i_error:1;
  816. u64 i_rd_to:1;
  817. u64 i_spur_wr:1;
  818. u64 i_spur_rd:1;
  819. u64 i_rsvd:11;
  820. u64 i_mult_err:1;
  821. } ii_iprb8_fld_s;
  822. } ii_iprb8_u_t;
  823. /************************************************************************
  824. * *
  825. * Description: There are 9 instances of this register, one per *
  826. * actual widget in this implementation of SHub and Crossbow. *
  827. * Note: Crossbow only has ports for Widgets 8 through F, widget 0 *
  828. * refers to Crossbow's internal space. *
  829. * This register contains the state elements per widget that are *
  830. * necessary to manage the PIO flow control on Crosstalk and on the *
  831. * Router Network. See the PIO Flow Control chapter for a complete *
  832. * description of this register *
  833. * The SPUR_WR bit requires some explanation. When this register is *
  834. * written, the new value of the C field is captured in an internal *
  835. * register so the hardware can remember what the programmer wrote *
  836. * into the credit counter. The SPUR_WR bit sets whenever the C field *
  837. * increments above this stored value, which indicates that there *
  838. * have been more responses received than requests sent. The SPUR_WR *
  839. * bit cannot be cleared until a value is written to the IPRBx *
  840. * register; the write will correct the C field and capture its new *
  841. * value in the internal register. Even if IECLR[E_PRB_x] is set, the *
  842. * SPUR_WR bit will persist if IPRBx hasn't yet been written. *
  843. * . *
  844. * *
  845. ************************************************************************/
  846. typedef union ii_iprb9_u {
  847. u64 ii_iprb9_regval;
  848. struct {
  849. u64 i_c:8;
  850. u64 i_na:14;
  851. u64 i_rsvd_2:2;
  852. u64 i_nb:14;
  853. u64 i_rsvd_1:2;
  854. u64 i_m:2;
  855. u64 i_f:1;
  856. u64 i_of_cnt:5;
  857. u64 i_error:1;
  858. u64 i_rd_to:1;
  859. u64 i_spur_wr:1;
  860. u64 i_spur_rd:1;
  861. u64 i_rsvd:11;
  862. u64 i_mult_err:1;
  863. } ii_iprb9_fld_s;
  864. } ii_iprb9_u_t;
  865. /************************************************************************
  866. * *
  867. * Description: There are 9 instances of this register, one per *
  868. * actual widget in this implementation of SHub and Crossbow. *
  869. * Note: Crossbow only has ports for Widgets 8 through F, widget 0 *
  870. * refers to Crossbow's internal space. *
  871. * This register contains the state elements per widget that are *
  872. * necessary to manage the PIO flow control on Crosstalk and on the *
  873. * Router Network. See the PIO Flow Control chapter for a complete *
  874. * description of this register *
  875. * The SPUR_WR bit requires some explanation. When this register is *
  876. * written, the new value of the C field is captured in an internal *
  877. * register so the hardware can remember what the programmer wrote *
  878. * into the credit counter. The SPUR_WR bit sets whenever the C field *
  879. * increments above this stored value, which indicates that there *
  880. * have been more responses received than requests sent. The SPUR_WR *
  881. * bit cannot be cleared until a value is written to the IPRBx *
  882. * register; the write will correct the C field and capture its new *
  883. * value in the internal register. Even if IECLR[E_PRB_x] is set, the *
  884. * SPUR_WR bit will persist if IPRBx hasn't yet been written. *
  885. * *
  886. * *
  887. ************************************************************************/
  888. typedef union ii_iprba_u {
  889. u64 ii_iprba_regval;
  890. struct {
  891. u64 i_c:8;
  892. u64 i_na:14;
  893. u64 i_rsvd_2:2;
  894. u64 i_nb:14;
  895. u64 i_rsvd_1:2;
  896. u64 i_m:2;
  897. u64 i_f:1;
  898. u64 i_of_cnt:5;
  899. u64 i_error:1;
  900. u64 i_rd_to:1;
  901. u64 i_spur_wr:1;
  902. u64 i_spur_rd:1;
  903. u64 i_rsvd:11;
  904. u64 i_mult_err:1;
  905. } ii_iprba_fld_s;
  906. } ii_iprba_u_t;
  907. /************************************************************************
  908. * *
  909. * Description: There are 9 instances of this register, one per *
  910. * actual widget in this implementation of SHub and Crossbow. *
  911. * Note: Crossbow only has ports for Widgets 8 through F, widget 0 *
  912. * refers to Crossbow's internal space. *
  913. * This register contains the state elements per widget that are *
  914. * necessary to manage the PIO flow control on Crosstalk and on the *
  915. * Router Network. See the PIO Flow Control chapter for a complete *
  916. * description of this register *
  917. * The SPUR_WR bit requires some explanation. When this register is *
  918. * written, the new value of the C field is captured in an internal *
  919. * register so the hardware can remember what the programmer wrote *
  920. * into the credit counter. The SPUR_WR bit sets whenever the C field *
  921. * increments above this stored value, which indicates that there *
  922. * have been more responses received than requests sent. The SPUR_WR *
  923. * bit cannot be cleared until a value is written to the IPRBx *
  924. * register; the write will correct the C field and capture its new *
  925. * value in the internal register. Even if IECLR[E_PRB_x] is set, the *
  926. * SPUR_WR bit will persist if IPRBx hasn't yet been written. *
  927. * . *
  928. * *
  929. ************************************************************************/
  930. typedef union ii_iprbb_u {
  931. u64 ii_iprbb_regval;
  932. struct {
  933. u64 i_c:8;
  934. u64 i_na:14;
  935. u64 i_rsvd_2:2;
  936. u64 i_nb:14;
  937. u64 i_rsvd_1:2;
  938. u64 i_m:2;
  939. u64 i_f:1;
  940. u64 i_of_cnt:5;
  941. u64 i_error:1;
  942. u64 i_rd_to:1;
  943. u64 i_spur_wr:1;
  944. u64 i_spur_rd:1;
  945. u64 i_rsvd:11;
  946. u64 i_mult_err:1;
  947. } ii_iprbb_fld_s;
  948. } ii_iprbb_u_t;
  949. /************************************************************************
  950. * *
  951. * Description: There are 9 instances of this register, one per *
  952. * actual widget in this implementation of SHub and Crossbow. *
  953. * Note: Crossbow only has ports for Widgets 8 through F, widget 0 *
  954. * refers to Crossbow's internal space. *
  955. * This register contains the state elements per widget that are *
  956. * necessary to manage the PIO flow control on Crosstalk and on the *
  957. * Router Network. See the PIO Flow Control chapter for a complete *
  958. * description of this register *
  959. * The SPUR_WR bit requires some explanation. When this register is *
  960. * written, the new value of the C field is captured in an internal *
  961. * register so the hardware can remember what the programmer wrote *
  962. * into the credit counter. The SPUR_WR bit sets whenever the C field *
  963. * increments above this stored value, which indicates that there *
  964. * have been more responses received than requests sent. The SPUR_WR *
  965. * bit cannot be cleared until a value is written to the IPRBx *
  966. * register; the write will correct the C field and capture its new *
  967. * value in the internal register. Even if IECLR[E_PRB_x] is set, the *
  968. * SPUR_WR bit will persist if IPRBx hasn't yet been written. *
  969. * . *
  970. * *
  971. ************************************************************************/
  972. typedef union ii_iprbc_u {
  973. u64 ii_iprbc_regval;
  974. struct {
  975. u64 i_c:8;
  976. u64 i_na:14;
  977. u64 i_rsvd_2:2;
  978. u64 i_nb:14;
  979. u64 i_rsvd_1:2;
  980. u64 i_m:2;
  981. u64 i_f:1;
  982. u64 i_of_cnt:5;
  983. u64 i_error:1;
  984. u64 i_rd_to:1;
  985. u64 i_spur_wr:1;
  986. u64 i_spur_rd:1;
  987. u64 i_rsvd:11;
  988. u64 i_mult_err:1;
  989. } ii_iprbc_fld_s;
  990. } ii_iprbc_u_t;
  991. /************************************************************************
  992. * *
  993. * Description: There are 9 instances of this register, one per *
  994. * actual widget in this implementation of SHub and Crossbow. *
  995. * Note: Crossbow only has ports for Widgets 8 through F, widget 0 *
  996. * refers to Crossbow's internal space. *
  997. * This register contains the state elements per widget that are *
  998. * necessary to manage the PIO flow control on Crosstalk and on the *
  999. * Router Network. See the PIO Flow Control chapter for a complete *
  1000. * description of this register *
  1001. * The SPUR_WR bit requires some explanation. When this register is *
  1002. * written, the new value of the C field is captured in an internal *
  1003. * register so the hardware can remember what the programmer wrote *
  1004. * into the credit counter. The SPUR_WR bit sets whenever the C field *
  1005. * increments above this stored value, which indicates that there *
  1006. * have been more responses received than requests sent. The SPUR_WR *
  1007. * bit cannot be cleared until a value is written to the IPRBx *
  1008. * register; the write will correct the C field and capture its new *
  1009. * value in the internal register. Even if IECLR[E_PRB_x] is set, the *
  1010. * SPUR_WR bit will persist if IPRBx hasn't yet been written. *
  1011. * . *
  1012. * *
  1013. ************************************************************************/
  1014. typedef union ii_iprbd_u {
  1015. u64 ii_iprbd_regval;
  1016. struct {
  1017. u64 i_c:8;
  1018. u64 i_na:14;
  1019. u64 i_rsvd_2:2;
  1020. u64 i_nb:14;
  1021. u64 i_rsvd_1:2;
  1022. u64 i_m:2;
  1023. u64 i_f:1;
  1024. u64 i_of_cnt:5;
  1025. u64 i_error:1;
  1026. u64 i_rd_to:1;
  1027. u64 i_spur_wr:1;
  1028. u64 i_spur_rd:1;
  1029. u64 i_rsvd:11;
  1030. u64 i_mult_err:1;
  1031. } ii_iprbd_fld_s;
  1032. } ii_iprbd_u_t;
  1033. /************************************************************************
  1034. * *
  1035. * Description: There are 9 instances of this register, one per *
  1036. * actual widget in this implementation of SHub and Crossbow. *
  1037. * Note: Crossbow only has ports for Widgets 8 through F, widget 0 *
  1038. * refers to Crossbow's internal space. *
  1039. * This register contains the state elements per widget that are *
  1040. * necessary to manage the PIO flow control on Crosstalk and on the *
  1041. * Router Network. See the PIO Flow Control chapter for a complete *
  1042. * description of this register *
  1043. * The SPUR_WR bit requires some explanation. When this register is *
  1044. * written, the new value of the C field is captured in an internal *
  1045. * register so the hardware can remember what the programmer wrote *
  1046. * into the credit counter. The SPUR_WR bit sets whenever the C field *
  1047. * increments above this stored value, which indicates that there *
  1048. * have been more responses received than requests sent. The SPUR_WR *
  1049. * bit cannot be cleared until a value is written to the IPRBx *
  1050. * register; the write will correct the C field and capture its new *
  1051. * value in the internal register. Even if IECLR[E_PRB_x] is set, the *
  1052. * SPUR_WR bit will persist if IPRBx hasn't yet been written. *
  1053. * . *
  1054. * *
  1055. ************************************************************************/
  1056. typedef union ii_iprbe_u {
  1057. u64 ii_iprbe_regval;
  1058. struct {
  1059. u64 i_c:8;
  1060. u64 i_na:14;
  1061. u64 i_rsvd_2:2;
  1062. u64 i_nb:14;
  1063. u64 i_rsvd_1:2;
  1064. u64 i_m:2;
  1065. u64 i_f:1;
  1066. u64 i_of_cnt:5;
  1067. u64 i_error:1;
  1068. u64 i_rd_to:1;
  1069. u64 i_spur_wr:1;
  1070. u64 i_spur_rd:1;
  1071. u64 i_rsvd:11;
  1072. u64 i_mult_err:1;
  1073. } ii_iprbe_fld_s;
  1074. } ii_iprbe_u_t;
  1075. /************************************************************************
  1076. * *
  1077. * Description: There are 9 instances of this register, one per *
  1078. * actual widget in this implementation of Shub and Crossbow. *
  1079. * Note: Crossbow only has ports for Widgets 8 through F, widget 0 *
  1080. * refers to Crossbow's internal space. *
  1081. * This register contains the state elements per widget that are *
  1082. * necessary to manage the PIO flow control on Crosstalk and on the *
  1083. * Router Network. See the PIO Flow Control chapter for a complete *
  1084. * description of this register *
  1085. * The SPUR_WR bit requires some explanation. When this register is *
  1086. * written, the new value of the C field is captured in an internal *
  1087. * register so the hardware can remember what the programmer wrote *
  1088. * into the credit counter. The SPUR_WR bit sets whenever the C field *
  1089. * increments above this stored value, which indicates that there *
  1090. * have been more responses received than requests sent. The SPUR_WR *
  1091. * bit cannot be cleared until a value is written to the IPRBx *
  1092. * register; the write will correct the C field and capture its new *
  1093. * value in the internal register. Even if IECLR[E_PRB_x] is set, the *
  1094. * SPUR_WR bit will persist if IPRBx hasn't yet been written. *
  1095. * . *
  1096. * *
  1097. ************************************************************************/
  1098. typedef union ii_iprbf_u {
  1099. u64 ii_iprbf_regval;
  1100. struct {
  1101. u64 i_c:8;
  1102. u64 i_na:14;
  1103. u64 i_rsvd_2:2;
  1104. u64 i_nb:14;
  1105. u64 i_rsvd_1:2;
  1106. u64 i_m:2;
  1107. u64 i_f:1;
  1108. u64 i_of_cnt:5;
  1109. u64 i_error:1;
  1110. u64 i_rd_to:1;
  1111. u64 i_spur_wr:1;
  1112. u64 i_spur_rd:1;
  1113. u64 i_rsvd:11;
  1114. u64 i_mult_err:1;
  1115. } ii_iprbe_fld_s;
  1116. } ii_iprbf_u_t;
  1117. /************************************************************************
  1118. * *
  1119. * This register specifies the timeout value to use for monitoring *
  1120. * Crosstalk credits which are used outbound to Crosstalk. An *
  1121. * internal counter called the Crosstalk Credit Timeout Counter *
  1122. * increments every 128 II clocks. The counter starts counting *
  1123. * anytime the credit count drops below a threshold, and resets to *
  1124. * zero (stops counting) anytime the credit count is at or above the *
  1125. * threshold. The threshold is 1 credit in direct connect mode and 2 *
  1126. * in Crossbow connect mode. When the internal Crosstalk Credit *
  1127. * Timeout Counter reaches the value programmed in this register, a *
  1128. * Crosstalk Credit Timeout has occurred. The internal counter is not *
  1129. * readable from software, and stops counting at its maximum value, *
  1130. * so it cannot cause more than one interrupt. *
  1131. * *
  1132. ************************************************************************/
  1133. typedef union ii_ixcc_u {
  1134. u64 ii_ixcc_regval;
  1135. struct {
  1136. u64 i_time_out:26;
  1137. u64 i_rsvd:38;
  1138. } ii_ixcc_fld_s;
  1139. } ii_ixcc_u_t;
  1140. /************************************************************************
  1141. * *
  1142. * Description: This register qualifies all the PIO and DMA *
  1143. * operations launched from widget 0 towards the SHub. In *
  1144. * addition, it also qualifies accesses by the BTE streams. *
  1145. * The bits in each field of this register are cleared by the SHub *
  1146. * upon detection of an error which requires widget 0 or the BTE *
  1147. * streams to be terminated. Whether or not widget x has access *
  1148. * rights to this SHub is determined by an AND of the device *
  1149. * enable bit in the appropriate field of this register and bit 0 in *
  1150. * the Wx_IAC field. The bits in this field are set by writing a 1 to *
  1151. * them. Incoming replies from Crosstalk are not subject to this *
  1152. * access control mechanism. *
  1153. * *
  1154. ************************************************************************/
  1155. typedef union ii_imem_u {
  1156. u64 ii_imem_regval;
  1157. struct {
  1158. u64 i_w0_esd:1;
  1159. u64 i_rsvd_3:3;
  1160. u64 i_b0_esd:1;
  1161. u64 i_rsvd_2:3;
  1162. u64 i_b1_esd:1;
  1163. u64 i_rsvd_1:3;
  1164. u64 i_clr_precise:1;
  1165. u64 i_rsvd:51;
  1166. } ii_imem_fld_s;
  1167. } ii_imem_u_t;
  1168. /************************************************************************
  1169. * *
  1170. * Description: This register specifies the timeout value to use for *
  1171. * monitoring Crosstalk tail flits coming into the Shub in the *
  1172. * TAIL_TO field. An internal counter associated with this register *
  1173. * is incremented every 128 II internal clocks (7 bits). The counter *
  1174. * starts counting anytime a header micropacket is received and stops *
  1175. * counting (and resets to zero) any time a micropacket with a Tail *
  1176. * bit is received. Once the counter reaches the threshold value *
  1177. * programmed in this register, it generates an interrupt to the *
  1178. * processor that is programmed into the IIDSR. The counter saturates *
  1179. * (does not roll over) at its maximum value, so it cannot cause *
  1180. * another interrupt until after it is cleared. *
  1181. * The register also contains the Read Response Timeout values. The *
  1182. * Prescalar is 23 bits, and counts II clocks. An internal counter *
  1183. * increments on every II clock and when it reaches the value in the *
  1184. * Prescalar field, all IPRTE registers with their valid bits set *
  1185. * have their Read Response timers bumped. Whenever any of them match *
  1186. * the value in the RRSP_TO field, a Read Response Timeout has *
  1187. * occurred, and error handling occurs as described in the Error *
  1188. * Handling section of this document. *
  1189. * *
  1190. ************************************************************************/
  1191. typedef union ii_ixtt_u {
  1192. u64 ii_ixtt_regval;
  1193. struct {
  1194. u64 i_tail_to:26;
  1195. u64 i_rsvd_1:6;
  1196. u64 i_rrsp_ps:23;
  1197. u64 i_rrsp_to:5;
  1198. u64 i_rsvd:4;
  1199. } ii_ixtt_fld_s;
  1200. } ii_ixtt_u_t;
  1201. /************************************************************************
  1202. * *
  1203. * Writing a 1 to the fields of this register clears the appropriate *
  1204. * error bits in other areas of SHub. Note that when the *
  1205. * E_PRB_x bits are used to clear error bits in PRB registers, *
  1206. * SPUR_RD and SPUR_WR may persist, because they require additional *
  1207. * action to clear them. See the IPRBx and IXSS Register *
  1208. * specifications. *
  1209. * *
  1210. ************************************************************************/
  1211. typedef union ii_ieclr_u {
  1212. u64 ii_ieclr_regval;
  1213. struct {
  1214. u64 i_e_prb_0:1;
  1215. u64 i_rsvd:7;
  1216. u64 i_e_prb_8:1;
  1217. u64 i_e_prb_9:1;
  1218. u64 i_e_prb_a:1;
  1219. u64 i_e_prb_b:1;
  1220. u64 i_e_prb_c:1;
  1221. u64 i_e_prb_d:1;
  1222. u64 i_e_prb_e:1;
  1223. u64 i_e_prb_f:1;
  1224. u64 i_e_crazy:1;
  1225. u64 i_e_bte_0:1;
  1226. u64 i_e_bte_1:1;
  1227. u64 i_reserved_1:10;
  1228. u64 i_spur_rd_hdr:1;
  1229. u64 i_cam_intr_to:1;
  1230. u64 i_cam_overflow:1;
  1231. u64 i_cam_read_miss:1;
  1232. u64 i_ioq_rep_underflow:1;
  1233. u64 i_ioq_req_underflow:1;
  1234. u64 i_ioq_rep_overflow:1;
  1235. u64 i_ioq_req_overflow:1;
  1236. u64 i_iiq_rep_overflow:1;
  1237. u64 i_iiq_req_overflow:1;
  1238. u64 i_ii_xn_rep_cred_overflow:1;
  1239. u64 i_ii_xn_req_cred_overflow:1;
  1240. u64 i_ii_xn_invalid_cmd:1;
  1241. u64 i_xn_ii_invalid_cmd:1;
  1242. u64 i_reserved_2:21;
  1243. } ii_ieclr_fld_s;
  1244. } ii_ieclr_u_t;
  1245. /************************************************************************
  1246. * *
  1247. * This register controls both BTEs. SOFT_RESET is intended for *
  1248. * recovery after an error. COUNT controls the total number of CRBs *
  1249. * that both BTEs (combined) can use, which affects total BTE *
  1250. * bandwidth. *
  1251. * *
  1252. ************************************************************************/
  1253. typedef union ii_ibcr_u {
  1254. u64 ii_ibcr_regval;
  1255. struct {
  1256. u64 i_count:4;
  1257. u64 i_rsvd_1:4;
  1258. u64 i_soft_reset:1;
  1259. u64 i_rsvd:55;
  1260. } ii_ibcr_fld_s;
  1261. } ii_ibcr_u_t;
  1262. /************************************************************************
  1263. * *
  1264. * This register contains the header of a spurious read response *
  1265. * received from Crosstalk. A spurious read response is defined as a *
  1266. * read response received by II from a widget for which (1) the SIDN *
  1267. * has a value between 1 and 7, inclusive (II never sends requests to *
  1268. * these widgets (2) there is no valid IPRTE register which *
  1269. * corresponds to the TNUM, or (3) the widget indicated in SIDN is *
  1270. * not the same as the widget recorded in the IPRTE register *
  1271. * referenced by the TNUM. If this condition is true, and if the *
  1272. * IXSS[VALID] bit is clear, then the header of the spurious read *
  1273. * response is capture in IXSM and IXSS, and IXSS[VALID] is set. The *
  1274. * errant header is thereby captured, and no further spurious read *
  1275. * respones are captured until IXSS[VALID] is cleared by setting the *
  1276. * appropriate bit in IECLR. Every time a spurious read response is *
  1277. * detected, the SPUR_RD bit of the PRB corresponding to the incoming *
  1278. * message's SIDN field is set. This always happens, regardless of *
  1279. * whether a header is captured. The programmer should check *
  1280. * IXSM[SIDN] to determine which widget sent the spurious response, *
  1281. * because there may be more than one SPUR_RD bit set in the PRB *
  1282. * registers. The widget indicated by IXSM[SIDN] was the first *
  1283. * spurious read response to be received since the last time *
  1284. * IXSS[VALID] was clear. The SPUR_RD bit of the corresponding PRB *
  1285. * will be set. Any SPUR_RD bits in any other PRB registers indicate *
  1286. * spurious messages from other widets which were detected after the *
  1287. * header was captured.. *
  1288. * *
  1289. ************************************************************************/
  1290. typedef union ii_ixsm_u {
  1291. u64 ii_ixsm_regval;
  1292. struct {
  1293. u64 i_byte_en:32;
  1294. u64 i_reserved:1;
  1295. u64 i_tag:3;
  1296. u64 i_alt_pactyp:4;
  1297. u64 i_bo:1;
  1298. u64 i_error:1;
  1299. u64 i_vbpm:1;
  1300. u64 i_gbr:1;
  1301. u64 i_ds:2;
  1302. u64 i_ct:1;
  1303. u64 i_tnum:5;
  1304. u64 i_pactyp:4;
  1305. u64 i_sidn:4;
  1306. u64 i_didn:4;
  1307. } ii_ixsm_fld_s;
  1308. } ii_ixsm_u_t;
  1309. /************************************************************************
  1310. * *
  1311. * This register contains the sideband bits of a spurious read *
  1312. * response received from Crosstalk. *
  1313. * *
  1314. ************************************************************************/
  1315. typedef union ii_ixss_u {
  1316. u64 ii_ixss_regval;
  1317. struct {
  1318. u64 i_sideband:8;
  1319. u64 i_rsvd:55;
  1320. u64 i_valid:1;
  1321. } ii_ixss_fld_s;
  1322. } ii_ixss_u_t;
  1323. /************************************************************************
  1324. * *
  1325. * This register enables software to access the II LLP's test port. *
  1326. * Refer to the LLP 2.5 documentation for an explanation of the test *
  1327. * port. Software can write to this register to program the values *
  1328. * for the control fields (TestErrCapture, TestClear, TestFlit, *
  1329. * TestMask and TestSeed). Similarly, software can read from this *
  1330. * register to obtain the values of the test port's status outputs *
  1331. * (TestCBerr, TestValid and TestData). *
  1332. * *
  1333. ************************************************************************/
  1334. typedef union ii_ilct_u {
  1335. u64 ii_ilct_regval;
  1336. struct {
  1337. u64 i_test_seed:20;
  1338. u64 i_test_mask:8;
  1339. u64 i_test_data:20;
  1340. u64 i_test_valid:1;
  1341. u64 i_test_cberr:1;
  1342. u64 i_test_flit:3;
  1343. u64 i_test_clear:1;
  1344. u64 i_test_err_capture:1;
  1345. u64 i_rsvd:9;
  1346. } ii_ilct_fld_s;
  1347. } ii_ilct_u_t;
  1348. /************************************************************************
  1349. * *
  1350. * If the II detects an illegal incoming Duplonet packet (request or *
  1351. * reply) when VALID==0 in the IIEPH1 register, then it saves the *
  1352. * contents of the packet's header flit in the IIEPH1 and IIEPH2 *
  1353. * registers, sets the VALID bit in IIEPH1, clears the OVERRUN bit, *
  1354. * and assigns a value to the ERR_TYPE field which indicates the *
  1355. * specific nature of the error. The II recognizes four different *
  1356. * types of errors: short request packets (ERR_TYPE==2), short reply *
  1357. * packets (ERR_TYPE==3), long request packets (ERR_TYPE==4) and long *
  1358. * reply packets (ERR_TYPE==5). The encodings for these types of *
  1359. * errors were chosen to be consistent with the same types of errors *
  1360. * indicated by the ERR_TYPE field in the LB_ERROR_HDR1 register (in *
  1361. * the LB unit). If the II detects an illegal incoming Duplonet *
  1362. * packet when VALID==1 in the IIEPH1 register, then it merely sets *
  1363. * the OVERRUN bit to indicate that a subsequent error has happened, *
  1364. * and does nothing further. *
  1365. * *
  1366. ************************************************************************/
  1367. typedef union ii_iieph1_u {
  1368. u64 ii_iieph1_regval;
  1369. struct {
  1370. u64 i_command:7;
  1371. u64 i_rsvd_5:1;
  1372. u64 i_suppl:14;
  1373. u64 i_rsvd_4:1;
  1374. u64 i_source:14;
  1375. u64 i_rsvd_3:1;
  1376. u64 i_err_type:4;
  1377. u64 i_rsvd_2:4;
  1378. u64 i_overrun:1;
  1379. u64 i_rsvd_1:3;
  1380. u64 i_valid:1;
  1381. u64 i_rsvd:13;
  1382. } ii_iieph1_fld_s;
  1383. } ii_iieph1_u_t;
  1384. /************************************************************************
  1385. * *
  1386. * This register holds the Address field from the header flit of an *
  1387. * incoming erroneous Duplonet packet, along with the tail bit which *
  1388. * accompanied this header flit. This register is essentially an *
  1389. * extension of IIEPH1. Two registers were necessary because the 64 *
  1390. * bits available in only a single register were insufficient to *
  1391. * capture the entire header flit of an erroneous packet. *
  1392. * *
  1393. ************************************************************************/
  1394. typedef union ii_iieph2_u {
  1395. u64 ii_iieph2_regval;
  1396. struct {
  1397. u64 i_rsvd_0:3;
  1398. u64 i_address:47;
  1399. u64 i_rsvd_1:10;
  1400. u64 i_tail:1;
  1401. u64 i_rsvd:3;
  1402. } ii_iieph2_fld_s;
  1403. } ii_iieph2_u_t;
  1404. /******************************/
  1405. /************************************************************************
  1406. * *
  1407. * This register's value is a bit vector that guards access from SXBs *
  1408. * to local registers within the II as well as to external Crosstalk *
  1409. * widgets *
  1410. * *
  1411. ************************************************************************/
  1412. typedef union ii_islapr_u {
  1413. u64 ii_islapr_regval;
  1414. struct {
  1415. u64 i_region:64;
  1416. } ii_islapr_fld_s;
  1417. } ii_islapr_u_t;
  1418. /************************************************************************
  1419. * *
  1420. * A write to this register of the 56-bit value "Pup+Bun" will cause *
  1421. * the bit in the ISLAPR register corresponding to the region of the *
  1422. * requestor to be set (access allowed). (
  1423. * *
  1424. ************************************************************************/
  1425. typedef union ii_islapo_u {
  1426. u64 ii_islapo_regval;
  1427. struct {
  1428. u64 i_io_sbx_ovrride:56;
  1429. u64 i_rsvd:8;
  1430. } ii_islapo_fld_s;
  1431. } ii_islapo_u_t;
  1432. /************************************************************************
  1433. * *
  1434. * Determines how long the wrapper will wait aftr an interrupt is *
  1435. * initially issued from the II before it times out the outstanding *
  1436. * interrupt and drops it from the interrupt queue. *
  1437. * *
  1438. ************************************************************************/
  1439. typedef union ii_iwi_u {
  1440. u64 ii_iwi_regval;
  1441. struct {
  1442. u64 i_prescale:24;
  1443. u64 i_rsvd:8;
  1444. u64 i_timeout:8;
  1445. u64 i_rsvd1:8;
  1446. u64 i_intrpt_retry_period:8;
  1447. u64 i_rsvd2:8;
  1448. } ii_iwi_fld_s;
  1449. } ii_iwi_u_t;
  1450. /************************************************************************
  1451. * *
  1452. * Log errors which have occurred in the II wrapper. The errors are *
  1453. * cleared by writing to the IECLR register. *
  1454. * *
  1455. ************************************************************************/
  1456. typedef union ii_iwel_u {
  1457. u64 ii_iwel_regval;
  1458. struct {
  1459. u64 i_intr_timed_out:1;
  1460. u64 i_rsvd:7;
  1461. u64 i_cam_overflow:1;
  1462. u64 i_cam_read_miss:1;
  1463. u64 i_rsvd1:2;
  1464. u64 i_ioq_rep_underflow:1;
  1465. u64 i_ioq_req_underflow:1;
  1466. u64 i_ioq_rep_overflow:1;
  1467. u64 i_ioq_req_overflow:1;
  1468. u64 i_iiq_rep_overflow:1;
  1469. u64 i_iiq_req_overflow:1;
  1470. u64 i_rsvd2:6;
  1471. u64 i_ii_xn_rep_cred_over_under:1;
  1472. u64 i_ii_xn_req_cred_over_under:1;
  1473. u64 i_rsvd3:6;
  1474. u64 i_ii_xn_invalid_cmd:1;
  1475. u64 i_xn_ii_invalid_cmd:1;
  1476. u64 i_rsvd4:30;
  1477. } ii_iwel_fld_s;
  1478. } ii_iwel_u_t;
  1479. /************************************************************************
  1480. * *
  1481. * Controls the II wrapper. *
  1482. * *
  1483. ************************************************************************/
  1484. typedef union ii_iwc_u {
  1485. u64 ii_iwc_regval;
  1486. struct {
  1487. u64 i_dma_byte_swap:1;
  1488. u64 i_rsvd:3;
  1489. u64 i_cam_read_lines_reset:1;
  1490. u64 i_rsvd1:3;
  1491. u64 i_ii_xn_cred_over_under_log:1;
  1492. u64 i_rsvd2:19;
  1493. u64 i_xn_rep_iq_depth:5;
  1494. u64 i_rsvd3:3;
  1495. u64 i_xn_req_iq_depth:5;
  1496. u64 i_rsvd4:3;
  1497. u64 i_iiq_depth:6;
  1498. u64 i_rsvd5:12;
  1499. u64 i_force_rep_cred:1;
  1500. u64 i_force_req_cred:1;
  1501. } ii_iwc_fld_s;
  1502. } ii_iwc_u_t;
  1503. /************************************************************************
  1504. * *
  1505. * Status in the II wrapper. *
  1506. * *
  1507. ************************************************************************/
  1508. typedef union ii_iws_u {
  1509. u64 ii_iws_regval;
  1510. struct {
  1511. u64 i_xn_rep_iq_credits:5;
  1512. u64 i_rsvd:3;
  1513. u64 i_xn_req_iq_credits:5;
  1514. u64 i_rsvd1:51;
  1515. } ii_iws_fld_s;
  1516. } ii_iws_u_t;
  1517. /************************************************************************
  1518. * *
  1519. * Masks errors in the IWEL register. *
  1520. * *
  1521. ************************************************************************/
  1522. typedef union ii_iweim_u {
  1523. u64 ii_iweim_regval;
  1524. struct {
  1525. u64 i_intr_timed_out:1;
  1526. u64 i_rsvd:7;
  1527. u64 i_cam_overflow:1;
  1528. u64 i_cam_read_miss:1;
  1529. u64 i_rsvd1:2;
  1530. u64 i_ioq_rep_underflow:1;
  1531. u64 i_ioq_req_underflow:1;
  1532. u64 i_ioq_rep_overflow:1;
  1533. u64 i_ioq_req_overflow:1;
  1534. u64 i_iiq_rep_overflow:1;
  1535. u64 i_iiq_req_overflow:1;
  1536. u64 i_rsvd2:6;
  1537. u64 i_ii_xn_rep_cred_overflow:1;
  1538. u64 i_ii_xn_req_cred_overflow:1;
  1539. u64 i_rsvd3:6;
  1540. u64 i_ii_xn_invalid_cmd:1;
  1541. u64 i_xn_ii_invalid_cmd:1;
  1542. u64 i_rsvd4:30;
  1543. } ii_iweim_fld_s;
  1544. } ii_iweim_u_t;
  1545. /************************************************************************
  1546. * *
  1547. * A write to this register causes a particular field in the *
  1548. * corresponding widget's PRB entry to be adjusted up or down by 1. *
  1549. * This counter should be used when recovering from error and reset *
  1550. * conditions. Note that software would be capable of causing *
  1551. * inadvertent overflow or underflow of these counters. *
  1552. * *
  1553. ************************************************************************/
  1554. typedef union ii_ipca_u {
  1555. u64 ii_ipca_regval;
  1556. struct {
  1557. u64 i_wid:4;
  1558. u64 i_adjust:1;
  1559. u64 i_rsvd_1:3;
  1560. u64 i_field:2;
  1561. u64 i_rsvd:54;
  1562. } ii_ipca_fld_s;
  1563. } ii_ipca_u_t;
  1564. /************************************************************************
  1565. * *
  1566. * There are 8 instances of this register. This register contains *
  1567. * the information that the II has to remember once it has launched a *
  1568. * PIO Read operation. The contents are used to form the correct *
  1569. * Router Network packet and direct the Crosstalk reply to the *
  1570. * appropriate processor. *
  1571. * *
  1572. ************************************************************************/
  1573. typedef union ii_iprte0a_u {
  1574. u64 ii_iprte0a_regval;
  1575. struct {
  1576. u64 i_rsvd_1:54;
  1577. u64 i_widget:4;
  1578. u64 i_to_cnt:5;
  1579. u64 i_vld:1;
  1580. } ii_iprte0a_fld_s;
  1581. } ii_iprte0a_u_t;
  1582. /************************************************************************
  1583. * *
  1584. * There are 8 instances of this register. This register contains *
  1585. * the information that the II has to remember once it has launched a *
  1586. * PIO Read operation. The contents are used to form the correct *
  1587. * Router Network packet and direct the Crosstalk reply to the *
  1588. * appropriate processor. *
  1589. * *
  1590. ************************************************************************/
  1591. typedef union ii_iprte1a_u {
  1592. u64 ii_iprte1a_regval;
  1593. struct {
  1594. u64 i_rsvd_1:54;
  1595. u64 i_widget:4;
  1596. u64 i_to_cnt:5;
  1597. u64 i_vld:1;
  1598. } ii_iprte1a_fld_s;
  1599. } ii_iprte1a_u_t;
  1600. /************************************************************************
  1601. * *
  1602. * There are 8 instances of this register. This register contains *
  1603. * the information that the II has to remember once it has launched a *
  1604. * PIO Read operation. The contents are used to form the correct *
  1605. * Router Network packet and direct the Crosstalk reply to the *
  1606. * appropriate processor. *
  1607. * *
  1608. ************************************************************************/
  1609. typedef union ii_iprte2a_u {
  1610. u64 ii_iprte2a_regval;
  1611. struct {
  1612. u64 i_rsvd_1:54;
  1613. u64 i_widget:4;
  1614. u64 i_to_cnt:5;
  1615. u64 i_vld:1;
  1616. } ii_iprte2a_fld_s;
  1617. } ii_iprte2a_u_t;
  1618. /************************************************************************
  1619. * *
  1620. * There are 8 instances of this register. This register contains *
  1621. * the information that the II has to remember once it has launched a *
  1622. * PIO Read operation. The contents are used to form the correct *
  1623. * Router Network packet and direct the Crosstalk reply to the *
  1624. * appropriate processor. *
  1625. * *
  1626. ************************************************************************/
  1627. typedef union ii_iprte3a_u {
  1628. u64 ii_iprte3a_regval;
  1629. struct {
  1630. u64 i_rsvd_1:54;
  1631. u64 i_widget:4;
  1632. u64 i_to_cnt:5;
  1633. u64 i_vld:1;
  1634. } ii_iprte3a_fld_s;
  1635. } ii_iprte3a_u_t;
  1636. /************************************************************************
  1637. * *
  1638. * There are 8 instances of this register. This register contains *
  1639. * the information that the II has to remember once it has launched a *
  1640. * PIO Read operation. The contents are used to form the correct *
  1641. * Router Network packet and direct the Crosstalk reply to the *
  1642. * appropriate processor. *
  1643. * *
  1644. ************************************************************************/
  1645. typedef union ii_iprte4a_u {
  1646. u64 ii_iprte4a_regval;
  1647. struct {
  1648. u64 i_rsvd_1:54;
  1649. u64 i_widget:4;
  1650. u64 i_to_cnt:5;
  1651. u64 i_vld:1;
  1652. } ii_iprte4a_fld_s;
  1653. } ii_iprte4a_u_t;
  1654. /************************************************************************
  1655. * *
  1656. * There are 8 instances of this register. This register contains *
  1657. * the information that the II has to remember once it has launched a *
  1658. * PIO Read operation. The contents are used to form the correct *
  1659. * Router Network packet and direct the Crosstalk reply to the *
  1660. * appropriate processor. *
  1661. * *
  1662. ************************************************************************/
  1663. typedef union ii_iprte5a_u {
  1664. u64 ii_iprte5a_regval;
  1665. struct {
  1666. u64 i_rsvd_1:54;
  1667. u64 i_widget:4;
  1668. u64 i_to_cnt:5;
  1669. u64 i_vld:1;
  1670. } ii_iprte5a_fld_s;
  1671. } ii_iprte5a_u_t;
  1672. /************************************************************************
  1673. * *
  1674. * There are 8 instances of this register. This register contains *
  1675. * the information that the II has to remember once it has launched a *
  1676. * PIO Read operation. The contents are used to form the correct *
  1677. * Router Network packet and direct the Crosstalk reply to the *
  1678. * appropriate processor. *
  1679. * *
  1680. ************************************************************************/
  1681. typedef union ii_iprte6a_u {
  1682. u64 ii_iprte6a_regval;
  1683. struct {
  1684. u64 i_rsvd_1:54;
  1685. u64 i_widget:4;
  1686. u64 i_to_cnt:5;
  1687. u64 i_vld:1;
  1688. } ii_iprte6a_fld_s;
  1689. } ii_iprte6a_u_t;
  1690. /************************************************************************
  1691. * *
  1692. * There are 8 instances of this register. This register contains *
  1693. * the information that the II has to remember once it has launched a *
  1694. * PIO Read operation. The contents are used to form the correct *
  1695. * Router Network packet and direct the Crosstalk reply to the *
  1696. * appropriate processor. *
  1697. * *
  1698. ************************************************************************/
  1699. typedef union ii_iprte7a_u {
  1700. u64 ii_iprte7a_regval;
  1701. struct {
  1702. u64 i_rsvd_1:54;
  1703. u64 i_widget:4;
  1704. u64 i_to_cnt:5;
  1705. u64 i_vld:1;
  1706. } ii_iprtea7_fld_s;
  1707. } ii_iprte7a_u_t;
  1708. /************************************************************************
  1709. * *
  1710. * There are 8 instances of this register. This register contains *
  1711. * the information that the II has to remember once it has launched a *
  1712. * PIO Read operation. The contents are used to form the correct *
  1713. * Router Network packet and direct the Crosstalk reply to the *
  1714. * appropriate processor. *
  1715. * *
  1716. ************************************************************************/
  1717. typedef union ii_iprte0b_u {
  1718. u64 ii_iprte0b_regval;
  1719. struct {
  1720. u64 i_rsvd_1:3;
  1721. u64 i_address:47;
  1722. u64 i_init:3;
  1723. u64 i_source:11;
  1724. } ii_iprte0b_fld_s;
  1725. } ii_iprte0b_u_t;
  1726. /************************************************************************
  1727. * *
  1728. * There are 8 instances of this register. This register contains *
  1729. * the information that the II has to remember once it has launched a *
  1730. * PIO Read operation. The contents are used to form the correct *
  1731. * Router Network packet and direct the Crosstalk reply to the *
  1732. * appropriate processor. *
  1733. * *
  1734. ************************************************************************/
  1735. typedef union ii_iprte1b_u {
  1736. u64 ii_iprte1b_regval;
  1737. struct {
  1738. u64 i_rsvd_1:3;
  1739. u64 i_address:47;
  1740. u64 i_init:3;
  1741. u64 i_source:11;
  1742. } ii_iprte1b_fld_s;
  1743. } ii_iprte1b_u_t;
  1744. /************************************************************************
  1745. * *
  1746. * There are 8 instances of this register. This register contains *
  1747. * the information that the II has to remember once it has launched a *
  1748. * PIO Read operation. The contents are used to form the correct *
  1749. * Router Network packet and direct the Crosstalk reply to the *
  1750. * appropriate processor. *
  1751. * *
  1752. ************************************************************************/
  1753. typedef union ii_iprte2b_u {
  1754. u64 ii_iprte2b_regval;
  1755. struct {
  1756. u64 i_rsvd_1:3;
  1757. u64 i_address:47;
  1758. u64 i_init:3;
  1759. u64 i_source:11;
  1760. } ii_iprte2b_fld_s;
  1761. } ii_iprte2b_u_t;
  1762. /************************************************************************
  1763. * *
  1764. * There are 8 instances of this register. This register contains *
  1765. * the information that the II has to remember once it has launched a *
  1766. * PIO Read operation. The contents are used to form the correct *
  1767. * Router Network packet and direct the Crosstalk reply to the *
  1768. * appropriate processor. *
  1769. * *
  1770. ************************************************************************/
  1771. typedef union ii_iprte3b_u {
  1772. u64 ii_iprte3b_regval;
  1773. struct {
  1774. u64 i_rsvd_1:3;
  1775. u64 i_address:47;
  1776. u64 i_init:3;
  1777. u64 i_source:11;
  1778. } ii_iprte3b_fld_s;
  1779. } ii_iprte3b_u_t;
  1780. /************************************************************************
  1781. * *
  1782. * There are 8 instances of this register. This register contains *
  1783. * the information that the II has to remember once it has launched a *
  1784. * PIO Read operation. The contents are used to form the correct *
  1785. * Router Network packet and direct the Crosstalk reply to the *
  1786. * appropriate processor. *
  1787. * *
  1788. ************************************************************************/
  1789. typedef union ii_iprte4b_u {
  1790. u64 ii_iprte4b_regval;
  1791. struct {
  1792. u64 i_rsvd_1:3;
  1793. u64 i_address:47;
  1794. u64 i_init:3;
  1795. u64 i_source:11;
  1796. } ii_iprte4b_fld_s;
  1797. } ii_iprte4b_u_t;
  1798. /************************************************************************
  1799. * *
  1800. * There are 8 instances of this register. This register contains *
  1801. * the information that the II has to remember once it has launched a *
  1802. * PIO Read operation. The contents are used to form the correct *
  1803. * Router Network packet and direct the Crosstalk reply to the *
  1804. * appropriate processor. *
  1805. * *
  1806. ************************************************************************/
  1807. typedef union ii_iprte5b_u {
  1808. u64 ii_iprte5b_regval;
  1809. struct {
  1810. u64 i_rsvd_1:3;
  1811. u64 i_address:47;
  1812. u64 i_init:3;
  1813. u64 i_source:11;
  1814. } ii_iprte5b_fld_s;
  1815. } ii_iprte5b_u_t;
  1816. /************************************************************************
  1817. * *
  1818. * There are 8 instances of this register. This register contains *
  1819. * the information that the II has to remember once it has launched a *
  1820. * PIO Read operation. The contents are used to form the correct *
  1821. * Router Network packet and direct the Crosstalk reply to the *
  1822. * appropriate processor. *
  1823. * *
  1824. ************************************************************************/
  1825. typedef union ii_iprte6b_u {
  1826. u64 ii_iprte6b_regval;
  1827. struct {
  1828. u64 i_rsvd_1:3;
  1829. u64 i_address:47;
  1830. u64 i_init:3;
  1831. u64 i_source:11;
  1832. } ii_iprte6b_fld_s;
  1833. } ii_iprte6b_u_t;
  1834. /************************************************************************
  1835. * *
  1836. * There are 8 instances of this register. This register contains *
  1837. * the information that the II has to remember once it has launched a *
  1838. * PIO Read operation. The contents are used to form the correct *
  1839. * Router Network packet and direct the Crosstalk reply to the *
  1840. * appropriate processor. *
  1841. * *
  1842. ************************************************************************/
  1843. typedef union ii_iprte7b_u {
  1844. u64 ii_iprte7b_regval;
  1845. struct {
  1846. u64 i_rsvd_1:3;
  1847. u64 i_address:47;
  1848. u64 i_init:3;
  1849. u64 i_source:11;
  1850. } ii_iprte7b_fld_s;
  1851. } ii_iprte7b_u_t;
  1852. /************************************************************************
  1853. * *
  1854. * Description: SHub II contains a feature which did not exist in *
  1855. * the Hub which automatically cleans up after a Read Response *
  1856. * timeout, including deallocation of the IPRTE and recovery of IBuf *
  1857. * space. The inclusion of this register in SHub is for backward *
  1858. * compatibility *
  1859. * A write to this register causes an entry from the table of *
  1860. * outstanding PIO Read Requests to be freed and returned to the *
  1861. * stack of free entries. This register is used in handling the *
  1862. * timeout errors that result in a PIO Reply never returning from *
  1863. * Crosstalk. *
  1864. * Note that this register does not affect the contents of the IPRTE *
  1865. * registers. The Valid bits in those registers have to be *
  1866. * specifically turned off by software. *
  1867. * *
  1868. ************************************************************************/
  1869. typedef union ii_ipdr_u {
  1870. u64 ii_ipdr_regval;
  1871. struct {
  1872. u64 i_te:3;
  1873. u64 i_rsvd_1:1;
  1874. u64 i_pnd:1;
  1875. u64 i_init_rpcnt:1;
  1876. u64 i_rsvd:58;
  1877. } ii_ipdr_fld_s;
  1878. } ii_ipdr_u_t;
  1879. /************************************************************************
  1880. * *
  1881. * A write to this register causes a CRB entry to be returned to the *
  1882. * queue of free CRBs. The entry should have previously been cleared *
  1883. * (mark bit) via backdoor access to the pertinent CRB entry. This *
  1884. * register is used in the last step of handling the errors that are *
  1885. * captured and marked in CRB entries. Briefly: 1) first error for *
  1886. * DMA write from a particular device, and first error for a *
  1887. * particular BTE stream, lead to a marked CRB entry, and processor *
  1888. * interrupt, 2) software reads the error information captured in the *
  1889. * CRB entry, and presumably takes some corrective action, 3) *
  1890. * software clears the mark bit, and finally 4) software writes to *
  1891. * the ICDR register to return the CRB entry to the list of free CRB *
  1892. * entries. *
  1893. * *
  1894. ************************************************************************/
  1895. typedef union ii_icdr_u {
  1896. u64 ii_icdr_regval;
  1897. struct {
  1898. u64 i_crb_num:4;
  1899. u64 i_pnd:1;
  1900. u64 i_rsvd:59;
  1901. } ii_icdr_fld_s;
  1902. } ii_icdr_u_t;
  1903. /************************************************************************
  1904. * *
  1905. * This register provides debug access to two FIFOs inside of II. *
  1906. * Both IOQ_MAX* fields of this register contain the instantaneous *
  1907. * depth (in units of the number of available entries) of the *
  1908. * associated IOQ FIFO. A read of this register will return the *
  1909. * number of free entries on each FIFO at the time of the read. So *
  1910. * when a FIFO is idle, the associated field contains the maximum *
  1911. * depth of the FIFO. This register is writable for debug reasons *
  1912. * and is intended to be written with the maximum desired FIFO depth *
  1913. * while the FIFO is idle. Software must assure that II is idle when *
  1914. * this register is written. If there are any active entries in any *
  1915. * of these FIFOs when this register is written, the results are *
  1916. * undefined. *
  1917. * *
  1918. ************************************************************************/
  1919. typedef union ii_ifdr_u {
  1920. u64 ii_ifdr_regval;
  1921. struct {
  1922. u64 i_ioq_max_rq:7;
  1923. u64 i_set_ioq_rq:1;
  1924. u64 i_ioq_max_rp:7;
  1925. u64 i_set_ioq_rp:1;
  1926. u64 i_rsvd:48;
  1927. } ii_ifdr_fld_s;
  1928. } ii_ifdr_u_t;
  1929. /************************************************************************
  1930. * *
  1931. * This register allows the II to become sluggish in removing *
  1932. * messages from its inbound queue (IIQ). This will cause messages to *
  1933. * back up in either virtual channel. Disabling the "molasses" mode *
  1934. * subsequently allows the II to be tested under stress. In the *
  1935. * sluggish ("Molasses") mode, the localized effects of congestion *
  1936. * can be observed. *
  1937. * *
  1938. ************************************************************************/
  1939. typedef union ii_iiap_u {
  1940. u64 ii_iiap_regval;
  1941. struct {
  1942. u64 i_rq_mls:6;
  1943. u64 i_rsvd_1:2;
  1944. u64 i_rp_mls:6;
  1945. u64 i_rsvd:50;
  1946. } ii_iiap_fld_s;
  1947. } ii_iiap_u_t;
  1948. /************************************************************************
  1949. * *
  1950. * This register allows several parameters of CRB operation to be *
  1951. * set. Note that writing to this register can have catastrophic side *
  1952. * effects, if the CRB is not quiescent, i.e. if the CRB is *
  1953. * processing protocol messages when the write occurs. *
  1954. * *
  1955. ************************************************************************/
  1956. typedef union ii_icmr_u {
  1957. u64 ii_icmr_regval;
  1958. struct {
  1959. u64 i_sp_msg:1;
  1960. u64 i_rd_hdr:1;
  1961. u64 i_rsvd_4:2;
  1962. u64 i_c_cnt:4;
  1963. u64 i_rsvd_3:4;
  1964. u64 i_clr_rqpd:1;
  1965. u64 i_clr_rppd:1;
  1966. u64 i_rsvd_2:2;
  1967. u64 i_fc_cnt:4;
  1968. u64 i_crb_vld:15;
  1969. u64 i_crb_mark:15;
  1970. u64 i_rsvd_1:2;
  1971. u64 i_precise:1;
  1972. u64 i_rsvd:11;
  1973. } ii_icmr_fld_s;
  1974. } ii_icmr_u_t;
  1975. /************************************************************************
  1976. * *
  1977. * This register allows control of the table portion of the CRB *
  1978. * logic via software. Control operations from this register have *
  1979. * priority over all incoming Crosstalk or BTE requests. *
  1980. * *
  1981. ************************************************************************/
  1982. typedef union ii_iccr_u {
  1983. u64 ii_iccr_regval;
  1984. struct {
  1985. u64 i_crb_num:4;
  1986. u64 i_rsvd_1:4;
  1987. u64 i_cmd:8;
  1988. u64 i_pending:1;
  1989. u64 i_rsvd:47;
  1990. } ii_iccr_fld_s;
  1991. } ii_iccr_u_t;
  1992. /************************************************************************
  1993. * *
  1994. * This register allows the maximum timeout value to be programmed. *
  1995. * *
  1996. ************************************************************************/
  1997. typedef union ii_icto_u {
  1998. u64 ii_icto_regval;
  1999. struct {
  2000. u64 i_timeout:8;
  2001. u64 i_rsvd:56;
  2002. } ii_icto_fld_s;
  2003. } ii_icto_u_t;
  2004. /************************************************************************
  2005. * *
  2006. * This register allows the timeout prescalar to be programmed. An *
  2007. * internal counter is associated with this register. When the *
  2008. * internal counter reaches the value of the PRESCALE field, the *
  2009. * timer registers in all valid CRBs are incremented (CRBx_D[TIMEOUT] *
  2010. * field). The internal counter resets to zero, and then continues *
  2011. * counting. *
  2012. * *
  2013. ************************************************************************/
  2014. typedef union ii_ictp_u {
  2015. u64 ii_ictp_regval;
  2016. struct {
  2017. u64 i_prescale:24;
  2018. u64 i_rsvd:40;
  2019. } ii_ictp_fld_s;
  2020. } ii_ictp_u_t;
  2021. /************************************************************************
  2022. * *
  2023. * Description: There are 15 CRB Entries (ICRB0 to ICRBE) that are *
  2024. * used for Crosstalk operations (both cacheline and partial *
  2025. * operations) or BTE/IO. Because the CRB entries are very wide, five *
  2026. * registers (_A to _E) are required to read and write each entry. *
  2027. * The CRB Entry registers can be conceptualized as rows and columns *
  2028. * (illustrated in the table above). Each row contains the 4 *
  2029. * registers required for a single CRB Entry. The first doubleword *
  2030. * (column) for each entry is labeled A, and the second doubleword *
  2031. * (higher address) is labeled B, the third doubleword is labeled C, *
  2032. * the fourth doubleword is labeled D and the fifth doubleword is *
  2033. * labeled E. All CRB entries have their addresses on a quarter *
  2034. * cacheline aligned boundary. *
  2035. * Upon reset, only the following fields are initialized: valid *
  2036. * (VLD), priority count, timeout, timeout valid, and context valid. *
  2037. * All other bits should be cleared by software before use (after *
  2038. * recovering any potential error state from before the reset). *
  2039. * The following four tables summarize the format for the four *
  2040. * registers that are used for each ICRB# Entry. *
  2041. * *
  2042. ************************************************************************/
  2043. typedef union ii_icrb0_a_u {
  2044. u64 ii_icrb0_a_regval;
  2045. struct {
  2046. u64 ia_iow:1;
  2047. u64 ia_vld:1;
  2048. u64 ia_addr:47;
  2049. u64 ia_tnum:5;
  2050. u64 ia_sidn:4;
  2051. u64 ia_rsvd:6;
  2052. } ii_icrb0_a_fld_s;
  2053. } ii_icrb0_a_u_t;
  2054. /************************************************************************
  2055. * *
  2056. * Description: There are 15 CRB Entries (ICRB0 to ICRBE) that are *
  2057. * used for Crosstalk operations (both cacheline and partial *
  2058. * operations) or BTE/IO. Because the CRB entries are very wide, five *
  2059. * registers (_A to _E) are required to read and write each entry. *
  2060. * *
  2061. ************************************************************************/
  2062. typedef union ii_icrb0_b_u {
  2063. u64 ii_icrb0_b_regval;
  2064. struct {
  2065. u64 ib_xt_err:1;
  2066. u64 ib_mark:1;
  2067. u64 ib_ln_uce:1;
  2068. u64 ib_errcode:3;
  2069. u64 ib_error:1;
  2070. u64 ib_stall__bte_1:1;
  2071. u64 ib_stall__bte_0:1;
  2072. u64 ib_stall__intr:1;
  2073. u64 ib_stall_ib:1;
  2074. u64 ib_intvn:1;
  2075. u64 ib_wb:1;
  2076. u64 ib_hold:1;
  2077. u64 ib_ack:1;
  2078. u64 ib_resp:1;
  2079. u64 ib_ack_cnt:11;
  2080. u64 ib_rsvd:7;
  2081. u64 ib_exc:5;
  2082. u64 ib_init:3;
  2083. u64 ib_imsg:8;
  2084. u64 ib_imsgtype:2;
  2085. u64 ib_use_old:1;
  2086. u64 ib_rsvd_1:11;
  2087. } ii_icrb0_b_fld_s;
  2088. } ii_icrb0_b_u_t;
  2089. /************************************************************************
  2090. * *
  2091. * Description: There are 15 CRB Entries (ICRB0 to ICRBE) that are *
  2092. * used for Crosstalk operations (both cacheline and partial *
  2093. * operations) or BTE/IO. Because the CRB entries are very wide, five *
  2094. * registers (_A to _E) are required to read and write each entry. *
  2095. * *
  2096. ************************************************************************/
  2097. typedef union ii_icrb0_c_u {
  2098. u64 ii_icrb0_c_regval;
  2099. struct {
  2100. u64 ic_source:15;
  2101. u64 ic_size:2;
  2102. u64 ic_ct:1;
  2103. u64 ic_bte_num:1;
  2104. u64 ic_gbr:1;
  2105. u64 ic_resprqd:1;
  2106. u64 ic_bo:1;
  2107. u64 ic_suppl:15;
  2108. u64 ic_rsvd:27;
  2109. } ii_icrb0_c_fld_s;
  2110. } ii_icrb0_c_u_t;
  2111. /************************************************************************
  2112. * *
  2113. * Description: There are 15 CRB Entries (ICRB0 to ICRBE) that are *
  2114. * used for Crosstalk operations (both cacheline and partial *
  2115. * operations) or BTE/IO. Because the CRB entries are very wide, five *
  2116. * registers (_A to _E) are required to read and write each entry. *
  2117. * *
  2118. ************************************************************************/
  2119. typedef union ii_icrb0_d_u {
  2120. u64 ii_icrb0_d_regval;
  2121. struct {
  2122. u64 id_pa_be:43;
  2123. u64 id_bte_op:1;
  2124. u64 id_pr_psc:4;
  2125. u64 id_pr_cnt:4;
  2126. u64 id_sleep:1;
  2127. u64 id_rsvd:11;
  2128. } ii_icrb0_d_fld_s;
  2129. } ii_icrb0_d_u_t;
  2130. /************************************************************************
  2131. * *
  2132. * Description: There are 15 CRB Entries (ICRB0 to ICRBE) that are *
  2133. * used for Crosstalk operations (both cacheline and partial *
  2134. * operations) or BTE/IO. Because the CRB entries are very wide, five *
  2135. * registers (_A to _E) are required to read and write each entry. *
  2136. * *
  2137. ************************************************************************/
  2138. typedef union ii_icrb0_e_u {
  2139. u64 ii_icrb0_e_regval;
  2140. struct {
  2141. u64 ie_timeout:8;
  2142. u64 ie_context:15;
  2143. u64 ie_rsvd:1;
  2144. u64 ie_tvld:1;
  2145. u64 ie_cvld:1;
  2146. u64 ie_rsvd_0:38;
  2147. } ii_icrb0_e_fld_s;
  2148. } ii_icrb0_e_u_t;
  2149. /************************************************************************
  2150. * *
  2151. * This register contains the lower 64 bits of the header of the *
  2152. * spurious message captured by II. Valid when the SP_MSG bit in ICMR *
  2153. * register is set. *
  2154. * *
  2155. ************************************************************************/
  2156. typedef union ii_icsml_u {
  2157. u64 ii_icsml_regval;
  2158. struct {
  2159. u64 i_tt_addr:47;
  2160. u64 i_newsuppl_ex:14;
  2161. u64 i_reserved:2;
  2162. u64 i_overflow:1;
  2163. } ii_icsml_fld_s;
  2164. } ii_icsml_u_t;
  2165. /************************************************************************
  2166. * *
  2167. * This register contains the middle 64 bits of the header of the *
  2168. * spurious message captured by II. Valid when the SP_MSG bit in ICMR *
  2169. * register is set. *
  2170. * *
  2171. ************************************************************************/
  2172. typedef union ii_icsmm_u {
  2173. u64 ii_icsmm_regval;
  2174. struct {
  2175. u64 i_tt_ack_cnt:11;
  2176. u64 i_reserved:53;
  2177. } ii_icsmm_fld_s;
  2178. } ii_icsmm_u_t;
  2179. /************************************************************************
  2180. * *
  2181. * This register contains the microscopic state, all the inputs to *
  2182. * the protocol table, captured with the spurious message. Valid when *
  2183. * the SP_MSG bit in the ICMR register is set. *
  2184. * *
  2185. ************************************************************************/
  2186. typedef union ii_icsmh_u {
  2187. u64 ii_icsmh_regval;
  2188. struct {
  2189. u64 i_tt_vld:1;
  2190. u64 i_xerr:1;
  2191. u64 i_ft_cwact_o:1;
  2192. u64 i_ft_wact_o:1;
  2193. u64 i_ft_active_o:1;
  2194. u64 i_sync:1;
  2195. u64 i_mnusg:1;
  2196. u64 i_mnusz:1;
  2197. u64 i_plusz:1;
  2198. u64 i_plusg:1;
  2199. u64 i_tt_exc:5;
  2200. u64 i_tt_wb:1;
  2201. u64 i_tt_hold:1;
  2202. u64 i_tt_ack:1;
  2203. u64 i_tt_resp:1;
  2204. u64 i_tt_intvn:1;
  2205. u64 i_g_stall_bte1:1;
  2206. u64 i_g_stall_bte0:1;
  2207. u64 i_g_stall_il:1;
  2208. u64 i_g_stall_ib:1;
  2209. u64 i_tt_imsg:8;
  2210. u64 i_tt_imsgtype:2;
  2211. u64 i_tt_use_old:1;
  2212. u64 i_tt_respreqd:1;
  2213. u64 i_tt_bte_num:1;
  2214. u64 i_cbn:1;
  2215. u64 i_match:1;
  2216. u64 i_rpcnt_lt_34:1;
  2217. u64 i_rpcnt_ge_34:1;
  2218. u64 i_rpcnt_lt_18:1;
  2219. u64 i_rpcnt_ge_18:1;
  2220. u64 i_rpcnt_lt_2:1;
  2221. u64 i_rpcnt_ge_2:1;
  2222. u64 i_rqcnt_lt_18:1;
  2223. u64 i_rqcnt_ge_18:1;
  2224. u64 i_rqcnt_lt_2:1;
  2225. u64 i_rqcnt_ge_2:1;
  2226. u64 i_tt_device:7;
  2227. u64 i_tt_init:3;
  2228. u64 i_reserved:5;
  2229. } ii_icsmh_fld_s;
  2230. } ii_icsmh_u_t;
  2231. /************************************************************************
  2232. * *
  2233. * The Shub DEBUG unit provides a 3-bit selection signal to the *
  2234. * II core and a 3-bit selection signal to the fsbclk domain in the II *
  2235. * wrapper. *
  2236. * *
  2237. ************************************************************************/
  2238. typedef union ii_idbss_u {
  2239. u64 ii_idbss_regval;
  2240. struct {
  2241. u64 i_iioclk_core_submenu:3;
  2242. u64 i_rsvd:5;
  2243. u64 i_fsbclk_wrapper_submenu:3;
  2244. u64 i_rsvd_1:5;
  2245. u64 i_iioclk_menu:5;
  2246. u64 i_rsvd_2:43;
  2247. } ii_idbss_fld_s;
  2248. } ii_idbss_u_t;
  2249. /************************************************************************
  2250. * *
  2251. * Description: This register is used to set up the length for a *
  2252. * transfer and then to monitor the progress of that transfer. This *
  2253. * register needs to be initialized before a transfer is started. A *
  2254. * legitimate write to this register will set the Busy bit, clear the *
  2255. * Error bit, and initialize the length to the value desired. *
  2256. * While the transfer is in progress, hardware will decrement the *
  2257. * length field with each successful block that is copied. Once the *
  2258. * transfer completes, hardware will clear the Busy bit. The length *
  2259. * field will also contain the number of cache lines left to be *
  2260. * transferred. *
  2261. * *
  2262. ************************************************************************/
  2263. typedef union ii_ibls0_u {
  2264. u64 ii_ibls0_regval;
  2265. struct {
  2266. u64 i_length:16;
  2267. u64 i_error:1;
  2268. u64 i_rsvd_1:3;
  2269. u64 i_busy:1;
  2270. u64 i_rsvd:43;
  2271. } ii_ibls0_fld_s;
  2272. } ii_ibls0_u_t;
  2273. /************************************************************************
  2274. * *
  2275. * This register should be loaded before a transfer is started. The *
  2276. * address to be loaded in bits 39:0 is the 40-bit TRex+ physical *
  2277. * address as described in Section 1.3, Figure2 and Figure3. Since *
  2278. * the bottom 7 bits of the address are always taken to be zero, BTE *
  2279. * transfers are always cacheline-aligned. *
  2280. * *
  2281. ************************************************************************/
  2282. typedef union ii_ibsa0_u {
  2283. u64 ii_ibsa0_regval;
  2284. struct {
  2285. u64 i_rsvd_1:7;
  2286. u64 i_addr:42;
  2287. u64 i_rsvd:15;
  2288. } ii_ibsa0_fld_s;
  2289. } ii_ibsa0_u_t;
  2290. /************************************************************************
  2291. * *
  2292. * This register should be loaded before a transfer is started. The *
  2293. * address to be loaded in bits 39:0 is the 40-bit TRex+ physical *
  2294. * address as described in Section 1.3, Figure2 and Figure3. Since *
  2295. * the bottom 7 bits of the address are always taken to be zero, BTE *
  2296. * transfers are always cacheline-aligned. *
  2297. * *
  2298. ************************************************************************/
  2299. typedef union ii_ibda0_u {
  2300. u64 ii_ibda0_regval;
  2301. struct {
  2302. u64 i_rsvd_1:7;
  2303. u64 i_addr:42;
  2304. u64 i_rsvd:15;
  2305. } ii_ibda0_fld_s;
  2306. } ii_ibda0_u_t;
  2307. /************************************************************************
  2308. * *
  2309. * Writing to this register sets up the attributes of the transfer *
  2310. * and initiates the transfer operation. Reading this register has *
  2311. * the side effect of terminating any transfer in progress. Note: *
  2312. * stopping a transfer midstream could have an adverse impact on the *
  2313. * other BTE. If a BTE stream has to be stopped (due to error *
  2314. * handling for example), both BTE streams should be stopped and *
  2315. * their transfers discarded. *
  2316. * *
  2317. ************************************************************************/
  2318. typedef union ii_ibct0_u {
  2319. u64 ii_ibct0_regval;
  2320. struct {
  2321. u64 i_zerofill:1;
  2322. u64 i_rsvd_2:3;
  2323. u64 i_notify:1;
  2324. u64 i_rsvd_1:3;
  2325. u64 i_poison:1;
  2326. u64 i_rsvd:55;
  2327. } ii_ibct0_fld_s;
  2328. } ii_ibct0_u_t;
  2329. /************************************************************************
  2330. * *
  2331. * This register contains the address to which the WINV is sent. *
  2332. * This address has to be cache line aligned. *
  2333. * *
  2334. ************************************************************************/
  2335. typedef union ii_ibna0_u {
  2336. u64 ii_ibna0_regval;
  2337. struct {
  2338. u64 i_rsvd_1:7;
  2339. u64 i_addr:42;
  2340. u64 i_rsvd:15;
  2341. } ii_ibna0_fld_s;
  2342. } ii_ibna0_u_t;
  2343. /************************************************************************
  2344. * *
  2345. * This register contains the programmable level as well as the node *
  2346. * ID and PI unit of the processor to which the interrupt will be *
  2347. * sent. *
  2348. * *
  2349. ************************************************************************/
  2350. typedef union ii_ibia0_u {
  2351. u64 ii_ibia0_regval;
  2352. struct {
  2353. u64 i_rsvd_2:1;
  2354. u64 i_node_id:11;
  2355. u64 i_rsvd_1:4;
  2356. u64 i_level:7;
  2357. u64 i_rsvd:41;
  2358. } ii_ibia0_fld_s;
  2359. } ii_ibia0_u_t;
  2360. /************************************************************************
  2361. * *
  2362. * Description: This register is used to set up the length for a *
  2363. * transfer and then to monitor the progress of that transfer. This *
  2364. * register needs to be initialized before a transfer is started. A *
  2365. * legitimate write to this register will set the Busy bit, clear the *
  2366. * Error bit, and initialize the length to the value desired. *
  2367. * While the transfer is in progress, hardware will decrement the *
  2368. * length field with each successful block that is copied. Once the *
  2369. * transfer completes, hardware will clear the Busy bit. The length *
  2370. * field will also contain the number of cache lines left to be *
  2371. * transferred. *
  2372. * *
  2373. ************************************************************************/
  2374. typedef union ii_ibls1_u {
  2375. u64 ii_ibls1_regval;
  2376. struct {
  2377. u64 i_length:16;
  2378. u64 i_error:1;
  2379. u64 i_rsvd_1:3;
  2380. u64 i_busy:1;
  2381. u64 i_rsvd:43;
  2382. } ii_ibls1_fld_s;
  2383. } ii_ibls1_u_t;
  2384. /************************************************************************
  2385. * *
  2386. * This register should be loaded before a transfer is started. The *
  2387. * address to be loaded in bits 39:0 is the 40-bit TRex+ physical *
  2388. * address as described in Section 1.3, Figure2 and Figure3. Since *
  2389. * the bottom 7 bits of the address are always taken to be zero, BTE *
  2390. * transfers are always cacheline-aligned. *
  2391. * *
  2392. ************************************************************************/
  2393. typedef union ii_ibsa1_u {
  2394. u64 ii_ibsa1_regval;
  2395. struct {
  2396. u64 i_rsvd_1:7;
  2397. u64 i_addr:33;
  2398. u64 i_rsvd:24;
  2399. } ii_ibsa1_fld_s;
  2400. } ii_ibsa1_u_t;
  2401. /************************************************************************
  2402. * *
  2403. * This register should be loaded before a transfer is started. The *
  2404. * address to be loaded in bits 39:0 is the 40-bit TRex+ physical *
  2405. * address as described in Section 1.3, Figure2 and Figure3. Since *
  2406. * the bottom 7 bits of the address are always taken to be zero, BTE *
  2407. * transfers are always cacheline-aligned. *
  2408. * *
  2409. ************************************************************************/
  2410. typedef union ii_ibda1_u {
  2411. u64 ii_ibda1_regval;
  2412. struct {
  2413. u64 i_rsvd_1:7;
  2414. u64 i_addr:33;
  2415. u64 i_rsvd:24;
  2416. } ii_ibda1_fld_s;
  2417. } ii_ibda1_u_t;
  2418. /************************************************************************
  2419. * *
  2420. * Writing to this register sets up the attributes of the transfer *
  2421. * and initiates the transfer operation. Reading this register has *
  2422. * the side effect of terminating any transfer in progress. Note: *
  2423. * stopping a transfer midstream could have an adverse impact on the *
  2424. * other BTE. If a BTE stream has to be stopped (due to error *
  2425. * handling for example), both BTE streams should be stopped and *
  2426. * their transfers discarded. *
  2427. * *
  2428. ************************************************************************/
  2429. typedef union ii_ibct1_u {
  2430. u64 ii_ibct1_regval;
  2431. struct {
  2432. u64 i_zerofill:1;
  2433. u64 i_rsvd_2:3;
  2434. u64 i_notify:1;
  2435. u64 i_rsvd_1:3;
  2436. u64 i_poison:1;
  2437. u64 i_rsvd:55;
  2438. } ii_ibct1_fld_s;
  2439. } ii_ibct1_u_t;
  2440. /************************************************************************
  2441. * *
  2442. * This register contains the address to which the WINV is sent. *
  2443. * This address has to be cache line aligned. *
  2444. * *
  2445. ************************************************************************/
  2446. typedef union ii_ibna1_u {
  2447. u64 ii_ibna1_regval;
  2448. struct {
  2449. u64 i_rsvd_1:7;
  2450. u64 i_addr:33;
  2451. u64 i_rsvd:24;
  2452. } ii_ibna1_fld_s;
  2453. } ii_ibna1_u_t;
  2454. /************************************************************************
  2455. * *
  2456. * This register contains the programmable level as well as the node *
  2457. * ID and PI unit of the processor to which the interrupt will be *
  2458. * sent. *
  2459. * *
  2460. ************************************************************************/
  2461. typedef union ii_ibia1_u {
  2462. u64 ii_ibia1_regval;
  2463. struct {
  2464. u64 i_pi_id:1;
  2465. u64 i_node_id:8;
  2466. u64 i_rsvd_1:7;
  2467. u64 i_level:7;
  2468. u64 i_rsvd:41;
  2469. } ii_ibia1_fld_s;
  2470. } ii_ibia1_u_t;
  2471. /************************************************************************
  2472. * *
  2473. * This register defines the resources that feed information into *
  2474. * the two performance counters located in the IO Performance *
  2475. * Profiling Register. There are 17 different quantities that can be *
  2476. * measured. Given these 17 different options, the two performance *
  2477. * counters have 15 of them in common; menu selections 0 through 0xE *
  2478. * are identical for each performance counter. As for the other two *
  2479. * options, one is available from one performance counter and the *
  2480. * other is available from the other performance counter. Hence, the *
  2481. * II supports all 17*16=272 possible combinations of quantities to *
  2482. * measure. *
  2483. * *
  2484. ************************************************************************/
  2485. typedef union ii_ipcr_u {
  2486. u64 ii_ipcr_regval;
  2487. struct {
  2488. u64 i_ippr0_c:4;
  2489. u64 i_ippr1_c:4;
  2490. u64 i_icct:8;
  2491. u64 i_rsvd:48;
  2492. } ii_ipcr_fld_s;
  2493. } ii_ipcr_u_t;
  2494. /************************************************************************
  2495. * *
  2496. * *
  2497. * *
  2498. ************************************************************************/
  2499. typedef union ii_ippr_u {
  2500. u64 ii_ippr_regval;
  2501. struct {
  2502. u64 i_ippr0:32;
  2503. u64 i_ippr1:32;
  2504. } ii_ippr_fld_s;
  2505. } ii_ippr_u_t;
  2506. /************************************************************************
  2507. * *
  2508. * The following defines which were not formed into structures are *
  2509. * probably identical to another register, and the name of the *
  2510. * register is provided against each of these registers. This *
  2511. * information needs to be checked carefully *
  2512. * *
  2513. * IIO_ICRB1_A IIO_ICRB0_A *
  2514. * IIO_ICRB1_B IIO_ICRB0_B *
  2515. * IIO_ICRB1_C IIO_ICRB0_C *
  2516. * IIO_ICRB1_D IIO_ICRB0_D *
  2517. * IIO_ICRB1_E IIO_ICRB0_E *
  2518. * IIO_ICRB2_A IIO_ICRB0_A *
  2519. * IIO_ICRB2_B IIO_ICRB0_B *
  2520. * IIO_ICRB2_C IIO_ICRB0_C *
  2521. * IIO_ICRB2_D IIO_ICRB0_D *
  2522. * IIO_ICRB2_E IIO_ICRB0_E *
  2523. * IIO_ICRB3_A IIO_ICRB0_A *
  2524. * IIO_ICRB3_B IIO_ICRB0_B *
  2525. * IIO_ICRB3_C IIO_ICRB0_C *
  2526. * IIO_ICRB3_D IIO_ICRB0_D *
  2527. * IIO_ICRB3_E IIO_ICRB0_E *
  2528. * IIO_ICRB4_A IIO_ICRB0_A *
  2529. * IIO_ICRB4_B IIO_ICRB0_B *
  2530. * IIO_ICRB4_C IIO_ICRB0_C *
  2531. * IIO_ICRB4_D IIO_ICRB0_D *
  2532. * IIO_ICRB4_E IIO_ICRB0_E *
  2533. * IIO_ICRB5_A IIO_ICRB0_A *
  2534. * IIO_ICRB5_B IIO_ICRB0_B *
  2535. * IIO_ICRB5_C IIO_ICRB0_C *
  2536. * IIO_ICRB5_D IIO_ICRB0_D *
  2537. * IIO_ICRB5_E IIO_ICRB0_E *
  2538. * IIO_ICRB6_A IIO_ICRB0_A *
  2539. * IIO_ICRB6_B IIO_ICRB0_B *
  2540. * IIO_ICRB6_C IIO_ICRB0_C *
  2541. * IIO_ICRB6_D IIO_ICRB0_D *
  2542. * IIO_ICRB6_E IIO_ICRB0_E *
  2543. * IIO_ICRB7_A IIO_ICRB0_A *
  2544. * IIO_ICRB7_B IIO_ICRB0_B *
  2545. * IIO_ICRB7_C IIO_ICRB0_C *
  2546. * IIO_ICRB7_D IIO_ICRB0_D *
  2547. * IIO_ICRB7_E IIO_ICRB0_E *
  2548. * IIO_ICRB8_A IIO_ICRB0_A *
  2549. * IIO_ICRB8_B IIO_ICRB0_B *
  2550. * IIO_ICRB8_C IIO_ICRB0_C *
  2551. * IIO_ICRB8_D IIO_ICRB0_D *
  2552. * IIO_ICRB8_E IIO_ICRB0_E *
  2553. * IIO_ICRB9_A IIO_ICRB0_A *
  2554. * IIO_ICRB9_B IIO_ICRB0_B *
  2555. * IIO_ICRB9_C IIO_ICRB0_C *
  2556. * IIO_ICRB9_D IIO_ICRB0_D *
  2557. * IIO_ICRB9_E IIO_ICRB0_E *
  2558. * IIO_ICRBA_A IIO_ICRB0_A *
  2559. * IIO_ICRBA_B IIO_ICRB0_B *
  2560. * IIO_ICRBA_C IIO_ICRB0_C *
  2561. * IIO_ICRBA_D IIO_ICRB0_D *
  2562. * IIO_ICRBA_E IIO_ICRB0_E *
  2563. * IIO_ICRBB_A IIO_ICRB0_A *
  2564. * IIO_ICRBB_B IIO_ICRB0_B *
  2565. * IIO_ICRBB_C IIO_ICRB0_C *
  2566. * IIO_ICRBB_D IIO_ICRB0_D *
  2567. * IIO_ICRBB_E IIO_ICRB0_E *
  2568. * IIO_ICRBC_A IIO_ICRB0_A *
  2569. * IIO_ICRBC_B IIO_ICRB0_B *
  2570. * IIO_ICRBC_C IIO_ICRB0_C *
  2571. * IIO_ICRBC_D IIO_ICRB0_D *
  2572. * IIO_ICRBC_E IIO_ICRB0_E *
  2573. * IIO_ICRBD_A IIO_ICRB0_A *
  2574. * IIO_ICRBD_B IIO_ICRB0_B *
  2575. * IIO_ICRBD_C IIO_ICRB0_C *
  2576. * IIO_ICRBD_D IIO_ICRB0_D *
  2577. * IIO_ICRBD_E IIO_ICRB0_E *
  2578. * IIO_ICRBE_A IIO_ICRB0_A *
  2579. * IIO_ICRBE_B IIO_ICRB0_B *
  2580. * IIO_ICRBE_C IIO_ICRB0_C *
  2581. * IIO_ICRBE_D IIO_ICRB0_D *
  2582. * IIO_ICRBE_E IIO_ICRB0_E *
  2583. * *
  2584. ************************************************************************/
  2585. /*
  2586. * Slightly friendlier names for some common registers.
  2587. */
  2588. #define IIO_WIDGET IIO_WID /* Widget identification */
  2589. #define IIO_WIDGET_STAT IIO_WSTAT /* Widget status register */
  2590. #define IIO_WIDGET_CTRL IIO_WCR /* Widget control register */
  2591. #define IIO_PROTECT IIO_ILAPR /* IO interface protection */
  2592. #define IIO_PROTECT_OVRRD IIO_ILAPO /* IO protect override */
  2593. #define IIO_OUTWIDGET_ACCESS IIO_IOWA /* Outbound widget access */
  2594. #define IIO_INWIDGET_ACCESS IIO_IIWA /* Inbound widget access */
  2595. #define IIO_INDEV_ERR_MASK IIO_IIDEM /* Inbound device error mask */
  2596. #define IIO_LLP_CSR IIO_ILCSR /* LLP control and status */
  2597. #define IIO_LLP_LOG IIO_ILLR /* LLP log */
  2598. #define IIO_XTALKCC_TOUT IIO_IXCC /* Xtalk credit count timeout */
  2599. #define IIO_XTALKTT_TOUT IIO_IXTT /* Xtalk tail timeout */
  2600. #define IIO_IO_ERR_CLR IIO_IECLR /* IO error clear */
  2601. #define IIO_IGFX_0 IIO_IGFX0
  2602. #define IIO_IGFX_1 IIO_IGFX1
  2603. #define IIO_IBCT_0 IIO_IBCT0
  2604. #define IIO_IBCT_1 IIO_IBCT1
  2605. #define IIO_IBLS_0 IIO_IBLS0
  2606. #define IIO_IBLS_1 IIO_IBLS1
  2607. #define IIO_IBSA_0 IIO_IBSA0
  2608. #define IIO_IBSA_1 IIO_IBSA1
  2609. #define IIO_IBDA_0 IIO_IBDA0
  2610. #define IIO_IBDA_1 IIO_IBDA1
  2611. #define IIO_IBNA_0 IIO_IBNA0
  2612. #define IIO_IBNA_1 IIO_IBNA1
  2613. #define IIO_IBIA_0 IIO_IBIA0
  2614. #define IIO_IBIA_1 IIO_IBIA1
  2615. #define IIO_IOPRB_0 IIO_IPRB0
  2616. #define IIO_PRTE_A(_x) (IIO_IPRTE0_A + (8 * (_x)))
  2617. #define IIO_PRTE_B(_x) (IIO_IPRTE0_B + (8 * (_x)))
  2618. #define IIO_NUM_PRTES 8 /* Total number of PRB table entries */
  2619. #define IIO_WIDPRTE_A(x) IIO_PRTE_A(((x) - 8)) /* widget ID to its PRTE num */
  2620. #define IIO_WIDPRTE_B(x) IIO_PRTE_B(((x) - 8)) /* widget ID to its PRTE num */
  2621. #define IIO_NUM_IPRBS 9
  2622. #define IIO_LLP_CSR_IS_UP 0x00002000
  2623. #define IIO_LLP_CSR_LLP_STAT_MASK 0x00003000
  2624. #define IIO_LLP_CSR_LLP_STAT_SHFT 12
  2625. #define IIO_LLP_CB_MAX 0xffff /* in ILLR CB_CNT, Max Check Bit errors */
  2626. #define IIO_LLP_SN_MAX 0xffff /* in ILLR SN_CNT, Max Sequence Number errors */
  2627. /* key to IIO_PROTECT_OVRRD */
  2628. #define IIO_PROTECT_OVRRD_KEY 0x53474972756c6573ull /* "SGIrules" */
  2629. /* BTE register names */
  2630. #define IIO_BTE_STAT_0 IIO_IBLS_0 /* Also BTE length/status 0 */
  2631. #define IIO_BTE_SRC_0 IIO_IBSA_0 /* Also BTE source address 0 */
  2632. #define IIO_BTE_DEST_0 IIO_IBDA_0 /* Also BTE dest. address 0 */
  2633. #define IIO_BTE_CTRL_0 IIO_IBCT_0 /* Also BTE control/terminate 0 */
  2634. #define IIO_BTE_NOTIFY_0 IIO_IBNA_0 /* Also BTE notification 0 */
  2635. #define IIO_BTE_INT_0 IIO_IBIA_0 /* Also BTE interrupt 0 */
  2636. #define IIO_BTE_OFF_0 0 /* Base offset from BTE 0 regs. */
  2637. #define IIO_BTE_OFF_1 (IIO_IBLS_1 - IIO_IBLS_0) /* Offset from base to BTE 1 */
  2638. /* BTE register offsets from base */
  2639. #define BTEOFF_STAT 0
  2640. #define BTEOFF_SRC (IIO_BTE_SRC_0 - IIO_BTE_STAT_0)
  2641. #define BTEOFF_DEST (IIO_BTE_DEST_0 - IIO_BTE_STAT_0)
  2642. #define BTEOFF_CTRL (IIO_BTE_CTRL_0 - IIO_BTE_STAT_0)
  2643. #define BTEOFF_NOTIFY (IIO_BTE_NOTIFY_0 - IIO_BTE_STAT_0)
  2644. #define BTEOFF_INT (IIO_BTE_INT_0 - IIO_BTE_STAT_0)
  2645. /* names used in shub diags */
  2646. #define IIO_BASE_BTE0 IIO_IBLS_0
  2647. #define IIO_BASE_BTE1 IIO_IBLS_1
  2648. /*
  2649. * Macro which takes the widget number, and returns the
  2650. * IO PRB address of that widget.
  2651. * value _x is expected to be a widget number in the range
  2652. * 0, 8 - 0xF
  2653. */
  2654. #define IIO_IOPRB(_x) (IIO_IOPRB_0 + ( ( (_x) < HUB_WIDGET_ID_MIN ? \
  2655. (_x) : \
  2656. (_x) - (HUB_WIDGET_ID_MIN-1)) << 3) )
  2657. /* GFX Flow Control Node/Widget Register */
  2658. #define IIO_IGFX_W_NUM_BITS 4 /* size of widget num field */
  2659. #define IIO_IGFX_W_NUM_MASK ((1<<IIO_IGFX_W_NUM_BITS)-1)
  2660. #define IIO_IGFX_W_NUM_SHIFT 0
  2661. #define IIO_IGFX_PI_NUM_BITS 1 /* size of PI num field */
  2662. #define IIO_IGFX_PI_NUM_MASK ((1<<IIO_IGFX_PI_NUM_BITS)-1)
  2663. #define IIO_IGFX_PI_NUM_SHIFT 4
  2664. #define IIO_IGFX_N_NUM_BITS 8 /* size of node num field */
  2665. #define IIO_IGFX_N_NUM_MASK ((1<<IIO_IGFX_N_NUM_BITS)-1)
  2666. #define IIO_IGFX_N_NUM_SHIFT 5
  2667. #define IIO_IGFX_P_NUM_BITS 1 /* size of processor num field */
  2668. #define IIO_IGFX_P_NUM_MASK ((1<<IIO_IGFX_P_NUM_BITS)-1)
  2669. #define IIO_IGFX_P_NUM_SHIFT 16
  2670. #define IIO_IGFX_INIT(widget, pi, node, cpu) (\
  2671. (((widget) & IIO_IGFX_W_NUM_MASK) << IIO_IGFX_W_NUM_SHIFT) | \
  2672. (((pi) & IIO_IGFX_PI_NUM_MASK)<< IIO_IGFX_PI_NUM_SHIFT)| \
  2673. (((node) & IIO_IGFX_N_NUM_MASK) << IIO_IGFX_N_NUM_SHIFT) | \
  2674. (((cpu) & IIO_IGFX_P_NUM_MASK) << IIO_IGFX_P_NUM_SHIFT))
  2675. /* Scratch registers (all bits available) */
  2676. #define IIO_SCRATCH_REG0 IIO_ISCR0
  2677. #define IIO_SCRATCH_REG1 IIO_ISCR1
  2678. #define IIO_SCRATCH_MASK 0xffffffffffffffffUL
  2679. #define IIO_SCRATCH_BIT0_0 0x0000000000000001UL
  2680. #define IIO_SCRATCH_BIT0_1 0x0000000000000002UL
  2681. #define IIO_SCRATCH_BIT0_2 0x0000000000000004UL
  2682. #define IIO_SCRATCH_BIT0_3 0x0000000000000008UL
  2683. #define IIO_SCRATCH_BIT0_4 0x0000000000000010UL
  2684. #define IIO_SCRATCH_BIT0_5 0x0000000000000020UL
  2685. #define IIO_SCRATCH_BIT0_6 0x0000000000000040UL
  2686. #define IIO_SCRATCH_BIT0_7 0x0000000000000080UL
  2687. #define IIO_SCRATCH_BIT0_8 0x0000000000000100UL
  2688. #define IIO_SCRATCH_BIT0_9 0x0000000000000200UL
  2689. #define IIO_SCRATCH_BIT0_A 0x0000000000000400UL
  2690. #define IIO_SCRATCH_BIT1_0 0x0000000000000001UL
  2691. #define IIO_SCRATCH_BIT1_1 0x0000000000000002UL
  2692. /* IO Translation Table Entries */
  2693. #define IIO_NUM_ITTES 7 /* ITTEs numbered 0..6 */
  2694. /* Hw manuals number them 1..7! */
  2695. /*
  2696. * IIO_IMEM Register fields.
  2697. */
  2698. #define IIO_IMEM_W0ESD 0x1UL /* Widget 0 shut down due to error */
  2699. #define IIO_IMEM_B0ESD (1UL << 4) /* BTE 0 shut down due to error */
  2700. #define IIO_IMEM_B1ESD (1UL << 8) /* BTE 1 Shut down due to error */
  2701. /*
  2702. * As a permanent workaround for a bug in the PI side of the shub, we've
  2703. * redefined big window 7 as small window 0.
  2704. XXX does this still apply for SN1??
  2705. */
  2706. #define HUB_NUM_BIG_WINDOW (IIO_NUM_ITTES - 1)
  2707. /*
  2708. * Use the top big window as a surrogate for the first small window
  2709. */
  2710. #define SWIN0_BIGWIN HUB_NUM_BIG_WINDOW
  2711. #define ILCSR_WARM_RESET 0x100
  2712. /*
  2713. * CRB manipulation macros
  2714. * The CRB macros are slightly complicated, since there are up to
  2715. * four registers associated with each CRB entry.
  2716. */
  2717. #define IIO_NUM_CRBS 15 /* Number of CRBs */
  2718. #define IIO_NUM_PC_CRBS 4 /* Number of partial cache CRBs */
  2719. #define IIO_ICRB_OFFSET 8
  2720. #define IIO_ICRB_0 IIO_ICRB0_A
  2721. #define IIO_ICRB_ADDR_SHFT 2 /* Shift to get proper address */
  2722. /* XXX - This is now tuneable:
  2723. #define IIO_FIRST_PC_ENTRY 12
  2724. */
  2725. #define IIO_ICRB_A(_x) ((u64)(IIO_ICRB_0 + (6 * IIO_ICRB_OFFSET * (_x))))
  2726. #define IIO_ICRB_B(_x) ((u64)((char *)IIO_ICRB_A(_x) + 1*IIO_ICRB_OFFSET))
  2727. #define IIO_ICRB_C(_x) ((u64)((char *)IIO_ICRB_A(_x) + 2*IIO_ICRB_OFFSET))
  2728. #define IIO_ICRB_D(_x) ((u64)((char *)IIO_ICRB_A(_x) + 3*IIO_ICRB_OFFSET))
  2729. #define IIO_ICRB_E(_x) ((u64)((char *)IIO_ICRB_A(_x) + 4*IIO_ICRB_OFFSET))
  2730. #define TNUM_TO_WIDGET_DEV(_tnum) (_tnum & 0x7)
  2731. /*
  2732. * values for "ecode" field
  2733. */
  2734. #define IIO_ICRB_ECODE_DERR 0 /* Directory error due to IIO access */
  2735. #define IIO_ICRB_ECODE_PERR 1 /* Poison error on IO access */
  2736. #define IIO_ICRB_ECODE_WERR 2 /* Write error by IIO access
  2737. * e.g. WINV to a Read only line. */
  2738. #define IIO_ICRB_ECODE_AERR 3 /* Access error caused by IIO access */
  2739. #define IIO_ICRB_ECODE_PWERR 4 /* Error on partial write */
  2740. #define IIO_ICRB_ECODE_PRERR 5 /* Error on partial read */
  2741. #define IIO_ICRB_ECODE_TOUT 6 /* CRB timeout before deallocating */
  2742. #define IIO_ICRB_ECODE_XTERR 7 /* Incoming xtalk pkt had error bit */
  2743. /*
  2744. * Values for field imsgtype
  2745. */
  2746. #define IIO_ICRB_IMSGT_XTALK 0 /* Incoming message from Xtalk */
  2747. #define IIO_ICRB_IMSGT_BTE 1 /* Incoming message from BTE */
  2748. #define IIO_ICRB_IMSGT_SN1NET 2 /* Incoming message from SN1 net */
  2749. #define IIO_ICRB_IMSGT_CRB 3 /* Incoming message from CRB ??? */
  2750. /*
  2751. * values for field initiator.
  2752. */
  2753. #define IIO_ICRB_INIT_XTALK 0 /* Message originated in xtalk */
  2754. #define IIO_ICRB_INIT_BTE0 0x1 /* Message originated in BTE 0 */
  2755. #define IIO_ICRB_INIT_SN1NET 0x2 /* Message originated in SN1net */
  2756. #define IIO_ICRB_INIT_CRB 0x3 /* Message originated in CRB ? */
  2757. #define IIO_ICRB_INIT_BTE1 0x5 /* MEssage originated in BTE 1 */
  2758. /*
  2759. * Number of credits Hub widget has while sending req/response to
  2760. * xbow.
  2761. * Value of 3 is required by Xbow 1.1
  2762. * We may be able to increase this to 4 with Xbow 1.2.
  2763. */
  2764. #define HUBII_XBOW_CREDIT 3
  2765. #define HUBII_XBOW_REV2_CREDIT 4
  2766. /*
  2767. * Number of credits that xtalk devices should use when communicating
  2768. * with a SHub (depth of SHub's queue).
  2769. */
  2770. #define HUB_CREDIT 4
  2771. /*
  2772. * Some IIO_PRB fields
  2773. */
  2774. #define IIO_PRB_MULTI_ERR (1LL << 63)
  2775. #define IIO_PRB_SPUR_RD (1LL << 51)
  2776. #define IIO_PRB_SPUR_WR (1LL << 50)
  2777. #define IIO_PRB_RD_TO (1LL << 49)
  2778. #define IIO_PRB_ERROR (1LL << 48)
  2779. /*************************************************************************
  2780. Some of the IIO field masks and shifts are defined here.
  2781. This is in order to maintain compatibility in SN0 and SN1 code
  2782. **************************************************************************/
  2783. /*
  2784. * ICMR register fields
  2785. * (Note: the IIO_ICMR_P_CNT and IIO_ICMR_PC_VLD from Hub are not
  2786. * present in SHub)
  2787. */
  2788. #define IIO_ICMR_CRB_VLD_SHFT 20
  2789. #define IIO_ICMR_CRB_VLD_MASK (0x7fffUL << IIO_ICMR_CRB_VLD_SHFT)
  2790. #define IIO_ICMR_FC_CNT_SHFT 16
  2791. #define IIO_ICMR_FC_CNT_MASK (0xf << IIO_ICMR_FC_CNT_SHFT)
  2792. #define IIO_ICMR_C_CNT_SHFT 4
  2793. #define IIO_ICMR_C_CNT_MASK (0xf << IIO_ICMR_C_CNT_SHFT)
  2794. #define IIO_ICMR_PRECISE (1UL << 52)
  2795. #define IIO_ICMR_CLR_RPPD (1UL << 13)
  2796. #define IIO_ICMR_CLR_RQPD (1UL << 12)
  2797. /*
  2798. * IIO PIO Deallocation register field masks : (IIO_IPDR)
  2799. XXX present but not needed in bedrock? See the manual.
  2800. */
  2801. #define IIO_IPDR_PND (1 << 4)
  2802. /*
  2803. * IIO CRB deallocation register field masks: (IIO_ICDR)
  2804. */
  2805. #define IIO_ICDR_PND (1 << 4)
  2806. /*
  2807. * IO BTE Length/Status (IIO_IBLS) register bit field definitions
  2808. */
  2809. #define IBLS_BUSY (0x1UL << 20)
  2810. #define IBLS_ERROR_SHFT 16
  2811. #define IBLS_ERROR (0x1UL << IBLS_ERROR_SHFT)
  2812. #define IBLS_LENGTH_MASK 0xffff
  2813. /*
  2814. * IO BTE Control/Terminate register (IBCT) register bit field definitions
  2815. */
  2816. #define IBCT_POISON (0x1UL << 8)
  2817. #define IBCT_NOTIFY (0x1UL << 4)
  2818. #define IBCT_ZFIL_MODE (0x1UL << 0)
  2819. /*
  2820. * IIO Incoming Error Packet Header (IIO_IIEPH1/IIO_IIEPH2)
  2821. */
  2822. #define IIEPH1_VALID (1UL << 44)
  2823. #define IIEPH1_OVERRUN (1UL << 40)
  2824. #define IIEPH1_ERR_TYPE_SHFT 32
  2825. #define IIEPH1_ERR_TYPE_MASK 0xf
  2826. #define IIEPH1_SOURCE_SHFT 20
  2827. #define IIEPH1_SOURCE_MASK 11
  2828. #define IIEPH1_SUPPL_SHFT 8
  2829. #define IIEPH1_SUPPL_MASK 11
  2830. #define IIEPH1_CMD_SHFT 0
  2831. #define IIEPH1_CMD_MASK 7
  2832. #define IIEPH2_TAIL (1UL << 40)
  2833. #define IIEPH2_ADDRESS_SHFT 0
  2834. #define IIEPH2_ADDRESS_MASK 38
  2835. #define IIEPH1_ERR_SHORT_REQ 2
  2836. #define IIEPH1_ERR_SHORT_REPLY 3
  2837. #define IIEPH1_ERR_LONG_REQ 4
  2838. #define IIEPH1_ERR_LONG_REPLY 5
  2839. /*
  2840. * IO Error Clear register bit field definitions
  2841. */
  2842. #define IECLR_PI1_FWD_INT (1UL << 31) /* clear PI1_FORWARD_INT in iidsr */
  2843. #define IECLR_PI0_FWD_INT (1UL << 30) /* clear PI0_FORWARD_INT in iidsr */
  2844. #define IECLR_SPUR_RD_HDR (1UL << 29) /* clear valid bit in ixss reg */
  2845. #define IECLR_BTE1 (1UL << 18) /* clear bte error 1 */
  2846. #define IECLR_BTE0 (1UL << 17) /* clear bte error 0 */
  2847. #define IECLR_CRAZY (1UL << 16) /* clear crazy bit in wstat reg */
  2848. #define IECLR_PRB_F (1UL << 15) /* clear err bit in PRB_F reg */
  2849. #define IECLR_PRB_E (1UL << 14) /* clear err bit in PRB_E reg */
  2850. #define IECLR_PRB_D (1UL << 13) /* clear err bit in PRB_D reg */
  2851. #define IECLR_PRB_C (1UL << 12) /* clear err bit in PRB_C reg */
  2852. #define IECLR_PRB_B (1UL << 11) /* clear err bit in PRB_B reg */
  2853. #define IECLR_PRB_A (1UL << 10) /* clear err bit in PRB_A reg */
  2854. #define IECLR_PRB_9 (1UL << 9) /* clear err bit in PRB_9 reg */
  2855. #define IECLR_PRB_8 (1UL << 8) /* clear err bit in PRB_8 reg */
  2856. #define IECLR_PRB_0 (1UL << 0) /* clear err bit in PRB_0 reg */
  2857. /*
  2858. * IIO CRB control register Fields: IIO_ICCR
  2859. */
  2860. #define IIO_ICCR_PENDING 0x10000
  2861. #define IIO_ICCR_CMD_MASK 0xFF
  2862. #define IIO_ICCR_CMD_SHFT 7
  2863. #define IIO_ICCR_CMD_NOP 0x0 /* No Op */
  2864. #define IIO_ICCR_CMD_WAKE 0x100 /* Reactivate CRB entry and process */
  2865. #define IIO_ICCR_CMD_TIMEOUT 0x200 /* Make CRB timeout & mark invalid */
  2866. #define IIO_ICCR_CMD_EJECT 0x400 /* Contents of entry written to memory
  2867. * via a WB
  2868. */
  2869. #define IIO_ICCR_CMD_FLUSH 0x800
  2870. /*
  2871. *
  2872. * CRB Register description.
  2873. *
  2874. * WARNING * WARNING * WARNING * WARNING * WARNING * WARNING * WARNING
  2875. * WARNING * WARNING * WARNING * WARNING * WARNING * WARNING * WARNING
  2876. * WARNING * WARNING * WARNING * WARNING * WARNING * WARNING * WARNING
  2877. * WARNING * WARNING * WARNING * WARNING * WARNING * WARNING * WARNING
  2878. * WARNING * WARNING * WARNING * WARNING * WARNING * WARNING * WARNING
  2879. *
  2880. * Many of the fields in CRB are status bits used by hardware
  2881. * for implementation of the protocol. It's very dangerous to
  2882. * mess around with the CRB registers.
  2883. *
  2884. * It's OK to read the CRB registers and try to make sense out of the
  2885. * fields in CRB.
  2886. *
  2887. * Updating CRB requires all activities in Hub IIO to be quiesced.
  2888. * otherwise, a write to CRB could corrupt other CRB entries.
  2889. * CRBs are here only as a back door peek to shub IIO's status.
  2890. * Quiescing implies no dmas no PIOs
  2891. * either directly from the cpu or from sn0net.
  2892. * this is not something that can be done easily. So, AVOID updating
  2893. * CRBs.
  2894. */
  2895. /*
  2896. * Easy access macros for CRBs, all 5 registers (A-E)
  2897. */
  2898. typedef ii_icrb0_a_u_t icrba_t;
  2899. #define a_sidn ii_icrb0_a_fld_s.ia_sidn
  2900. #define a_tnum ii_icrb0_a_fld_s.ia_tnum
  2901. #define a_addr ii_icrb0_a_fld_s.ia_addr
  2902. #define a_valid ii_icrb0_a_fld_s.ia_vld
  2903. #define a_iow ii_icrb0_a_fld_s.ia_iow
  2904. #define a_regvalue ii_icrb0_a_regval
  2905. typedef ii_icrb0_b_u_t icrbb_t;
  2906. #define b_use_old ii_icrb0_b_fld_s.ib_use_old
  2907. #define b_imsgtype ii_icrb0_b_fld_s.ib_imsgtype
  2908. #define b_imsg ii_icrb0_b_fld_s.ib_imsg
  2909. #define b_initiator ii_icrb0_b_fld_s.ib_init
  2910. #define b_exc ii_icrb0_b_fld_s.ib_exc
  2911. #define b_ackcnt ii_icrb0_b_fld_s.ib_ack_cnt
  2912. #define b_resp ii_icrb0_b_fld_s.ib_resp
  2913. #define b_ack ii_icrb0_b_fld_s.ib_ack
  2914. #define b_hold ii_icrb0_b_fld_s.ib_hold
  2915. #define b_wb ii_icrb0_b_fld_s.ib_wb
  2916. #define b_intvn ii_icrb0_b_fld_s.ib_intvn
  2917. #define b_stall_ib ii_icrb0_b_fld_s.ib_stall_ib
  2918. #define b_stall_int ii_icrb0_b_fld_s.ib_stall__intr
  2919. #define b_stall_bte_0 ii_icrb0_b_fld_s.ib_stall__bte_0
  2920. #define b_stall_bte_1 ii_icrb0_b_fld_s.ib_stall__bte_1
  2921. #define b_error ii_icrb0_b_fld_s.ib_error
  2922. #define b_ecode ii_icrb0_b_fld_s.ib_errcode
  2923. #define b_lnetuce ii_icrb0_b_fld_s.ib_ln_uce
  2924. #define b_mark ii_icrb0_b_fld_s.ib_mark
  2925. #define b_xerr ii_icrb0_b_fld_s.ib_xt_err
  2926. #define b_regvalue ii_icrb0_b_regval
  2927. typedef ii_icrb0_c_u_t icrbc_t;
  2928. #define c_suppl ii_icrb0_c_fld_s.ic_suppl
  2929. #define c_barrop ii_icrb0_c_fld_s.ic_bo
  2930. #define c_doresp ii_icrb0_c_fld_s.ic_resprqd
  2931. #define c_gbr ii_icrb0_c_fld_s.ic_gbr
  2932. #define c_btenum ii_icrb0_c_fld_s.ic_bte_num
  2933. #define c_cohtrans ii_icrb0_c_fld_s.ic_ct
  2934. #define c_xtsize ii_icrb0_c_fld_s.ic_size
  2935. #define c_source ii_icrb0_c_fld_s.ic_source
  2936. #define c_regvalue ii_icrb0_c_regval
  2937. typedef ii_icrb0_d_u_t icrbd_t;
  2938. #define d_sleep ii_icrb0_d_fld_s.id_sleep
  2939. #define d_pricnt ii_icrb0_d_fld_s.id_pr_cnt
  2940. #define d_pripsc ii_icrb0_d_fld_s.id_pr_psc
  2941. #define d_bteop ii_icrb0_d_fld_s.id_bte_op
  2942. #define d_bteaddr ii_icrb0_d_fld_s.id_pa_be /* ic_pa_be fld has 2 names */
  2943. #define d_benable ii_icrb0_d_fld_s.id_pa_be /* ic_pa_be fld has 2 names */
  2944. #define d_regvalue ii_icrb0_d_regval
  2945. typedef ii_icrb0_e_u_t icrbe_t;
  2946. #define icrbe_ctxtvld ii_icrb0_e_fld_s.ie_cvld
  2947. #define icrbe_toutvld ii_icrb0_e_fld_s.ie_tvld
  2948. #define icrbe_context ii_icrb0_e_fld_s.ie_context
  2949. #define icrbe_timeout ii_icrb0_e_fld_s.ie_timeout
  2950. #define e_regvalue ii_icrb0_e_regval
  2951. /* Number of widgets supported by shub */
  2952. #define HUB_NUM_WIDGET 9
  2953. #define HUB_WIDGET_ID_MIN 0x8
  2954. #define HUB_WIDGET_ID_MAX 0xf
  2955. #define HUB_WIDGET_PART_NUM 0xc120
  2956. #define MAX_HUBS_PER_XBOW 2
  2957. /* A few more #defines for backwards compatibility */
  2958. #define iprb_t ii_iprb0_u_t
  2959. #define iprb_regval ii_iprb0_regval
  2960. #define iprb_mult_err ii_iprb0_fld_s.i_mult_err
  2961. #define iprb_spur_rd ii_iprb0_fld_s.i_spur_rd
  2962. #define iprb_spur_wr ii_iprb0_fld_s.i_spur_wr
  2963. #define iprb_rd_to ii_iprb0_fld_s.i_rd_to
  2964. #define iprb_ovflow ii_iprb0_fld_s.i_of_cnt
  2965. #define iprb_error ii_iprb0_fld_s.i_error
  2966. #define iprb_ff ii_iprb0_fld_s.i_f
  2967. #define iprb_mode ii_iprb0_fld_s.i_m
  2968. #define iprb_bnakctr ii_iprb0_fld_s.i_nb
  2969. #define iprb_anakctr ii_iprb0_fld_s.i_na
  2970. #define iprb_xtalkctr ii_iprb0_fld_s.i_c
  2971. #define LNK_STAT_WORKING 0x2 /* LLP is working */
  2972. #define IIO_WSTAT_ECRAZY (1ULL << 32) /* Hub gone crazy */
  2973. #define IIO_WSTAT_TXRETRY (1ULL << 9) /* Hub Tx Retry timeout */
  2974. #define IIO_WSTAT_TXRETRY_MASK 0x7F /* should be 0xFF?? */
  2975. #define IIO_WSTAT_TXRETRY_SHFT 16
  2976. #define IIO_WSTAT_TXRETRY_CNT(w) (((w) >> IIO_WSTAT_TXRETRY_SHFT) & \
  2977. IIO_WSTAT_TXRETRY_MASK)
  2978. /* Number of II perf. counters we can multiplex at once */
  2979. #define IO_PERF_SETS 32
  2980. /* Bit for the widget in inbound access register */
  2981. #define IIO_IIWA_WIDGET(_w) ((u64)(1ULL << _w))
  2982. /* Bit for the widget in outbound access register */
  2983. #define IIO_IOWA_WIDGET(_w) ((u64)(1ULL << _w))
  2984. /* NOTE: The following define assumes that we are going to get
  2985. * widget numbers from 8 thru F and the device numbers within
  2986. * widget from 0 thru 7.
  2987. */
  2988. #define IIO_IIDEM_WIDGETDEV_MASK(w, d) ((u64)(1ULL << (8 * ((w) - 8) + (d))))
  2989. /* IO Interrupt Destination Register */
  2990. #define IIO_IIDSR_SENT_SHIFT 28
  2991. #define IIO_IIDSR_SENT_MASK 0x30000000
  2992. #define IIO_IIDSR_ENB_SHIFT 24
  2993. #define IIO_IIDSR_ENB_MASK 0x01000000
  2994. #define IIO_IIDSR_NODE_SHIFT 9
  2995. #define IIO_IIDSR_NODE_MASK 0x000ff700
  2996. #define IIO_IIDSR_PI_ID_SHIFT 8
  2997. #define IIO_IIDSR_PI_ID_MASK 0x00000100
  2998. #define IIO_IIDSR_LVL_SHIFT 0
  2999. #define IIO_IIDSR_LVL_MASK 0x000000ff
  3000. /* Xtalk timeout threshold register (IIO_IXTT) */
  3001. #define IXTT_RRSP_TO_SHFT 55 /* read response timeout */
  3002. #define IXTT_RRSP_TO_MASK (0x1FULL << IXTT_RRSP_TO_SHFT)
  3003. #define IXTT_RRSP_PS_SHFT 32 /* read responsed TO prescalar */
  3004. #define IXTT_RRSP_PS_MASK (0x7FFFFFULL << IXTT_RRSP_PS_SHFT)
  3005. #define IXTT_TAIL_TO_SHFT 0 /* tail timeout counter threshold */
  3006. #define IXTT_TAIL_TO_MASK (0x3FFFFFFULL << IXTT_TAIL_TO_SHFT)
  3007. /*
  3008. * The IO LLP control status register and widget control register
  3009. */
  3010. typedef union hubii_wcr_u {
  3011. u64 wcr_reg_value;
  3012. struct {
  3013. u64 wcr_widget_id:4, /* LLP crossbar credit */
  3014. wcr_tag_mode:1, /* Tag mode */
  3015. wcr_rsvd1:8, /* Reserved */
  3016. wcr_xbar_crd:3, /* LLP crossbar credit */
  3017. wcr_f_bad_pkt:1, /* Force bad llp pkt enable */
  3018. wcr_dir_con:1, /* widget direct connect */
  3019. wcr_e_thresh:5, /* elasticity threshold */
  3020. wcr_rsvd:41; /* unused */
  3021. } wcr_fields_s;
  3022. } hubii_wcr_t;
  3023. #define iwcr_dir_con wcr_fields_s.wcr_dir_con
  3024. /* The structures below are defined to extract and modify the ii
  3025. performance registers */
  3026. /* io_perf_sel allows the caller to specify what tests will be
  3027. performed */
  3028. typedef union io_perf_sel {
  3029. u64 perf_sel_reg;
  3030. struct {
  3031. u64 perf_ippr0:4, perf_ippr1:4, perf_icct:8, perf_rsvd:48;
  3032. } perf_sel_bits;
  3033. } io_perf_sel_t;
  3034. /* io_perf_cnt is to extract the count from the shub registers. Due to
  3035. hardware problems there is only one counter, not two. */
  3036. typedef union io_perf_cnt {
  3037. u64 perf_cnt;
  3038. struct {
  3039. u64 perf_cnt:20, perf_rsvd2:12, perf_rsvd1:32;
  3040. } perf_cnt_bits;
  3041. } io_perf_cnt_t;
  3042. typedef union iprte_a {
  3043. u64 entry;
  3044. struct {
  3045. u64 i_rsvd_1:3;
  3046. u64 i_addr:38;
  3047. u64 i_init:3;
  3048. u64 i_source:8;
  3049. u64 i_rsvd:2;
  3050. u64 i_widget:4;
  3051. u64 i_to_cnt:5;
  3052. u64 i_vld:1;
  3053. } iprte_fields;
  3054. } iprte_a_t;
  3055. #endif /* _ASM_IA64_SN_SHUBIO_H */