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.

106 lines
2.1 KiB

  1. /*++
  2. Copyright (C) 1997-99 Microsoft Corporation
  3. Module Name:
  4. crashdmp.h
  5. Abstract:
  6. --*/
  7. #if !defined (___crashdmp_h___)
  8. #define ___crashdmp_h___
  9. #include <idedump.h>
  10. typedef
  11. VOID
  12. (*PSTALL_ROUTINE) (
  13. IN ULONG Delay
  14. );
  15. typedef struct _CRASHDUMP_INIT_DATA {
  16. ULONG CheckSum;
  17. UCHAR PathId;
  18. UCHAR TargetId;
  19. UCHAR Lun;
  20. PHW_DEVICE_EXTENSION LiveHwDeviceExtension;
  21. } CRASHDUMP_INIT_DATA, *PCRASHDUMP_INIT_DATA;
  22. typedef struct _CRASHDUMP_DATA {
  23. PCRASHDUMP_INIT_DATA CrashInitData;
  24. ULONG BytesPerSector;
  25. LARGE_INTEGER PartitionOffset;
  26. PSTALL_ROUTINE StallRoutine;
  27. SCSI_REQUEST_BLOCK Srb;
  28. HW_DEVICE_EXTENSION HwDeviceExtension;
  29. ULONG MaxBlockSize;
  30. } CRASHDUMP_DATA, *PCRASHDUMP_DATA;
  31. ULONG
  32. AtapiCrashDumpDriverEntry (
  33. PVOID Context
  34. );
  35. //
  36. // crash dump privates
  37. //
  38. BOOLEAN
  39. AtapiCrashDumpOpen (
  40. IN LARGE_INTEGER PartitionOffset
  41. );
  42. NTSTATUS
  43. AtapiCrashDumpIdeWrite (
  44. IN PLARGE_INTEGER DiskByteOffset,
  45. IN PMDL Mdl
  46. );
  47. VOID
  48. AtapiCrashDumpFinish (
  49. VOID
  50. );
  51. NTSTATUS
  52. AtapiCrashDumpIdeWritePio (
  53. IN PSCSI_REQUEST_BLOCK Srb
  54. );
  55. NTSTATUS
  56. AtapiDumpCallback(
  57. IN PKBUGCHECK_DATA BugcheckData,
  58. IN PVOID BugcheckBuffer,
  59. IN ULONG BugcheckBufferLength,
  60. IN PULONG BugcheckBufferUsed
  61. );
  62. //
  63. // Validate that the duplicate definitions in IDEDUMP.H are the same as
  64. // the ATAPI ones are.
  65. //
  66. C_ASSERT (sizeof (COMMAND_LOG) == sizeof (ATAPI_DUMP_COMMAND_LOG));
  67. C_ASSERT (sizeof (ATAPI_DUMP_BMSTATUS) == sizeof (BMSTATUS));
  68. C_ASSERT (ATAPI_DUMP_COMMAND_LOG_COUNT == MAX_COMMAND_LOG_ENTRIES);
  69. C_ASSERT (ATAPI_DUMP_BMSTATUS_NO_ERROR == BMSTATUS_NO_ERROR);
  70. C_ASSERT (ATAPI_DUMP_BMSTATUS_NOT_REACH_END_OF_TRANSFER == BMSTATUS_NOT_REACH_END_OF_TRANSFER);
  71. C_ASSERT (ATAPI_DUMP_BMSTATUS_ERROR_TRANSFER == BMSTATUS_ERROR_TRANSFER);
  72. C_ASSERT (ATAPI_DUMP_BMSTATUS_INTERRUPT == BMSTATUS_INTERRUPT);
  73. #endif // ___crashdmp_h___