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.

80 lines
1.2 KiB

  1. /*++
  2. Copyright (c) 2001 Microsoft Corporation
  3. Module Name:
  4. cpup.h
  5. Abstract:
  6. This module contains the private common definitions shared between
  7. Microsoft CPUs.
  8. Author:
  9. Samer Arafeh (samera) 12-Dec-2001
  10. --*/
  11. #ifndef _CPUP_INCLUDE
  12. #define _CPUP_INCLUDE
  13. #ifdef __cplusplus
  14. extern "C" {
  15. #endif
  16. #if !defined RPL_MASK
  17. #define RPL_MASK 3
  18. #endif
  19. //
  20. // flags used by ia32ShowContext
  21. //
  22. #define LOG_CONTEXT_SYS 1
  23. #define LOG_CONTEXT_GETSET 2
  24. //
  25. // This is to prevent this library from linking to wow64 to use wow64!Wow64LogPrint
  26. //
  27. #if defined(LOGPRINT)
  28. #undef LOGPRINT
  29. #endif
  30. #define LOGPRINT(_x_) CpupDebugPrint _x_
  31. //
  32. // CPU declaration
  33. //
  34. #define DECLARE_CPU \
  35. PCPUCONTEXT cpu = (PCPUCONTEXT)Wow64TlsGetValue(WOW64_TLS_CPURESERVED)
  36. //
  37. // Sanitize x86 eflags
  38. //
  39. #define SANITIZE_X86EFLAGS(efl) ((efl & 0x003e0dd7L) | (0x202L))
  40. //
  41. // Common functions
  42. //
  43. VOID
  44. CpupDebugPrint(
  45. IN ULONG_PTR Flags,
  46. IN PCHAR Format,
  47. ...);
  48. VOID
  49. CpupPrintContext (
  50. IN PCHAR str,
  51. IN PCPUCONTEXT cpu
  52. );
  53. #ifdef __cplusplus
  54. }
  55. #endif
  56. #endif // _CPUP_INCLUDE