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.

94 lines
2.7 KiB

  1. /*++
  2. Copyright (c) 1998 Microsoft Corporation
  3. Module Name:
  4. acpimsft
  5. Abstract:
  6. This module controls all of the Microsoft specific (ie: not exported to
  7. anyone outside the company) structures, IOCTLS, and Defines.
  8. This file is included after acpiioct.h
  9. Author:
  10. Environment:
  11. NT Kernel Model Driver only
  12. --*/
  13. #ifndef _ACPIMSFT_H_
  14. #define _ACPIMSFT_H_
  15. #ifndef _ACPIIOCT_H_
  16. #error Need to include ACPIIOCT.H before ACPIMSFT.H
  17. #endif
  18. //
  19. // IRP_MJ_INTERNAL_DEVICE_CONTROL CODES
  20. //
  21. #define IOCTL_ACPI_REGISTER_OPREGION_HANDLER CTL_CODE(FILE_DEVICE_ACPI, 0x2, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
  22. #define IOCTL_ACPI_UNREGISTER_OPREGION_HANDLER CTL_CODE(FILE_DEVICE_ACPI, 0x3, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
  23. //
  24. // Make sure that we define the right calling convention
  25. //
  26. #ifdef EXPORT
  27. #undef EXPORT
  28. #endif
  29. #define EXPORT __cdecl
  30. //
  31. // Data structures used for IOCTL_ACPI_REGISTER_OPREGION
  32. // IOCTL_ACPI_UNREGISTER_OPREGION
  33. //
  34. typedef NTSTATUS (EXPORT *PACPI_OPREGION_HANDLER)();
  35. typedef VOID (EXPORT *PACPI_OPREGION_CALLBACK)();
  36. typedef struct _ACPI_REGISTER_OPREGION_HANDLER_BUFFER {
  37. ULONG Signature;
  38. ULONG AccessType;
  39. ULONG RegionSpace;
  40. PACPI_OPREGION_HANDLER Handler;
  41. PVOID Context;
  42. } ACPI_REGISTER_OPREGION_HANDLER_BUFFER, *PACPI_REGISTER_OPREGION_HANDLER_BUFFER;
  43. typedef struct _ACPI_UNREGISTER_OPREGION_HANDLER_BUFFER {
  44. ULONG Signature;
  45. PVOID OperationRegionObject;
  46. } ACPI_UNREGISTER_OPREGION_HANDLER_BUFFER,*PACPI_UNREGISTER_OPREGION_HANDLER_BUFFER;
  47. //
  48. // Signatures for Register, Unregister of OpRegions
  49. //
  50. #define ACPI_REGISTER_OPREGION_HANDLER_BUFFER_SIGNATURE 'HorA'
  51. #define ACPI_UNREGISTER_OPREGION_HANDLER_BUFFER_SIGNATURE 'HouA'
  52. //
  53. // Access types for OpRegions
  54. //
  55. #define ACPI_OPREGION_ACCESS_AS_RAW 0x1
  56. #define ACPI_OPREGION_ACCESS_AS_COOKED 0x2
  57. //
  58. // Allowable region spaces
  59. //
  60. #define ACPI_OPREGION_REGION_SPACE_MEMORY 0x0
  61. #define ACPI_OPREGION_REGION_SPACE_IO 0x1
  62. #define ACPI_OPREGION_REGION_SPACE_PCI_CONFIG 0x2
  63. #define ACPI_OPREGION_REGION_SPACE_EC 0x3
  64. #define ACPI_OPREGION_REGION_SPACE_SMB 0x4
  65. #define ACPI_OPREGION_REGION_SPACE_CMOS_CONFIG 0x5
  66. #define ACPI_OPREGION_REGION_SPACE_PCIBARTARGET 0x6
  67. //
  68. // Operation to perform on region
  69. //
  70. #define ACPI_OPREGION_READ 0x0
  71. #define ACPI_OPREGION_WRITE 0x1
  72. #endif