Share via


HAL Library Routines

The routines and macros described in this section are described in alphabetical order.

For an overview of the functionality of these routines and macros, see Summary of Kernel-Mode Support Routines.

The following routines are reserved for system use. Do not use them in your driver.

HalAcquireDisplayOwnership

HalAllocateAdapterChannel. Use AllocateAdapterChannel instead.

HalAllocateCrashDumpRegisters

HalAllocateMapRegisters

HalGetScatterGatherList. Use GetScatterGatherList instead.

HalMakeBeep

HalPutDmaAdapter. Use PutDmaAdapter instead.

HalPutScatterGatherList. Use PutScatterGatherList instead.

The following obsolete routines are exported only to support existing drivers:

Obsolete routine Description
HalAllocateCommonBuffer

See AllocateCommonBuffer instead.

HalAssignSlotResources

Drivers of PnP devices are assigned resources by the PnP manager, which passes resource lists with each IRP_MN_START_DEVICE request. Drivers that must support a legacy device that cannot be enumerated by the PnP manager should use IoReportDetectedDevice and IoReportResourceForDetection.

HalFreeCommonBuffer

See FreeCommonBuffer instead.

HalGetAdapter

See IoGetDmaAdapter instead.

HalGetBusData

Instead, use IRP_MN_QUERY_INTERFACE to query the GUID_BUS_INTERFACE_STANDARD interface. This query request returns a function pointer to GetBusData, which can be used to read from the configuration space of a given device.

HalGetBusDataByOffset

Instead, use IRP_MN_QUERY_INTERFACE to query the GUID_BUS_INTERFACE_STANDARD interface. This query request returns a function pointer to GetBusData, which can be used to read from the configuration space of a given device.

HalGetDmaAlignmentRequirement

See GetDmaAlignment instead.

HalGetInterruptVector

Drivers of PnP devices are assigned resources by the PnP manager, which passes resource lists with each IRP_MN_START_DEVICE request. Drivers that must support a legacy device that cannot be enumerated by the PnP manager should use IoReportDetectedDevice and IoReportResourceForDetection.

HalReadDmaCounter

See ReadDmaCounter instead.

HalSetBusData

Instead, use IRP_MN_QUERY_INTERFACE to query the GUID_BUS_INTERFACE_STANDARD interface. This query request returns a function pointer to SetBusData, which can be used to write to the configuration space of a given device.

HalSetBusDataByOffset

Instead, use IRP_MN_QUERY_INTERFACE to query the GUID_BUS_INTERFACE_STANDARD interface. This query request returns a function pointer to SetBusData, which can be used to write to the configuration space of a given device.

HalTranslateBusAddress

The PnP manager passes lists of raw and translated resources in its IIRP_MN_START_DEVICE request for each device. Consequently, in most cases there is no need to translate bus addresses. However, if translation is required, use IRP_MN_QUERY_INTERFACE to query the GUID_BUS_INTERFACE_STANDARD interface. The query request returns a function pointer to TranslateBusAddress, which can be used to translates addresses on the parent bus to logical addresses.

 

These obsolete routines are included in the Ntddk.h header file.

The following routine is not supported and should not be used:

Routine Description
HalReturnToFirmware

Restarts the system.

Note  This routine is not supported and should not be used.
 

Routine The firmware routine to call. The only valid value for this parameter is HalRebootRoutine.

 

Windows performs resource balancing of PCI bus resources to open an address region for a plugged device. The rebalance operation causes the bus data for some driver's device to move dynamically (between IRP_MN_STOP_DEVICE and IRP_MN_START_DEVICE calls). Therefore, a driver must not access the bus data directly. Instead the driver must pass it down to the lower bus driver because it knows the location of the device.

For more information, see Stopping a Device to Rebalance Resources.

 

 

Send comments about this topic to Microsoft