VOID
HalFreeCommonBuffer(
IN PADAPTER_OBJECT AdapterObject,
IN ULONG Length,
IN PHYSICAL_ADDRESS LogicalAddress,
IN PVOID VirtualAddress,
IN BOOLEAN CacheEnabled
);
HalFreeCommonBuffer frees a common buffer and all resources it uses.
When a common buffer is to be released, the driver calls HalFreeCommonBuffer to unmap both its logical and virtual addresses. The parameters passed to HalFreeCommonBuffer must match exactly those passed to and returned from HalAllocateCommonBuffer. A driver cannot free part of an allocated common buffer.
Callers of HalFreeCommonBuffer must be running at IRQL <= DISPATCH_LEVEL. However, this routine is usually called when the driver is being unloaded and is running at IRQL PASSIVE_LEVEL.