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.

376 lines
7.3 KiB

  1. /*++
  2. Copyright (c) 1993 Microsoft Corporation
  3. Module Name:
  4. sphw.h
  5. Abstract:
  6. Header file for hardware detection and
  7. confirmation routines for text setup.
  8. Author:
  9. Ted Miller (tedm) 1-October-1993
  10. Revision History:
  11. --*/
  12. #ifndef _SPHW_DEFN_
  13. #define _SPHW_DEFN_
  14. VOID
  15. SpConfirmScsiMiniports(
  16. IN PVOID SifHandle,
  17. IN PWSTR SourceDevicePath,
  18. IN PWSTR DirectoryOnSourceDevice
  19. );
  20. VOID
  21. SpConfirmHardware(
  22. IN PVOID SifHandle
  23. );
  24. VOID
  25. SpInitializePreinstallList(
  26. IN HANDLE MasterSifHandle,
  27. IN PWSTR SetupSourceDevicePath,
  28. IN PWSTR OemPreinstallSourcePath
  29. );
  30. //
  31. // In splddrv.c
  32. //
  33. VOID
  34. SpLoadScsiClassDrivers(
  35. IN PVOID SifHandle,
  36. IN PWSTR SourceDevicePath,
  37. IN PWSTR DirectoryOnBootDevice
  38. );
  39. VOID
  40. SpLoadCdRomDrivers(
  41. IN PVOID SifHandle,
  42. IN PWSTR SourceDevicePath,
  43. IN PWSTR DirectoryOnBootDevice
  44. );
  45. VOID
  46. SpLoadDiskDrivers(
  47. IN PVOID SifHandle,
  48. IN PWSTR SourceDevicePath,
  49. IN PWSTR DirectoryOnBootDevice
  50. );
  51. BOOLEAN
  52. SpInstallingMp(
  53. VOID
  54. );
  55. BOOLEAN
  56. SpSelectSectionItem(
  57. IN PVOID SifHandle,
  58. IN PWSTR SectionName,
  59. IN ULONG SelectScreenId,
  60. IN ULONG DefaultSelection OPTIONAL,
  61. OUT PULONG SelectedOption
  62. );
  63. //
  64. // enum to represent flopy disk drive types.
  65. //
  66. typedef enum {
  67. FloppyTypeNone,
  68. FloppyType525Low,
  69. FloppyType525High,
  70. FloppyType35Low,
  71. FloppyType35High,
  72. FloppyType35High120MB
  73. } FloppyDriveType;
  74. FloppyDriveType
  75. SpGetFloppyDriveType(
  76. IN ULONG FloppyOrdinal
  77. );
  78. #define IS_525_DRIVE(x) (((x)==FloppyType525Low) || ((x)==FloppyType525High))
  79. #define IS_35_DRIVE(x) (((x)==FloppyType35Low) || ((x)==FloppyType35High))
  80. typedef struct _HARDWARE_COMPONENT_REGISTRY {
  81. struct _HARDWARE_COMPONENT_REGISTRY *Next;
  82. //
  83. // The name of the key. The empty string means the key in the
  84. // services key itself.
  85. //
  86. PWSTR KeyName;
  87. //
  88. // The name of the value within the registry key
  89. //
  90. PWSTR ValueName;
  91. //
  92. // The data type for the value (ie, REG_DWORD, etc)
  93. //
  94. ULONG ValueType;
  95. //
  96. // The buffer containing the data to be placed into the value
  97. //
  98. PVOID Buffer;
  99. //
  100. // The size of the buffer in bytes
  101. //
  102. ULONG BufferSize;
  103. } HARDWARE_COMPONENT_REGISTRY, *PHARDWARE_COMPONENT_REGISTRY;
  104. //
  105. // One of these will be created for each file to be copied for a
  106. // third party device.
  107. //
  108. typedef struct _HARDWARE_COMPONENT_FILE {
  109. struct _HARDWARE_COMPONENT_FILE *Next;
  110. //
  111. // Filename of the file.
  112. //
  113. PWSTR Filename;
  114. //
  115. // type of the file (hal, port, class, etc).
  116. //
  117. HwFileType FileType;
  118. //
  119. // Part of name of the section in txtsetup.oem [Config.<ConfigName>]
  120. // that contains registry options. If this is NULL, then no registry
  121. // information is associated with this file.
  122. //
  123. PWSTR ConfigName;
  124. //
  125. // Registry values for the node in the services list in the registry.
  126. //
  127. PHARDWARE_COMPONENT_REGISTRY RegistryValueList;
  128. //
  129. // These two fields are used when prompting for the diskette
  130. // containing the third-party-supplied driver's files.
  131. //
  132. PWSTR DiskDescription;
  133. PWSTR DiskTagFile;
  134. //
  135. // Directory where files are to be found on the disk.
  136. //
  137. PWSTR Directory;
  138. //
  139. // Arc name of the device from which the file was copied
  140. //
  141. PWSTR ArcDeviceName;
  142. } HARDWARE_COMPONENT_FILE, *PHARDWARE_COMPONENT_FILE;
  143. //
  144. // structure for storing information about a driver we have located and
  145. // will install.
  146. //
  147. typedef struct _HARDWARE_COMPONENT {
  148. struct _HARDWARE_COMPONENT *Next;
  149. //
  150. // String used as a key into the relevent section (like [Display],
  151. // [Mouse], etc).
  152. //
  153. PWSTR IdString;
  154. //
  155. // String that describes the hardware.
  156. //
  157. PWSTR Description;
  158. //
  159. // If this is TRUE, then there is an OEM option selected for this
  160. // hardware.
  161. //
  162. BOOLEAN ThirdPartyOptionSelected;
  163. //
  164. // Bits to be set if a third party option is selected, indicating
  165. // which type of files are specified in the oem inf file.
  166. //
  167. ULONG FileTypeBits;
  168. //
  169. // Files for a third party option.
  170. //
  171. PHARDWARE_COMPONENT_FILE Files;
  172. //
  173. // For some components this is the name of a device driver file.
  174. //
  175. PWSTR BaseDllName;
  176. //
  177. // If this is TRUE, then the driver for this device was migrated from an
  178. // existing NT system.
  179. //
  180. BOOLEAN MigratedDriver;
  181. } HARDWARE_COMPONENT, *PHARDWARE_COMPONENT;
  182. PHARDWARE_COMPONENT
  183. SpSetupldrHwToHwDevice(
  184. IN PDETECTED_DEVICE SetupldrHw
  185. );
  186. extern PHARDWARE_COMPONENT HardwareComponents[HwComponentMax];
  187. extern PHARDWARE_COMPONENT ScsiHardware;
  188. extern PHARDWARE_COMPONENT BootBusExtenders;
  189. extern PHARDWARE_COMPONENT BusExtenders;
  190. extern PHARDWARE_COMPONENT InputDevicesSupport;
  191. extern PHARDWARE_COMPONENT PreinstallHardwareComponents[HwComponentMax];
  192. extern PHARDWARE_COMPONENT PreinstallScsiHardware;
  193. extern PHARDWARE_COMPONENT UnsupportedScsiHardwareToDisable;
  194. #ifdef _ALPHA_
  195. extern PWSTR OemPalFilename, OemPalDiskDescription;
  196. #endif _ALPHA_
  197. VOID
  198. SpFreeHwComponent(
  199. IN OUT PHARDWARE_COMPONENT *HwComp,
  200. IN BOOLEAN FreeAllInList
  201. );
  202. //
  203. // These are the names of the components. This is array is not localized
  204. // because it is used only to index hardware-related sections in the
  205. // setup information file.
  206. //
  207. extern PWSTR NonlocalizedComponentNames[HwComponentMax];
  208. extern PWSTR ScsiSectionName;
  209. extern ULONG LoadedScsiMiniportCount;
  210. //
  211. // structure for storing the PNP database.
  212. //
  213. typedef struct _SETUP_PNP_HARDWARE_ID {
  214. struct _SETUP_PNP_HARDWARE_ID *Next;
  215. //
  216. // String that represents the hardware id of a PNP device.
  217. //
  218. PWSTR Id;
  219. //
  220. // Driver for the device
  221. //
  222. PWSTR DriverName;
  223. //
  224. // Class GUID for this device, if any
  225. //
  226. PWSTR ClassGuid;
  227. } SETUP_PNP_HARDWARE_ID, *PSETUP_PNP_HARDWARE_ID;
  228. PSETUP_PNP_HARDWARE_ID
  229. SpSetupldrPnpDatabaseToSetupPnpDatabase(
  230. IN PPNP_HARDWARE_ID HardwareIdDatabase
  231. );
  232. //
  233. // OEM Virtual Source Device abstraction
  234. //
  235. typedef struct _VIRTUAL_OEM_SOURCE_DEVICE {
  236. //
  237. // Next device
  238. //
  239. struct _VIRTUAL_OEM_SOURCE_DEVICE *Next;
  240. //
  241. // Device Id (for ARC name mapping)
  242. //
  243. ULONG DeviceId;
  244. //
  245. // Arc device name
  246. //
  247. PWSTR ArcDeviceName;
  248. //
  249. // Memory address where the device image is copied
  250. // by the loader
  251. //
  252. PVOID ImageBase;
  253. //
  254. // Image size
  255. //
  256. ULONGLONG ImageSize;
  257. } VIRTUAL_OEM_SOURCE_DEVICE, *PVIRTUAL_OEM_SOURCE_DEVICE;
  258. #define MS_RAMDISK_DRIVER_PARAM L"Disk"
  259. //
  260. // Virtual OEM source devices (accessible through RAM driver)
  261. //
  262. extern PVIRTUAL_OEM_SOURCE_DEVICE VirtualOemSourceDevices;
  263. NTSTATUS
  264. SpInitVirtualOemDevices(
  265. IN PSETUP_LOADER_BLOCK SetupLoaderBlock,
  266. OUT PVIRTUAL_OEM_SOURCE_DEVICE *SourceDevices
  267. );
  268. #endif // ndef _SPHW_DEFN_
  269.