2010-03-23 00:27:32 +00:00
|
|
|
/* Hardware Abstraction Layer Types */
|
|
|
|
|
|
|
|
$if (_NTDDK_)
|
|
|
|
typedef BOOLEAN
|
|
|
|
(NTAPI *PHAL_RESET_DISPLAY_PARAMETERS)(
|
2012-01-22 14:43:53 +00:00
|
|
|
_In_ ULONG Columns,
|
|
|
|
_In_ ULONG Rows);
|
2010-03-23 00:27:32 +00:00
|
|
|
|
|
|
|
typedef PBUS_HANDLER
|
|
|
|
(FASTCALL *pHalHandlerForBus)(
|
2012-01-22 14:43:53 +00:00
|
|
|
_In_ INTERFACE_TYPE InterfaceType,
|
|
|
|
_In_ ULONG BusNumber);
|
2010-03-23 00:27:32 +00:00
|
|
|
|
|
|
|
typedef VOID
|
|
|
|
(FASTCALL *pHalReferenceBusHandler)(
|
2012-01-22 14:43:53 +00:00
|
|
|
_In_ PBUS_HANDLER BusHandler);
|
2010-03-23 00:27:32 +00:00
|
|
|
|
|
|
|
typedef enum _HAL_QUERY_INFORMATION_CLASS {
|
|
|
|
HalInstalledBusInformation,
|
|
|
|
HalProfileSourceInformation,
|
|
|
|
HalInformationClassUnused1,
|
|
|
|
HalPowerInformation,
|
|
|
|
HalProcessorSpeedInformation,
|
|
|
|
HalCallbackInformation,
|
|
|
|
HalMapRegisterInformation,
|
|
|
|
HalMcaLogInformation,
|
|
|
|
HalFrameBufferCachingInformation,
|
|
|
|
HalDisplayBiosInformation,
|
|
|
|
HalProcessorFeatureInformation,
|
|
|
|
HalNumaTopologyInterface,
|
|
|
|
HalErrorInformation,
|
|
|
|
HalCmcLogInformation,
|
|
|
|
HalCpeLogInformation,
|
|
|
|
HalQueryMcaInterface,
|
|
|
|
HalQueryAMLIIllegalIOPortAddresses,
|
|
|
|
HalQueryMaxHotPlugMemoryAddress,
|
|
|
|
HalPartitionIpiInterface,
|
|
|
|
HalPlatformInformation,
|
|
|
|
HalQueryProfileSourceList,
|
|
|
|
HalInitLogInformation,
|
|
|
|
HalFrequencyInformation,
|
|
|
|
HalProcessorBrandString,
|
|
|
|
HalHypervisorInformation,
|
|
|
|
HalPlatformTimerInformation,
|
|
|
|
HalAcpiAuditInformation
|
|
|
|
} HAL_QUERY_INFORMATION_CLASS, *PHAL_QUERY_INFORMATION_CLASS;
|
|
|
|
|
|
|
|
typedef enum _HAL_SET_INFORMATION_CLASS {
|
|
|
|
HalProfileSourceInterval,
|
|
|
|
HalProfileSourceInterruptHandler,
|
|
|
|
HalMcaRegisterDriver,
|
|
|
|
HalKernelErrorHandler,
|
|
|
|
HalCmcRegisterDriver,
|
|
|
|
HalCpeRegisterDriver,
|
|
|
|
HalMcaLog,
|
|
|
|
HalCmcLog,
|
|
|
|
HalCpeLog,
|
|
|
|
HalGenerateCmcInterrupt,
|
|
|
|
HalProfileSourceTimerHandler,
|
|
|
|
HalEnlightenment,
|
|
|
|
HalProfileDpgoSourceInterruptHandler
|
|
|
|
} HAL_SET_INFORMATION_CLASS, *PHAL_SET_INFORMATION_CLASS;
|
|
|
|
|
|
|
|
typedef NTSTATUS
|
|
|
|
(NTAPI *pHalQuerySystemInformation)(
|
2012-01-22 14:43:53 +00:00
|
|
|
_In_ HAL_QUERY_INFORMATION_CLASS InformationClass,
|
|
|
|
_In_ ULONG BufferSize,
|
|
|
|
_Inout_updates_bytes_to_(BufferSize, *ReturnedLength) PVOID Buffer,
|
|
|
|
_Out_ PULONG ReturnedLength);
|
2010-03-23 00:27:32 +00:00
|
|
|
|
|
|
|
typedef NTSTATUS
|
|
|
|
(NTAPI *pHalSetSystemInformation)(
|
2012-01-22 14:43:53 +00:00
|
|
|
_In_ HAL_SET_INFORMATION_CLASS InformationClass,
|
|
|
|
_In_ ULONG BufferSize,
|
|
|
|
_In_ PVOID Buffer);
|
2010-03-23 00:27:32 +00:00
|
|
|
|
|
|
|
typedef VOID
|
|
|
|
(FASTCALL *pHalExamineMBR)(
|
2012-01-22 14:43:53 +00:00
|
|
|
_In_ PDEVICE_OBJECT DeviceObject,
|
|
|
|
_In_ ULONG SectorSize,
|
|
|
|
_In_ ULONG MBRTypeIdentifier,
|
|
|
|
_Out_ PVOID *Buffer);
|
2010-03-23 00:27:32 +00:00
|
|
|
|
|
|
|
typedef NTSTATUS
|
|
|
|
(FASTCALL *pHalIoReadPartitionTable)(
|
2012-01-22 14:43:53 +00:00
|
|
|
_In_ PDEVICE_OBJECT DeviceObject,
|
|
|
|
_In_ ULONG SectorSize,
|
|
|
|
_In_ BOOLEAN ReturnRecognizedPartitions,
|
|
|
|
_Out_ struct _DRIVE_LAYOUT_INFORMATION **PartitionBuffer);
|
2010-03-23 00:27:32 +00:00
|
|
|
|
|
|
|
typedef NTSTATUS
|
|
|
|
(FASTCALL *pHalIoSetPartitionInformation)(
|
2012-01-22 14:43:53 +00:00
|
|
|
_In_ PDEVICE_OBJECT DeviceObject,
|
|
|
|
_In_ ULONG SectorSize,
|
|
|
|
_In_ ULONG PartitionNumber,
|
|
|
|
_In_ ULONG PartitionType);
|
2010-03-23 00:27:32 +00:00
|
|
|
|
|
|
|
typedef NTSTATUS
|
|
|
|
(FASTCALL *pHalIoWritePartitionTable)(
|
2012-01-22 14:43:53 +00:00
|
|
|
_In_ PDEVICE_OBJECT DeviceObject,
|
|
|
|
_In_ ULONG SectorSize,
|
|
|
|
_In_ ULONG SectorsPerTrack,
|
|
|
|
_In_ ULONG NumberOfHeads,
|
|
|
|
_In_ struct _DRIVE_LAYOUT_INFORMATION *PartitionBuffer);
|
2010-03-23 00:27:32 +00:00
|
|
|
|
|
|
|
typedef NTSTATUS
|
|
|
|
(NTAPI *pHalQueryBusSlots)(
|
2012-01-22 14:43:53 +00:00
|
|
|
_In_ PBUS_HANDLER BusHandler,
|
|
|
|
_In_ ULONG BufferSize,
|
|
|
|
_Out_ PULONG SlotNumbers,
|
|
|
|
_Out_ PULONG ReturnedLength);
|
2010-03-23 00:27:32 +00:00
|
|
|
|
|
|
|
typedef NTSTATUS
|
2012-01-22 14:43:53 +00:00
|
|
|
(NTAPI *pHalInitPnpDriver)(VOID);
|
2010-03-23 00:27:32 +00:00
|
|
|
|
|
|
|
typedef struct _PM_DISPATCH_TABLE {
|
|
|
|
ULONG Signature;
|
|
|
|
ULONG Version;
|
|
|
|
PVOID Function[1];
|
|
|
|
} PM_DISPATCH_TABLE, *PPM_DISPATCH_TABLE;
|
|
|
|
|
|
|
|
typedef NTSTATUS
|
|
|
|
(NTAPI *pHalInitPowerManagement)(
|
2012-01-22 14:43:53 +00:00
|
|
|
_In_ PPM_DISPATCH_TABLE PmDriverDispatchTable,
|
|
|
|
_Out_ PPM_DISPATCH_TABLE *PmHalDispatchTable);
|
2010-03-23 00:27:32 +00:00
|
|
|
|
|
|
|
typedef struct _DMA_ADAPTER*
|
|
|
|
(NTAPI *pHalGetDmaAdapter)(
|
2012-01-22 14:43:53 +00:00
|
|
|
_In_ PVOID Context,
|
|
|
|
_In_ struct _DEVICE_DESCRIPTION *DeviceDescriptor,
|
|
|
|
_Out_ PULONG NumberOfMapRegisters);
|
2010-03-23 00:27:32 +00:00
|
|
|
|
|
|
|
typedef NTSTATUS
|
|
|
|
(NTAPI *pHalGetInterruptTranslator)(
|
2012-01-22 14:43:53 +00:00
|
|
|
_In_ INTERFACE_TYPE ParentInterfaceType,
|
|
|
|
_In_ ULONG ParentBusNumber,
|
|
|
|
_In_ INTERFACE_TYPE BridgeInterfaceType,
|
|
|
|
_In_ USHORT Size,
|
|
|
|
_In_ USHORT Version,
|
|
|
|
_Out_ PTRANSLATOR_INTERFACE Translator,
|
|
|
|
_Out_ PULONG BridgeBusNumber);
|
2010-03-23 00:27:32 +00:00
|
|
|
|
|
|
|
typedef NTSTATUS
|
2012-01-22 14:43:53 +00:00
|
|
|
(NTAPI *pHalStartMirroring)(VOID);
|
2010-03-23 00:27:32 +00:00
|
|
|
|
|
|
|
typedef NTSTATUS
|
|
|
|
(NTAPI *pHalEndMirroring)(
|
2012-01-22 14:43:53 +00:00
|
|
|
_In_ ULONG PassNumber);
|
2010-03-23 00:27:32 +00:00
|
|
|
|
|
|
|
typedef NTSTATUS
|
|
|
|
(NTAPI *pHalMirrorPhysicalMemory)(
|
2012-01-22 14:43:53 +00:00
|
|
|
_In_ PHYSICAL_ADDRESS PhysicalAddress,
|
|
|
|
_In_ LARGE_INTEGER NumberOfBytes);
|
2010-03-23 00:27:32 +00:00
|
|
|
|
|
|
|
typedef NTSTATUS
|
|
|
|
(NTAPI *pHalMirrorVerify)(
|
2012-01-22 14:43:53 +00:00
|
|
|
_In_ PHYSICAL_ADDRESS PhysicalAddress,
|
|
|
|
_In_ LARGE_INTEGER NumberOfBytes);
|
2010-03-23 00:27:32 +00:00
|
|
|
|
|
|
|
typedef BOOLEAN
|
|
|
|
(NTAPI *pHalTranslateBusAddress)(
|
2012-01-22 14:43:53 +00:00
|
|
|
_In_ INTERFACE_TYPE InterfaceType,
|
|
|
|
_In_ ULONG BusNumber,
|
|
|
|
_In_ PHYSICAL_ADDRESS BusAddress,
|
|
|
|
_Inout_ PULONG AddressSpace,
|
|
|
|
_Out_ PPHYSICAL_ADDRESS TranslatedAddress);
|
2010-03-23 00:27:32 +00:00
|
|
|
|
|
|
|
typedef NTSTATUS
|
|
|
|
(NTAPI *pHalAssignSlotResources)(
|
2012-01-22 14:43:53 +00:00
|
|
|
_In_ PUNICODE_STRING RegistryPath,
|
|
|
|
_In_opt_ PUNICODE_STRING DriverClassName,
|
|
|
|
_In_ PDRIVER_OBJECT DriverObject,
|
|
|
|
_In_ PDEVICE_OBJECT DeviceObject,
|
|
|
|
_In_ INTERFACE_TYPE BusType,
|
|
|
|
_In_ ULONG BusNumber,
|
|
|
|
_In_ ULONG SlotNumber,
|
|
|
|
_Inout_ PCM_RESOURCE_LIST *AllocatedResources);
|
2010-03-23 00:27:32 +00:00
|
|
|
|
|
|
|
typedef VOID
|
2012-01-22 14:43:53 +00:00
|
|
|
(NTAPI *pHalHaltSystem)(VOID);
|
2010-03-23 00:27:32 +00:00
|
|
|
|
|
|
|
typedef BOOLEAN
|
2012-01-22 14:43:53 +00:00
|
|
|
(NTAPI *pHalResetDisplay)(VOID);
|
2010-03-23 00:27:32 +00:00
|
|
|
|
|
|
|
typedef struct _MAP_REGISTER_ENTRY {
|
|
|
|
PVOID MapRegister;
|
|
|
|
BOOLEAN WriteToDevice;
|
|
|
|
} MAP_REGISTER_ENTRY, *PMAP_REGISTER_ENTRY;
|
|
|
|
|
|
|
|
typedef UCHAR
|
|
|
|
(NTAPI *pHalVectorToIDTEntry)(
|
|
|
|
ULONG Vector);
|
|
|
|
|
|
|
|
typedef BOOLEAN
|
|
|
|
(NTAPI *pHalFindBusAddressTranslation)(
|
2012-01-22 14:43:53 +00:00
|
|
|
_In_ PHYSICAL_ADDRESS BusAddress,
|
|
|
|
_Inout_ PULONG AddressSpace,
|
|
|
|
_Out_ PPHYSICAL_ADDRESS TranslatedAddress,
|
|
|
|
_Inout_ PULONG_PTR Context,
|
|
|
|
_In_ BOOLEAN NextBus);
|
2010-03-23 00:27:32 +00:00
|
|
|
|
|
|
|
typedef VOID
|
2012-01-22 14:43:53 +00:00
|
|
|
(NTAPI *pHalEndOfBoot)(VOID);
|
2010-03-23 00:27:32 +00:00
|
|
|
|
|
|
|
typedef PVOID
|
|
|
|
(NTAPI *pHalGetAcpiTable)(
|
2012-01-22 14:43:53 +00:00
|
|
|
_In_ ULONG Signature,
|
|
|
|
_In_opt_ PCSTR OemId,
|
|
|
|
_In_opt_ PCSTR OemTableId);
|
2010-03-23 00:27:32 +00:00
|
|
|
|
|
|
|
#if defined(_IA64_)
|
|
|
|
typedef NTSTATUS
|
|
|
|
(*pHalGetErrorCapList)(
|
2012-01-22 14:43:53 +00:00
|
|
|
_Inout_ PULONG CapsListLength,
|
|
|
|
_Inout_updates_bytes_(*CapsListLength) PUCHAR ErrorCapList);
|
2010-03-23 00:27:32 +00:00
|
|
|
|
|
|
|
typedef NTSTATUS
|
|
|
|
(*pHalInjectError)(
|
2012-01-22 14:43:53 +00:00
|
|
|
_In_ ULONG BufferLength,
|
|
|
|
_In_reads_bytes_(BufferLength) PUCHAR Buffer);
|
2010-03-23 00:27:32 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
typedef VOID
|
2012-01-22 14:43:53 +00:00
|
|
|
(NTAPI *PCI_ERROR_HANDLER_CALLBACK)(VOID);
|
2010-03-23 00:27:32 +00:00
|
|
|
|
|
|
|
typedef VOID
|
|
|
|
(NTAPI *pHalSetPciErrorHandlerCallback)(
|
2012-01-22 14:43:53 +00:00
|
|
|
_In_ PCI_ERROR_HANDLER_CALLBACK Callback);
|
2010-03-23 00:27:32 +00:00
|
|
|
|
|
|
|
#if 1 /* Not present in WDK 7600 */
|
|
|
|
typedef VOID
|
|
|
|
(FASTCALL *pHalIoAssignDriveLetters)(
|
2012-01-22 14:43:53 +00:00
|
|
|
_In_ struct _LOADER_PARAMETER_BLOCK *LoaderBlock,
|
|
|
|
_In_ PSTRING NtDeviceName,
|
|
|
|
_Out_ PUCHAR NtSystemPath,
|
|
|
|
_Out_ PSTRING NtSystemPathString);
|
2010-03-23 00:27:32 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
ULONG Version;
|
|
|
|
pHalQuerySystemInformation HalQuerySystemInformation;
|
|
|
|
pHalSetSystemInformation HalSetSystemInformation;
|
|
|
|
pHalQueryBusSlots HalQueryBusSlots;
|
|
|
|
ULONG Spare1;
|
|
|
|
pHalExamineMBR HalExamineMBR;
|
|
|
|
#if 1 /* Not present in WDK 7600 */
|
|
|
|
pHalIoAssignDriveLetters HalIoAssignDriveLetters;
|
|
|
|
#endif
|
|
|
|
pHalIoReadPartitionTable HalIoReadPartitionTable;
|
|
|
|
pHalIoSetPartitionInformation HalIoSetPartitionInformation;
|
|
|
|
pHalIoWritePartitionTable HalIoWritePartitionTable;
|
|
|
|
pHalHandlerForBus HalReferenceHandlerForBus;
|
|
|
|
pHalReferenceBusHandler HalReferenceBusHandler;
|
|
|
|
pHalReferenceBusHandler HalDereferenceBusHandler;
|
|
|
|
pHalInitPnpDriver HalInitPnpDriver;
|
|
|
|
pHalInitPowerManagement HalInitPowerManagement;
|
|
|
|
pHalGetDmaAdapter HalGetDmaAdapter;
|
|
|
|
pHalGetInterruptTranslator HalGetInterruptTranslator;
|
|
|
|
pHalStartMirroring HalStartMirroring;
|
|
|
|
pHalEndMirroring HalEndMirroring;
|
|
|
|
pHalMirrorPhysicalMemory HalMirrorPhysicalMemory;
|
|
|
|
pHalEndOfBoot HalEndOfBoot;
|
|
|
|
pHalMirrorVerify HalMirrorVerify;
|
|
|
|
pHalGetAcpiTable HalGetCachedAcpiTable;
|
|
|
|
pHalSetPciErrorHandlerCallback HalSetPciErrorHandlerCallback;
|
|
|
|
#if defined(_IA64_)
|
|
|
|
pHalGetErrorCapList HalGetErrorCapList;
|
|
|
|
pHalInjectError HalInjectError;
|
|
|
|
#endif
|
|
|
|
} HAL_DISPATCH, *PHAL_DISPATCH;
|
|
|
|
|
2014-05-11 23:11:16 +00:00
|
|
|
#ifdef _NTSYSTEM_
|
|
|
|
extern HAL_DISPATCH HalDispatchTable;
|
2010-03-23 00:27:32 +00:00
|
|
|
#define HALDISPATCH (&HalDispatchTable)
|
|
|
|
#else
|
2014-05-11 23:11:16 +00:00
|
|
|
__CREATE_NTOS_DATA_IMPORT_ALIAS(HalDispatchTable)
|
2014-09-14 15:49:35 +00:00
|
|
|
extern PHAL_DISPATCH HalDispatchTable;
|
2010-03-23 00:27:32 +00:00
|
|
|
#define HALDISPATCH HalDispatchTable
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#define HAL_DISPATCH_VERSION 3 /* FIXME: when to use 4? */
|
|
|
|
#define HalDispatchTableVersion HALDISPATCH->Version
|
|
|
|
#define HalQuerySystemInformation HALDISPATCH->HalQuerySystemInformation
|
|
|
|
#define HalSetSystemInformation HALDISPATCH->HalSetSystemInformation
|
|
|
|
#define HalQueryBusSlots HALDISPATCH->HalQueryBusSlots
|
|
|
|
#define HalReferenceHandlerForBus HALDISPATCH->HalReferenceHandlerForBus
|
|
|
|
#define HalReferenceBusHandler HALDISPATCH->HalReferenceBusHandler
|
|
|
|
#define HalDereferenceBusHandler HALDISPATCH->HalDereferenceBusHandler
|
|
|
|
#define HalInitPnpDriver HALDISPATCH->HalInitPnpDriver
|
|
|
|
#define HalInitPowerManagement HALDISPATCH->HalInitPowerManagement
|
|
|
|
#define HalGetDmaAdapter HALDISPATCH->HalGetDmaAdapter
|
|
|
|
#define HalGetInterruptTranslator HALDISPATCH->HalGetInterruptTranslator
|
|
|
|
#define HalStartMirroring HALDISPATCH->HalStartMirroring
|
|
|
|
#define HalEndMirroring HALDISPATCH->HalEndMirroring
|
|
|
|
#define HalMirrorPhysicalMemory HALDISPATCH->HalMirrorPhysicalMemory
|
|
|
|
#define HalEndOfBoot HALDISPATCH->HalEndOfBoot
|
|
|
|
#define HalMirrorVerify HALDISPATCH->HalMirrorVerify
|
|
|
|
#define HalGetCachedAcpiTable HALDISPATCH->HalGetCachedAcpiTable
|
|
|
|
#define HalSetPciErrorHandlerCallback HALDISPATCH->HalSetPciErrorHandlerCallback
|
|
|
|
#if defined(_IA64_)
|
|
|
|
#define HalGetErrorCapList HALDISPATCH->HalGetErrorCapList
|
|
|
|
#define HalInjectError HALDISPATCH->HalInjectError
|
|
|
|
#endif
|
|
|
|
|
|
|
|
typedef struct _HAL_BUS_INFORMATION {
|
|
|
|
INTERFACE_TYPE BusType;
|
|
|
|
BUS_DATA_TYPE ConfigurationType;
|
|
|
|
ULONG BusNumber;
|
|
|
|
ULONG Reserved;
|
|
|
|
} HAL_BUS_INFORMATION, *PHAL_BUS_INFORMATION;
|
|
|
|
|
|
|
|
typedef struct _HAL_PROFILE_SOURCE_INFORMATION {
|
|
|
|
KPROFILE_SOURCE Source;
|
|
|
|
BOOLEAN Supported;
|
|
|
|
ULONG Interval;
|
|
|
|
} HAL_PROFILE_SOURCE_INFORMATION, *PHAL_PROFILE_SOURCE_INFORMATION;
|
|
|
|
|
|
|
|
typedef struct _HAL_PROFILE_SOURCE_INFORMATION_EX {
|
|
|
|
KPROFILE_SOURCE Source;
|
|
|
|
BOOLEAN Supported;
|
|
|
|
ULONG_PTR Interval;
|
|
|
|
ULONG_PTR DefInterval;
|
|
|
|
ULONG_PTR MaxInterval;
|
|
|
|
ULONG_PTR MinInterval;
|
|
|
|
} HAL_PROFILE_SOURCE_INFORMATION_EX, *PHAL_PROFILE_SOURCE_INFORMATION_EX;
|
|
|
|
|
|
|
|
typedef struct _HAL_PROFILE_SOURCE_INTERVAL {
|
|
|
|
KPROFILE_SOURCE Source;
|
|
|
|
ULONG_PTR Interval;
|
|
|
|
} HAL_PROFILE_SOURCE_INTERVAL, *PHAL_PROFILE_SOURCE_INTERVAL;
|
|
|
|
|
|
|
|
typedef struct _HAL_PROFILE_SOURCE_LIST {
|
|
|
|
KPROFILE_SOURCE Source;
|
|
|
|
PWSTR Description;
|
|
|
|
} HAL_PROFILE_SOURCE_LIST, *PHAL_PROFILE_SOURCE_LIST;
|
|
|
|
|
|
|
|
typedef enum _HAL_DISPLAY_BIOS_INFORMATION {
|
|
|
|
HalDisplayInt10Bios,
|
|
|
|
HalDisplayEmulatedBios,
|
|
|
|
HalDisplayNoBios
|
|
|
|
} HAL_DISPLAY_BIOS_INFORMATION, *PHAL_DISPLAY_BIOS_INFORMATION;
|
|
|
|
|
|
|
|
typedef struct _HAL_POWER_INFORMATION {
|
|
|
|
ULONG TBD;
|
|
|
|
} HAL_POWER_INFORMATION, *PHAL_POWER_INFORMATION;
|
|
|
|
|
|
|
|
typedef struct _HAL_PROCESSOR_SPEED_INFO {
|
|
|
|
ULONG ProcessorSpeed;
|
|
|
|
} HAL_PROCESSOR_SPEED_INFORMATION, *PHAL_PROCESSOR_SPEED_INFORMATION;
|
|
|
|
|
|
|
|
typedef struct _HAL_CALLBACKS {
|
|
|
|
PCALLBACK_OBJECT SetSystemInformation;
|
|
|
|
PCALLBACK_OBJECT BusCheck;
|
|
|
|
} HAL_CALLBACKS, *PHAL_CALLBACKS;
|
|
|
|
|
|
|
|
typedef struct _HAL_PROCESSOR_FEATURE {
|
|
|
|
ULONG UsableFeatureBits;
|
|
|
|
} HAL_PROCESSOR_FEATURE;
|
|
|
|
|
|
|
|
typedef NTSTATUS
|
|
|
|
(NTAPI *PHALIOREADWRITEHANDLER)(
|
2012-01-22 14:43:53 +00:00
|
|
|
_In_ BOOLEAN fRead,
|
|
|
|
_In_ ULONG dwAddr,
|
|
|
|
_In_ ULONG dwSize,
|
|
|
|
_Inout_ PULONG pdwData);
|
2010-03-23 00:27:32 +00:00
|
|
|
|
|
|
|
typedef struct _HAL_AMLI_BAD_IO_ADDRESS_LIST {
|
|
|
|
ULONG BadAddrBegin;
|
|
|
|
ULONG BadAddrSize;
|
|
|
|
ULONG OSVersionTrigger;
|
|
|
|
PHALIOREADWRITEHANDLER IOHandler;
|
|
|
|
} HAL_AMLI_BAD_IO_ADDRESS_LIST, *PHAL_AMLI_BAD_IO_ADDRESS_LIST;
|
|
|
|
|
|
|
|
#if defined(_X86_) || defined(_IA64_) || defined(_AMD64_)
|
|
|
|
|
|
|
|
typedef VOID
|
2012-01-22 14:43:53 +00:00
|
|
|
(NTAPI *PHALMCAINTERFACELOCK)(VOID);
|
2010-03-23 00:27:32 +00:00
|
|
|
|
|
|
|
typedef VOID
|
2012-01-22 14:43:53 +00:00
|
|
|
(NTAPI *PHALMCAINTERFACEUNLOCK)(VOID);
|
2010-03-23 00:27:32 +00:00
|
|
|
|
|
|
|
typedef NTSTATUS
|
|
|
|
(NTAPI *PHALMCAINTERFACEREADREGISTER)(
|
2012-01-22 14:43:53 +00:00
|
|
|
_In_ UCHAR BankNumber,
|
|
|
|
_Inout_ PVOID Exception);
|
2010-03-23 00:27:32 +00:00
|
|
|
|
|
|
|
typedef struct _HAL_MCA_INTERFACE {
|
|
|
|
PHALMCAINTERFACELOCK Lock;
|
|
|
|
PHALMCAINTERFACEUNLOCK Unlock;
|
|
|
|
PHALMCAINTERFACEREADREGISTER ReadRegister;
|
|
|
|
} HAL_MCA_INTERFACE;
|
|
|
|
|
|
|
|
typedef enum {
|
|
|
|
ApicDestinationModePhysical = 1,
|
|
|
|
ApicDestinationModeLogicalFlat,
|
|
|
|
ApicDestinationModeLogicalClustered,
|
|
|
|
ApicDestinationModeUnknown
|
|
|
|
} HAL_APIC_DESTINATION_MODE, *PHAL_APIC_DESTINATION_MODE;
|
|
|
|
|
|
|
|
#if defined(_AMD64_)
|
|
|
|
|
|
|
|
struct _KTRAP_FRAME;
|
|
|
|
struct _KEXCEPTION_FRAME;
|
|
|
|
|
|
|
|
typedef ERROR_SEVERITY
|
|
|
|
(NTAPI *PDRIVER_EXCPTN_CALLBACK)(
|
2012-01-22 14:43:53 +00:00
|
|
|
_In_ PVOID Context,
|
|
|
|
_In_ struct _KTRAP_FRAME *TrapFrame,
|
|
|
|
_In_ struct _KEXCEPTION_FRAME *ExceptionFrame,
|
|
|
|
_In_ PMCA_EXCEPTION Exception);
|
2010-03-23 00:27:32 +00:00
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if defined(_X86_) || defined(_IA64_)
|
|
|
|
typedef
|
|
|
|
#if defined(_IA64_)
|
|
|
|
ERROR_SEVERITY
|
|
|
|
#else
|
|
|
|
VOID
|
|
|
|
#endif
|
|
|
|
(NTAPI *PDRIVER_EXCPTN_CALLBACK)(
|
2012-01-22 14:43:53 +00:00
|
|
|
_In_ PVOID Context,
|
|
|
|
_In_ PMCA_EXCEPTION BankLog);
|
2010-03-23 00:27:32 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
typedef PDRIVER_EXCPTN_CALLBACK PDRIVER_MCA_EXCEPTION_CALLBACK;
|
|
|
|
|
|
|
|
typedef struct _MCA_DRIVER_INFO {
|
|
|
|
PDRIVER_MCA_EXCEPTION_CALLBACK ExceptionCallback;
|
|
|
|
PKDEFERRED_ROUTINE DpcCallback;
|
|
|
|
PVOID DeviceContext;
|
|
|
|
} MCA_DRIVER_INFO, *PMCA_DRIVER_INFO;
|
|
|
|
|
|
|
|
typedef struct _HAL_ERROR_INFO {
|
|
|
|
ULONG Version;
|
|
|
|
ULONG InitMaxSize;
|
|
|
|
ULONG McaMaxSize;
|
|
|
|
ULONG McaPreviousEventsCount;
|
|
|
|
ULONG McaCorrectedEventsCount;
|
|
|
|
ULONG McaKernelDeliveryFails;
|
|
|
|
ULONG McaDriverDpcQueueFails;
|
|
|
|
ULONG McaReserved;
|
|
|
|
ULONG CmcMaxSize;
|
|
|
|
ULONG CmcPollingInterval;
|
|
|
|
ULONG CmcInterruptsCount;
|
|
|
|
ULONG CmcKernelDeliveryFails;
|
|
|
|
ULONG CmcDriverDpcQueueFails;
|
|
|
|
ULONG CmcGetStateFails;
|
|
|
|
ULONG CmcClearStateFails;
|
|
|
|
ULONG CmcReserved;
|
|
|
|
ULONGLONG CmcLogId;
|
|
|
|
ULONG CpeMaxSize;
|
|
|
|
ULONG CpePollingInterval;
|
|
|
|
ULONG CpeInterruptsCount;
|
|
|
|
ULONG CpeKernelDeliveryFails;
|
|
|
|
ULONG CpeDriverDpcQueueFails;
|
|
|
|
ULONG CpeGetStateFails;
|
|
|
|
ULONG CpeClearStateFails;
|
|
|
|
ULONG CpeInterruptSources;
|
|
|
|
ULONGLONG CpeLogId;
|
|
|
|
ULONGLONG KernelReserved[4];
|
|
|
|
} HAL_ERROR_INFO, *PHAL_ERROR_INFO;
|
|
|
|
|
|
|
|
#define HAL_MCE_INTERRUPTS_BASED ((ULONG)-1)
|
|
|
|
#define HAL_MCE_DISABLED ((ULONG)0)
|
|
|
|
|
|
|
|
#define HAL_CMC_INTERRUPTS_BASED HAL_MCE_INTERRUPTS_BASED
|
|
|
|
#define HAL_CMC_DISABLED HAL_MCE_DISABLED
|
|
|
|
|
|
|
|
#define HAL_CPE_INTERRUPTS_BASED HAL_MCE_INTERRUPTS_BASED
|
|
|
|
#define HAL_CPE_DISABLED HAL_MCE_DISABLED
|
|
|
|
|
|
|
|
#define HAL_MCA_INTERRUPTS_BASED HAL_MCE_INTERRUPTS_BASED
|
|
|
|
#define HAL_MCA_DISABLED HAL_MCE_DISABLED
|
|
|
|
|
|
|
|
typedef VOID
|
|
|
|
(NTAPI *PDRIVER_CMC_EXCEPTION_CALLBACK)(
|
2012-01-22 14:43:53 +00:00
|
|
|
_In_ PVOID Context,
|
|
|
|
_In_ PCMC_EXCEPTION CmcLog);
|
2010-03-23 00:27:32 +00:00
|
|
|
|
|
|
|
typedef VOID
|
|
|
|
(NTAPI *PDRIVER_CPE_EXCEPTION_CALLBACK)(
|
2012-01-22 14:43:53 +00:00
|
|
|
_In_ PVOID Context,
|
|
|
|
_In_ PCPE_EXCEPTION CmcLog);
|
2010-03-23 00:27:32 +00:00
|
|
|
|
|
|
|
typedef struct _CMC_DRIVER_INFO {
|
|
|
|
PDRIVER_CMC_EXCEPTION_CALLBACK ExceptionCallback;
|
|
|
|
PKDEFERRED_ROUTINE DpcCallback;
|
|
|
|
PVOID DeviceContext;
|
|
|
|
} CMC_DRIVER_INFO, *PCMC_DRIVER_INFO;
|
|
|
|
|
|
|
|
typedef struct _CPE_DRIVER_INFO {
|
|
|
|
PDRIVER_CPE_EXCEPTION_CALLBACK ExceptionCallback;
|
|
|
|
PKDEFERRED_ROUTINE DpcCallback;
|
|
|
|
PVOID DeviceContext;
|
|
|
|
} CPE_DRIVER_INFO, *PCPE_DRIVER_INFO;
|
|
|
|
|
|
|
|
#endif // defined(_X86_) || defined(_IA64_) || defined(_AMD64_)
|
|
|
|
|
|
|
|
#if defined(_IA64_)
|
|
|
|
|
|
|
|
typedef NTSTATUS
|
|
|
|
(*HALSENDCROSSPARTITIONIPI)(
|
2012-01-22 14:43:53 +00:00
|
|
|
_In_ USHORT ProcessorID,
|
|
|
|
_In_ UCHAR HardwareVector);
|
2010-03-23 00:27:32 +00:00
|
|
|
|
|
|
|
typedef NTSTATUS
|
|
|
|
(*HALRESERVECROSSPARTITIONINTERRUPTVECTOR)(
|
2012-01-22 14:43:53 +00:00
|
|
|
_Out_ PULONG Vector,
|
|
|
|
_Out_ PKIRQL Irql,
|
|
|
|
_Inout_ PGROUP_AFFINITY Affinity,
|
|
|
|
_Out_ PUCHAR HardwareVector);
|
2010-03-23 00:27:32 +00:00
|
|
|
|
|
|
|
typedef VOID
|
|
|
|
(*HALFREECROSSPARTITIONINTERRUPTVECTOR)(
|
2012-01-22 14:43:53 +00:00
|
|
|
_In_ ULONG Vector,
|
|
|
|
_In_ PGROUP_AFFINITY Affinity);
|
2010-03-23 00:27:32 +00:00
|
|
|
|
|
|
|
typedef struct _HAL_CROSS_PARTITION_IPI_INTERFACE {
|
|
|
|
HALSENDCROSSPARTITIONIPI HalSendCrossPartitionIpi;
|
|
|
|
HALRESERVECROSSPARTITIONINTERRUPTVECTOR HalReserveCrossPartitionInterruptVector;
|
|
|
|
HALFREECROSSPARTITIONINTERRUPTVECTOR HalFreeCrossPartitionInterruptVector;
|
|
|
|
} HAL_CROSS_PARTITION_IPI_INTERFACE;
|
|
|
|
|
|
|
|
#define HAL_CROSS_PARTITION_IPI_INTERFACE_MINIMUM_SIZE \
|
|
|
|
FIELD_OFFSET(HAL_CROSS_PARTITION_IPI_INTERFACE, \
|
|
|
|
HalFreeCrossPartitionInterruptVector)
|
|
|
|
|
|
|
|
#endif /* defined(_IA64_) */
|
|
|
|
|
|
|
|
typedef struct _HAL_PLATFORM_INFORMATION {
|
|
|
|
ULONG PlatformFlags;
|
|
|
|
} HAL_PLATFORM_INFORMATION, *PHAL_PLATFORM_INFORMATION;
|
|
|
|
|
|
|
|
#define HAL_PLATFORM_DISABLE_WRITE_COMBINING 0x01L
|
|
|
|
#define HAL_PLATFORM_DISABLE_PTCG 0x04L
|
|
|
|
#define HAL_PLATFORM_DISABLE_UC_MAIN_MEMORY 0x08L
|
|
|
|
#define HAL_PLATFORM_ENABLE_WRITE_COMBINING_MMIO 0x10L
|
|
|
|
#define HAL_PLATFORM_ACPI_TABLES_CACHED 0x20L
|
|
|
|
|
2010-03-27 10:45:04 +00:00
|
|
|
$endif (_NTDDK_)
|