Source code of Windows XP (NT5)
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.

176 lines
3.6 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 BiosTransferMemory,
  75. IN ULONG TransferLength
  76. );
  77. VOID
  78. x86BiosInitializeBiosShadowed (
  79. IN PVOID BiosIoSpace,
  80. IN PVOID BiosIoMemory,
  81. IN PVOID BiosFrameBuffer
  82. );
  83. VOID
  84. x86BiosInitializeBiosShadowedPci (
  85. IN PVOID BiosIoSpace,
  86. IN PVOID BiosIoMemory,
  87. IN PVOID BiosFrameBuffer,
  88. IN UCHAR NumberPciBusses,
  89. IN PGETSETPCIBUSDATA GetPciData,
  90. IN PGETSETPCIBUSDATA SetPciData
  91. );
  92. XM_STATUS
  93. x86BiosExecuteInterrupt (
  94. IN UCHAR Number,
  95. IN OUT PXM86_CONTEXT Context,
  96. IN PVOID BiosIoSpace OPTIONAL,
  97. IN PVOID BiosIoMemory OPTIONAL
  98. );
  99. XM_STATUS
  100. x86BiosExecuteInterruptShadowed (
  101. IN UCHAR Number,
  102. IN OUT PXM86_CONTEXT Context,
  103. IN PVOID BiosIoSpace OPTIONAL,
  104. IN PVOID BiosIoMemory OPTIONAL,
  105. IN PVOID BiosFrameBuffer OPTIONAL
  106. );
  107. XM_STATUS
  108. x86BiosExecuteInterruptShadowedPci (
  109. IN UCHAR Number,
  110. IN OUT PXM86_CONTEXT Context,
  111. IN PVOID BiosIoSpace OPTIONAL,
  112. IN PVOID BiosIoMemory OPTIONAL,
  113. IN PVOID BiosFrameBuffer OPTIONAL,
  114. IN UCHAR NumberPciBusses,
  115. IN PGETSETPCIBUSDATA GetPciData,
  116. IN PGETSETPCIBUSDATA SetPciData
  117. );
  118. XM_STATUS
  119. x86BiosInitializeAdapter (
  120. IN ULONG Adapter,
  121. IN OUT PXM86_CONTEXT Context OPTIONAL,
  122. IN PVOID BiosIoSpace OPTIONAL,
  123. IN PVOID BiosIoMemory OPTIONAL
  124. );
  125. XM_STATUS
  126. x86BiosInitializeAdapterShadowed (
  127. IN ULONG Adapter,
  128. IN OUT PXM86_CONTEXT Context OPTIONAL,
  129. IN PVOID BiosIoSpace OPTIONAL,
  130. IN PVOID BiosIoMemory OPTIONAL,
  131. IN PVOID BiosFrameBuffer OPTIONAL
  132. );
  133. XM_STATUS
  134. x86BiosInitializeAdapterShadowedPci(
  135. IN ULONG Adapter,
  136. IN OUT PXM86_CONTEXT Context OPTIONAL,
  137. IN PVOID BiosIoSpace OPTIONAL,
  138. IN PVOID BiosIoMemory OPTIONAL,
  139. IN PVOID BiosFrameBuffer OPTIONAL,
  140. IN UCHAR NumberPciBusses,
  141. IN PGETSETPCIBUSDATA GetPciData,
  142. IN PGETSETPCIBUSDATA SetPciData
  143. );
  144. #endif // _X86NEW_