Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1438 lines
41 KiB

  1. /*++
  2. Copyright (c) 1990 Microsoft Corporation
  3. Copyright (c) 1992, 1993 Digital Equipment Corporation
  4. Module Name:
  5. genalpha.c
  6. Abstract:
  7. This module implements a program which generates ALPHA machine dependent
  8. structure offset definitions for kernel structures that are accessed in
  9. assembly code.
  10. Author:
  11. David N. Cutler (davec) 27-Mar-1990
  12. Joe Notarangelo 26-Mar-1992
  13. Revision History:
  14. Thomas Van Baak (tvb) 10-Jul-1992
  15. Modified CONTEXT, TRAP, and EXCEPTION frames according to the new
  16. Alpha calling standard.
  17. Forrest Foltz (forrestf) 24-Jan-1998
  18. Modified format to use new obj-based procedure.
  19. --*/
  20. #include "ki.h"
  21. #pragma hdrstop
  22. #define HEADER_FILE
  23. #include "excpt.h"
  24. #include "ntdef.h"
  25. #include "ntkeapi.h"
  26. #include "ntalpha.h"
  27. #include "ntimage.h"
  28. #include "ntseapi.h"
  29. #include "ntobapi.h"
  30. #include "ntlpcapi.h"
  31. #include "ntioapi.h"
  32. #include "ntmmapi.h"
  33. #include "ntldr.h"
  34. #include "ntpsapi.h"
  35. #include "ntpoapi.h"
  36. #include "ntexapi.h"
  37. #include "ntnls.h"
  38. #include "nturtl.h"
  39. #include "ntcsrmsg.h"
  40. #include "ntcsrsrv.h"
  41. #include "ntxcapi.h"
  42. #include "arc.h"
  43. #include "ntstatus.h"
  44. #include "kxalpha.h"
  45. #include "stdarg.h"
  46. #include "setjmp.h"
  47. #include "alphaops.h"
  48. #include "fwcallbk.h"
  49. include(`..\genxx.h')
  50. #define KSALPHA SEF_KERNEL
  51. #define HALALPHA SEF_HAL
  52. //
  53. // Helper macro for call pal functions
  54. //
  55. #define genPal(CALLPAL) \
  56. genStr("#define "CALLPAL##_STR" 0x%lx\n", CALLPAL)
  57. //
  58. // Bitmask definitions here
  59. //
  60. #if defined(_AXP64_)
  61. startBitStruc( HARDWARE_PTE, KSALPHA )
  62. genBitField( Valid, PTE_VALID )
  63. genBitField( Reserved1 )
  64. genBitField( FaultOnWrite, PTE_FOW )
  65. genBitField( Reserved2 )
  66. genBitField( Global, PTE_GLOBAL )
  67. genBitField( GranularityHint, PTE_GH )
  68. genBitField( Reserved3 )
  69. genBitField( KernelReadAccess, PTE_KRE )
  70. genBitField( UserReadAccess, PTE_URE )
  71. genBitField( Reserved4 )
  72. genBitField( KernelWriteAccess, PTE_KWE )
  73. genBitField( UserWriteAccess, PTE_UWE )
  74. genBitField( Reserved5 )
  75. genBitField( Write , PTE_WRITE )
  76. genBitField( CopyOnWrite, PTE_COPY_ON_WRITE )
  77. genBitField( Software, PTE_SOFTWARE )
  78. genBitField( PageFrameNumber, PTE_PFN )
  79. #else
  80. startBitStruc(HARDWARE_PTE, KSALPHA)
  81. genBitField(Valid, PTE_VALID)
  82. genBitField(Owner, PTE_OWNER)
  83. genBitField(Dirty, PTE_DIRTY)
  84. genBitField(reserved)
  85. genBitField(Global, PTE_GLOBAL)
  86. genBitField(GranularityHint)
  87. genBitField(Write, PTE_WRITE)
  88. genBitField(CopyOnWrite, PTE_COPYONWRITE)
  89. genBitField(PageFrameNumber, PTE_PFN)
  90. #endif
  91. startBitStruc(PSR, KSALPHA)
  92. genBitField(MODE, PSR_MODE)
  93. genBitAlias(PSR_USER_MODE)
  94. genBitField(INTERRUPT_ENABLE, PSR_IE)
  95. genBitField(IRQL, PSR_IRQL)
  96. startBitStruc(IE, KSALPHA)
  97. genBitField(SoftwareInterruptEnables, IE_SFW)
  98. genBitField(HardwareInterruptEnables, IE_HDW)
  99. startBitStruc(MCHK_STATUS, KSALPHA | HALALPHA)
  100. genBitField(Correctable, MCHK_CORRECTABLE)
  101. genBitField(Retryable, MCHK_RETRYABLE)
  102. startBitStruc(MCES, KSALPHA | HALALPHA)
  103. genBitField(MachineCheck, MCES_MCK)
  104. genBitField(SystemCorrectable, MCES_SCE)
  105. genBitField(ProcessorCorrectable, MCES_PCE)
  106. genBitField(DisableProcessorCorrectable, MCES_DPC)
  107. genBitField(DisableSystemCorrectable, MCES_DSC)
  108. genBitField(DisableMachineChecks, MCES_DMCK)
  109. startBitStruc(EXC_SUM, KSALPHA)
  110. genBitField(SoftwareCompletion, EXCSUM_SWC)
  111. genBitField(InvalidOperation, EXCSUM_INV)
  112. genBitField(DivisionByZero, EXCSUM_DZE)
  113. genBitField(Overflow, EXCSUM_OVF)
  114. genBitField(Underflow, EXCSUM_UNF)
  115. genBitField(InexactResult, EXCSUM_INE)
  116. genBitField(IntegerOverflow, EXCSUM_IOV)
  117. //
  118. // Element description array is here
  119. //
  120. STRUC_ELEMENT ElementList[] = {
  121. START_LIST
  122. //
  123. // Output include statement for ALPHA architecture static definitions.
  124. //
  125. EnableInc(KSALPHA | HALALPHA)
  126. genTxt("#include \"kxalpha.h\"\n")
  127. DisableInc(HALALPHA)
  128. //
  129. // Include architecture independent definitions.
  130. //
  131. #include "..\genxx.inc"
  132. //
  133. // Generate architecture dependent definitions.
  134. //
  135. // Processor control register structure definitions.
  136. //
  137. EnableInc(HAL)
  138. genCom("Processor Control Registers Structure Offset Definitions")
  139. genNam(PCR_MINOR_VERSION)
  140. genNam(PCR_MAJOR_VERSION)
  141. genDef(Pc, KPCR, MinorVersion)
  142. genDef(Pc, KPCR, MajorVersion)
  143. genDef(Pc, KPCR, PalBaseAddress)
  144. genDef(Pc, KPCR, PalMajorVersion)
  145. genDef(Pc, KPCR, PalMinorVersion)
  146. genDef(Pc, KPCR, PalSequenceVersion)
  147. genDef(Pc, KPCR, PalMajorSpecification)
  148. genDef(Pc, KPCR, PalMinorSpecification)
  149. genDef(Pc, KPCR, FirmwareRestartAddress)
  150. genDef(Pc, KPCR, RestartBlock)
  151. genDef(Pc, KPCR, PalReserved)
  152. genDef(Pc, KPCR, PalAlignmentFixupCount)
  153. genDef(Pc, KPCR, PanicStack)
  154. genDef(Pc, KPCR, ProcessorType)
  155. genDef(Pc, KPCR, ProcessorRevision)
  156. genDef(Pc, KPCR, PhysicalAddressBits)
  157. genDef(Pc, KPCR, MaximumAddressSpaceNumber)
  158. genDef(Pc, KPCR, PageSize)
  159. genDef(Pc, KPCR, FirstLevelDcacheSize)
  160. genDef(Pc, KPCR, FirstLevelDcacheFillSize)
  161. genDef(Pc, KPCR, FirstLevelIcacheSize)
  162. genDef(Pc, KPCR, FirstLevelIcacheFillSize)
  163. genDef(Pc, KPCR, FirmwareRevisionId)
  164. genDef(Pc, KPCR, SystemType)
  165. genDef(Pc, KPCR, SystemVariant)
  166. genDef(Pc, KPCR, SystemRevision)
  167. genDef(Pc, KPCR, SystemSerialNumber)
  168. genDef(Pc, KPCR, CycleClockPeriod)
  169. genDef(Pc, KPCR, SecondLevelCacheSize)
  170. genDef(Pc, KPCR, SecondLevelCacheFillSize)
  171. genDef(Pc, KPCR, ThirdLevelCacheSize)
  172. genDef(Pc, KPCR, ThirdLevelCacheFillSize)
  173. genDef(Pc, KPCR, FourthLevelCacheSize)
  174. genDef(Pc, KPCR, FourthLevelCacheFillSize)
  175. genDef(Pc, KPCR, Prcb)
  176. genDef(Pc, KPCR, Number)
  177. genDef(Pc, KPCR, SetMember)
  178. genDef(Pc, KPCR, HalReserved)
  179. genDef(Pc, KPCR, IrqlTable)
  180. genDef(Pc, KPCR, IrqlMask)
  181. genDef(Pc, KPCR, InterruptRoutine)
  182. genDef(Pc, KPCR, ReservedVectors)
  183. genDef(Pc, KPCR, MachineCheckError)
  184. genDef(Pc, KPCR, DpcStack)
  185. genDef(Pc, KPCR, NotMember)
  186. genDef(Pc, KPCR, CurrentPid)
  187. genDef(Pc, KPCR, SystemServiceDispatchStart)
  188. genDef(Pc, KPCR, SystemServiceDispatchEnd)
  189. genDef(Pc, KPCR, IdleThread)
  190. genVal(ProcessorControlRegisterLength, ROUND_UP(sizeof(KPCR), 16))
  191. genNamUint(SharedUserData)
  192. genDef(Us, KUSER_SHARED_DATA, TickCountLow)
  193. genDef(Us, KUSER_SHARED_DATA, TickCountMultiplier)
  194. genDef(Us, KUSER_SHARED_DATA, InterruptTime)
  195. genDef(Us, KUSER_SHARED_DATA, SystemTime)
  196. //
  197. // Processor block structure definitions.
  198. //
  199. genCom("Processor Block Structure Offset Definitions")
  200. genNam(PRCB_MINOR_VERSION)
  201. genNam(PRCB_MAJOR_VERSION)
  202. genDef(Pb, KPRCB, MinorVersion)
  203. genDef(Pb, KPRCB, MajorVersion)
  204. genDef(Pb, KPRCB, CurrentThread)
  205. genDef(Pb, KPRCB, NextThread)
  206. genDef(Pb, KPRCB, IdleThread)
  207. genDef(Pb, KPRCB, Number)
  208. genDef(Pb, KPRCB, BuildType)
  209. genDef(Pb, KPRCB, SetMember)
  210. genDef(Pb, KPRCB, RestartBlock)
  211. DisableInc(HALALPHA)
  212. genDef(Pb, KPRCB, InterruptCount)
  213. genDef(Pb, KPRCB, DpcTime)
  214. genDef(Pb, KPRCB, InterruptTime)
  215. genDef(Pb, KPRCB, KernelTime)
  216. genDef(Pb, KPRCB, UserTime)
  217. genDef(Pb, KPRCB, QuantumEndDpc)
  218. genDef(Pb, KPRCB, IpiFrozen)
  219. genDef(Pb, KPRCB, IpiCounts)
  220. genDef(Pb, KPRCB, ProcessorState)
  221. genAlt(PbAlignmentFixupCount, KPRCB, KeAlignmentFixupCount)
  222. genAlt(PbContextSwitches, KPRCB, KeContextSwitches)
  223. genAlt(PbDcacheFlushCount, KPRCB, KeDcacheFlushCount)
  224. genAlt(PbExceptionDispatchCount, KPRCB, KeExceptionDispatchCount)
  225. genAlt(PbFirstLevelTbFills, KPRCB, KeFirstLevelTbFills)
  226. genAlt(PbFloatingEmulationCount, KPRCB, KeFloatingEmulationCount)
  227. genAlt(PbIcacheFlushCount, KPRCB, KeIcacheFlushCount)
  228. genAlt(PbSecondLevelTbFills, KPRCB, KeSecondLevelTbFills)
  229. genAlt(PbSystemCalls, KPRCB, KeSystemCalls)
  230. genDef(Pb, KPRCB, LockQueue)
  231. genDef(Pb, KPRCB, PacketBarrier)
  232. genDef(Pb, KPRCB, CurrentPacket)
  233. genDef(Pb, KPRCB, TargetSet)
  234. genDef(Pb, KPRCB, WorkerRoutine)
  235. genDef(Pb, KPRCB, RequestSummary)
  236. genDef(Pb, KPRCB, DpcListHead)
  237. genDef(Pb, KPRCB, DpcLock)
  238. genDef(Pb, KPRCB, DpcCount)
  239. genDef(Pb, KPRCB, LastDpcCount)
  240. genDef(Pb, KPRCB, QuantumEnd)
  241. genDef(Pb, KPRCB, StartCount)
  242. genDef(Pb, KPRCB, SoftwareInterrupts)
  243. genDef(Pb, KPRCB, InterruptTrapFrame)
  244. genDef(Pb, KPRCB, DpcRoutineActive)
  245. genDef(Pb, KPRCB, DpcQueueDepth)
  246. genDef(Pb, KPRCB, DpcRequestRate)
  247. genDef(Pb, KPRCB, DpcBypassCount)
  248. genDef(Pb, KPRCB, ApcBypassCount)
  249. genDef(Pb, KPRCB, DispatchInterruptCount)
  250. genDef(Pb, KPRCB, DebugDpcTime)
  251. genDef(Pb, KPRCB, DpcInterruptRequested)
  252. genDef(Pb, KPRCB, MaximumDpcQueueDepth)
  253. genDef(Pb, KPRCB, MinimumDpcRate)
  254. genDef(Pb, KPRCB, AdjustDpcThreshold)
  255. EnableInc(HALALPHA)
  256. genDef(Pb, KPRCB, PowerState)
  257. genVal(ProcessorBlockLength, ROUND_UP(sizeof(KPRCB), 16))
  258. //
  259. // Prcb power state
  260. //
  261. genCom("Processor Power State Offset Definitions")
  262. genDef(Pp, PROCESSOR_POWER_STATE, IdleFunction)
  263. DisableInc(HALALPHA)
  264. //
  265. // Immediate interprocessor command definitions.
  266. //
  267. genCom("Immediate Interprocessor Command Definitions")
  268. genNam(IPI_APC)
  269. genNam(IPI_DPC)
  270. genNam(IPI_FREEZE)
  271. genNam(IPI_PACKET_READY)
  272. //
  273. // Interprocessor interrupt count structure offset definitions.
  274. //
  275. genCom("Interprocessor Interrupt Count Structure Offset Definitions")
  276. genDef(Ic, KIPI_COUNTS, Freeze)
  277. genDef(Ic, KIPI_COUNTS, Packet)
  278. genDef(Ic, KIPI_COUNTS, DPC)
  279. genDef(Ic, KIPI_COUNTS, APC)
  280. genDef(Ic, KIPI_COUNTS, FlushSingleTb)
  281. genDef(Ic, KIPI_COUNTS, FlushEntireTb)
  282. genDef(Ic, KIPI_COUNTS, ChangeColor)
  283. genDef(Ic, KIPI_COUNTS, SweepDcache)
  284. genDef(Ic, KIPI_COUNTS, SweepIcache)
  285. genDef(Ic, KIPI_COUNTS, SweepIcacheRange)
  286. genDef(Ic, KIPI_COUNTS, FlushIoBuffers)
  287. //
  288. // LPC structure offset definitions
  289. //
  290. genCom("LPC Structure Offset Definitions")
  291. genAlt(PmLength, PORT_MESSAGE, u1.Length)
  292. genAlt(PmClientId, PORT_MESSAGE, ClientId)
  293. genAlt(PmProcess, PORT_MESSAGE, ClientId.UniqueProcess)
  294. genAlt(PmThread, PORT_MESSAGE, ClientId.UniqueThread)
  295. genAlt(PmMessageId, PORT_MESSAGE, MessageId)
  296. genAlt(PmClientViewSize, PORT_MESSAGE, ClientViewSize)
  297. genVal(PortMessageLength, sizeof(PORT_MESSAGE))
  298. //
  299. // Client ID structure offset definitions
  300. //
  301. genCom("Client Id Structure Offset Definitions")
  302. genDef(Cid, CLIENT_ID, UniqueProcess)
  303. genDef(Cid, CLIENT_ID, UniqueThread)
  304. //
  305. // Context frame offset definitions and flag definitions.
  306. //
  307. EnableInc(HALALPHA)
  308. genCom("Context Frame Offset and Flag Definitions")
  309. genNam(CONTEXT_FULL)
  310. genNam(CONTEXT_CONTROL)
  311. genNam(CONTEXT_FLOATING_POINT)
  312. genNam(CONTEXT_INTEGER)
  313. genSpc()
  314. genDef(Cx, CONTEXT, FltF0)
  315. genDef(Cx, CONTEXT, FltF1)
  316. genDef(Cx, CONTEXT, FltF2)
  317. genDef(Cx, CONTEXT, FltF3)
  318. genDef(Cx, CONTEXT, FltF4)
  319. genDef(Cx, CONTEXT, FltF5)
  320. genDef(Cx, CONTEXT, FltF6)
  321. genDef(Cx, CONTEXT, FltF7)
  322. genDef(Cx, CONTEXT, FltF8)
  323. genDef(Cx, CONTEXT, FltF9)
  324. genDef(Cx, CONTEXT, FltF10)
  325. genDef(Cx, CONTEXT, FltF11)
  326. genDef(Cx, CONTEXT, FltF12)
  327. genDef(Cx, CONTEXT, FltF13)
  328. genDef(Cx, CONTEXT, FltF14)
  329. genDef(Cx, CONTEXT, FltF15)
  330. genDef(Cx, CONTEXT, FltF16)
  331. genDef(Cx, CONTEXT, FltF17)
  332. genDef(Cx, CONTEXT, FltF18)
  333. genDef(Cx, CONTEXT, FltF19)
  334. genDef(Cx, CONTEXT, FltF20)
  335. genDef(Cx, CONTEXT, FltF21)
  336. genDef(Cx, CONTEXT, FltF22)
  337. genDef(Cx, CONTEXT, FltF23)
  338. genDef(Cx, CONTEXT, FltF24)
  339. genDef(Cx, CONTEXT, FltF25)
  340. genDef(Cx, CONTEXT, FltF26)
  341. genDef(Cx, CONTEXT, FltF27)
  342. genDef(Cx, CONTEXT, FltF28)
  343. genDef(Cx, CONTEXT, FltF29)
  344. genDef(Cx, CONTEXT, FltF30)
  345. genDef(Cx, CONTEXT, FltF31)
  346. genDef(Cx, CONTEXT, IntV0)
  347. genDef(Cx, CONTEXT, IntT0)
  348. genDef(Cx, CONTEXT, IntT1)
  349. genDef(Cx, CONTEXT, IntT2)
  350. genDef(Cx, CONTEXT, IntT3)
  351. genDef(Cx, CONTEXT, IntT4)
  352. genDef(Cx, CONTEXT, IntT5)
  353. genDef(Cx, CONTEXT, IntT6)
  354. genDef(Cx, CONTEXT, IntT7)
  355. genDef(Cx, CONTEXT, IntS0)
  356. genDef(Cx, CONTEXT, IntS1)
  357. genDef(Cx, CONTEXT, IntS2)
  358. genDef(Cx, CONTEXT, IntS3)
  359. genDef(Cx, CONTEXT, IntS4)
  360. genDef(Cx, CONTEXT, IntS5)
  361. genDef(Cx, CONTEXT, IntFp)
  362. genDef(Cx, CONTEXT, IntA0)
  363. genDef(Cx, CONTEXT, IntA1)
  364. genDef(Cx, CONTEXT, IntA2)
  365. genDef(Cx, CONTEXT, IntA3)
  366. genDef(Cx, CONTEXT, IntA4)
  367. genDef(Cx, CONTEXT, IntA5)
  368. genDef(Cx, CONTEXT, IntT8)
  369. genDef(Cx, CONTEXT, IntT9)
  370. genDef(Cx, CONTEXT, IntT10)
  371. genDef(Cx, CONTEXT, IntT11)
  372. genDef(Cx, CONTEXT, IntRa)
  373. genDef(Cx, CONTEXT, IntT12)
  374. genDef(Cx, CONTEXT, IntAt)
  375. genDef(Cx, CONTEXT, IntGp)
  376. genDef(Cx, CONTEXT, IntSp)
  377. genDef(Cx, CONTEXT, IntZero)
  378. genDef(Cx, CONTEXT, Fpcr)
  379. genDef(Cx, CONTEXT, SoftFpcr)
  380. genDef(Cx, CONTEXT, Fir)
  381. genDef(Cx, CONTEXT, Psr)
  382. genDef(Cx, CONTEXT, ContextFlags)
  383. genVal(ContextFrameLength, ROUND_UP(sizeof(CONTEXT), 16))
  384. //
  385. // Exception frame offset definitions.
  386. //
  387. genCom("Exception Frame Offset Definitions and Length")
  388. genDef(Ex, KEXCEPTION_FRAME, FltF2)
  389. genDef(Ex, KEXCEPTION_FRAME, FltF3)
  390. genDef(Ex, KEXCEPTION_FRAME, FltF4)
  391. genDef(Ex, KEXCEPTION_FRAME, FltF5)
  392. genDef(Ex, KEXCEPTION_FRAME, FltF6)
  393. genDef(Ex, KEXCEPTION_FRAME, FltF7)
  394. genDef(Ex, KEXCEPTION_FRAME, FltF8)
  395. genDef(Ex, KEXCEPTION_FRAME, FltF9)
  396. genDef(Ex, KEXCEPTION_FRAME, IntS0)
  397. genDef(Ex, KEXCEPTION_FRAME, IntS1)
  398. genDef(Ex, KEXCEPTION_FRAME, IntS2)
  399. genDef(Ex, KEXCEPTION_FRAME, IntS3)
  400. genDef(Ex, KEXCEPTION_FRAME, IntS4)
  401. genDef(Ex, KEXCEPTION_FRAME, IntS5)
  402. genDef(Ex, KEXCEPTION_FRAME, IntFp)
  403. genDef(Ex, KEXCEPTION_FRAME, Psr)
  404. genDef(Ex, KEXCEPTION_FRAME, SwapReturn)
  405. genDef(Ex, KEXCEPTION_FRAME, IntRa)
  406. genVal(ExceptionFrameLength, ROUND_UP(sizeof(KEXCEPTION_FRAME), 16))
  407. //
  408. // Jump buffer offset definitions.
  409. //
  410. genCom("Jump Offset Definitions and Length")
  411. genDef(Jb, _JUMP_BUFFER, Fp)
  412. genDef(Jb, _JUMP_BUFFER, Pc)
  413. genDef(Jb, _JUMP_BUFFER, Seb)
  414. genDef(Jb, _JUMP_BUFFER, Type)
  415. genDef(Jb, _JUMP_BUFFER, FltF2)
  416. genDef(Jb, _JUMP_BUFFER, FltF3)
  417. genDef(Jb, _JUMP_BUFFER, FltF4)
  418. genDef(Jb, _JUMP_BUFFER, FltF5)
  419. genDef(Jb, _JUMP_BUFFER, FltF6)
  420. genDef(Jb, _JUMP_BUFFER, FltF7)
  421. genDef(Jb, _JUMP_BUFFER, FltF8)
  422. genDef(Jb, _JUMP_BUFFER, FltF9)
  423. genDef(Jb, _JUMP_BUFFER, IntS0)
  424. genDef(Jb, _JUMP_BUFFER, IntS1)
  425. genDef(Jb, _JUMP_BUFFER, IntS2)
  426. genDef(Jb, _JUMP_BUFFER, IntS3)
  427. genDef(Jb, _JUMP_BUFFER, IntS4)
  428. genDef(Jb, _JUMP_BUFFER, IntS5)
  429. genDef(Jb, _JUMP_BUFFER, IntS6)
  430. genDef(Jb, _JUMP_BUFFER, IntSp)
  431. genDef(Jb, _JUMP_BUFFER, Fir)
  432. //
  433. // Trap frame offset definitions.
  434. //
  435. genCom("Trap Frame Offset Definitions and Length")
  436. genDef(Tr, KTRAP_FRAME, FltF0)
  437. genDef(Tr, KTRAP_FRAME, FltF1)
  438. genDef(Tr, KTRAP_FRAME, FltF10)
  439. genDef(Tr, KTRAP_FRAME, FltF11)
  440. genDef(Tr, KTRAP_FRAME, FltF12)
  441. genDef(Tr, KTRAP_FRAME, FltF13)
  442. genDef(Tr, KTRAP_FRAME, FltF14)
  443. genDef(Tr, KTRAP_FRAME, FltF15)
  444. genDef(Tr, KTRAP_FRAME, FltF16)
  445. genDef(Tr, KTRAP_FRAME, FltF17)
  446. genDef(Tr, KTRAP_FRAME, FltF18)
  447. genDef(Tr, KTRAP_FRAME, FltF19)
  448. genDef(Tr, KTRAP_FRAME, FltF20)
  449. genDef(Tr, KTRAP_FRAME, FltF21)
  450. genDef(Tr, KTRAP_FRAME, FltF22)
  451. genDef(Tr, KTRAP_FRAME, FltF23)
  452. genDef(Tr, KTRAP_FRAME, FltF24)
  453. genDef(Tr, KTRAP_FRAME, FltF25)
  454. genDef(Tr, KTRAP_FRAME, FltF26)
  455. genDef(Tr, KTRAP_FRAME, FltF27)
  456. genDef(Tr, KTRAP_FRAME, FltF28)
  457. genDef(Tr, KTRAP_FRAME, FltF29)
  458. genDef(Tr, KTRAP_FRAME, FltF30)
  459. genDef(Tr, KTRAP_FRAME, IntV0)
  460. genDef(Tr, KTRAP_FRAME, IntT0)
  461. genDef(Tr, KTRAP_FRAME, IntT1)
  462. genDef(Tr, KTRAP_FRAME, IntT2)
  463. genDef(Tr, KTRAP_FRAME, IntT3)
  464. genDef(Tr, KTRAP_FRAME, IntT4)
  465. genDef(Tr, KTRAP_FRAME, IntT5)
  466. genDef(Tr, KTRAP_FRAME, IntT6)
  467. genDef(Tr, KTRAP_FRAME, IntT7)
  468. genDef(Tr, KTRAP_FRAME, IntFp)
  469. genDef(Tr, KTRAP_FRAME, IntA0)
  470. genDef(Tr, KTRAP_FRAME, IntA1)
  471. genDef(Tr, KTRAP_FRAME, IntA2)
  472. genDef(Tr, KTRAP_FRAME, IntA3)
  473. genDef(Tr, KTRAP_FRAME, IntA4)
  474. genDef(Tr, KTRAP_FRAME, IntA5)
  475. genDef(Tr, KTRAP_FRAME, IntT8)
  476. genDef(Tr, KTRAP_FRAME, IntT9)
  477. genDef(Tr, KTRAP_FRAME, IntT10)
  478. genDef(Tr, KTRAP_FRAME, IntT11)
  479. genDef(Tr, KTRAP_FRAME, IntT12)
  480. genDef(Tr, KTRAP_FRAME, IntAt)
  481. genDef(Tr, KTRAP_FRAME, IntGp)
  482. genDef(Tr, KTRAP_FRAME, IntSp)
  483. genDef(Tr, KTRAP_FRAME, Fpcr)
  484. genDef(Tr, KTRAP_FRAME, Psr)
  485. genDef(Tr, KTRAP_FRAME, Fir)
  486. genAlt(TrExceptionRecord, KTRAP_FRAME, ExceptionRecord[0])
  487. genDef(Tr, KTRAP_FRAME, OldIrql)
  488. genDef(Tr, KTRAP_FRAME, PreviousMode)
  489. genDef(Tr, KTRAP_FRAME, IntRa)
  490. genDef(Tr, KTRAP_FRAME, TrapFrame)
  491. genVal(TrapFrameLength, ROUND_UP(sizeof(KTRAP_FRAME), 16))
  492. //
  493. // Firmware frame offset defintions and length.
  494. //
  495. DisableInc(HALALPHA)
  496. genCom("Firmware frame offset defintions and length")
  497. genNam(FW_EXC_MCHK)
  498. genNam(FW_EXC_ARITH)
  499. genNam(FW_EXC_INTERRUPT)
  500. genNam(FW_EXC_DFAULT)
  501. genNam(FW_EXC_ITBMISS)
  502. genNam(FW_EXC_ITBACV)
  503. genNam(FW_EXC_NDTBMISS)
  504. genNam(FW_EXC_PDTBMISS)
  505. genNam(FW_EXC_UNALIGNED)
  506. genNam(FW_EXC_OPCDEC)
  507. genNam(FW_EXC_FEN)
  508. genNam(FW_EXC_HALT)
  509. genNam(FW_EXC_BPT)
  510. genNam(FW_EXC_GENTRAP)
  511. genNam(FW_EXC_HALT_INTERRUPT)
  512. genDef(Fw, FIRMWARE_FRAME, Type)
  513. genDef(Fw, FIRMWARE_FRAME, Param1)
  514. genDef(Fw, FIRMWARE_FRAME, Param2)
  515. genDef(Fw, FIRMWARE_FRAME, Param3)
  516. genDef(Fw, FIRMWARE_FRAME, Param4)
  517. genDef(Fw, FIRMWARE_FRAME, Param5)
  518. genDef(Fw, FIRMWARE_FRAME, Psr)
  519. genDef(Fw, FIRMWARE_FRAME, Mmcsr)
  520. genDef(Fw, FIRMWARE_FRAME, Va)
  521. genDef(Fw, FIRMWARE_FRAME, Fir)
  522. genDef(Fw, FIRMWARE_FRAME, IntV0)
  523. genDef(Fw, FIRMWARE_FRAME, IntT0)
  524. genDef(Fw, FIRMWARE_FRAME, IntT1)
  525. genDef(Fw, FIRMWARE_FRAME, IntT2)
  526. genDef(Fw, FIRMWARE_FRAME, IntT3)
  527. genDef(Fw, FIRMWARE_FRAME, IntT4)
  528. genDef(Fw, FIRMWARE_FRAME, IntT5)
  529. genDef(Fw, FIRMWARE_FRAME, IntT6)
  530. genDef(Fw, FIRMWARE_FRAME, IntT7)
  531. genDef(Fw, FIRMWARE_FRAME, IntS0)
  532. genDef(Fw, FIRMWARE_FRAME, IntS1)
  533. genDef(Fw, FIRMWARE_FRAME, IntS2)
  534. genDef(Fw, FIRMWARE_FRAME, IntS3)
  535. genDef(Fw, FIRMWARE_FRAME, IntS4)
  536. genDef(Fw, FIRMWARE_FRAME, IntS5)
  537. genDef(Fw, FIRMWARE_FRAME, IntFp)
  538. genDef(Fw, FIRMWARE_FRAME, IntA0)
  539. genDef(Fw, FIRMWARE_FRAME, IntA1)
  540. genDef(Fw, FIRMWARE_FRAME, IntA2)
  541. genDef(Fw, FIRMWARE_FRAME, IntA3)
  542. genDef(Fw, FIRMWARE_FRAME, IntA4)
  543. genDef(Fw, FIRMWARE_FRAME, IntA5)
  544. genDef(Fw, FIRMWARE_FRAME, IntT8)
  545. genDef(Fw, FIRMWARE_FRAME, IntT9)
  546. genDef(Fw, FIRMWARE_FRAME, IntT10)
  547. genDef(Fw, FIRMWARE_FRAME, IntT11)
  548. genDef(Fw, FIRMWARE_FRAME, IntRa)
  549. genDef(Fw, FIRMWARE_FRAME, IntT12)
  550. genDef(Fw, FIRMWARE_FRAME, IntAt)
  551. genDef(Fw, FIRMWARE_FRAME, IntGp)
  552. genDef(Fw, FIRMWARE_FRAME, IntSp)
  553. genDef(Fw, FIRMWARE_FRAME, IntZero)
  554. genDef(Fw, FIRMWARE_FRAME, FltF0)
  555. genDef(Fw, FIRMWARE_FRAME, FltF1)
  556. genDef(Fw, FIRMWARE_FRAME, FltF2)
  557. genDef(Fw, FIRMWARE_FRAME, FltF3)
  558. genDef(Fw, FIRMWARE_FRAME, FltF4)
  559. genDef(Fw, FIRMWARE_FRAME, FltF5)
  560. genDef(Fw, FIRMWARE_FRAME, FltF6)
  561. genDef(Fw, FIRMWARE_FRAME, FltF7)
  562. genDef(Fw, FIRMWARE_FRAME, FltF8)
  563. genDef(Fw, FIRMWARE_FRAME, FltF9)
  564. genDef(Fw, FIRMWARE_FRAME, FltF10)
  565. genDef(Fw, FIRMWARE_FRAME, FltF11)
  566. genDef(Fw, FIRMWARE_FRAME, FltF12)
  567. genDef(Fw, FIRMWARE_FRAME, FltF13)
  568. genDef(Fw, FIRMWARE_FRAME, FltF14)
  569. genDef(Fw, FIRMWARE_FRAME, FltF15)
  570. genDef(Fw, FIRMWARE_FRAME, FltF16)
  571. genDef(Fw, FIRMWARE_FRAME, FltF17)
  572. genDef(Fw, FIRMWARE_FRAME, FltF18)
  573. genDef(Fw, FIRMWARE_FRAME, FltF19)
  574. genDef(Fw, FIRMWARE_FRAME, FltF20)
  575. genDef(Fw, FIRMWARE_FRAME, FltF21)
  576. genDef(Fw, FIRMWARE_FRAME, FltF22)
  577. genDef(Fw, FIRMWARE_FRAME, FltF23)
  578. genDef(Fw, FIRMWARE_FRAME, FltF24)
  579. genDef(Fw, FIRMWARE_FRAME, FltF25)
  580. genDef(Fw, FIRMWARE_FRAME, FltF26)
  581. genDef(Fw, FIRMWARE_FRAME, FltF27)
  582. genDef(Fw, FIRMWARE_FRAME, FltF28)
  583. genDef(Fw, FIRMWARE_FRAME, FltF29)
  584. genDef(Fw, FIRMWARE_FRAME, FltF30)
  585. genDef(Fw, FIRMWARE_FRAME, FltF31)
  586. genVal(FirmwareFrameLength, FIRMWARE_FRAME_LENGTH)
  587. //
  588. // Usermode lout frame definitions
  589. //
  590. genCom("Usermode callout frame definitions")
  591. genDef(Cu, KCALLOUT_FRAME, F2)
  592. genDef(Cu, KCALLOUT_FRAME, F3)
  593. genDef(Cu, KCALLOUT_FRAME, F4)
  594. genDef(Cu, KCALLOUT_FRAME, F5)
  595. genDef(Cu, KCALLOUT_FRAME, F6)
  596. genDef(Cu, KCALLOUT_FRAME, F7)
  597. genDef(Cu, KCALLOUT_FRAME, F8)
  598. genDef(Cu, KCALLOUT_FRAME, F9)
  599. genDef(Cu, KCALLOUT_FRAME, S0)
  600. genDef(Cu, KCALLOUT_FRAME, S1)
  601. genDef(Cu, KCALLOUT_FRAME, S2)
  602. genDef(Cu, KCALLOUT_FRAME, S3)
  603. genDef(Cu, KCALLOUT_FRAME, S4)
  604. genDef(Cu, KCALLOUT_FRAME, S5)
  605. genDef(Cu, KCALLOUT_FRAME, FP)
  606. genDef(Cu, KCALLOUT_FRAME, CbStk)
  607. genDef(Cu, KCALLOUT_FRAME, InStk)
  608. genDef(Cu, KCALLOUT_FRAME, TrFr)
  609. genDef(Cu, KCALLOUT_FRAME, TrFir)
  610. genDef(Cu, KCALLOUT_FRAME, Ra)
  611. genDef(Cu, KCALLOUT_FRAME, A0)
  612. genDef(Cu, KCALLOUT_FRAME, A1)
  613. genVal(CuFrameLength, sizeof(KCALLOUT_FRAME))
  614. //
  615. // Usermode callout user frame definitions.
  616. //
  617. genCom("Usermode callout user frame definitions")
  618. genDef(Ck, UCALLOUT_FRAME, Buffer)
  619. genDef(Ck, UCALLOUT_FRAME, Length)
  620. genDef(Ck, UCALLOUT_FRAME, ApiNumber)
  621. genDef(Ck, UCALLOUT_FRAME, Sp)
  622. genDef(Ck, UCALLOUT_FRAME, Ra)
  623. //
  624. // KFLOATING_SAVE definition
  625. //
  626. genCom("KFLOATING_SAVE definitions")
  627. genDef(Kfs, KFLOATING_SAVE, Fpcr)
  628. genDef(Kfs, KFLOATING_SAVE, SoftFpcr)
  629. genDef(Kfs, KFLOATING_SAVE, Reserved1)
  630. genDef(Kfs, KFLOATING_SAVE, Reserved2)
  631. genDef(Kfs, KFLOATING_SAVE, Reserved3)
  632. genDef(Kfs, KFLOATING_SAVE, Reserved4)
  633. EnableInc(HALALPHA)
  634. //
  635. // Loader Paeter Block offset definitions.
  636. //
  637. genCom("Loader Parameter Block Offset Definitions")
  638. genDef(Lpb, LOADER_PARAMETER_BLOCK, LoadOrderListHead)
  639. genDef(Lpb, LOADER_PARAMETER_BLOCK, MemoryDescriptorListHead)
  640. genDef(Lpb, LOADER_PARAMETER_BLOCK, KernelStack)
  641. genDef(Lpb, LOADER_PARAMETER_BLOCK, Prcb)
  642. genDef(Lpb, LOADER_PARAMETER_BLOCK, Process)
  643. genDef(Lpb, LOADER_PARAMETER_BLOCK, Thread)
  644. genDef(Lpb, LOADER_PARAMETER_BLOCK, RegistryLength)
  645. genDef(Lpb, LOADER_PARAMETER_BLOCK, RegistryBase)
  646. genAlt(LpbDpcStack,
  647. LOADER_PARAMETER_BLOCK, u.Alpha.DpcStack)
  648. genAlt(LpbFirstLevelDcacheSize,
  649. LOADER_PARAMETER_BLOCK, u.Alpha.FirstLevelDcacheSize)
  650. genAlt(LpbFirstLevelDcacheFillSize,
  651. LOADER_PARAMETER_BLOCK, u.Alpha.FirstLevelDcacheFillSize)
  652. genAlt(LpbFirstLevelIcacheSize,
  653. LOADER_PARAMETER_BLOCK, u.Alpha.FirstLevelIcacheSize)
  654. genAlt(LpbFirstLevelIcacheFillSize,
  655. LOADER_PARAMETER_BLOCK, u.Alpha.FirstLevelIcacheFillSize)
  656. genAlt(LpbGpBase,
  657. LOADER_PARAMETER_BLOCK, u.Alpha.GpBase)
  658. genAlt(LpbPanicStack,
  659. LOADER_PARAMETER_BLOCK, u.Alpha.PanicStack)
  660. genAlt(LpbPcrPage,
  661. LOADER_PARAMETER_BLOCK, u.Alpha.PcrPage)
  662. genAlt(LpbPdrPage,
  663. LOADER_PARAMETER_BLOCK, u.Alpha.PdrPage)
  664. genAlt(LpbSecondLevelDcacheSize,
  665. LOADER_PARAMETER_BLOCK, u.Alpha.SecondLevelDcacheSize)
  666. genAlt(LpbSecondLevelDcacheFillSize,
  667. LOADER_PARAMETER_BLOCK, u.Alpha.SecondLevelDcacheFillSize)
  668. genAlt(LpbSecondLevelIcacheSize,
  669. LOADER_PARAMETER_BLOCK, u.Alpha.SecondLevelIcacheSize)
  670. genAlt(LpbSecondLevelIcacheFillSize,
  671. LOADER_PARAMETER_BLOCK, u.Alpha.SecondLevelIcacheFillSize)
  672. genAlt(LpbPhysicalAddressBits,
  673. LOADER_PARAMETER_BLOCK, u.Alpha.PhysicalAddressBits)
  674. genAlt(LpbMaximumAddressSpaceNumber,
  675. LOADER_PARAMETER_BLOCK, u.Alpha.MaximumAddressSpaceNumber)
  676. genAlt(LpbSystemSerialNumber,
  677. LOADER_PARAMETER_BLOCK, u.Alpha.SystemSerialNumber[0])
  678. genAlt(LpbSystemType,
  679. LOADER_PARAMETER_BLOCK, u.Alpha.SystemType[0])
  680. genAlt(LpbSystemVariant,
  681. LOADER_PARAMETER_BLOCK, u.Alpha.SystemVariant)
  682. genAlt(LpbSystemRevision,
  683. LOADER_PARAMETER_BLOCK, u.Alpha.SystemRevision)
  684. genAlt(LpbProcessorType,
  685. LOADER_PARAMETER_BLOCK, u.Alpha.ProcessorType)
  686. genAlt(LpbProcessorRevision,
  687. LOADER_PARAMETER_BLOCK, u.Alpha.ProcessorRevision)
  688. genAlt(LpbCycleClockPeriod,
  689. LOADER_PARAMETER_BLOCK, u.Alpha.CycleClockPeriod)
  690. genAlt(LpbPageSize,
  691. LOADER_PARAMETER_BLOCK, u.Alpha.PageSize)
  692. genAlt(LpbRestartBlock,
  693. LOADER_PARAMETER_BLOCK, u.Alpha.RestartBlock)
  694. genAlt(LpbFirmwareRestartAddress,
  695. LOADER_PARAMETER_BLOCK, u.Alpha.FirmwareRestartAddress)
  696. genAlt(LpbFirmwareRevisionId,
  697. LOADER_PARAMETER_BLOCK, u.Alpha.FirmwareRevisionId)
  698. genAlt(LpbPalBaseAddress,
  699. LOADER_PARAMETER_BLOCK, u.Alpha.PalBaseAddress)
  700. DisableInc(HALALPHA)
  701. //
  702. // Restart Block Structure and Alpha Save Area Structure.
  703. //
  704. // N.B. - The Alpha Save Area Structure Offsets are written as though
  705. // they were offsets from the beginning of the Restart block.
  706. //
  707. EnableInc(HALALPHA)
  708. genCom("Restart Block Structure Definitions")
  709. genDef(Rb, RESTART_BLOCK, Signature)
  710. genDef(Rb, RESTART_BLOCK, Length)
  711. genDef(Rb, RESTART_BLOCK, Version)
  712. genDef(Rb, RESTART_BLOCK, Revision)
  713. genDef(Rb, RESTART_BLOCK, NextRestartBlock)
  714. genDef(Rb, RESTART_BLOCK, RestartAddress)
  715. genDef(Rb, RESTART_BLOCK, BootMasterId)
  716. genDef(Rb, RESTART_BLOCK, ProcessorId)
  717. genDef(Rb, RESTART_BLOCK, BootStatus)
  718. genDef(Rb, RESTART_BLOCK, CheckSum)
  719. genDef(Rb, RESTART_BLOCK, SaveAreaLength)
  720. genAlt(RbSaveArea, RESTART_BLOCK, u.SaveArea)
  721. genVal(RbHaltReason,
  722. OFFSET(RESTART_BLOCK, u.SaveArea) +
  723. OFFSET(ALPHA_RESTART_STATE, HaltReason))
  724. genVal(RbLogoutFrame,
  725. OFFSET(RESTART_BLOCK, u.SaveArea) +
  726. OFFSET(ALPHA_RESTART_STATE, LogoutFrame))
  727. genVal(RbPalBase,
  728. OFFSET(RESTART_BLOCK, u.SaveArea) +
  729. OFFSET(ALPHA_RESTART_STATE, PalBase))
  730. genVal(RbIntV0,
  731. OFFSET(RESTART_BLOCK, u.SaveArea) +
  732. OFFSET(ALPHA_RESTART_STATE, IntV0))
  733. genVal(RbIntT0,
  734. OFFSET(RESTART_BLOCK, u.SaveArea) +
  735. OFFSET(ALPHA_RESTART_STATE, IntT0))
  736. genVal(RbIntT1,
  737. OFFSET(RESTART_BLOCK, u.SaveArea) +
  738. OFFSET(ALPHA_RESTART_STATE, IntT1))
  739. genVal(RbIntT2,
  740. OFFSET(RESTART_BLOCK, u.SaveArea) +
  741. OFFSET(ALPHA_RESTART_STATE, IntT2))
  742. genVal(RbIntT3,
  743. OFFSET(RESTART_BLOCK, u.SaveArea) +
  744. OFFSET(ALPHA_RESTART_STATE, IntT3))
  745. genVal(RbIntT4,
  746. OFFSET(RESTART_BLOCK, u.SaveArea) +
  747. OFFSET(ALPHA_RESTART_STATE, IntT4))
  748. genVal(RbIntT5,
  749. OFFSET(RESTART_BLOCK, u.SaveArea) +
  750. OFFSET(ALPHA_RESTART_STATE, IntT5))
  751. genVal(RbIntT6,
  752. OFFSET(RESTART_BLOCK, u.SaveArea) +
  753. OFFSET(ALPHA_RESTART_STATE, IntT6))
  754. genVal(RbIntT7,
  755. OFFSET(RESTART_BLOCK, u.SaveArea) +
  756. OFFSET(ALPHA_RESTART_STATE, IntT7))
  757. genVal(RbIntS0,
  758. OFFSET(RESTART_BLOCK, u.SaveArea) +
  759. OFFSET(ALPHA_RESTART_STATE, IntS0))
  760. genVal(RbIntS1,
  761. OFFSET(RESTART_BLOCK, u.SaveArea) +
  762. OFFSET(ALPHA_RESTART_STATE, IntS1))
  763. genVal(RbIntS2,
  764. OFFSET(RESTART_BLOCK, u.SaveArea) +
  765. OFFSET(ALPHA_RESTART_STATE, IntS2))
  766. genVal(RbIntS3,
  767. OFFSET(RESTART_BLOCK, u.SaveArea) +
  768. OFFSET(ALPHA_RESTART_STATE, IntS3))
  769. genVal(RbIntS4,
  770. OFFSET(RESTART_BLOCK, u.SaveArea) +
  771. OFFSET(ALPHA_RESTART_STATE, IntS4))
  772. genVal(RbIntS5,
  773. OFFSET(RESTART_BLOCK, u.SaveArea) +
  774. OFFSET(ALPHA_RESTART_STATE, IntS5))
  775. genVal(RbIntFp,
  776. OFFSET(RESTART_BLOCK, u.SaveArea) +
  777. OFFSET(ALPHA_RESTART_STATE, IntFp))
  778. genVal(RbIntA0,
  779. OFFSET(RESTART_BLOCK, u.SaveArea) +
  780. OFFSET(ALPHA_RESTART_STATE, IntA0))
  781. genVal(RbIntA1,
  782. OFFSET(RESTART_BLOCK, u.SaveArea) +
  783. OFFSET(ALPHA_RESTART_STATE, IntA1))
  784. genVal(RbIntA2,
  785. OFFSET(RESTART_BLOCK, u.SaveArea) +
  786. OFFSET(ALPHA_RESTART_STATE, IntA2))
  787. genVal(RbIntA3,
  788. OFFSET(RESTART_BLOCK, u.SaveArea) +
  789. OFFSET(ALPHA_RESTART_STATE, IntA3))
  790. genVal(RbIntA4,
  791. OFFSET(RESTART_BLOCK, u.SaveArea) +
  792. OFFSET(ALPHA_RESTART_STATE, IntA4))
  793. genVal(RbIntA5,
  794. OFFSET(RESTART_BLOCK, u.SaveArea) +
  795. OFFSET(ALPHA_RESTART_STATE, IntA5))
  796. genVal(RbIntT8,
  797. OFFSET(RESTART_BLOCK, u.SaveArea) +
  798. OFFSET(ALPHA_RESTART_STATE, IntT8))
  799. genVal(RbIntT9,
  800. OFFSET(RESTART_BLOCK, u.SaveArea) +
  801. OFFSET(ALPHA_RESTART_STATE, IntT9))
  802. genVal(RbIntT10,
  803. OFFSET(RESTART_BLOCK, u.SaveArea) +
  804. OFFSET(ALPHA_RESTART_STATE, IntT10))
  805. genVal(RbIntT11,
  806. OFFSET(RESTART_BLOCK, u.SaveArea) +
  807. OFFSET(ALPHA_RESTART_STATE, IntT11))
  808. genVal(RbIntRa,
  809. OFFSET(RESTART_BLOCK, u.SaveArea) +
  810. OFFSET(ALPHA_RESTART_STATE, IntRa))
  811. genVal(RbIntT12,
  812. OFFSET(RESTART_BLOCK, u.SaveArea) +
  813. OFFSET(ALPHA_RESTART_STATE, IntT12))
  814. genVal(RbIntAT,
  815. OFFSET(RESTART_BLOCK, u.SaveArea) +
  816. OFFSET(ALPHA_RESTART_STATE, IntAT))
  817. genVal(RbIntGp,
  818. OFFSET(RESTART_BLOCK, u.SaveArea) +
  819. OFFSET(ALPHA_RESTART_STATE, IntGp))
  820. genVal(RbIntSp,
  821. OFFSET(RESTART_BLOCK, u.SaveArea) +
  822. OFFSET(ALPHA_RESTART_STATE, IntSp))
  823. genVal(RbIntZero,
  824. OFFSET(RESTART_BLOCK, u.SaveArea) +
  825. OFFSET(ALPHA_RESTART_STATE, IntZero))
  826. genVal(RbFpcr,
  827. OFFSET(RESTART_BLOCK, u.SaveArea) +
  828. OFFSET(ALPHA_RESTART_STATE, Fpcr))
  829. genVal(RbFltF0,
  830. OFFSET(RESTART_BLOCK, u.SaveArea) +
  831. OFFSET(ALPHA_RESTART_STATE, FltF0))
  832. genVal(RbFltF1,
  833. OFFSET(RESTART_BLOCK, u.SaveArea) +
  834. OFFSET(ALPHA_RESTART_STATE, FltF1))
  835. genVal(RbFltF2,
  836. OFFSET(RESTART_BLOCK, u.SaveArea) +
  837. OFFSET(ALPHA_RESTART_STATE, FltF2))
  838. genVal(RbFltF3,
  839. OFFSET(RESTART_BLOCK, u.SaveArea) +
  840. OFFSET(ALPHA_RESTART_STATE, FltF3))
  841. genVal(RbFltF4,
  842. OFFSET(RESTART_BLOCK, u.SaveArea) +
  843. OFFSET(ALPHA_RESTART_STATE, FltF4))
  844. genVal(RbFltF5,
  845. OFFSET(RESTART_BLOCK, u.SaveArea) +
  846. OFFSET(ALPHA_RESTART_STATE, FltF5))
  847. genVal(RbFltF6,
  848. OFFSET(RESTART_BLOCK, u.SaveArea) +
  849. OFFSET(ALPHA_RESTART_STATE, FltF6))
  850. genVal(RbFltF7,
  851. OFFSET(RESTART_BLOCK, u.SaveArea) +
  852. OFFSET(ALPHA_RESTART_STATE, FltF7))
  853. genVal(RbFltF8,
  854. OFFSET(RESTART_BLOCK, u.SaveArea) +
  855. OFFSET(ALPHA_RESTART_STATE, FltF8))
  856. genVal(RbFltF9,
  857. OFFSET(RESTART_BLOCK, u.SaveArea) +
  858. OFFSET(ALPHA_RESTART_STATE, FltF9))
  859. genVal(RbFltF10,
  860. OFFSET(RESTART_BLOCK, u.SaveArea) +
  861. OFFSET(ALPHA_RESTART_STATE, FltF10))
  862. genVal(RbFltF11,
  863. OFFSET(RESTART_BLOCK, u.SaveArea) +
  864. OFFSET(ALPHA_RESTART_STATE, FltF11))
  865. genVal(RbFltF12,
  866. OFFSET(RESTART_BLOCK, u.SaveArea) +
  867. OFFSET(ALPHA_RESTART_STATE, FltF12))
  868. genVal(RbFltF13,
  869. OFFSET(RESTART_BLOCK, u.SaveArea) +
  870. OFFSET(ALPHA_RESTART_STATE, FltF13))
  871. genVal(RbFltF14,
  872. OFFSET(RESTART_BLOCK, u.SaveArea) +
  873. OFFSET(ALPHA_RESTART_STATE, FltF14))
  874. genVal(RbFltF15,
  875. OFFSET(RESTART_BLOCK, u.SaveArea) +
  876. OFFSET(ALPHA_RESTART_STATE, FltF15))
  877. genVal(RbFltF16,
  878. OFFSET(RESTART_BLOCK, u.SaveArea) +
  879. OFFSET(ALPHA_RESTART_STATE, FltF16))
  880. genVal(RbFltF17,
  881. OFFSET(RESTART_BLOCK, u.SaveArea) +
  882. OFFSET(ALPHA_RESTART_STATE, FltF17))
  883. genVal(RbFltF18,
  884. OFFSET(RESTART_BLOCK, u.SaveArea) +
  885. OFFSET(ALPHA_RESTART_STATE, FltF18))
  886. genVal(RbFltF19,
  887. OFFSET(RESTART_BLOCK, u.SaveArea) +
  888. OFFSET(ALPHA_RESTART_STATE, FltF19))
  889. genVal(RbFltF20,
  890. OFFSET(RESTART_BLOCK, u.SaveArea) +
  891. OFFSET(ALPHA_RESTART_STATE, FltF20))
  892. genVal(RbFltF21,
  893. OFFSET(RESTART_BLOCK, u.SaveArea) +
  894. OFFSET(ALPHA_RESTART_STATE, FltF21))
  895. genVal(RbFltF22,
  896. OFFSET(RESTART_BLOCK, u.SaveArea) +
  897. OFFSET(ALPHA_RESTART_STATE, FltF22))
  898. genVal(RbFltF23,
  899. OFFSET(RESTART_BLOCK, u.SaveArea) +
  900. OFFSET(ALPHA_RESTART_STATE, FltF23))
  901. genVal(RbFltF24,
  902. OFFSET(RESTART_BLOCK, u.SaveArea) +
  903. OFFSET(ALPHA_RESTART_STATE, FltF24))
  904. genVal(RbFltF25,
  905. OFFSET(RESTART_BLOCK, u.SaveArea) +
  906. OFFSET(ALPHA_RESTART_STATE, FltF25))
  907. genVal(RbFltF26,
  908. OFFSET(RESTART_BLOCK, u.SaveArea) +
  909. OFFSET(ALPHA_RESTART_STATE, FltF26))
  910. genVal(RbFltF27,
  911. OFFSET(RESTART_BLOCK, u.SaveArea) +
  912. OFFSET(ALPHA_RESTART_STATE, FltF27))
  913. genVal(RbFltF28,
  914. OFFSET(RESTART_BLOCK, u.SaveArea) +
  915. OFFSET(ALPHA_RESTART_STATE, FltF28))
  916. genVal(RbFltF29,
  917. OFFSET(RESTART_BLOCK, u.SaveArea) +
  918. OFFSET(ALPHA_RESTART_STATE, FltF29))
  919. genVal(RbFltF30,
  920. OFFSET(RESTART_BLOCK, u.SaveArea) +
  921. OFFSET(ALPHA_RESTART_STATE, FltF30))
  922. genVal(RbFltF31,
  923. OFFSET(RESTART_BLOCK, u.SaveArea) +
  924. OFFSET(ALPHA_RESTART_STATE, FltF31))
  925. genVal(RbAsn,
  926. OFFSET(RESTART_BLOCK, u.SaveArea) +
  927. OFFSET(ALPHA_RESTART_STATE, Asn))
  928. genVal(RbGeneralEntry,
  929. OFFSET(RESTART_BLOCK, u.SaveArea) +
  930. OFFSET(ALPHA_RESTART_STATE, GeneralEntry))
  931. genVal(RbIksp,
  932. OFFSET(RESTART_BLOCK, u.SaveArea) +
  933. OFFSET(ALPHA_RESTART_STATE, Iksp))
  934. genVal(RbInterruptEntry,
  935. OFFSET(RESTART_BLOCK, u.SaveArea) +
  936. OFFSET(ALPHA_RESTART_STATE, InterruptEntry))
  937. genVal(RbKgp,
  938. OFFSET(RESTART_BLOCK, u.SaveArea) +
  939. OFFSET(ALPHA_RESTART_STATE, Kgp))
  940. genVal(RbMces,
  941. OFFSET(RESTART_BLOCK, u.SaveArea) +
  942. OFFSET(ALPHA_RESTART_STATE, Mces))
  943. genVal(RbMemMgmtEntry,
  944. OFFSET(RESTART_BLOCK, u.SaveArea) +
  945. OFFSET(ALPHA_RESTART_STATE, MemMgmtEntry))
  946. genVal(RbPanicEntry,
  947. OFFSET(RESTART_BLOCK, u.SaveArea) +
  948. OFFSET(ALPHA_RESTART_STATE, PanicEntry))
  949. genVal(RbPcr,
  950. OFFSET(RESTART_BLOCK, u.SaveArea) +
  951. OFFSET(ALPHA_RESTART_STATE, Pcr))
  952. genVal(RbPdr,
  953. OFFSET(RESTART_BLOCK, u.SaveArea) +
  954. OFFSET(ALPHA_RESTART_STATE, Pdr))
  955. genVal(RbPsr,
  956. OFFSET(RESTART_BLOCK, u.SaveArea) +
  957. OFFSET(ALPHA_RESTART_STATE, Psr))
  958. genVal(RbReiRestartAddress,
  959. OFFSET(RESTART_BLOCK, u.SaveArea) +
  960. OFFSET(ALPHA_RESTART_STATE, ReiRestartAddress))
  961. genVal(RbSirr,
  962. OFFSET(RESTART_BLOCK, u.SaveArea) +
  963. OFFSET(ALPHA_RESTART_STATE, Sirr))
  964. genVal(RbSyscallEntry,
  965. OFFSET(RESTART_BLOCK, u.SaveArea) +
  966. OFFSET(ALPHA_RESTART_STATE, SyscallEntry))
  967. genVal(RbTeb,
  968. OFFSET(RESTART_BLOCK, u.SaveArea) +
  969. OFFSET(ALPHA_RESTART_STATE, Teb))
  970. genVal(RbThread,
  971. OFFSET(RESTART_BLOCK, u.SaveArea) +
  972. OFFSET(ALPHA_RESTART_STATE, Thread))
  973. genVal(RbPerProcessorState,
  974. OFFSET(RESTART_BLOCK, u.SaveArea) +
  975. OFFSET(ALPHA_RESTART_STATE, PerProcessorState))
  976. //
  977. // Address space layout definitions
  978. //
  979. genCom("Address Space Layout Definitions")
  980. genNamUint(KSEG0_BASE)
  981. genNamUint(KSEG2_BASE)
  982. DisableInc(HALALPHA)
  983. genNamUint(SYSTEM_BASE)
  984. genNamUint(PDE_BASE)
  985. genNamUint(PTE_BASE)
  986. genNamUint(PDE64_BASE)
  987. genNamUint(PTE64_BASE)
  988. //
  989. // Page table and page directory entry definitions
  990. //
  991. EnableInc(HALALPHA)
  992. genCom("Page Table and Directory Entry Definitions")
  993. genNam(PAGE_SIZE)
  994. genNam(PAGE_SHIFT)
  995. genNam(PDI_SHIFT)
  996. genNam(PTI_SHIFT)
  997. DisableInc(HALALPHA)
  998. //
  999. // Breakpoint instruction definitions
  1000. //
  1001. EnableInc(HALALPHA)
  1002. genCom("Breakpoint Definitions")
  1003. genNam(USER_BREAKPOINT)
  1004. genNam(KERNEL_BREAKPOINT)
  1005. genNam(BREAKIN_BREAKPOINT)
  1006. genNam(DEBUG_PRINT_BREAKPOINT)
  1007. genNam(DEBUG_PROMPT_BREAKPOINT)
  1008. genNam(DEBUG_STOP_BREAKPOINT)
  1009. genNam(DEBUG_LOAD_SYMBOLS_BREAKPOINT)
  1010. genNam(DEBUG_UNLOAD_SYMBOLS_BREAKPOINT)
  1011. DisableInc(HALALPHA)
  1012. //
  1013. //
  1014. // Trap code definitions
  1015. //
  1016. genCom("Trap Code Definitions")
  1017. genNam(GENTRAP_INTEGER_OVERFLOW)
  1018. genNam(GENTRAP_INTEGER_DIVIDE_BY_ZERO)
  1019. genNam(GENTRAP_FLOATING_OVERFLOW)
  1020. genNam(GENTRAP_FLOATING_DIVIDE_BY_ZERO)
  1021. genNam(GENTRAP_FLOATING_UNDERFLOW)
  1022. genNam(GENTRAP_FLOATING_INVALID_OPERAND)
  1023. genNam(GENTRAP_FLOATING_INEXACT_RESULT)
  1024. //
  1025. // Miscellaneous definitions
  1026. //
  1027. EnableInc(HALALPHA)
  1028. genCom("Miscellaneous Definitions")
  1029. genNam(Executive)
  1030. genNam(KernelMode)
  1031. genNam(FALSE)
  1032. genNam(TRUE)
  1033. DisableInc(HALALPHA)
  1034. genNam(BASE_PRIORITY_THRESHOLD)
  1035. genNam(EVENT_PAIR_INCREMENT)
  1036. genNam(LOW_REALTIME_PRIORITY)
  1037. genNamUint(MM_USER_PROBE_ADDRESS)
  1038. genNam(KERNEL_STACK_SIZE)
  1039. genNam(KERNEL_LARGE_STACK_COMMIT)
  1040. genNam(SET_LOW_WAIT_HIGH)
  1041. genNam(SET_HIGH_WAIT_LOW)
  1042. genNam(CLOCK_QUANTUM_DECREMENT)
  1043. genNam(READY_SKIP_QUANTUM)
  1044. genNam(THREAD_QUANTUM)
  1045. genNam(WAIT_QUANTUM_DECREMENT)
  1046. genNam(ROUND_TRIP_DECREMENT_COUNT)
  1047. //
  1048. // Generate processor type definitions.
  1049. //
  1050. EnableInc(HALALPHA)
  1051. genNam(PROCESSOR_ALPHA_21064)
  1052. genNam(PROCESSOR_ALPHA_21164)
  1053. genNam(PROCESSOR_ALPHA_21066)
  1054. genNam(PROCESSOR_ALPHA_21068)
  1055. genNam(PROCESSOR_ALPHA_21164PC)
  1056. genNam(PROCESSOR_ALPHA_21264)
  1057. //
  1058. // Insert any bitfield definitions that have been generated
  1059. //
  1060. DUMP_BITFIELDS
  1061. //
  1062. // Generate the call pal mnemonic to opcode definitions.
  1063. //
  1064. genCom("Call PAL Mnemonics")
  1065. genTxt("// begin callpal\n")
  1066. genSpc()
  1067. //
  1068. // N.B. any new call pal functions must be added to both alphaops.h
  1069. // and to the call pal entry table below.
  1070. //
  1071. // Unprivileged Call Pals
  1072. genPal(BPT_FUNC)
  1073. genPal(CALLSYS_FUNC)
  1074. genPal(IMB_FUNC)
  1075. genPal(GENTRAP_FUNC)
  1076. genPal(RDTEB_FUNC)
  1077. genPal(KBPT_FUNC)
  1078. genPal(CALLKD_FUNC)
  1079. #if defined(_AXP64_)
  1080. genPal(RDTEB64_FUNC)
  1081. #endif
  1082. // Privileged Call Pals
  1083. genPal(HALT_FUNC)
  1084. genPal(RESTART_FUNC)
  1085. genPal(DRAINA_FUNC)
  1086. genPal(REBOOT_FUNC)
  1087. genPal(INITPAL_FUNC)
  1088. genPal(WRENTRY_FUNC)
  1089. genPal(SWPIRQL_FUNC)
  1090. genPal(RDIRQL_FUNC)
  1091. genPal(DI_FUNC)
  1092. genPal(EI_FUNC)
  1093. genPal(SWPPAL_FUNC)
  1094. genPal(SSIR_FUNC)
  1095. genPal(CSIR_FUNC)
  1096. genPal(RFE_FUNC)
  1097. genPal(RETSYS_FUNC)
  1098. genPal(SWPCTX_FUNC)
  1099. genPal(SWPPROCESS_FUNC)
  1100. genPal(RDMCES_FUNC)
  1101. genPal(WRMCES_FUNC)
  1102. genPal(TBIA_FUNC)
  1103. genPal(TBIS_FUNC)
  1104. genPal(TBISASN_FUNC)
  1105. genPal(DTBIS_FUNC)
  1106. genPal(RDKSP_FUNC)
  1107. genPal(SWPKSP_FUNC)
  1108. genPal(RDPSR_FUNC)
  1109. genPal(RDPCR_FUNC)
  1110. genPal(RDTHREAD_FUNC)
  1111. genPal(TBIM_FUNC)
  1112. genPal(TBIMASN_FUNC)
  1113. genPal(TBIM64_FUNC)
  1114. genPal(TBIS64_FUNC)
  1115. genPal(EALNFIX_FUNC)
  1116. genPal(DALNFIX_FUNC)
  1117. genPal(RDCOUNTERS_FUNC)
  1118. genPal(RDSTATE_FUNC)
  1119. genPal(WRPERFMON_FUNC)
  1120. genPal(CP_SLEEP_FUNC)
  1121. // 21064 (EV4) - specific functions
  1122. genPal(INITPCR_FUNC)
  1123. genSpc()
  1124. genTxt("// end callpal\n")
  1125. genSpc()
  1126. //
  1127. // Define Bios Argument structure definitions.
  1128. //
  1129. genCom("Bios Argument Structure Definitions")
  1130. genDef(Ba, X86_BIOS_ARGUMENTS, Eax)
  1131. genDef(Ba, X86_BIOS_ARGUMENTS, Ebx)
  1132. genDef(Ba, X86_BIOS_ARGUMENTS, Ecx)
  1133. genDef(Ba, X86_BIOS_ARGUMENTS, Edx)
  1134. genDef(Ba, X86_BIOS_ARGUMENTS, Esi)
  1135. genDef(Ba, X86_BIOS_ARGUMENTS, Edi)
  1136. genDef(Ba, X86_BIOS_ARGUMENTS, Ebp)
  1137. genVal(BiosArgumentLength, sizeof(X86_BIOS_ARGUMENTS))
  1138. genCom("Define Vendor Callback Read/Write Error Frame Operation Types")
  1139. genVal(ReadFrame, ReadFrame)
  1140. genVal(WriteFrame, WriteFrame)
  1141. genCom("Define Vendor Callback Vector Base Address")
  1142. genValUint(SYSTEM_VECTOR_BASE,
  1143. (ULONG_PTR)SYSTEM_BLOCK + OFFSET(SYSTEM_PARAMETER_BLOCK, VendorVector))
  1144. genCom("Define Vendor Callback Offsets")
  1145. genVal(VnCallBiosRoutine, CallBiosRoutine * 4)
  1146. genVal(VnReadWriteErrorFrameRoutine, ReadWriteErrorFrameRoutine * 4)
  1147. genVal(VnVideoDisplayInitializeRoutine, VideoDisplayInitializeRoutine * 4)
  1148. genCom("Define Firmware Callback Vector Base Address")
  1149. genValUint(FIRMWARE_VECTOR_BASE,
  1150. (ULONG_PTR)SYSTEM_BLOCK + OFFSET(SYSTEM_PARAMETER_BLOCK, FirmwareVector))
  1151. genCom("Define Firmware Callback Offsets")
  1152. genVal(FwGetEnvironmentRoutine, GetEnvironmentRoutine * 4)
  1153. genVal(FwSetEnvironmentRoutine, SetEnvironmentRoutine * 4)
  1154. //
  1155. // Close out conditional statement.
  1156. //
  1157. EnableInc(KSALPHA | HALALPHA)
  1158. END_LIST
  1159. };