eficontext.h 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208
  1. /*
  2. * Copyright (c) 1999, 2000
  3. * Intel Corporation.
  4. * All rights reserved.
  5. *
  6. * Redistribution and use in source and binary forms, with or without
  7. * modification, are permitted provided that the following conditions
  8. * are met:
  9. *
  10. * 1. Redistributions of source code must retain the above copyright
  11. * notice, this list of conditions and the following disclaimer.
  12. *
  13. * 2. Redistributions in binary form must reproduce the above copyright
  14. * notice, this list of conditions and the following disclaimer in the
  15. * documentation and/or other materials provided with the distribution.
  16. *
  17. * 3. All advertising materials mentioning features or use of this software
  18. * must display the following acknowledgement:
  19. *
  20. * This product includes software developed by Intel Corporation and
  21. * its contributors.
  22. *
  23. * 4. Neither the name of Intel Corporation or its contributors may be
  24. * used to endorse or promote products derived from this software
  25. * without specific prior written permission.
  26. *
  27. * THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION AND CONTRIBUTORS ``AS IS''
  28. * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  29. * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  30. * ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION OR CONTRIBUTORS BE
  31. * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
  32. * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
  33. * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
  34. * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
  35. * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
  36. * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
  37. * THE POSSIBILITY OF SUCH DAMAGE.
  38. *
  39. */
  40. #ifndef _EFICONTEXT_H_
  41. #define _EFICONTEXT_H_
  42. //
  43. // IA-64 processor exception types
  44. //
  45. #define EXCPT_ALT_DTLB 4
  46. #define EXCPT_DNESTED_TLB 5
  47. #define EXCPT_BREAKPOINT 11
  48. #define EXCPT_EXTERNAL_INTERRUPT 12
  49. #define EXCPT_GEN_EXCEPT 24
  50. #define EXCPT_NAT_CONSUMPTION 26
  51. #define EXCPT_DEBUG_EXCEPT 29
  52. #define EXCPT_UNALIGNED_ACCESS 30
  53. #define EXCPT_FP_FAULT 32
  54. #define EXCPT_FP_TRAP 33
  55. #define EXCPT_TAKEN_BRANCH 35
  56. #define EXCPT_SINGLE_STEP 36
  57. //
  58. // IA-64 processor context definition - must be 512 byte aligned!!!
  59. //
  60. typedef
  61. struct {
  62. UINT64 reserved; // necessary to preserve alignment for the correct bits in UNAT and to insure F2 is 16 byte aligned...
  63. UINT64 r1;
  64. UINT64 r2;
  65. UINT64 r3;
  66. UINT64 r4;
  67. UINT64 r5;
  68. UINT64 r6;
  69. UINT64 r7;
  70. UINT64 r8;
  71. UINT64 r9;
  72. UINT64 r10;
  73. UINT64 r11;
  74. UINT64 r12;
  75. UINT64 r13;
  76. UINT64 r14;
  77. UINT64 r15;
  78. UINT64 r16;
  79. UINT64 r17;
  80. UINT64 r18;
  81. UINT64 r19;
  82. UINT64 r20;
  83. UINT64 r21;
  84. UINT64 r22;
  85. UINT64 r23;
  86. UINT64 r24;
  87. UINT64 r25;
  88. UINT64 r26;
  89. UINT64 r27;
  90. UINT64 r28;
  91. UINT64 r29;
  92. UINT64 r30;
  93. UINT64 r31;
  94. UINT64 f2[2];
  95. UINT64 f3[2];
  96. UINT64 f4[2];
  97. UINT64 f5[2];
  98. UINT64 f6[2];
  99. UINT64 f7[2];
  100. UINT64 f8[2];
  101. UINT64 f9[2];
  102. UINT64 f10[2];
  103. UINT64 f11[2];
  104. UINT64 f12[2];
  105. UINT64 f13[2];
  106. UINT64 f14[2];
  107. UINT64 f15[2];
  108. UINT64 f16[2];
  109. UINT64 f17[2];
  110. UINT64 f18[2];
  111. UINT64 f19[2];
  112. UINT64 f20[2];
  113. UINT64 f21[2];
  114. UINT64 f22[2];
  115. UINT64 f23[2];
  116. UINT64 f24[2];
  117. UINT64 f25[2];
  118. UINT64 f26[2];
  119. UINT64 f27[2];
  120. UINT64 f28[2];
  121. UINT64 f29[2];
  122. UINT64 f30[2];
  123. UINT64 f31[2];
  124. UINT64 pr;
  125. UINT64 b0;
  126. UINT64 b1;
  127. UINT64 b2;
  128. UINT64 b3;
  129. UINT64 b4;
  130. UINT64 b5;
  131. UINT64 b6;
  132. UINT64 b7;
  133. // application registers
  134. UINT64 ar_rsc;
  135. UINT64 ar_bsp;
  136. UINT64 ar_bspstore;
  137. UINT64 ar_rnat;
  138. UINT64 ar_fcr;
  139. UINT64 ar_eflag;
  140. UINT64 ar_csd;
  141. UINT64 ar_ssd;
  142. UINT64 ar_cflg;
  143. UINT64 ar_fsr;
  144. UINT64 ar_fir;
  145. UINT64 ar_fdr;
  146. UINT64 ar_ccv;
  147. UINT64 ar_unat;
  148. UINT64 ar_fpsr;
  149. UINT64 ar_pfs;
  150. UINT64 ar_lc;
  151. UINT64 ar_ec;
  152. // control registers
  153. UINT64 cr_dcr;
  154. UINT64 cr_itm;
  155. UINT64 cr_iva;
  156. UINT64 cr_pta;
  157. UINT64 cr_ipsr;
  158. UINT64 cr_isr;
  159. UINT64 cr_iip;
  160. UINT64 cr_ifa;
  161. UINT64 cr_itir;
  162. UINT64 cr_iipa;
  163. UINT64 cr_ifs;
  164. UINT64 cr_iim;
  165. UINT64 cr_iha;
  166. // debug registers
  167. UINT64 dbr0;
  168. UINT64 dbr1;
  169. UINT64 dbr2;
  170. UINT64 dbr3;
  171. UINT64 dbr4;
  172. UINT64 dbr5;
  173. UINT64 dbr6;
  174. UINT64 dbr7;
  175. UINT64 ibr0;
  176. UINT64 ibr1;
  177. UINT64 ibr2;
  178. UINT64 ibr3;
  179. UINT64 ibr4;
  180. UINT64 ibr5;
  181. UINT64 ibr6;
  182. UINT64 ibr7;
  183. // virtual registers
  184. UINT64 int_nat; // nat bits for R1-R31
  185. } SYSTEM_CONTEXT;
  186. #endif /* _EFI_CONTEXT_H_ */