regacces.h 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185
  1. /*++
  2. Copyright (c) 2012 Minoca Corp. All Rights Reserved
  3. Module Name:
  4. regacces.h
  5. Abstract:
  6. This header contains definitions for basic hardware register access.
  7. Author:
  8. Evan Green 28-Oct-2012
  9. --*/
  10. //
  11. // ------------------------------------------------------------------- Includes
  12. //
  13. //
  14. // ---------------------------------------------------------------- Definitions
  15. //
  16. //
  17. // ------------------------------------------------------ Data Type Definitions
  18. //
  19. //
  20. // -------------------------------------------------------------------- Globals
  21. //
  22. //
  23. // -------------------------------------------------------- Function Prototypes
  24. //
  25. KERNEL_API
  26. ULONG
  27. HlReadRegister32 (
  28. PVOID RegisterAddress
  29. );
  30. /*++
  31. Routine Description:
  32. This routine performs a 32-bit memory register read. The given address
  33. is assumed to be mapped with an uncached attribute.
  34. Arguments:
  35. RegisterAddress - Supplies the virtual address of the register to read.
  36. Return Value:
  37. Returns the value at the given register.
  38. --*/
  39. KERNEL_API
  40. VOID
  41. HlWriteRegister32 (
  42. PVOID RegisterAddress,
  43. ULONG Value
  44. );
  45. /*++
  46. Routine Description:
  47. This routine performs a 32-bit memory register write. The given address
  48. is assumed to be mapped with an uncached attribute.
  49. Arguments:
  50. RegisterAddress - Supplies the virtual address of the register to write to.
  51. Value - Supplies the value to write.
  52. Return Value:
  53. None.
  54. --*/
  55. KERNEL_API
  56. USHORT
  57. HlReadRegister16 (
  58. PVOID RegisterAddress
  59. );
  60. /*++
  61. Routine Description:
  62. This routine performs a 16-bit memory register read. The given address
  63. is assumed to be mapped with an uncached attribute.
  64. Arguments:
  65. RegisterAddress - Supplies the virtual address of the register to read.
  66. Return Value:
  67. Returns the value at the given register.
  68. --*/
  69. KERNEL_API
  70. VOID
  71. HlWriteRegister16 (
  72. PVOID RegisterAddress,
  73. USHORT Value
  74. );
  75. /*++
  76. Routine Description:
  77. This routine performs a 16-bit memory register write. The given address
  78. is assumed to be mapped with an uncached attribute.
  79. Arguments:
  80. RegisterAddress - Supplies the virtual address of the register to write to.
  81. Value - Supplies the value to write.
  82. Return Value:
  83. None.
  84. --*/
  85. KERNEL_API
  86. UCHAR
  87. HlReadRegister8 (
  88. PVOID RegisterAddress
  89. );
  90. /*++
  91. Routine Description:
  92. This routine performs an 8-bit memory register read. The given address
  93. is assumed to be mapped with an uncached attribute.
  94. Arguments:
  95. RegisterAddress - Supplies the virtual address of the register to read.
  96. Return Value:
  97. Returns the value at the given register.
  98. --*/
  99. KERNEL_API
  100. VOID
  101. HlWriteRegister8 (
  102. PVOID RegisterAddress,
  103. UCHAR Value
  104. );
  105. /*++
  106. Routine Description:
  107. This routine performs an 8-bit memory register write. The given address
  108. is assumed to be mapped with an uncached attribute.
  109. Arguments:
  110. RegisterAddress - Supplies the virtual address of the register to write to.
  111. Value - Supplies the value to write.
  112. Return Value:
  113. None.
  114. --*/