2005-11-22 04:57:45 +00:00
|
|
|
/*++ NDK Version: 0095
|
|
|
|
|
|
|
|
Copyright (c) Alex Ionescu. All rights reserved.
|
|
|
|
|
|
|
|
Header Name:
|
|
|
|
|
|
|
|
haltypes.h
|
|
|
|
|
|
|
|
Abstract:
|
|
|
|
|
|
|
|
Type definitions for the HAL.
|
|
|
|
|
|
|
|
Author:
|
|
|
|
|
|
|
|
Alex Ionescu (alex.ionescu@reactos.com) 06-Oct-2004
|
|
|
|
|
|
|
|
--*/
|
|
|
|
|
2005-06-18 23:33:40 +00:00
|
|
|
#ifndef _HALTYPES_H
|
|
|
|
#define _HALTYPES_H
|
|
|
|
|
2005-11-22 04:57:45 +00:00
|
|
|
//
|
|
|
|
// Dependencies
|
|
|
|
//
|
2005-11-25 00:17:40 +00:00
|
|
|
#include <umtypes.h>
|
|
|
|
|
|
|
|
#ifndef NTOS_MODE_USER
|
2005-06-18 23:33:40 +00:00
|
|
|
|
2005-11-22 04:57:45 +00:00
|
|
|
//
|
2005-11-27 18:24:32 +00:00
|
|
|
// Multi-Boot Flags (REMOVE ME)
|
2005-11-22 04:57:45 +00:00
|
|
|
//
|
2005-11-27 18:24:32 +00:00
|
|
|
#ifdef _REACTOS_
|
2005-11-22 04:57:45 +00:00
|
|
|
#define MB_FLAGS_MEM_INFO (0x1)
|
|
|
|
#define MB_FLAGS_BOOT_DEVICE (0x2)
|
|
|
|
#define MB_FLAGS_COMMAND_LINE (0x4)
|
|
|
|
#define MB_FLAGS_MODULE_INFO (0x8)
|
|
|
|
#define MB_FLAGS_AOUT_SYMS (0x10)
|
|
|
|
#define MB_FLAGS_ELF_SYMS (0x20)
|
|
|
|
#define MB_FLAGS_MMAP_INFO (0x40)
|
|
|
|
#define MB_FLAGS_DRIVES_INFO (0x80)
|
|
|
|
#define MB_FLAGS_CONFIG_TABLE (0x100)
|
|
|
|
#define MB_FLAGS_BOOT_LOADER_NAME (0x200)
|
|
|
|
#define MB_FLAGS_APM_TABLE (0x400)
|
|
|
|
#define MB_FLAGS_GRAPHICS_TABLE (0x800)
|
|
|
|
#define MB_FLAGS_ACPI_TABLE (0x1000)
|
2005-11-27 18:24:32 +00:00
|
|
|
#endif
|
2005-06-18 23:33:40 +00:00
|
|
|
|
2005-11-22 04:57:45 +00:00
|
|
|
//
|
|
|
|
// HalShutdownSystem Types
|
|
|
|
//
|
2005-06-19 03:25:33 +00:00
|
|
|
typedef enum _FIRMWARE_ENTRY
|
|
|
|
{
|
2005-06-26 01:08:55 +00:00
|
|
|
HalHaltRoutine,
|
|
|
|
HalPowerDownRoutine,
|
|
|
|
HalRestartRoutine,
|
|
|
|
HalRebootRoutine,
|
|
|
|
HalInteractiveModeRoutine,
|
|
|
|
HalMaximumRoutine
|
2005-06-19 07:41:35 +00:00
|
|
|
} FIRMWARE_REENTRY, *PFIRMWARE_REENTRY;
|
2005-06-18 23:33:40 +00:00
|
|
|
|
2005-11-22 04:57:45 +00:00
|
|
|
//
|
|
|
|
// Hal Private dispatch Table
|
|
|
|
//
|
2005-12-04 03:24:11 +00:00
|
|
|
#define HAL_PRIVATE_DISPATCH_VERSION 2
|
2005-06-23 03:18:20 +00:00
|
|
|
typedef struct _HAL_PRIVATE_DISPATCH
|
|
|
|
{
|
|
|
|
ULONG Version;
|
2005-12-04 03:24:11 +00:00
|
|
|
PVOID HalHandlerForBus;
|
|
|
|
PVOID HalHandlerForBus2;
|
|
|
|
PVOID HalLocateHiberRanges;
|
|
|
|
PVOID HalRegisterBusHandler;
|
|
|
|
PVOID HalSetWakeEnable;
|
|
|
|
PVOID HalSetWakeAlarm;
|
|
|
|
PVOID HalTranslateBusAddress;
|
|
|
|
PVOID HalTranslateBusAddress2;
|
|
|
|
PVOID HalHaltSystem;
|
|
|
|
PVOID Null;
|
|
|
|
PVOID Null2;
|
|
|
|
PVOID HalAllocateMapRegisters;
|
|
|
|
PVOID KdSetupPciDeviceForDebugging;
|
|
|
|
PVOID KdReleasePciDeviceforDebugging;
|
|
|
|
PVOID KdGetAcpiTablePhase0;
|
|
|
|
PVOID HalReferenceHandler;
|
|
|
|
PVOID HalVectorToIDTEntry;
|
|
|
|
PVOID MatchAll;
|
|
|
|
PVOID KdUnmapVirtualAddress;
|
2005-06-23 03:18:20 +00:00
|
|
|
} HAL_PRIVATE_DISPATCH, *PHAL_PRIVATE_DISPATCH;
|
|
|
|
|
2005-11-27 20:18:33 +00:00
|
|
|
#ifndef _REACTOS_
|
2005-11-22 04:57:45 +00:00
|
|
|
//
|
2005-11-27 20:18:33 +00:00
|
|
|
// NLS Data Block
|
|
|
|
//
|
|
|
|
typedef struct _NLS_TABLE_DATA
|
|
|
|
{
|
|
|
|
PVOID AnsiCodePageData;
|
|
|
|
PVOID OemCodePageData;
|
|
|
|
PVOID UnicodeCodePageData;
|
|
|
|
} NLS_TABLE_DATA, *PNLS_TABLE_DATA;
|
|
|
|
|
|
|
|
//
|
|
|
|
// Subsystem Specific Loader Blocks
|
|
|
|
//
|
|
|
|
typedef struct _PROFILE_PARAMETER_BLOCK
|
|
|
|
{
|
|
|
|
USHORT DockData0;
|
|
|
|
USHORT DockData1;
|
|
|
|
USHORT DockData2;
|
|
|
|
USHORT DockData3;
|
|
|
|
ULONG DockData4;
|
2005-11-28 21:40:21 +00:00
|
|
|
ULONG DockData5;
|
2005-11-27 20:18:33 +00:00
|
|
|
} PROFILE_PARAMETER_BLOCK, *PPROFILE_PARAMETER_BLOCK;
|
|
|
|
|
|
|
|
typedef struct _HEADLESS_LOADER_BLOCK
|
|
|
|
{
|
|
|
|
UCHAR Unknown[0xC];
|
|
|
|
} HEADLESS_LOADER_BLOCK, *PHEADLESS_LOADER_BLOCK;
|
|
|
|
|
|
|
|
typedef struct _NETWORK_LOADER_BLOCK
|
|
|
|
{
|
|
|
|
UCHAR Unknown[0xC];
|
|
|
|
} NETWORK_LOADER_BLOCK, *PNETWORK_LOADER_BLOCK;
|
|
|
|
|
|
|
|
//
|
|
|
|
// Extended Loader Parameter Block
|
|
|
|
//
|
|
|
|
typedef struct _LOADER_PARAMETER_EXTENSION
|
|
|
|
{
|
|
|
|
ULONG Size;
|
|
|
|
PROFILE_PARAMETER_BLOCK ProfileParameterBlock;
|
|
|
|
ULONG MajorVersion;
|
|
|
|
ULONG MinorVersion;
|
|
|
|
PVOID SpecialConfigInfFile;
|
|
|
|
ULONG SpecialConfigInfSize;
|
|
|
|
PVOID TriageDumpData;
|
|
|
|
//
|
|
|
|
// NT 5.1
|
|
|
|
//
|
|
|
|
ULONG NumberOfPages;
|
|
|
|
PHEADLESS_LOADER_BLOCK HeadlessLoaderBlock;
|
|
|
|
PVOID Unknown1;
|
|
|
|
PVOID PrefetchDatabaseBase;
|
|
|
|
ULONG PrefetchDatabaseSize;
|
|
|
|
PNETWORK_LOADER_BLOCK NetworkLoaderBlock;
|
|
|
|
//
|
|
|
|
// NT 5.2+
|
|
|
|
//
|
|
|
|
PVOID Reserved[2];
|
|
|
|
LIST_ENTRY FirmwareListEntry;
|
|
|
|
PVOID AcpiTableBase;
|
|
|
|
ULONG AcpiTableSize;
|
|
|
|
} LOADER_PARAMETER_EXTENSION, *PLOADER_PARAMETER_EXTENSION;
|
|
|
|
|
|
|
|
//
|
|
|
|
// Architecture specific Loader Parameter Blocks
|
|
|
|
//
|
|
|
|
typedef struct _I386_LOADER_BLOCK
|
|
|
|
{
|
|
|
|
PVOID CommonDataArea;
|
|
|
|
ULONG MachineType;
|
|
|
|
ULONG Reserved;
|
|
|
|
} I386_LOADER_BLOCK, *PI386_LOADER_BLOCK;
|
|
|
|
|
|
|
|
//
|
|
|
|
// Setup Loader Parameter Block
|
|
|
|
//
|
|
|
|
typedef struct _SETUP_LOADER_BLOCK
|
|
|
|
{
|
|
|
|
ULONG Unknown[139];
|
|
|
|
ULONG Flags;
|
|
|
|
} SETUP_LOADER_BLOCK, *PSETUP_LOADER_BLOCK;
|
|
|
|
|
|
|
|
//
|
|
|
|
// Loader Parameter Block
|
|
|
|
//
|
|
|
|
typedef struct _LOADER_PARAMETER_BLOCK
|
|
|
|
{
|
|
|
|
LIST_ENTRY LoadOrderListHead;
|
|
|
|
LIST_ENTRY MemoryDescriptorListHead;
|
|
|
|
LIST_ENTRY DriverList;
|
|
|
|
PVOID KernelStack;
|
|
|
|
PVOID Prcb;
|
|
|
|
PVOID Process;
|
|
|
|
PVOID Thread;
|
|
|
|
ULONG RegistryLength;
|
|
|
|
PVOID RegistryBase;
|
|
|
|
PCONFIGURATION_COMPONENT_DATA ConfigurationRoot;
|
|
|
|
LPSTR ArcBootDeviceName;
|
|
|
|
LPSTR ArcHalDeviceName;
|
|
|
|
LPSTR SystemRoot;
|
|
|
|
LPSTR BootRoot;
|
|
|
|
LPSTR CommandLine;
|
|
|
|
PNLS_TABLE_DATA NlsTables;
|
|
|
|
PARC_DISK_INFORMATION ArcDevices;
|
|
|
|
PVOID OEMFont;
|
|
|
|
PSETUP_LOADER_BLOCK SetupLdrBlock;
|
|
|
|
PLOADER_PARAMETER_EXTENSION LpbExtension;
|
|
|
|
union
|
|
|
|
{
|
|
|
|
I386_LOADER_BLOCK I386;
|
|
|
|
} u;
|
|
|
|
} LOADER_PARAMETER_BLOCK, *PLOADER_PARAMETER_BLOCK;
|
|
|
|
|
|
|
|
#else
|
|
|
|
|
|
|
|
//
|
|
|
|
// FIXME: ReactOS ONLY
|
2005-11-22 04:57:45 +00:00
|
|
|
//
|
2005-06-26 01:08:55 +00:00
|
|
|
typedef struct _LOADER_MODULE
|
2005-06-18 23:33:40 +00:00
|
|
|
{
|
2005-06-26 01:08:55 +00:00
|
|
|
ULONG ModStart;
|
|
|
|
ULONG ModEnd;
|
|
|
|
ULONG String;
|
|
|
|
ULONG Reserved;
|
2005-06-18 23:33:40 +00:00
|
|
|
} LOADER_MODULE, *PLOADER_MODULE;
|
2005-06-19 07:03:18 +00:00
|
|
|
typedef struct _LOADER_PARAMETER_BLOCK
|
2005-06-18 23:33:40 +00:00
|
|
|
{
|
2005-06-26 01:08:55 +00:00
|
|
|
ULONG Flags;
|
|
|
|
ULONG MemLower;
|
|
|
|
ULONG MemHigher;
|
|
|
|
ULONG BootDevice;
|
|
|
|
ULONG CommandLine;
|
|
|
|
ULONG ModsCount;
|
|
|
|
ULONG ModsAddr;
|
|
|
|
UCHAR Syms[12];
|
|
|
|
ULONG MmapLength;
|
|
|
|
ULONG MmapAddr;
|
|
|
|
ULONG DrivesCount;
|
|
|
|
ULONG DrivesAddr;
|
|
|
|
ULONG ConfigTable;
|
|
|
|
ULONG BootLoaderName;
|
|
|
|
ULONG PageDirectoryStart;
|
|
|
|
ULONG PageDirectoryEnd;
|
|
|
|
ULONG KernelBase;
|
2005-06-18 23:33:40 +00:00
|
|
|
} LOADER_PARAMETER_BLOCK, *PLOADER_PARAMETER_BLOCK;
|
2005-11-27 20:18:33 +00:00
|
|
|
#endif
|
2005-06-18 23:33:40 +00:00
|
|
|
|
2005-11-22 04:57:45 +00:00
|
|
|
//
|
|
|
|
// Kernel Exports
|
|
|
|
//
|
|
|
|
#ifdef __NTOSKRNL__
|
2006-03-04 17:27:40 +00:00
|
|
|
extern HAL_PRIVATE_DISPATCH HalPrivateDispatchTable;
|
2005-11-22 04:57:45 +00:00
|
|
|
#else
|
2006-03-04 17:27:40 +00:00
|
|
|
extern PHAL_PRIVATE_DISPATCH HalPrivateDispatchTable;
|
2005-11-22 04:57:45 +00:00
|
|
|
#endif
|
2006-03-04 17:27:40 +00:00
|
|
|
extern ULONG KdComPortInUse;
|
2005-11-22 04:57:45 +00:00
|
|
|
|
2005-06-18 23:33:40 +00:00
|
|
|
#endif
|
2005-11-25 00:17:40 +00:00
|
|
|
#endif
|
2005-06-18 23:33:40 +00:00
|
|
|
|