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.

113 lines
2.4 KiB

  1. /*++
  2. Copyright (c) Microsoft Corporation. All rights reserved.
  3. Module Name:
  4. oprghdlr.h
  5. Abstract:
  6. This header file contains the shared structures for the ACPI op region
  7. registration DLL.
  8. Author:
  9. Vincent Geglia 09-Feb-2000
  10. Environment:
  11. Kernel mode
  12. Notes:
  13. Revision History:
  14. --*/
  15. #include "wdm.h"
  16. //
  17. // Make sure that we define the right calling convention
  18. //
  19. #ifdef EXPORT
  20. #undef EXPORT
  21. #endif
  22. #define EXPORT __cdecl
  23. //
  24. // Op region handler and callback function prototypes
  25. //
  26. typedef VOID (EXPORT *PACPI_OP_REGION_CALLBACK)();
  27. typedef
  28. NTSTATUS
  29. (EXPORT *PACPI_OP_REGION_HANDLER) (
  30. ULONG AccessType,
  31. PVOID OperationRegionObject,
  32. ULONG Address,
  33. ULONG Size,
  34. PULONG Data,
  35. ULONG_PTR Context,
  36. PACPI_OP_REGION_CALLBACK CompletionHandler,
  37. PVOID CompletionContext
  38. );
  39. //
  40. // Exposed function prototypes
  41. //
  42. NTSTATUS
  43. RegisterOpRegionHandler (
  44. IN PDEVICE_OBJECT DeviceObject,
  45. IN ULONG AccessType,
  46. IN ULONG RegionSpace,
  47. IN PACPI_OP_REGION_HANDLER Handler,
  48. IN PVOID Context,
  49. IN ULONG Flags,
  50. IN OUT PVOID *OperationRegionObject
  51. );
  52. NTSTATUS
  53. DeRegisterOpRegionHandler (
  54. IN PDEVICE_OBJECT DeviceObject,
  55. IN PVOID OperationRegionObject
  56. );
  57. //
  58. // Exposed definitions
  59. //
  60. //
  61. // Access types for OpRegions
  62. //
  63. #define ACPI_OPREGION_ACCESS_AS_RAW 0x1
  64. #define ACPI_OPREGION_ACCESS_AS_COOKED 0x2
  65. //
  66. // Allowable region spaces
  67. //
  68. #define ACPI_OPREGION_REGION_SPACE_MEMORY 0x0
  69. #define ACPI_OPREGION_REGION_SPACE_IO 0x1
  70. #define ACPI_OPREGION_REGION_SPACE_PCI_CONFIG 0x2
  71. #define ACPI_OPREGION_REGION_SPACE_EC 0x3
  72. #define ACPI_OPREGION_REGION_SPACE_SMB 0x4
  73. #define ACPI_OPREGION_REGION_SPACE_CMOS_CONFIG 0x5
  74. #define ACPI_OPREGION_REGION_SPACE_PCIBARTARGET 0x6
  75. //
  76. // Operation to perform on region
  77. //
  78. #define ACPI_OPREGION_READ 0x0
  79. #define ACPI_OPREGION_WRITE 0x1
  80. //
  81. // Flag definitions for op region registration
  82. //
  83. #define ACPI_OPREGION_ACCESS_AT_HIGH_LEVEL 0x1 // Indicates the handler function can be called at HIGH_LEVEL IRQL