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.

327 lines
3.2 KiB

  1. /*++
  2. Copyright (c) 2000 Microsoft Corporation
  3. Module Name:
  4. asmstub.c
  5. Abstract:
  6. This temporary module simply provides stub implementations of routines
  7. that are found in hal .asm files or for routines that are ultimately
  8. expected to be imported from the kernel.
  9. It exists only as a test file, and will no longer be necessary when
  10. an AMD64 compiler, linker etc. are available.
  11. --*/
  12. #include "halcmn.h"
  13. //
  14. // Things in the hal in .asm files
  15. //
  16. VOID HalProcessorIdle(VOID) { }
  17. ULONG
  18. HalpGetProcessorFlags(VOID) {
  19. return 0;
  20. }
  21. VOID
  22. HalpGenerateAPCInterrupt(VOID) {}
  23. VOID
  24. HalpGenerateDPCInterrupt(VOID) {}
  25. VOID
  26. HalpGenerateUnexpectedInterrupt(VOID) {}
  27. VOID
  28. HalpIoDelay(VOID) {}
  29. ULONG
  30. HalpSetCr4Bits(ULONG BitMask){ return 0; }
  31. VOID
  32. HalpSerialize(VOID) {}
  33. VOID
  34. StartPx_PMStub(VOID) {}
  35. VOID
  36. HalpHalt (
  37. VOID
  38. )
  39. {
  40. }
  41. //
  42. // Things that will ultimately end up in the kernel
  43. //
  44. BOOLEAN
  45. KiIpiServiceRoutine (
  46. IN struct _KTRAP_FRAME *TrapFrame,
  47. IN struct _KEXCEPTION_FRAME *ExceptionFrame
  48. )
  49. {
  50. return FALSE;
  51. }
  52. ULONG __imp_KeSetProfileIrql;
  53. //
  54. // Things that will be compiler intrinsics
  55. //
  56. UCHAR
  57. __readgsbyte (
  58. IN ULONG Offset
  59. )
  60. {
  61. return 0;
  62. }
  63. USHORT
  64. __readgsword (
  65. IN ULONG Offset
  66. )
  67. {
  68. return 0;
  69. }
  70. ULONG
  71. __readgsdword (
  72. IN ULONG Offset
  73. )
  74. {
  75. return 0;
  76. }
  77. ULONG64
  78. __readgsqword (
  79. IN ULONG Offset
  80. )
  81. {
  82. return 0;
  83. }
  84. ULONG64
  85. __rdtsc (
  86. VOID
  87. )
  88. {
  89. return 0;
  90. }
  91. VOID
  92. __writegsbyte (
  93. IN ULONG Offset,
  94. IN UCHAR Data
  95. )
  96. {
  97. }
  98. VOID
  99. __writegsword (
  100. IN ULONG Offset,
  101. IN USHORT Data
  102. )
  103. {
  104. }
  105. VOID
  106. __writegsdword (
  107. IN ULONG Offset,
  108. IN ULONG Data
  109. )
  110. {
  111. }
  112. VOID
  113. __writegsqword (
  114. IN ULONG Offset,
  115. IN ULONG64 Data
  116. )
  117. {
  118. }
  119. BOOLEAN
  120. KeTryToAcquireSpinLockAtDpcLevel (
  121. IN PKSPIN_LOCK SpinLock
  122. )
  123. {
  124. return FALSE;
  125. }
  126. BOOLEAN
  127. KeTestSpinLock (
  128. IN PKSPIN_LOCK SpinLock
  129. )
  130. {
  131. return FALSE;
  132. }
  133. ULONG64
  134. __readcr3 (
  135. VOID
  136. )
  137. { return 0; }
  138. VOID
  139. __writecr3 (
  140. ULONG64 Val
  141. )
  142. {}
  143. ULONG64
  144. __readcr4 (
  145. VOID
  146. )
  147. { return 0; }
  148. VOID
  149. __writecr4 (
  150. ULONG64 Val
  151. )
  152. {}
  153. ULONG64
  154. __readcr8 (
  155. VOID
  156. )
  157. { return 0; }
  158. VOID
  159. __writecr8 (
  160. IN ULONG64 Data
  161. )
  162. {}
  163. LONG64
  164. InterlockedOr64 (
  165. IN OUT LONG64 *Destination,
  166. IN LONG64 Value
  167. )
  168. {
  169. return 0;
  170. }
  171. LONG64
  172. InterlockedAnd64 (
  173. IN OUT LONG64 volatile *Destination,
  174. IN LONG64 Value
  175. )
  176. {
  177. return 0;
  178. }
  179. LONG
  180. InterlockedAnd (
  181. IN OUT LONG volatile *Destination,
  182. IN LONG Value
  183. )
  184. {
  185. return 0;
  186. }
  187. LONG
  188. InterlockedOr (
  189. IN OUT LONG *Destination,
  190. IN LONG Value
  191. )
  192. {
  193. return 0;
  194. }
  195. VOID
  196. __wrmsr (
  197. IN ULONG Msr,
  198. IN ULONG64 Value
  199. )
  200. {
  201. }
  202. ULONG64
  203. __rdmsr (
  204. IN ULONG Msr
  205. )
  206. {
  207. return 0;
  208. }
  209. VOID
  210. __wbinvd (
  211. VOID
  212. )
  213. {
  214. }
  215. VOID
  216. KiCpuId (
  217. IN ULONG Function,
  218. OUT PCPU_INFO CpuInfo
  219. )
  220. {
  221. }
  222. UCHAR
  223. __inbyte (
  224. IN USHORT Port
  225. )
  226. { return 0; }
  227. USHORT
  228. __inword (
  229. IN USHORT Port
  230. )
  231. { return 0; }
  232. ULONG
  233. __indword (
  234. IN USHORT Port
  235. )
  236. { return 0; }
  237. VOID
  238. __outbyte (
  239. IN USHORT Port,
  240. IN UCHAR Data
  241. )
  242. {}
  243. VOID
  244. __outword (
  245. IN USHORT Port,
  246. IN USHORT Data
  247. )
  248. {}
  249. VOID
  250. __outdword (
  251. IN USHORT Port,
  252. IN ULONG Data
  253. )
  254. {}