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.

136 lines
2.8 KiB

  1. /*++
  2. Copyright (c) 1995 Microsoft Corporation
  3. Module Name:
  4. wx86cpu.h
  5. Abstract:
  6. Defines the functions exported from the CPU DLL.
  7. Author:
  8. 22-Aug-1995 BarryBo, Created
  9. Revision History:
  10. --*/
  11. #ifndef _WX86CPU_
  12. #define _WX86CPU_
  13. #if !defined(_WX86CPUAPI_)
  14. #define WX86CPUAPI DECLSPEC_IMPORT
  15. #else
  16. #define WX86CPUAPI
  17. #endif
  18. #ifdef __cplusplus
  19. extern "C" {
  20. #endif
  21. #define WX86CPU_UNSIMULATE STATUS_WX86_UNSIMULATE
  22. #define WX86CPU_CONTINUE STATUS_WX86_CONTINUE
  23. #define WX86CPU_SINGLE_STEP STATUS_WX86_SINGLE_STEP
  24. #define WX86CPU_BREAKPOINT STATUS_WX86_BREAKPOINT
  25. //
  26. // Values used by the wx86e debugger extension to determine the CPU type
  27. //
  28. typedef enum _Wx86CpuType {
  29. Wx86CpuUnknown,
  30. Wx86CpuCcpu386,
  31. Wx86CpuCcpu,
  32. Wx86CpuCpu,
  33. Wx86CpuFx32,
  34. Wx86CpuOther
  35. } WX86_CPUTYPE, *PWX86_CPUTYPE;
  36. typedef struct Wx86CpuHint {
  37. DWORD Hint;
  38. DWORD_PTR Hint2;
  39. } WX86_CPUHINT, *PWX86_CPUHINT;
  40. #if !defined(__WOW64_WRAPPER__)
  41. //
  42. // Initialization and Termination routines
  43. //
  44. WX86CPUAPI BOOL CpuProcessTerm(BOOL OFlyInit);
  45. //
  46. // Cache manipulation functions
  47. //
  48. WX86CPUAPI VOID CpuFlushInstructionCache(PVOID BaseAddress, DWORD Length);
  49. //WX86CPUAPI BOOLEAN CpuMapNotify(PVOID DllBase, BOOLEAN Mapped); moved down
  50. WX86CPUAPI VOID CpuEnterIdle(BOOL fOFly);
  51. //
  52. // CPU feature set information
  53. //
  54. WX86CPUAPI BOOL CpuIsProcessorFeaturePresent(DWORD ProcessorFeature);
  55. //
  56. // Public Functions to get and set individual registers
  57. // are defined in Wx86.h
  58. //
  59. //
  60. // Functions for exception handling
  61. //
  62. WX86CPUAPI VOID MsCpuResetToConsistentState(PEXCEPTION_POINTERS pExecptionPointers);
  63. WX86CPUAPI VOID CpuPrepareToContinue(PEXCEPTION_POINTERS pExecptionPointers);
  64. //
  65. // Functions for process/thread manipulation
  66. //
  67. WX86CPUAPI VOID CpuStallExecutionInThisProcess(VOID);
  68. WX86CPUAPI VOID CpuResumeExecutionInThisProcess(VOID);
  69. WX86CPUAPI DWORD CpuGetThreadContext(HANDLE hThread, PVOID CpuContext, PCONTEXT_WX86 Context);
  70. WX86CPUAPI DWORD CpuSetThreadContext(HANDLE hThread, PVOID CpuContext, PCONTEXT_WX86 Context);
  71. #endif //__WOW64_WRAPPER__
  72. WX86CPUAPI BOOLEAN CpuMapNotify(PVOID DllBase, BOOLEAN Mapped);
  73. WX86CPUAPI NTSTATUS MsCpuProcessInit(VOID);
  74. WX86CPUAPI BOOL MsCpuThreadInit(VOID);
  75. WX86CPUAPI VOID MsCpuSimulate(PWX86_CPUHINT);
  76. WX86CPUAPI
  77. NTSTATUS
  78. MsCpuSetContext(
  79. PCONTEXT_WX86 Context);
  80. NTSTATUS
  81. MsCpuSetContextThread(
  82. IN HANDLE ProcessHandle,
  83. IN PTEB Teb,
  84. IN OUT PCONTEXT_WX86 Context);
  85. WX86CPUAPI
  86. NTSTATUS
  87. MsCpuGetContext(
  88. IN OUT PCONTEXT_WX86 Context);
  89. WX86CPUAPI
  90. NTSTATUS
  91. MsCpuGetContextThread(
  92. IN HANDLE ProcessHandle,
  93. IN PTEB Teb,
  94. IN OUT PCONTEXT_WX86 Context);
  95. #ifdef __cplusplus
  96. } // extern "C"
  97. #endif
  98. #endif //_WX86CPU_