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.

395 lines
7.9 KiB

  1. #pragma warning(disable:4163)
  2. #if !defined(_X86AMD64_)
  3. #define _X86AMD64_
  4. #endif
  5. #include "bootx86.h"
  6. #if defined(ROUND_UP)
  7. #undef ROUND_UP
  8. #endif
  9. #include "cmp.h"
  10. #include "..\amd64\amd64prv.h"
  11. include(BASE_INC_PATH\bldrthnk.h)
  12. SD(PHYSICAL_ADDRESS)
  13. FD(QuadPart,ULONGLONG)
  14. SE()
  15. SD(PROFILE_PARAMETER_BLOCK)
  16. FD(Status,USHORT)
  17. FD(DockingState,USHORT)
  18. FD(Capabilities,USHORT)
  19. FD(DockID,ULONG)
  20. FD(SerialNumber,ULONG)
  21. SE()
  22. SD(UNICODE_STRING)
  23. FD(Length,USHORT)
  24. FD(MaximumLength,USHORT)
  25. FD(Buffer,PWSTR)
  26. SE()
  27. SD(LIST_ENTRY)
  28. FD(Flink,PLIST_ENTRY)
  29. FD(Blink,PLIST_ENTRY)
  30. SE()
  31. SD64(EPROCESS)
  32. SE()
  33. SD64(ETHREAD)
  34. SE()
  35. SD64(KTHREAD)
  36. SE()
  37. SD64(KPRCB)
  38. SE()
  39. SD64(KGDTENTRY64)
  40. SE()
  41. SD64(KIDTENTRY64)
  42. SE()
  43. SD64(KTSS64)
  44. FD(Rsp0,ULONG64)
  45. FD(Rsp1,ULONG64)
  46. FD(Rsp2,ULONG64)
  47. FD(Ist,ULONG64)
  48. SE()
  49. SD(MEMORY_ALLOCATION_DESCRIPTOR)
  50. FD(ListEntry,LIST_ENTRY)
  51. FD(MemoryType,TYPE_OF_MEMORY)
  52. FD(BasePage,ULONG)
  53. FD(PageCount,ULONG)
  54. SE()
  55. SD(LDR_DATA_TABLE_ENTRY)
  56. FD(InLoadOrderLinks,LIST_ENTRY)
  57. FD(InMemoryOrderLinks,LIST_ENTRY)
  58. FD(InInitializationOrderLinks,LIST_ENTRY)
  59. FD(DllBase,PVOID)
  60. FD(EntryPoint,PVOID)
  61. FD(SizeOfImage,ULONG)
  62. FD(FullDllName,UNICODE_STRING)
  63. FD(BaseDllName,UNICODE_STRING)
  64. FD(Flags,ULONG)
  65. FD(LoadCount,USHORT)
  66. FD(TlsIndex,USHORT)
  67. SE()
  68. SD(BOOT_DRIVER_LIST_ENTRY)
  69. FD(Link,LIST_ENTRY)
  70. FD(FilePath,UNICODE_STRING)
  71. FD(RegistryPath,UNICODE_STRING)
  72. FD(LdrEntry,PLDR_DATA_TABLE_ENTRY)
  73. SE()
  74. SD(NLS_DATA_BLOCK)
  75. FD(AnsiCodePageData,PVOID)
  76. FD(OemCodePageData,PVOID)
  77. FD(UnicodeCaseTableData,PVOID)
  78. SE()
  79. SD(CONFIGURATION_COMPONENT)
  80. FD(Class,CONFIGURATION_CLASS)
  81. FD(Type,CONFIGURATION_TYPE)
  82. FD(Flags,ULONG)
  83. FD(Version,USHORT)
  84. FD(Revision,USHORT)
  85. FD(Key,ULONG)
  86. FD(AffinityMask,ULONG)
  87. FD(ConfigurationDataLength,ULONG)
  88. FD(IdentifierLength,ULONG)
  89. FD(Identifier,PCHAR)
  90. SE()
  91. SD(CONFIGURATION_COMPONENT_DATA)
  92. FD(Parent,PCONFIGURATION_COMPONENT_DATA)
  93. FD(Child,PCONFIGURATION_COMPONENT_DATA)
  94. FD(Sibling,PCONFIGURATION_COMPONENT_DATA)
  95. FD(ComponentEntry,CONFIGURATION_COMPONENT)
  96. FD(ConfigurationData,PVOID)
  97. SE()
  98. SD(BOOT_DRIVER_NODE)
  99. FD(ListEntry,BOOT_DRIVER_LIST_ENTRY)
  100. FD(Group,UNICODE_STRING)
  101. FD(Name,UNICODE_STRING)
  102. FD(Tag,ULONG)
  103. FD(ErrorControl,ULONG)
  104. SE()
  105. SD(ARC_DISK_SIGNATURE)
  106. FD(ListEntry,LIST_ENTRY)
  107. FD(Signature,ULONG)
  108. FDC(ArcName,PCHAR)
  109. FD(CheckSum,ULONG)
  110. FD(ValidPartitionTable,BOOLEAN)
  111. FD(xInt13,BOOLEAN)
  112. SE()
  113. SD(ARC_DISK_INFORMATION)
  114. FD(DiskSignatures,LIST_ENTRY)
  115. SE()
  116. SD(DETECTED_DEVICE_REGISTRY)
  117. FD(Next,PDETECTED_DEVICE_REGISTRY)
  118. FD(KeyName,PCHAR)
  119. FD(ValueName,PCHAR)
  120. FD(ValueType,ULONG)
  121. FD(Buffer,PVOID)
  122. FD(BufferSize,ULONG)
  123. SE()
  124. SD(DETECTED_DEVICE_FILE)
  125. FD(Next,PDETECTED_DEVICE_FILE)
  126. FD(Filename,PCHAR)
  127. FD(FileType,HwFileType)
  128. FD(ConfigName,PCHAR)
  129. FD(RegistryValueList,PDETECTED_DEVICE_REGISTRY)
  130. FD(DiskDescription,PCHAR)
  131. FD(DiskTagfile,PCHAR)
  132. FD(Directory,PCHAR)
  133. SE()
  134. SD(DETECTED_DEVICE)
  135. FD(Next,PDETECTED_DEVICE)
  136. FD(IdString,PCHAR)
  137. FD(Ordinal,ULONG)
  138. FD(Description,PCHAR)
  139. FD(ThirdPartyOptionSelected,BOOLEAN)
  140. FD(FileTypeBits,ULONG)
  141. FD(Files,PDETECTED_DEVICE_FILE)
  142. FD(BaseDllName,PCHAR)
  143. FD(MigratedDriver,BOOLEAN)
  144. SE()
  145. SD(PNP_HARDWARE_ID)
  146. FD(Next,PPNP_HARDWARE_ID)
  147. FD(Id,PCHAR)
  148. FD(DriverName,PCHAR)
  149. FD(ClassGuid,PCHAR)
  150. SE()
  151. SD(SETUP_LOADER_BLOCK_SCALARS)
  152. FD(SetupOperation,ULONG)
  153. FD(AsULong,ULONG)
  154. SE()
  155. SD(SETUP_LOADER_BLOCK)
  156. FD(ArcSetupDeviceName,PCHAR)
  157. FD(VideoDevice,DETECTED_DEVICE)
  158. FD(KeyboardDevices,PDETECTED_DEVICE)
  159. FD(ComputerDevice,DETECTED_DEVICE)
  160. FD(ScsiDevices,PDETECTED_DEVICE)
  161. FD(ScalarValues,SETUP_LOADER_BLOCK_SCALARS)
  162. FDC(IniFile,PCHAR)
  163. FD(IniFileLength,ULONG)
  164. FDC(WinntSifFile,PCHAR)
  165. FD(WinntSifFileLength,ULONG)
  166. FDC(MigrateInfFile,PCHAR)
  167. FD(MigrateInfFileLength,ULONG)
  168. FDC(UnsupDriversInfFile,PCHAR)
  169. FD(UnsupDriversInfFileLength,ULONG)
  170. FD(BootFontFile,PVOID)
  171. FD(BootFontFileLength,ULONG)
  172. FD(Monitor,PMONITOR_CONFIGURATION_DATA)
  173. FD(MonitorId,PCHAR)
  174. FD(BootBusExtenders,PDETECTED_DEVICE)
  175. FD(BusExtenders,PDETECTED_DEVICE)
  176. FD(InputDevicesSupport,PDETECTED_DEVICE)
  177. FD(HardwareIdDatabase,PPNP_HARDWARE_ID)
  178. FD(ComputerName,WCHAR)
  179. FD(IpAddress,ULONG)
  180. FD(SubnetMask,ULONG)
  181. FD(ServerIpAddress,ULONG)
  182. FD(DefaultRouter,ULONG)
  183. FD(DnsNameServer,ULONG)
  184. FD(NetbootCardHardwareId,WCHAR)
  185. FD(NetbootCardDriverName,WCHAR)
  186. FD(NetbootCardServiceName,WCHAR)
  187. FDC(NetbootCardRegistry,PCHAR)
  188. FD(NetbootCardRegistryLength,ULONG)
  189. FDC(NetbootCardInfo,PCHAR)
  190. FD(NetbootCardInfoLength,ULONG)
  191. FD(Flags,ULONG)
  192. FD(MachineDirectoryPath,PCHAR)
  193. FD(NetBootSifPath,PCHAR)
  194. FD(NetBootSecret,PVOID)
  195. FD(NetBootIMirrorFilePath,WCHAR)
  196. FDC(ASRPnPSifFile,PCHAR)
  197. FD(ASRPnPSifFileLength,ULONG)
  198. FD(NetBootAdministratorPassword,WCHAR)
  199. SE()
  200. SD(I386_LOADER_BLOCK)
  201. FD(CommonDataArea,PVOID)
  202. FD(MachineType,ULONG)
  203. FD(VirtualBias,ULONG)
  204. SE()
  205. SD(LOADER_PARAMETER_EXTENSION)
  206. FD(Size,ULONG)
  207. FD(Profile,PROFILE_PARAMETER_BLOCK)
  208. FD(MajorVersion,ULONG)
  209. FD(MinorVersion,ULONG)
  210. FD(InfFileImage,PVOID)
  211. FD(InfFileSize,ULONG)
  212. FD(TriageDumpBlock,PVOID)
  213. FD(LoaderPagesSpanned,ULONG)
  214. FD(HeadlessLoaderBlock,PHEADLESS_LOADER_BLOCK)
  215. FD(SMBiosEPSHeader,PVOID)
  216. FD(DrvDBImage,PVOID)
  217. FD(DrvDBSize,ULONG)
  218. FD(FirmwareDescriptorListHead,LIST_ENTRY)
  219. SE()
  220. SD(LOADER_PARAMETER_BLOCK)
  221. FD(LoadOrderListHead,LIST_ENTRY)
  222. FD(MemoryDescriptorListHead,LIST_ENTRY)
  223. FD(BootDriverListHead,LIST_ENTRY)
  224. FD(KernelStack,ULONG_PTR)
  225. FD(Prcb,ULONG_PTR)
  226. FD(Process,ULONG_PTR)
  227. FD(Thread,ULONG_PTR)
  228. FD(RegistryLength,ULONG)
  229. FDC(RegistryBase,PVOID)
  230. FD(ConfigurationRoot,PCONFIGURATION_COMPONENT_DATA)
  231. FDC(ArcBootDeviceName,PCHAR)
  232. FDC(ArcHalDeviceName,PCHAR)
  233. FDC(NtBootPathName,PCHAR)
  234. FDC(NtHalPathName,PCHAR)
  235. FDC(LoadOptions,PCHAR)
  236. FD(NlsData,PNLS_DATA_BLOCK)
  237. FD(ArcDiskInformation,PARC_DISK_INFORMATION)
  238. FDC(OemFontFile,PVOID)
  239. FD(SetupLoaderBlock,PSETUP_LOADER_BLOCK)
  240. FD(Extension,PLOADER_PARAMETER_EXTENSION)
  241. SE()
  242. SD(CM_PRD_GENERIC)
  243. FD(Start,PHYSICAL_ADDRESS)
  244. FD(Length,ULONG)
  245. SE()
  246. SD(CM_PRD_PORT)
  247. FD(Start,PHYSICAL_ADDRESS)
  248. FD(Length,ULONG)
  249. SE()
  250. SD(CM_PRD_INTERRUPT)
  251. FD(Level,ULONG)
  252. FD(Vector,ULONG)
  253. FD(Affinity,KAFFINITY)
  254. SE()
  255. SD(CM_PRD_MEMORY)
  256. FD(Start,PHYSICAL_ADDRESS)
  257. FD(Length,ULONG)
  258. SE()
  259. SD(CM_PRD_DMA)
  260. FD(Channel,ULONG)
  261. FD(Port,ULONG)
  262. SE()
  263. SD(CM_PRD_DEVICEPRIVATE)
  264. FD(Data,ULONG)
  265. SE()
  266. SD(CM_PRD_BUSNUMBER)
  267. FD(Start,ULONG)
  268. FD(Length,ULONG)
  269. FD(Reserved,ULONG)
  270. SE()
  271. SD(CM_PRD_DEVICESPECIFICDATA)
  272. FD(DataSize,ULONG)
  273. FD(Reserved1,ULONG)
  274. FD(Reserved2,ULONG)
  275. SE()
  276. SD(CM_PARTIAL_RESOURCE_DESCRIPTOR)
  277. FD(Type,UCHAR)
  278. FD(ShareDisposition,UCHAR)
  279. FD(Flags,USHORT)
  280. FD(u,CM_PRD_INTERRUPT)
  281. SE()
  282. SD(CM_PARTIAL_RESOURCE_LIST)
  283. FD(Version,USHORT)
  284. FD(Revision,USHORT)
  285. FD(Count,ULONG)
  286. FD(PartialDescriptors,CM_PARTIAL_RESOURCE_DESCRIPTOR)
  287. SE()
  288. SD(LARGE_INTEGER)
  289. FD(LowPart,ULONG)
  290. FD(HighPart,LONG)
  291. SE()
  292. SD(PO_HIBER_PERF)
  293. FD(IoTicks,ULONGLONG)
  294. FD(InitTicks,ULONGLONG)
  295. FD(CopyTicks,ULONGLONG)
  296. FD(StartCount,ULONGLONG)
  297. FD(ElapsedTime,ULONG)
  298. FD(IoTime,ULONG)
  299. FD(CopyTime,ULONG)
  300. FD(InitTime,ULONG)
  301. FD(PagesWritten,ULONG)
  302. FD(PagesProcessed,ULONG)
  303. FD(BytesCopied,ULONG)
  304. FD(DumpCount,ULONG)
  305. FD(FileRuns,ULONG)
  306. SE()
  307. SD(PO_MEMORY_IMAGE)
  308. FD(Signature, ULONG)
  309. FD(Version, ULONG)
  310. FD(CheckSum, ULONG)
  311. FD(LengthSelf, ULONG)
  312. FD(PageSelf, PFN_NUMBER)
  313. FD(PageSize, ULONG)
  314. FD(ImageType, ULONG)
  315. FD(SystemTime, LARGE_INTEGER)
  316. FD(InterruptTime, ULONGLONG)
  317. FD(FeatureFlags, ULONG)
  318. FD(HiberFlags, UCHAR)
  319. FD(spare, UCHAR)
  320. FD(NoHiberPtes, ULONG)
  321. FD(HiberVa, ULONG_PTR)
  322. FD(HiberPte, PHYSICAL_ADDRESS)
  323. FD(NoFreePages, ULONG)
  324. FD(FreeMapCheck, ULONG)
  325. FD(WakeCheck, ULONG)
  326. FD(TotalPages, PFN_NUMBER)
  327. FD(FirstTablePage, PFN_NUMBER)
  328. FD(LastFilePage, PFN_NUMBER)
  329. FD(PerfInfo, PO_HIBER_PERF)
  330. SE()
  331. SD(PO_MEMORY_RANGE_ARRAY_RANGE)
  332. FD(PageNo, PFN_NUMBER)
  333. FD(StartPage, PFN_NUMBER)
  334. FD(EndPage, PFN_NUMBER)
  335. FD(CheckSum, ULONG)
  336. SE()
  337. SD(PO_MEMORY_RANGE_ARRAY_LINK)
  338. FD(Next, PPO_MEMORY_RANGE_ARRAY);
  339. FD(NextTable, PFN_NUMBER)
  340. FD(CheckSum, ULONG)
  341. FD(EntryCount, ULONG)
  342. SE()
  343. DD()