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.

318 lines
3.9 KiB

  1. /*++
  2. Copyright (c) 1996 Intel Corporation
  3. Copyright (c) 1994 Microsoft Corporation
  4. Module Name:
  5. i64bios.c copied from hali64\x86bios.c
  6. Abstract:
  7. This module implements the platform specific interface between a device
  8. driver and the execution of x86 ROM bios code for the device.
  9. Author:
  10. William K. Cheung (wcheung) 20-Mar-1996
  11. based on the version by David N. Cutler (davec) 17-Jun-1994
  12. Environment:
  13. Kernel mode only.
  14. Revision History:
  15. --*/
  16. #pragma warning(disable:4200) // unsized array in halp
  17. #include "halp.h"
  18. //
  19. // Define global data.
  20. //
  21. ULONG HalpX86BiosInitialized = FALSE;
  22. ULONG HalpEnableInt10Calls = FALSE;
  23. ULONG
  24. HalpSetCmosData (
  25. IN PVOID BusHandler,
  26. IN PVOID RootHandler,
  27. IN ULONG SlotNumber,
  28. IN PVOID Buffer,
  29. IN ULONG Offset,
  30. IN ULONG Length
  31. )
  32. /*++
  33. Routine Description:
  34. Arguements:
  35. Return Value:
  36. --*/
  37. {
  38. UNREFERENCED_PARAMETER( Length );
  39. UNREFERENCED_PARAMETER( Offset );
  40. UNREFERENCED_PARAMETER( Buffer );
  41. UNREFERENCED_PARAMETER( SlotNumber );
  42. UNREFERENCED_PARAMETER( RootHandler );
  43. UNREFERENCED_PARAMETER( BusHandler );
  44. return 0;
  45. }
  46. ULONG
  47. HalpGetCmosData (
  48. IN ULONG BusNumber,
  49. IN ULONG SlotNumber,
  50. IN PVOID Buffer,
  51. IN ULONG Length
  52. )
  53. /*++
  54. Routine Description:
  55. Arguements:
  56. Return Value:
  57. --*/
  58. {
  59. UNREFERENCED_PARAMETER( BusNumber );
  60. UNREFERENCED_PARAMETER( SlotNumber );
  61. UNREFERENCED_PARAMETER( Buffer );
  62. UNREFERENCED_PARAMETER( Length );
  63. return 0;
  64. }
  65. VOID
  66. HalpAcquireCmosSpinLock (
  67. VOID
  68. )
  69. /*++
  70. Routine Description:
  71. Arguements:
  72. Return Value:
  73. --*/
  74. {
  75. return;
  76. }
  77. VOID
  78. HalpReleaseCmosSpinLock (
  79. VOID
  80. )
  81. /*++
  82. Routine Description:
  83. Arguements:
  84. Return Value:
  85. --*/
  86. {
  87. return ;
  88. }
  89. HAL_DISPLAY_BIOS_INFORMATION
  90. HalpGetDisplayBiosInformation (
  91. VOID
  92. )
  93. /*++
  94. Routine Description:
  95. Arguements:
  96. Return Value:
  97. --*/
  98. {
  99. return 8;
  100. }
  101. VOID
  102. HalpInitializeCmos (
  103. VOID
  104. )
  105. /*++
  106. Routine Description:
  107. Arguements:
  108. Return Value:
  109. --*/
  110. {
  111. return ;
  112. }
  113. VOID
  114. HalpReadCmosTime (
  115. PTIME_FIELDS TimeFields
  116. )
  117. /*++
  118. Routine Description:
  119. Arguements:
  120. Return Value:
  121. --*/
  122. {
  123. UNREFERENCED_PARAMETER( TimeFields );
  124. return ;
  125. }
  126. VOID
  127. HalpWriteCmosTime (
  128. PTIME_FIELDS TimeFields
  129. )
  130. /*++
  131. Routine Description:
  132. Arguements:
  133. Return Value:
  134. --*/
  135. {
  136. UNREFERENCED_PARAMETER( TimeFields );
  137. return;
  138. }
  139. BOOLEAN
  140. HalpBiosDisplayReset (
  141. VOID
  142. )
  143. /*++
  144. Routine Description:
  145. Arguements:
  146. Return Value:
  147. --*/
  148. {
  149. return FALSE;
  150. }
  151. VOID
  152. HalpInitializeX86DisplayAdapter(
  153. VOID
  154. )
  155. /*++
  156. Routine Description:
  157. This function initializes a display adapter using the x86 bios emulator.
  158. Arguments:
  159. None.
  160. Return Value:
  161. None.
  162. --*/
  163. {
  164. #if 0
  165. //
  166. // If I/O Ports or I/O memory could not be mapped, then don't
  167. // attempt to initialize the display adapter.
  168. //
  169. if (HalpIoControlBase == NULL || HalpIoMemoryBase == NULL) {
  170. return;
  171. }
  172. //
  173. // Initialize the x86 bios emulator.
  174. //
  175. x86BiosInitializeBios(HalpIoControlBase, HalpIoMemoryBase);
  176. HalpX86BiosInitialized = TRUE;
  177. //
  178. // Attempt to initialize the display adapter by executing its ROM bios
  179. // code. The standard ROM bios code address for PC video adapters is
  180. // 0xC000:0000 on the ISA bus.
  181. //
  182. if (x86BiosInitializeAdapter(0xc0000,
  183. NULL,
  184. (PVOID)HalpIoControlBase,
  185. (PVOID)HalpIoMemoryBase) != XM_SUCCESS) {
  186. HalpEnableInt10Calls = FALSE;
  187. return;
  188. }
  189. #endif
  190. HalpEnableInt10Calls = TRUE;
  191. return;
  192. }