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.

177 lines
3.8 KiB

  1. /*++ BUILD Version: 0000 // Increment this if a change has global effects
  2. Copyright (c) 1994 Microsoft Corporation
  3. Module Name:
  4. x86new.h
  5. Abstract:
  6. This module contains the public header file that describes the
  7. HAL interfaces to the 386/486 BIOS emulation.
  8. Author:
  9. David N. Cutler (davec) 13-Nov-1994
  10. Revision History:
  11. --*/
  12. #ifndef _X86NEW_
  13. #define _X86NEW_
  14. //
  15. // PCI Bios function code defintitions.
  16. //
  17. // AH:
  18. //
  19. #define PCI_FUNCTION_ID 0xb1
  20. //
  21. // AL:
  22. //
  23. #define PCI_BIOS_PRESENT 0x01
  24. #define PCI_FIND_DEVICE 0x02
  25. #define PCI_FIND_CLASS_CODE 0x03
  26. #define PCI_GENERATE_CYCLE 0x06
  27. #define PCI_READ_CONFIG_BYTE 0x08
  28. #define PCI_READ_CONFIG_WORD 0x09
  29. #define PCI_READ_CONFIG_DWORD 0x0a
  30. #define PCI_WRITE_CONFIG_BYTE 0x0b
  31. #define PCI_WRITE_CONFIG_WORD 0x0c
  32. #define PCI_WRITE_CONFIG_DWORD 0x0d
  33. #define PCI_GET_IRQ_ROUTING 0x0e
  34. #define PCI_SET_IRQ 0x0f
  35. //
  36. // PCI Bios function return code values.
  37. //
  38. #define PCI_SUCCESS 0x00
  39. #define PCI_NOT_SUPPORTED 0x81
  40. #define PCI_BAD_VENDOR_ID 0x83
  41. #define PCI_DEVICE_NOT_FOUND 0x86
  42. #define PCI_BAD_REGISTER 0x87
  43. #define PCI_SET_FAILED 0x88
  44. #define PCI_BUFFER_TOO_SMALL 0x89
  45. //
  46. // Miscellaneous PCI codes.
  47. //
  48. #define PCI_CONFIG_MECHANISM_2 0x02
  49. #define PCI_ILLEGAL_VENDOR_ID 0xffff
  50. //
  51. // Define PCI get/set function type.
  52. //
  53. typedef
  54. ULONG
  55. (*PGETSETPCIBUSDATA)(
  56. IN ULONG BusNumber,
  57. IN ULONG SlotNumber,
  58. IN PVOID Buffer,
  59. IN ULONG Offset,
  60. IN ULONG Length
  61. );
  62. //
  63. // Define BIOS emulation interfaces.
  64. //
  65. VOID
  66. x86BiosInitializeBios (
  67. IN PVOID BiosIoSpace,
  68. IN PVOID BiosIoMemory
  69. );
  70. VOID
  71. x86BiosInitializeBiosEx (
  72. IN PVOID BiosIoSpace,
  73. IN PVOID BiosIoMemory,
  74. IN PVOID BiosFrameBuffer,
  75. IN PVOID BiosTransferMemory,
  76. IN ULONG TransferLength
  77. );
  78. VOID
  79. x86BiosInitializeBiosShadowed (
  80. IN PVOID BiosIoSpace,
  81. IN PVOID BiosIoMemory,
  82. IN PVOID BiosFrameBuffer
  83. );
  84. VOID
  85. x86BiosInitializeBiosShadowedPci (
  86. IN PVOID BiosIoSpace,
  87. IN PVOID BiosIoMemory,
  88. IN PVOID BiosFrameBuffer,
  89. IN UCHAR NumberPciBusses,
  90. IN PGETSETPCIBUSDATA GetPciData,
  91. IN PGETSETPCIBUSDATA SetPciData
  92. );
  93. XM_STATUS
  94. x86BiosExecuteInterrupt (
  95. IN UCHAR Number,
  96. IN OUT PXM86_CONTEXT Context,
  97. IN PVOID BiosIoSpace OPTIONAL,
  98. IN PVOID BiosIoMemory OPTIONAL
  99. );
  100. XM_STATUS
  101. x86BiosExecuteInterruptShadowed (
  102. IN UCHAR Number,
  103. IN OUT PXM86_CONTEXT Context,
  104. IN PVOID BiosIoSpace OPTIONAL,
  105. IN PVOID BiosIoMemory OPTIONAL,
  106. IN PVOID BiosFrameBuffer OPTIONAL
  107. );
  108. XM_STATUS
  109. x86BiosExecuteInterruptShadowedPci (
  110. IN UCHAR Number,
  111. IN OUT PXM86_CONTEXT Context,
  112. IN PVOID BiosIoSpace OPTIONAL,
  113. IN PVOID BiosIoMemory OPTIONAL,
  114. IN PVOID BiosFrameBuffer OPTIONAL,
  115. IN UCHAR NumberPciBusses,
  116. IN PGETSETPCIBUSDATA GetPciData,
  117. IN PGETSETPCIBUSDATA SetPciData
  118. );
  119. XM_STATUS
  120. x86BiosInitializeAdapter (
  121. IN ULONG Adapter,
  122. IN OUT PXM86_CONTEXT Context OPTIONAL,
  123. IN PVOID BiosIoSpace OPTIONAL,
  124. IN PVOID BiosIoMemory OPTIONAL
  125. );
  126. XM_STATUS
  127. x86BiosInitializeAdapterShadowed (
  128. IN ULONG Adapter,
  129. IN OUT PXM86_CONTEXT Context OPTIONAL,
  130. IN PVOID BiosIoSpace OPTIONAL,
  131. IN PVOID BiosIoMemory OPTIONAL,
  132. IN PVOID BiosFrameBuffer OPTIONAL
  133. );
  134. XM_STATUS
  135. x86BiosInitializeAdapterShadowedPci(
  136. IN ULONG Adapter,
  137. IN OUT PXM86_CONTEXT Context OPTIONAL,
  138. IN PVOID BiosIoSpace OPTIONAL,
  139. IN PVOID BiosIoMemory OPTIONAL,
  140. IN PVOID BiosFrameBuffer OPTIONAL,
  141. IN UCHAR NumberPciBusses,
  142. IN PGETSETPCIBUSDATA GetPciData,
  143. IN PGETSETPCIBUSDATA SetPciData
  144. );
  145. #endif // _X86NEW_