Leaked source code of windows server 2003
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.

220 lines
4.2 KiB

  1. /*++
  2. Copyright (c) 1990 Microsoft Corporation
  3. Module Name:
  4. Monitorp.h
  5. Abstract:
  6. This contains the function prototypes, constants, and types for
  7. the monitor.
  8. Author:
  9. Dave Hastings (daveh) 16 Mar 1991
  10. Revision History:
  11. --*/
  12. #include <nt.h>
  13. #include <ntrtl.h>
  14. #include <nturtl.h>
  15. #include <windows.h>
  16. #include <vdm.h>
  17. #include <vint.h>
  18. #include "bop.h"
  19. #include "softpc.h"
  20. //bugbug
  21. typedef unsigned int UINT;
  22. #include <nt_mon.h> // for softpc base definitions
  23. #include <nt_reset.h>
  24. #include <monregs.h>
  25. //extern VDM_TIB VdmTib;
  26. #define EFLAGS_INTERRUPT_MASK 0x00000200L
  27. #define EFLAGS_V86_MASK 0x00020000L
  28. #define VDM_BASE_ADDRESS 0x00000001L
  29. #define RPL_MASK 3
  30. // Types borrowed from windef.h
  31. typedef unsigned char BYTE;
  32. // Memory type record
  33. typedef struct _Memory_Type {
  34. struct _Memory_Type *Previous;
  35. struct _Memory_Type *Next;
  36. ULONG Start;
  37. ULONG End;
  38. half_word Type;
  39. } MEMTYPE, *PMEMTYPE;
  40. // private flags
  41. #define VDM_IDLE 0x00000001L
  42. // external data
  43. extern ULONG VdmFlags;
  44. extern ULONG VdmSize;
  45. extern LDT_ENTRY *Ldt;
  46. extern ULONG IntelBase; // base memory address
  47. extern ULONG VdmDebugLevel; // used to control debugging
  48. extern ULONG VdmSize; // Size of memory in VDM
  49. extern PVOID CurrentMonitorTeb; // thread that is currently executing instructions.
  50. extern BOOLEAN IRQ13BeingHandled; // true until IRQ13 eoi'ed
  51. extern CONTEXT InitialContext; // Initial floating point context for all threads
  52. extern BOOLEAN DebugContextActive;
  53. #define MAX_BOP 256
  54. VOID reset(VOID);
  55. VOID dummy_int(VOID);
  56. VOID unexpected_int(VOID);
  57. VOID illegal_bop(VOID);
  58. VOID illegal_op_int(VOID);
  59. VOID print_screen(VOID);
  60. VOID time_int(VOID);
  61. VOID keyboard_int(VOID);
  62. VOID diskette_int(VOID);
  63. VOID video_io(VOID);
  64. VOID equipment(VOID);
  65. VOID memory_size(VOID);
  66. VOID disk_io(VOID);
  67. VOID rs232_io(VOID);
  68. VOID cassette_io(VOID);
  69. VOID keyboard_io(VOID);
  70. VOID printer_io(VOID);
  71. VOID rom_basic(VOID);
  72. VOID bootstrap(VOID);
  73. VOID time_of_day(VOID);
  74. VOID critical_region(VOID);
  75. VOID cmd_install(VOID);
  76. VOID cmd_load(VOID);
  77. VOID redirector(VOID);
  78. VOID ega_video_io(VOID);
  79. VOID MsBop0(VOID);
  80. VOID MsBop1(VOID);
  81. VOID MsBop2(VOID);
  82. VOID MsBop3(VOID);
  83. VOID MsBop4(VOID);
  84. VOID MsBop5(VOID);
  85. VOID MsBop6(VOID);
  86. VOID MsBop7(VOID);
  87. VOID MsBop8(VOID);
  88. VOID MsBop9(VOID);
  89. VOID MsBopA(VOID);
  90. VOID MsBopB(VOID);
  91. VOID MsBopC(VOID);
  92. VOID MsBopD(VOID);
  93. VOID MsBopE(VOID);
  94. VOID MsBopF(VOID);
  95. VOID emm_init(VOID);
  96. VOID emm_io(VOID);
  97. VOID return_from_call(VOID);
  98. VOID rtc_int(VOID);
  99. VOID re_direct(VOID);
  100. VOID D11_int(VOID);
  101. VOID int_287(VOID);
  102. VOID worm_init(VOID);
  103. VOID worm_io(VOID);
  104. VOID ps_private_1(VOID);
  105. VOID ps_private_2(VOID);
  106. VOID ps_private_3(VOID);
  107. VOID ps_private_4(VOID);
  108. VOID ps_private_5(VOID);
  109. VOID ps_private_6(VOID);
  110. VOID ps_private_7(VOID);
  111. VOID ps_private_8(VOID);
  112. VOID ps_private_9(VOID);
  113. VOID ps_private_10(VOID);
  114. VOID ps_private_11(VOID);
  115. VOID ps_private_12(VOID);
  116. VOID ps_private_13(VOID);
  117. VOID ps_private_14(VOID);
  118. VOID ps_private_15(VOID);
  119. VOID bootstrap1(VOID);
  120. VOID bootstrap2(VOID);
  121. VOID bootstrap3(VOID);
  122. VOID ms_windows(VOID);
  123. VOID msw_mouse(VOID);
  124. VOID mouse_install1(VOID);
  125. VOID mouse_install2(VOID);
  126. VOID mouse_int1(VOID);
  127. VOID mouse_int2(VOID);
  128. VOID mouse_io_language(VOID);
  129. VOID mouse_io_interrupt(VOID);
  130. VOID mouse_video_io(VOID);
  131. VOID switch_to_real_mode(VOID);
  132. VOID control_bop(VOID);
  133. VOID diskette_io(VOID);
  134. VOID host_unsimulate(VOID);
  135. VOID DispatchPageFault (ULONG,ULONG);
  136. NTSTATUS
  137. FastEnterPm(
  138. );
  139. VOID
  140. DispatchInterrupts(
  141. VOID
  142. );
  143. VOID
  144. DispatchHwInterrupt(
  145. );
  146. ULONG
  147. GetInterruptHandler(
  148. ULONG InterruptNumber,
  149. BOOLEAN ProtectedMode
  150. );
  151. PVOID
  152. GetInterruptStack(
  153. ULONG InterruptNumber,
  154. PUSHORT StackSelector,
  155. PUSHORT StackPointer,
  156. BOOLEAN ProtectedMode
  157. );
  158. VOID
  159. CpuOnetimeInit(
  160. VOID
  161. );
  162. VOID
  163. CpuOnetimeTerm(
  164. VOID
  165. );
  166. VOID
  167. cpu_createthread();
  168. VOID
  169. cpu_exitthread();
  170. HANDLE
  171. ThreadLookUp(
  172. PVOID
  173. );
  174. VOID
  175. cpu_exit();
  176. VOID
  177. InterruptInit(
  178. VOID
  179. );
  180. VOID
  181. InterruptTerminate(
  182. VOID
  183. );